Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS322D Tutorials.

Similar presentations


Presentation on theme: "CS322D Tutorials."— Presentation transcript:

1 CS322D Tutorials

2 Q1.Consider the following FSA:
Yes Will this machine accept the string 1010? Will it accept 01010? ? Write two additional strings that this FSA will accept. Write two additional strings that this FSA will reject. No No , ,

3 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 )

4 a. The set of strings w that end with the substring 010 (use four states )

5 b. The set of strings w that contain the substring 010(use four states )

6 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 )

7 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}

8 a.{w | w begins and ends with the same symbol}

9 b. {w | w begins with 1 and ends with 0 }

10 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}

11 d. {w| w contains even number of 1`s}

12 e. {w| w contains odd number of 0`s}


Download ppt "CS322D Tutorials."

Similar presentations


Ads by Google