Download presentation
Presentation is loading. Please wait.
Published byRobert Bradley Modified over 5 years ago
1
THEORY OF COMPUTATION 06 NUMBER OF STATES
2
IMPORTANT The number of distinct states the finite state machine needs in order to recognize a language is related to the number of distinct strings that must be distinguished from each other.
3
EXAMPLE (0+1)*(000+111)(0+1)* q4 q5 q0 q1 q2 q3 11 011011 00011 1 1 1
0,1 1 1 q0 q1 q2 q3 011010 00110
4
DISTINGUISHABLE Definition
Let L be a language in *. Two strings x and y in * are distinguishable with respect to L if there is a string z in * so that exactly one of the strings xz and yz is in L. The string z is said to distinguish x and y with respect to L.
5
DISTINGUISHABLE Definition
Let L be a language in *. Two strings x and y in * are distinguishable with respect to L if L/x ≠ L/y where L/x = { z * | xz L } L/y = { z * | yz L }.
6
EXAMPLE Let = { 0, 1 }. Let L be the language associated with (0+1)*10. Two strings x = and y = 010 in *. Since there is a string z = 0 in * such that xz = is in L but yz = 0100 is not in L, x and y are distinguishable with respect to L. We may say that x and y are indistinguishable with respect to L if there is no such string z. The strings 0 and 100 are indistinguishable with respect to L.
7
LEMMA Suppose that L *, and M = (Q,,q0,A,). If x and y are two strings in * for which *(q0,x) = *(q0,y) then x and y are indistinguishable with respective to L. Note: *(q0,x)= qj means that there is a path from q0 to qj with respect to x, *(q0,x) = ((…((q0,x1),x2),…),xj) = qj where x = x1x2…xj.
8
THEOREM Suppose that L *, and for some positive integer n, there are n strings in *, any two of which are distinguishable with respect to L. Then there can be no finite state machine recognizing L with fewer than n states.
9
THEOREM PALINDROME language over the alphabet {0,1} cannot be accepted by any finite automaton. Proof: Any two strings in {0,1}* are distinguishable with respect to PALINDROME language.
10
EXERCISE How many pair-wise distinguished strings are there with respect to the following languages: Language of all bit strings, not containing any double characters. Language of all bit strings, ending with at least 3 zeroes.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.