{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Disc2quest

# Disc2quest - i and s j such that i!=j By(2 it is observable...

This preview shows page 1. Sign up to view the full content.

2 nd  Week Discussion Session Example Question QUESTION: Prove that there is no DFA that decides the language L={x | x is a string  which has an equal number of a's and b's} over an alphabet ∑   {a,b}. ANSWER: This question can be solved using proof by contradiction. Assume that there  is a DFA M which decides L. Consider a string of the form a n b m  such that  n,m   Z + . (1)It is obvious that a n b is in L if and only if n=m. Let s n  be the  state of the machine after it processes the prefix a n . (2) By (1), we can say if  the machine M is in state s n  it accepts the suffix b m  if and only if m=n. Now  consider two states s
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: i and s j such that i!=j. By (2), it is observable that s i cannot be the same state as s j because when M is in state s i , it accepts the suffix b i while when it is in state s j it rejects the suffix b i . Consequently each s n is a unique state. Since there are an infinite number of s n 's and each of them are unique states, the machine M must have an infinite number of states. However, this contradicts with our initial assumption that M is a DFA therefore our initial assumption cannot be true. Hence there is no DFA that decides the language L....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online