1.Design a DFA for L = {w∈{0,1}|w contains both 00 and 11 as substrings}.
2.Design an NFA for L = {w∈{0,1}|w contains an equal number of occurrences of the substrings 01 and 10.}
3.Design regular expressions for languages over {a,b}.
(1)All string having at least two occurrences of the substring aa.
(2)All string that do not end with substrings aa or bb.
4.Prove that the language L is not regular with pumping lemma.L = {w∈{0,1}|w has the same number of substrings 00 and 11}.
5.Let h:Σ -> Σ be a homomorphism:任意的a∈Σ,h(a)=aa.Please give a formal construction of the DFA for h(L) = formal the DFA that accepts the regular language L over Σ.
6.Design a context-free grammar for the language L = {w∈{0,1}|x has two nonempty blocks of 0s of the same length}.
7.Design a deterministic PDA for L = {}。
8.Begin with the grammar:S->ASA|A|e A->00|e
(1)Eliminate e-productions.
(2)Eliminate unit productions into the result grammar.
(3)Please convert the result grammar into Chomsky Normal Form.
9.Consider a PDA P with start state q,start symbol Z in the stack and the following tranistion rules.Please covert P to an equivalent CFG.
δ(q,0,Z)={(q,X)}
δ(q,0,X)={(q,XX)}
δ(q,1,Z)={(r,X)}
δ(r,0,X)={(r,e)}
10.Design a Turing machine for L = {|k=ij and k>0}.
哈工大形式语言与自动机2022期末试题
最新推荐文章于 2023-11-17 20:30:27 发布