This question has been answered
Question
Hey can you help me in this assignment, it is in attach file
1 Attachment
Assignment 2, COSC 4P61, Theory of Computation, Fall, 2016
Due: Oct. 25, Tuesday, 5:00 PM.
1. (25) Find DFAs (draw their state transition diagrams) that accept the following languages:
(a) The set of strings over
{
a, b
}
where every
a
is immediately followed by a
b
;
(b) The set of strings over
{
a, b, c
}
that do not contain the substring
aaa
;.
(c) The set of strings over
{
a, b, c
}
that begin with
a
, contain exactly two
b
’s, and end with
cc
;
(d) The set of binary strings (encodings), without leading 0’s, of natural numbers that are divisible by 4.
(e) (
ab
)
*
(
ba
)
*
;
2. (15) Consider the following NFA without
e
moves: (1) give a regular expression for the language accepted; (2)
Convert it to a DFA using the standard algorithm described in class. Please also draw the state transition
diagram.
δ
(
q
0
, a
)
=
{
q
1
, q
2
}
δ
(
q
1
, a
)
=
{
q
1
}
δ
(
q
1
, b
)
=
{
q
0
, q
1
}
δ
(
q
1
, c
)
=
{
q
1
}
δ
(
q
2
, a
)
=
{
q
2
}
δ
(
q
2
, b
)
=
{
q
2
}
δ
(
q
2
, c
)
=
{
q
0
, q
2
}
3. (20) Give examples of languages
L
1
and
L
2
over
{
a, b
}
that satisfy the descriptions below:
(a)
L
1
is regular,
L
2
is nonregular, and
L
1
u
L
2
is regular;
(b)
L
1
is regular,
L
2
is nonregular, and
L
1
u
L
2
is nonregular;
(c)
L
1
is regular,
L
2
is nonregular, and
L
1
i
L
2
is regular;
(d)
L
1
is nonregular,
L
2
is nonregular, and
L
1
u
L
2
is regular.
(e)
L
1
is nonregular,
L
2
is nonregular, and
L
1
i
L
2
is regular.
4. (15) Prove or disprove the following:
(a) If
L
*
is regular, then
L
must be regular.
(b) For any language
L
,
L
*
must be regular.
(c) If
L
1
L
2
is regular, then both
L
1
and
L
2
have to be regular.
(d) The union of ±nite number of regular languages is always regular.
(e) The union of in±nite number of regular languages is always regular.
5. (25) Use the Pumping Lemma to show that the following languages are not regular.
(a)
{
a
i
b
j

i > j
}
(b)
{
a
p
a
q

for all intEgErs p and q whErE q is a primE numbEr and p is not primE
}
.
(c)
{
a
i
b
j

i

j

= 3
}
(d)
{
a
i
b
j
c
k

i
=
j or j
n
=
k
}
(e)
{
a
i
b
j

i/j is an intEgEr
}
1
Answered by Expert Tutors
37 Attachments
jpg
jpg
jpg
jpg
jpg
jpg
jpg
jpg
jpg
jpg
jpg
jpg
jpg
jpg
jpg
jpg
jpg
jpg
jpg
jpg
jpg
jpg
pdf
jpg
jpg
jpg
jpg
jpg
jpg
jpg
jpg
jpg
jpg
jpg
jpg
jpg
jpg
The student who asked this rated it
Subject:
Computer Science, Engineering & Technology
25, Tuesday, 5:00 PM. (25) Find DFAs (draw their state transition diagrams) that accept the following languages: (a) The set of strings over {a, b}...
204,222 students got unstuck by Course
Hero in the last week
Our Expert Tutors provide step by step solutions to help you excel in your courses