Question

Given a language LL, define LiL^i as follows:

L0={ε}Li=Li−1⋅Lfor all i>0\begin{aligned} L^0 &= \{\varepsilon\} \\ L^i &= L^{i-1} \cdot L \quad \text{for all } i > 0 \end{aligned}

The order of a language LL is defined as the smallest kk such that Lk=Lk+1L^k = L^{k+1}.

Consider the language L1L_1 (over alphabet {0}\{0\}) accepted by the following automaton.

Three-state finite automaton accepting language L1 over alphabet {0}

The order of L1L_1 is _____.

Official answer and solution
Official answer
2
From
Official GATE 2018 answer key

Solution

Characterize language L1L_1 from the automaton and find the smallest exponent where power concatenation stabilizes.

Examine the automaton for language L1L_1 over {0}\{0\}:

  • State 0 is the start state and is accepting   ⟹  ε∈L1\implies \varepsilon \in L_1 (string of length 0).
  • On '0', state 0 transitions to state 1, which is accepting   ⟹  0∈L1\implies 0 \in L_1 (length 1).
  • On '0', state 1 transitions to state 2, which is non-accepting   ⟹  00∉L1\implies 00 \notin L_1 (length 2).
  • On '0', state 2 transitions back to state 1 (accepting)   ⟹  000∈L1\implies 000 \in L_1 (length 3).
    Continuing around the 2-cycle between states 1 and 2, all odd lengths 1,3,5,…1, 3, 5, \dots are accepted, while even positive lengths 2,4,6,…2, 4, 6, \dots are rejected.

Thus, L1={0n∣n=0 or n is odd}={ε,0,03,05,07,… }L_1 = \{0^n \mid n = 0 \text{ or } n \text{ is odd}\} = \{\varepsilon, 0, 0^3, 0^5, 0^7, \dots\}.

Compute powers of L1L_1:

  • L11=L1={ε,0,03,05,… }L_1^1 = L_1 = \{\varepsilon, 0, 0^3, 0^5, \dots\}
  • L12=L1⋅L1L_1^2 = L_1 \cdot L_1: Contains all lengths formed by the sum of two lengths from {0,1,3,5,… }\{0, 1, 3, 5, \dots\}.
    • Even lengths: 1+1=21 + 1 = 2, 1+3=41 + 3 = 4, 1+5=61 + 5 = 6, and in general 1+(2m−1)=2m1 + (2m-1) = 2m for any m≥1m \ge 1.
    • Odd lengths: 0+(2m+1)=2m+10 + (2m+1) = 2m+1 for any m≥0m \ge 0.
      Thus, L12L_1^2 contains all non-negative integer powers: L12={0}∗L_1^2 = \{0\}^*.

Since L12={0}∗L_1^2 = \{0\}^*, any further power is:

L13=L12⋅L1={0}∗⋅L1={0}∗=L12L_1^3 = L_1^2 \cdot L_1 = \{0\}^* \cdot L_1 = \{0\}^* = L_1^2

Because L11≠L12L_1^1 \neq L_1^2 (as 00∉L1100 \notin L_1^1 but 00∈L1200 \in L_1^2) and L12=L13L_1^2 = L_1^3, the smallest integer kk satisfying L1k=L1k+1L_1^k = L_1^{k+1} is k=2k = 2.

Final answer

2

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2018 Computer Science and Information Technology (CS)
Question
62 of 65, printed as CS Q.52
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.