Latest

6/recent/ticker-posts

Consider the set of strings on {0,1} defined by the requirements below. For each construct an accepting DFA-solution of peter linz

 Consider the set of strings on {0,1} defined by the requirements below. For each construct an accepting DFA.

a) Every 00 is followed immediately by a 1. 

b)All strings containing 00 but not 000. 

c) The leftmost symbol differs from the rightmost one. 

d) Every substring of four symbols has at most two 0's. 

e)All strings of length five or more in which the fourth symbol from the right end is different from the leftmost symbol. 

f) All strings in which the left most two symbols and the right most two symbols are identical.

g) All strings of length four or greater in which the leftmost three symbols are the same, different from the rightmost  symbols.

a) Every 00 is followed immediately by a 1. 

Solution:




b)All strings containing 00 but not 000. 

Solution:




c) The leftmost symbol differs from the rightmost one. 

Solution:



d) Every substring of four symbols has at most two 0's. 

Solution:



e)All strings of length five or more in which the fourth symbol from the right end is different from the leftmost symbol. 

Solution:



f) All strings in which the left most two symbols and the right most two symbols are identical.

Solution:



g) All strings of length four or greater in which the leftmost three symbols are the same, different from the rightmost  symbols.

Solution:






Post a Comment

1 Comments

  1. In part (e) 0100111 is accepted but it's not a valid string

    ReplyDelete