سوال ۴۷ کنکور ارشد مهندسی کامپیوتر ۱۴۰۲
آیا میتوان هر ماشین متناهی قطعی (DFA) را به DFA ای معادل تبدیل کرد به گونهای که حالت شروع آن هیچ یال ورودی نداشته باشد؟ (یعنی تنها یال ورودی همان پیکان شروع باشد.)
پاسخ صحیح: گزینهٔ A — بله همیشه میتوان این کار را کرد.
Claim. Every DFA has an equivalent DFA whose start state has no incoming transitions. So the answer is always yes (option 1).
Construction. Add one fresh state and make it the new start state. Give it exactly the same outgoing behavior as the old start state: Keep every original transition unchanged, and make the new state accepting exactly when the old start state was, to preserve the empty string: Formally with if , else .
Why it works.
- is brand new, and no transition is ever directed into it (the old transitions are untouched and none of them targeted a state that did not exist), so has no incoming edge.
- For any input with , the first move sends , after which is in an ordinary state of and follows 's transitions identically. Hence .
- For , acceptance is decided by the start state itself, and we set accepting iff was, so is handled correctly too.
Therefore , and is a DFA whose start state has no incoming edge. The transformation needs no assumption about self-loops or edges from final states, which rules out options 3 and 4; and it works for every language, ruling out option 2.
Exam trick: "Make the start state un-enterable" is a standard normal-form move — just clone the start state into a fresh, never-targeted state and copy its accepting status to keep . The old start state may still keep its incoming edges; that is fine because it is no longer the start state.