TOC Assignment
TOC Assignment
September 1, 2016
Q1. Let A be a DFA and q a particular state of A, such that (q, a) = q for
all input symbols a. Show by induction on the length of the input that for all
input string w, (q, a) = q.
(q,w)
Q2. Give DFAs accepting the following languages over the alphabets {0,1}:
The set of all strings beginning with 1 that, when interpreted as a binary
integer, is a multiple of 5. For example, strings 101, 1010 and 1111 are in
the language; 0, 100 and 111 are not.
The set of all strings that, when interpreted in reverse as a binary integer,
is divisible by 5. Example of string in the language are 0,10011, 1001100
and 0101.
Q3. Give DFAs accepting the following languages over the alphabets {0,1}:
The set of all strings such that each block of five consecutive symbols
contain atleast two 0s.
The set of all strings whose tenth symbol from the right end is a 1.
The set of strings that either begin or end (or both) with 01.
The set of strings such that the number of 0s is divisible by five, and the
number of 1s is divisible by 3.
Q4. Convert the following NFA to a DFA and informally describe the language
it accepts.
!p
q
r
*s
*t
0
{ p,q }
{ r,s }
{ p,r }
1
{p}
{t}
{t}
a
{p}
{q}
{r}
{p}
{q}
b
{q}
{r}
01
The set of strings that consist of either 0 repeated one or more times or
010 repeated one or more times.
The set of strings of 0s and 1s such that at least one of the last ten
position is a 1.
c
{r}
{p}