{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Introduction to the Theory of Computation

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

View Full Document Right Arrow Icon
Theory of Computation — CSE 105 Section A Quiz 1 July 7, 1999 Time: 30 Minutes Maximum Points: 10 NAME: Student ID: Answer the following questions: 1. 4 points Write a deterministic finite automaton to recognize each of the following languages. each in is immediately preceded and immediately followed by a . has both and as substrings b a a a b a,b b a b b a a b a b b b a,b
Background image of page 1

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

View Full Document Right Arrow Icon
2. 3 points Show that if is a regular language, then so is where . is the reverse string of the string . Present a cogent argument outlining the main ideas. Hint: Make use of nondeterminism. Since is a regular language there is a NFA, say accepting it. To obtain (an automaton accepting we proceed as follows: (a) the states of are the same as of (b) the alphabet is the same (c) the transition function is obtained by reversing all arrows in
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: (d) to obtain the initial state of add a new state and add-transitions too all states which were final states in . The newly added state is the initial state of . (e) there is only one final state, namely the state which was initial state in Why this works: A word is accepted in if there is a path from the initial state to the final state. But given the con-struction this means that in there is a path from the initial state to one of the final states. Therefore if if . The above argument works the other way around, therefore implies . This proves that 3. 3 points Design a nondeterministic finite automaton for the following language. has 101 as a substring 1 1 0,1 0,1...
View Full Document

{[ snackBarMessage ]}