c318f00t2

c318f00t2 - CSc 318 Test 2 Wednesday 25 October 2000...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSc 318 Test 2 Wednesday 25 October 2000 >>>>>>>>>>SUGGESTED ANSWERS<<<<<<<<<<<<<< 1. (15 pts) Prove the following theorem. Theorem. Given DFA’s M=(Q, Σ , s, F, δ ) and N=(Q, Σ , s, F’, δ ). If F F’ then L(M) L(N). x L(M) δ (s,x) F δ (s,x) F’ x L(N) 2. (20 pts) Let A be the regular expression given by A=(a a*)(ab) and let M be the NFA ({s,1,2}, {a,b}, s, {2}, {(s,a,1), (1,a,1), (1,b,2), (2,b,2)}). a. Give the language expression for L(A). >>> ({a} {a}*){a}{b} b. Prove that L(A) L(M) >>>First I note that (clearly) L(A)={a k b: k>0}. For a k b, ({s}, a k b) = ({1}, a k-1 b) =… ({1}, b) = {2} a k b L(M). c. Find some x L(M) - L(A), that is an x in the language of the NFA but not in L(A). >>>> abb L(M) - L(A), 3. (25 pts) Prove that {a, b, c}* is countable. Define the 1-1 (no onto, which is unnecessary) f:{a,b,c}* {0, 1, 2, …} by f( ε )=0, f(a)=1, f(b)=2, f(c)=3. In general, f( α 1 α 2 …. α
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

c318f00t2 - CSc 318 Test 2 Wednesday 25 October 2000...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online