This preview shows pages 1–2. Sign up to view the full content.
cs3102: Theory of Computation
Class 5:
NonRegular Languages
Spring 2010
University of Virginia
David Evans
Menu
•
PS1, Problem 8
•
Nonregular languages
PS1 General Comments
•
Proofs are for
making convincing arguments
, not
for obfuscation.
–
e.g., If you assumed pizzas can only be cut through
their center, it is obvious each cut makes 2 new
pieces, and the number of pieces is 2
n
.
Adding an
inductive proof only adds unnecessary confusion!
•
Pledges are to remind you to be honorable
–
I assume you are all honorable whether you write a
pledge or not
–
Writing a rote pledge (not what the PS collaboration
policy says) doesn’t work
Problem 8
DFA that recognizes:
{
w

w
∈
[
a
,
b
]*
and
w
does not contain two
consecutive
a
s }
noa
onea
b
a
b
twoa
a
a, b
How many strings of length
n
in this language?
noa
onea
b
a
b
twoa
a
a, b
n
End in noa state
End in onea state
Total of length n
0
1
0
1
1
1
1
2
2
1+1 = 2
1
3
3
2+1 = 3
2
5
4
3+2 = 5
3
8
n
> 2
E
0
(
n
1)+
E
1
(
n
1)
E
0
(
n
1)
2E
0
(
n
1) +
E
1
(
n
1)
Fibonacci Strings!
E
1
(
n
) =
E
0
(
n
1)
E
0
(
n
) =
E
0
(
n
1)+
E
0
(
n
2)
T(n)
=
2E
0
(
n
1) +
E
0
(
n
2)
=
2
(
E
0
(
n
2) +
E
0
(
n
3)) +
E
0
(
n
2)
= 3
E
0
(
n
2) + 2
E
0
(
n
3)
T(n  1)
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 04/05/2010 for the course CS 150 taught by Professor Humphreys,g during the Spring '08 term at UVA.
 Spring '08
 Humphreys,G

Click to edit the document details