homework-1-sol

homework-1-sol - 11-711: Algorithms for NLPHomework...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 11-711: 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 on|y|.Base:|y|= 0.If|y|= 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σ∈Σ. Thus|w|=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]Givenon-deterministicFSAs (possibly withmoves) accepting the following languages:1.[10 points]The set of strings over{a, b}whose third and third-to-last 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.

Page1 / 6

homework-1-sol - 11-711: Algorithms for NLPHomework...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online