Question
Official answer and solution
- Official answer
- 2
- From
- Official GATE 2018 answer key
Solution
Characterize language from the automaton and find the smallest exponent where power concatenation stabilizes.
Examine the automaton for language over :
- State 0 is the start state and is accepting (string of length 0).
- On '0', state 0 transitions to state 1, which is accepting (length 1).
- On '0', state 1 transitions to state 2, which is non-accepting (length 2).
- On '0', state 2 transitions back to state 1 (accepting) (length 3).
Continuing around the 2-cycle between states 1 and 2, all odd lengths are accepted, while even positive lengths are rejected.
Thus, .
Compute powers of :
- : Contains all lengths formed by the sum of two lengths from .
- Even lengths: , , , and in general for any .
- Odd lengths: for any .
Thus, contains all non-negative integer powers: .
Since , any further power is:
Because (as but ) and , the smallest integer satisfying is .
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.