# hw1sol - CS 181 Winter 2007 Formal Languages and Automata...

• Homework Help
• 4

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

CS 181 — Winter 2007 Formal Languages and Automata Theory Problem Set #1 Solutions Problem 1.1. a. Show that Σ 1 Σ 2 implies Σ * 1 Σ * 2 . Is the converse true? Solution By definition, the language Σ * consists of all words over the alphabet Σ. Equivalently, every word w Σ * can be written as w = w 1 w 2 · · · w n where each w i Σ. We can use this definition to prove the statement as follows: Assume that Σ 1 Σ 2 . Fix w Σ * 1 . Then, by the definition of Σ * 1 , we can write w = w 1 w 2 · · · w n where each w i Σ 1 . But since Σ 1 Σ 2 , we also have that each w i Σ 1 Σ 2 . Since we can write w = w 1 w 2 · · · w n where each w i Σ 2 , it follows that w Σ * 2 . Notice our choice of w was arbitrary, so we can conclude that Σ 1 Σ 2 . Intuitively, what we have shown is the following: If all symbols in an alphabet Σ 1 appear in a larger alphabet Σ 2 , then any word we can write using symbols in Σ 1 we can also write using those same symbols in Σ 2 . The converse of the statement reads as follows: Σ * 1 Σ * 2 implies Σ 1 Σ 2 . It turns out that this statement is also true! The proof is as follows: Let Σ * 1 Σ * 2 . Assume, by way of contradiction, that Σ 1 6⊆ Σ 2 . In particular, there exists a symbol σ Σ 1 such that σ / Σ 2 . Now, consider the word consisting of just on symbol, σ . Clearly, σ Σ * 1 since σ Σ 1 . However, since σ / Σ 2 , we know σ / Σ * 2 . Thus, there exists some word in Σ * 1 and doesn’t appear in Σ * 2 . This contradicts the fact that Σ * 1 Σ * 2 . We can thus conclude that Σ 1 Σ 2 . b. Let ( Q, Σ , δ, q 0 , F ) be an FA. Define ˆ δ : Q × Σ * Q by induction as follows: ˆ δ ( q, ) = q ˆ δ ( q, w.a ) = δ ( ˆ δ ( q, w ) , a ) where w Σ * and a Σ. Argue (using induction) that a word w Σ * is accepted iff ˆ δ ( q 0 , w ) F . Solution Recall that a FA ( Q, Σ , δ, q 0 , F ) accepts a word w = w 1 w 2 · · · w n if there exists a sequence of states r 0 , r 1 , . . . , r n Q such that (1) r 0 = q 0 , (2) r i +1 = δ ( r i , w i +1 ) for i = 0 , . . . , n - 1, and (3) r n F .

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
• griebach
• WI, Automata theory, input letter

{[ 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