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

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

View Full Document Right Arrow Icon
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
Image of page 1

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

View Full Document Right Arrow Icon
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
Image of page 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 }
Image of page 3

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

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern