29 views

Uploaded by mukesh.iitb087830

save

You are on page 1of 7

1. (10 + 5 = 15 points)

a. Let M1 = (Q1 , Σ, δ 1 , q0 1 , F1 ) and M2 = (Q2 , Σ, δ 2 , q0 2 , F2 ) be two DFA.

**Construct a DFA that accepts L(M1 ) - L(M2 ). (If A and B are two sets then
**

A - B = { x | x ∈ A and x ∈

/B}.

Give a precise description of how the new DFA is constructed in terms of the two original DFA’s.

New constructed DFA = M3 = (Q3 , Σ, δ 3 , s3 , F3 ),

where

Q3 = Q1 X Q2 = {(p, q) | p ∈ Q1 and q ∈ Q2 }

Σ = same Σ as in M1 and M2

F3 = F1 X (Q2 - F2 ) = {(p, q) | p ∈ F 1 and q ∈ Q2 and q ∈

/ F2 }

s3 = (s1 , s2 ),

and let:

δ 3 : Q3 X Σ → Q3

be the transition function defined by:

δ 3 ((p, q), a) = (δ 1 (p, a), δ 2 (q, a))

**(Note that this construction is very similar to the product construction on page 22 of the book
**

which is used for intersection; the only difference is the accepting states as defined in F3 )

**b. Give a DFA to accept the set of strings a’s and b’s where the number
**

of a’s is divisible by 3. Also give a DFA to accept the set of strings

of a’s and b’s where the number of b’s is even. Call these two DFA’s

M1 and M2 respectively.

(i) What is L(M1 ) - L(M2 ).

**L(M1 ) - L(M2 ) represents all strings where the number of a’s is
**

divisible by three and the number of b’s

is NOT even (AKA: the number of b’s is odd).

**You will not receive any credit if you do not apply the construction
**

you describe in your answer to part a.

DFA for M1:

1

DFA for M2: DFA for L(M1 ) . For each of the following four languages. (7 + 8 + 7 + 8 = 30 points). b. Assume Σ = {a. . 9.}. c} for the third language and for the fourth language. The set of strings that do not contain three consecutive a’s. b} for the first two languages. give a finite state automaton to accept it. .. 2 .L(M2 ): (constructed using method described in 1a) 2.. . assume Σ = {0. Σ = {a. 1. a.

For example. The set of strings (of length at least three) where any contiguous string of length three contains at least 2 a’s. aababa should not be accepted.b. 3 .

set of strings that contain exactly 2 occurences of ‘a’ and 2 or more occurences of ‘b’.c.. starting with finding the DFAs for the set with exactly 2 occurences of ’a’ and the set with 2 or more occurences of ’b’. then using the product construction to find the intersection between the two sets: DFA for set of strings with exactly 2 occurences of ’a’: DFA for set of strings with 2 or more occurences of ’b’: DFA for ’product’/intersection of above two DFAs..this results in the DFA for the set of strings that contains exactly 2 occurences of ’a’ and 2 or more occurences of ’b’: 4 . This is done using the product construction described on page 22 of book.

01. Every literal has at least one digit before and after the decimal point. 5 . 0. and ’d’ represents a ’decimal point’. In addition.. for example.1000 are not. 1. .d.0... The text in each state represents the regular expression that corresponds to strings in the state.000.0.1. 0. ’Error State 1’ and ’Error State 2’ could be combined into a single state.12. and 002345. ’#’ represents a number 1-9. In the below FSA: ’0’ represents the number 0.01. Thus.0. they are split here to make the FSA more clear. 1. and 123005.0 are legal. but 0. 23. Fixed-decimal literals with no superfluous leading or trailing zeros. 123.

show clearly which subset of {s.. (3 + 6 + 6 = 15 points) a.): (a): Give a string beginning with ‘a’ that is NOT accepted: abbbb (b): Construct an equivalent deterministic automaton using subset construction. 6 . v} corresponds to each state of the deterministic automaton. u. u. t. v from left to right. Exercise 3 on Page 316 of text: Consider the following nondeterministic finite automaton (shown on page 316 of book.3. Omit inaccessible states. t. Assuming the states are named s..

7 . Exercise 5b (you don’t need to answer 5a) on Pages 316-317 of the textbook: Convert the nondeterministic finite automata on the top of page 317 in the text to an equivalent deterministic one using subset construction.b.

- Introduction to LinguisticsUploaded bySorayaHermawan
- v cUploaded byLoredana Ioana Draghici
- tmp14AC.tmpUploaded byFrontiers
- Parekh DfaUploaded byakor123
- Nasihah.docxUploaded bySiehah Nasihah
- Methodological Criteria in Implementing Literary Texts in English Teaching ClassroomUploaded byFilip Ristić
- Automata_DFA.pdfUploaded byArvind Kumar Rana
- 214 Midterm a SolutionUploaded byabdal113
- Information Technology Full Paper 2005Uploaded bymaniteja14
- csci3255 HW 2-1Uploaded bywaqas_raz
- Cascade Handouts Primary (Final) CEFR.docxUploaded byMesut Ali
- 21_33Uploaded byAngel Orozco
- Cs73 Solved Assignment Ignou 2012Uploaded byraghu_sharma_26
- Speaking SkillUploaded bycarloscristian65
- Secondary 1st Grade Unit 5BUploaded byArturo Gallardo
- Language - Wikipedia, The Free EncyclopediaUploaded byDaniel Stain Ferreira
- year782016unitoutlinesemester1french docUploaded byapi-320671726
- Stages of Reading DevelopmentUploaded byKaruna Kumar
- Factors That Affect Reading Progress IntelligenceUploaded bySarah Nicole Briones
- 8052Uploaded byangwulan
- anderson di lesson planUploaded byapi-439491093
- Evolutionary MathsUploaded bySamar Hamady
- The Importance of Teaching Culture in the Foreign Language ClassroomUploaded byPaola Lozano
- Barriers of CommunicationUploaded byvithanibharat
- Lesson Plan SpeakingUploaded bylallisara82

- 57522 Suffixes and PrefixezUploaded byeric
- AutoCAD 2005 Tips and TricksUploaded bySchmoe Joe
- sap BO NEWUploaded bysatishkrishnar
- Jamaat Ul Muslimeen ExposedUploaded bysyedshoeb
- The Effect of Classroom Performance Assessment on EFL Students' Basic and Inferential Reading SkillsUploaded byAbdel-Salam Abdel-Khalek El-Koumy
- Book of Enoch - WikipediaUploaded byDimGoan
- AI FinalExamUploaded byAhmed Adel
- OL-23922_SGSN_AdminUploaded byaggarwal.samrat245
- APA style paper exampleUploaded byNancy A. Henry
- sh080921engiUploaded byRitesh Sharma
- What are Socket Connections in c#Uploaded byapex_tgi
- Duino Elegies RilkeUploaded byBob Jenkins
- Linux Journal - System Administration (March 2015)Uploaded byIpse Lute
- Life With QmailUploaded bySen Ramesh
- system informationUploaded byBhupesh Pandey
- Molefi_Kete%20Asante_CVUploaded byAdelakin Agbonbioka
- HafezUploaded byhamid
- Crystal Reports TutorialUploaded bymohammed_1401
- Workbook 2Uploaded byarupsmartlearnwebtv
- Instruction Manual for Juki BHM LBH1790Uploaded byragadit
- Demystifying the IBM EDW ModelUploaded byd_seng
- Looking Closer at the Textus ReceptusUploaded byJ. Daniel Spratlin
- literacy intervention planUploaded byapi-239677720
- Android Lab 3Uploaded byAbdullah Salem
- The Armor of God – Prayers and VisualizationsUploaded byMonte Macaleister
- Output 1Uploaded byavenkat111
- If Not Sola Scriptura Then What (Arakaki)Uploaded byEastern Orthodox
- Documentation-Multiple Routing Configurations for Fast IP NeUploaded bysnehadayani
- Como Funciona a WebUploaded byHenrique Hermeto
- Laplace EquationUploaded byPorfirio Hernandez