سوال ۴۸ کنکور ارشد مهندسی کامپیوتر ۱۴۰۲
تعداد حالات ماشین متناهی قطعی (DFA) کمینه زبان چندتاست؟
پاسخ صحیح: گزینهٔ D — ۱۰۲
Because is bounded (), is a finite language, hence regular, and a minimal DFA exists. Build it directly over and count the live states plus one trap (dead) state.
Reading the 's. From the start state, scanning for lands in a distinct state :
These are states. is the start state and is accepting (since gives ). They are pairwise distinguishable: from the string is accepted but () is not.
Reading one more from would give , which can never complete to a word of (), so trap.
Reading the 's. From with , reading a leaves more 's still required. Track the remaining count with states :
The largest remaining value occurs from , giving , so we need — that is states. is accepting (it marks ). Each needs exactly to accept, so the states are pairwise distinguishable and distinct from every . Any read while in a state, or a read from , goes to the trap.
Trap state. One non-accepting dead state absorbs all illegal continuations (, , with , an after a , etc.). It is required for completeness of the DFA and is distinct from all the above.
Total:
So the minimal DFA has states — option 4.
Pitfall: Don't stop at the -counting states (option 2) or forget the mandatory trap state. A complete DFA needs the dead state, and the descending -counter contributes a separate chain of states.