東京大学 情報理工学系研究科 コンピュータ科学専攻 2015年2月実施 問題2
Author
kainoj, 祭音Myyura
Description
Let us consider nondeterministic finite automata (NFA) and deterministic finite automata (DFA) over the alphabet . For example, the NFA shown below
recognizes the language
Here denotes the set of words over .
Answer the following questions.
(1) Present an NFA, with at most four states, that recognizes the language
Here denotes the length of the word .
(2) Present a DFA that recognizes the language in Question (1).
(3) A DFA that recognizes the language has no less than states. Prove this fact.
(4) Argue for the following statement:
- To recognize the same language, a DFA possibly needs the number of states that is exponentially bigger than an NFA does.
题目描述
在字母表 上考虑非确定性有限自动机(NFA)和确定性有限自动机(DFA)。题图中的 NFA 识别语言
其中 表示 上所有字符串的集合。回答下列问题。
(1)构造一个状态数不超过 的 NFA,使其识别语言
其中 表示字符串 的长度。
(2)构造一个识别第(1)问中语言 的 DFA。
(3)证明:任何识别 的 DFA 都至少需要 个状态。
(4)论证:为了识别同一种语言,DFA 所需的状态数有可能比 NFA 所需的状态数呈指数级增长。
Kai
(1)
(2)
(3) + (4)
Define
Intuitively, a DFA needs to remember every possible length- suffix, of which there are .
Suppose, for contradiction, that a DFA recognizing has fewer than states. By the pigeonhole principle, two distinct words and reach the same state. Choose a position with ; by symmetry assume and .
Append to both words. Their -th last letters are then and , so while . But the two words started the suffix in the same DFA state, so the DFA must give them the same result, a contradiction.
Thus all length- words are pairwise distinguishable, and every DFA for has at least states.
- (3): Let . Then DFA recognizing has no less than states.
- (4): An NFA for uses states: it loops in the initial state and guesses the relevant , then counts the remaining symbols. The lower bound above shows that an equivalent DFA needs at least states.