Vous êtes sur la page 1sur 1

CS 301 THEORY OF AUTOMATA SECTION C

ASSIGNMENT 1: AUTOMATA
DUE: Friday September 30, 2016.
NOTE: Only hand written assignments are accepted. If I am not in office you can slip it under my
door.
(Taken or derived from Sipsers book)

PROBLEM
(REFERENCE: Sipser)

0 0 1 1
Suppose you are given the alphabet: = {[ ] , [ ] , [ ] , [ ]}. This way the strings generated from
0 1 0 1
have two rows, each row being a string of bits.
Part 1
Design an NFA, NFA- or DFA to recognize a language, where each string is such that the second row
string is three times the top row string. For example the following string is part of the language:
0 0 1 1
[ ][ ][ ][ ]
1 0 0 1
Consider different cases and you will see some interesting patterns.
Part 2
Design an NFA, NFA- or DFA to recognize a language, where each string is such that the second row
bit string is the same as the top row string but right shifted by one bit position. For example the
following strings are part of the language:
0 1 1 1
1 0 1
1 1 0 0
[ ][ ][ ][ ]
and
[ ][ ][ ]
and
[ ] [ ] [ ] [ ] etc.
0 0 1 1
0 1 0
0 1 1 0
Part 3
Design an NFA, NFA- or DFA to recognize a language, where each string has a length which is a
multiple of three. Every character in the 3rd, 6th, 9th, etc. position is such that the upper bit is the xor of
the two upper bits coming before it and the lower bit is the and of the two lower bits coming before it.
For example the following strings are part of the language:
0 1
[ ][ ][ ]
0 1

and

1 1 0 0 0 1
[ ][ ][ ][ ][ ][ ] [ ][ ][ ]
0 1 1 1 1 0

etc.

Vous aimerez peut-être aussi