homework-1-sol

# homework-1-sol - 11-711 Algorithms for NLP Homework...

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

11-711: Algorithms for NLP Homework Assignment #1: Formal Language Theory Solutions Out: September 10, 2009 Due: September 24, 2009 Problem 1 [10 points] Prove that, for any deterministic FSA A = ( Q, Σ , δ, q 0 , F ), ˆ δ ( q, xy ) = ˆ δ ˆ δ ( q, x ) , y for x, y Σ * . Use the definition of ˆ δ provided in lecture: (1) ˆ δ ( q, ) = q (2) ˆ δ ( q, xσ ) = δ ˆ δ ( q, x ) , σ where is the empty string, x Σ * , and σ Σ. Solution The proof is by induction on | y | . Base: | y | = 0. If | y | = 0, then y = . ˆ δ ( q, xy ) = ˆ δ ( q, x ) by definition of y = ˆ δ ˆ δ ( q, x ) , by definition (1) of ˆ δ = ˆ δ ˆ δ ( q, x ) , y by definition of y Induction: | y | = n + 1 . We rewrite y as where w Σ * and σ Σ. Thus | w | = n , and we assume by the inductive hypothesis that ˆ δ ( q, xw ) = ˆ δ ˆ δ ( q, x ) , w . ˆ δ ( q, xy ) = ˆ δ ( q, xwσ ) by definition of y = δ ˆ δ ( q, xw ) , σ by definition (2) of ˆ δ = δ ˆ δ ˆ δ ( q, x ) , w , σ by inductive hypothesis = ˆ δ ˆ δ ( q, x ) , wσ by definition (2) of ˆ δ = ˆ δ ˆ δ ( q, x ) , y by definition of y 1

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

View Full Document
Problem 2 [20 points] Give deterministic FSAs accepting the following languages: 1. [6 points] The set of strings over { a, b, c } in which all the a s precede the b s, which in turn precede the c s. It is possible that there are no a s, b s, or c s. (Sudkamp Problem 6.5) 2. [7 points] The set of strings over { a, b, c } in which every b is immediately followed by at least one c . (Sudkamp Problem 6.10) 3. [7 points] The set of strings over { 0 , 1 } such that the third symbol from the right end is the same as the last symbol. 2
Please note that there are simpler solutions for this question than the one given above. Problem 3 [20 points] Give non-deterministic FSAs (possibly with moves) accepting the following languages: 1. [10 points] The set of strings over { a, b }

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

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