c318f00t2

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

• Notes
• nizhes
• 2

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

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 …. α n )= α 1 + 4 α 2 + 4 2 α 3 + … +4 n-1 α n Now, to show that f is 1-1, suppose that f( α 1 α 2 …. α n )= f( β 1 β 2 …. β m ), then α 1 + 4 α 2 + 4 2 α 3 + … +4 n-1 α n = β 1 + 4 β 2 + 4 2 β 3 + … +4 n-1 β m . Taking the remainder of both sides after division by 4 gives

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

This is the end of the preview. Sign up to access the rest of the document.
• Spring '08
• varies

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern