COT 4210 Notes: Feb 26
February 26
1
Chomsky Normal Form
Chomsky Normal Form (CNF) is one of several normal forms used for context-free grammars.
Every grammar in CNF follows a particular series of rules, making it a kind of canonical
version of a particu
COT4210:Exam1Review
NadeemMohsin
02/12/2014
Examdetails
In class, usual time and place.
About 40-50 minutes long, but you have the entire class
period.
No aids of any kind, just bring something to write with
You might want to bring some scratch paper.
The
REVIE W3 VKHLA l LC bAW}
1) (14 pts) Create a DFA over the alphabet {a, b} that contains exactly all non-empty strings that
begin and end with the same letter. (For example, b, abbaba and bbab should be accepted, while
ab, aaab and baba should be reje
COT 4210 Notes: Lecture 7
January 30
1
Equivalence of regular expressions and regular languages
A language is regular if and only if some regular expression describes it. (Theorem 1.54 in
Sipser)
Initially, we dened regular languages as those languages th
i G
I : ,- g
TMM A TM _
Mum/UL, 13 06 ) TM
H dauotm EV
W? 5' Macaw/st
H C<M3w>) .9
new 0 [SQ
9% a m b c 3mm mu)
Om (mvpmA/"<M> )
Q) QM H 8m VFW" <M)<M>>
[5 M e J ACCEPT
a E ® M mad
DC<M> s; a WP
D 6 reux ("it M age/m <M>
J>C<l>>) ; " WWW M;
COT 4210 Notes: Lecture 5
January 22
1
NFA-DFA equivalence
NFAs dier from DFAs in that they allow multiple transitions (or no transitions) on the same
symbol from any state. In addition, they also allow -transitions, that do not use an input
symbol at all
COT 4210: Homework 2
65 points
Due Date: Tuesday, February 18
1. (12 points) Construct regular expressions for the following languages over = cfw_0, 1:
(a) cfw_w | w contains at least three 1s
(b) cfw_
(c) Strings that start and end with a 0 and contain t
COT 4210: Homework 1
Due Date: Monday, February 3
1. (7 points) Using the DFA transition table given here, draw the DFA state diagram.
What language does it recognize?
a
q2
q3
q3
q3
q3
q1
q2
q3
q4
q5
b
q3
q4
q3
q4
q3
c
q3
q3
q3
q5
q5
2. (8 points) Using
COT 4210: Homework 4 Solution
50 points
Due Date: Thursday, April 10
1. (15 points) (Exercise 3.2 from Sipser) For the TM of Example 3.9 (page 173 in the
3rd edition), give the sequence of congurations that the TM enters when started with
the given input
COT 4210: Homework 3 Solution
65 points
April 14, 2014
1. (10 points) Create a PDA for the language of strings over cfw_a, b that contain more
as than bs. Draw the transition diagram for it, and write down the following sets:
(a) The set of states (1 poin
COT 4210 Homework 2 Solution
February 18, 2014
1. (12 points) Construct regular expressions for the following languages over = cfw_0, 1:
(a) cfw_w | w contains at least three 1s
1 1 1
Or equivalently, since = 0 + 1:
(0 + 1) 1(0 + 1) 1(0 + 1) 1(0 + 1)
(b)
COT 4210 Homework 1 Solution
February 3, 2014
1. This recognizes the language of strings that start with a, followed by 1 or more occurrences of b,
followed by 1 or more occurrences of c. This can be concisely expressed by the regex abb cc .
This is easy
COT 4210: Exam 2 Solution
65 points
Thursday, April 03, 2014
1. (16 points) For each of the languages in the list below, write down whether it is:
(A) Regular
(B) Context-free but not regular
(C) Not context-free
2 points for each correct answer
(a) The l
COT 4210: Exam 2 Review
Wednesday, April 2, 2014
The major focus for Exam 2 is the context-free languages. You should know how to do
the following:
1. Construct a PDA for a given language (section 2.2)
2. Construct a CFG for a given language (section 2.1)