CS322D Tutorials
Q1.Consider the following FSA: Yes Will this machine accept the string 1010? Will it accept 01010? 1010110 ? Write two additional strings that this FSA will accept. Write two additional strings that this FSA will reject. No No 101 , 1010101 111111 , 0000000
Q2. Give state diagrams of NFAs for the following languages Q2. Give state diagrams of NFAs for the following languages. In all parts the alphabet is {0,1} a. The set of strings w that end with the substring 010 (use four states ) b. The set of strings w that contain the substring 010(use four states ) c. {w| w contains the substring 0101, i.e., w = x0101y for some x and y}(use five states )
a. The set of strings w that end with the substring 010 (use four states )
b. The set of strings w that contain the substring 010(use four states )
c. {w| w contains the substring 0101, i. e c. {w| w contains the substring 0101, i.e., w = x0101y for some x and y}(use five states )
Q3. Give state diagrams of DFAs for the following languages Q3.Give state diagrams of DFAs for the following languages. In all parts the alphabet is {0,1} a. {w | w begins and ends with the same symbol} b. {w | w begins with 1 and ends with 0 } c. {w| w contains the substring 0101, i.e., w = x0101y for some x and y} d. {w| w contains even number of 1`s} e. {w| w contains odd number of 0`s}
a.{w | w begins and ends with the same symbol}
b. {w | w begins with 1 and ends with 0 }
c. {w| w contains the substring 0101, i. e c. {w| w contains the substring 0101, i.e., w = x0101y for some x and y}
d. {w| w contains even number of 1`s}
e. {w| w contains odd number of 0`s}