This preview shows pages 1–4. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 11711: Algorithms for NLPHomework Assignment #1: Formal Language TheorySolutionsOut: September 10, 2009Due: September 24, 2009Problem 1 [10 points]Prove that, for anydeterministicFSAA= (Q,Σ, δ, q, F),ˆδ(q, xy) =ˆδˆδ(q, x), yforx, y∈Σ*. Use the definition ofˆδprovided in lecture:(1)ˆδ(q,) =q(2)ˆδ(q, xσ) =δˆδ(q, x), σwhereis the empty string,x∈Σ*, andσ∈Σ.SolutionThe proof is by induction ony.Base:y= 0.Ify= 0, theny= .ˆδ(q, xy)=ˆδ(q, x)by definition ofy=ˆδˆδ(q, x),by definition (1) ofˆδ=ˆδˆδ(q, x), yby definition ofyInduction:y=n+ 1.We rewriteyaswσwherew∈Σ*andσ∈Σ. Thusw=n, and weassume by the inductive hypothesis thatˆδ(q, xw) =ˆδˆδ(q, x), w.ˆδ(q, xy)=ˆδ(q, xwσ)by definition ofy=δˆδ(q, xw), σby definition (2) ofˆδ=δˆδˆδ(q, x), w, σby inductive hypothesis=ˆδˆδ(q, x), wσby definition (2) ofˆδ=ˆδˆδ(q, x), yby definition ofy1Problem 2 [20 points]GivedeterministicFSAs accepting the following languages:1.[6 points]The set of strings over{a, b, c}in which all theas precede thebs, which in turnprecede thecs. It is possible that there are noas,bs, orcs. (Sudkamp Problem 6.5)2.[7 points]The set of strings over{a, b, c}in which everybis immediately followed by at leastonec. (Sudkamp Problem 6.10)3.[7 points]The set of strings over{,1}such that the third symbol from the right end is thesame as the last symbol.2Please note that there are simpler solutions for this question than the one given above.Problem 3 [20 points]GivenondeterministicFSAs (possibly withmoves) accepting the following languages:1.[10 points]The set of strings over{a, b}whose third and thirdtolast symbols are bothb....
View
Full
Document
This note was uploaded on 10/01/2009 for the course CS 11711 taught by Professor Alon during the Fall '09 term at Carnegie Mellon.
 Fall '09
 Alon
 Algorithms

Click to edit the document details