BU CS 332 – Theory of Computation
Lecture 9:
- Midterm I review
Reading: Sipser Ch 0‐2.3
Mark Bun February 19, 2020
BU CS 332 Theory of Computation Lecture 9: Reading: Midterm I - - PowerPoint PPT Presentation
BU CS 332 Theory of Computation Lecture 9: Reading: Midterm I review Sipser Ch 0 2.3 Mark Bun February 19, 2020 Midterm I Topics 2/19/2020 CS332 Theory of Computation 2 Deterministic FAs (1.1) Given an English or formal
Reading: Sipser Ch 0‐2.3
Mark Bun February 19, 2020
2/19/2020 CS332 ‐ Theory of Computation 2
draw the state diagram of a DFA recognizing (and vice versa)
tuple…) and convert between state diagram and formal description
closure of regular languages under regular operations, construction for closure under complement
2/19/2020 CS332 ‐ Theory of Computation 3
draw the state diagram of an NFA recognizing (and vice versa)
to a DFA
union, concatenation, star
complement
2/19/2020 CS332 ‐ Theory of Computation 4
construct a regex generating (and vice versa)
2/19/2020 CS332 ‐ Theory of Computation 5
languages
how to apply it
non‐regular by combining pumping lemma with closure properties
2/19/2020 CS332 ‐ Theory of Computation 6
give a CFG (in Backus‐Naur form) generating (and vice versa)
context‐free languages
parsing and Chomsky Normal Form
But these are interesting! Read about them if you have time
2/19/2020 CS332 ‐ Theory of Computation 7
describe a PDA recognizing in terms of:
You are not responsible for knowing the proof.
intersection with regular languages, but not complement or intersection
2/19/2020 CS332 ‐ Theory of Computation 8
how to apply it
non‐context‐free by combining pumping lemma with closure properties You are not responsible for Chapter 2.4 on deterministic CFLs (But read this if you’re interested in how CFLs are parsed in real compilers, etc.)
2/19/2020 CS332 ‐ Theory of Computation 9
2/19/2020 CS332 ‐ Theory of Computation 10
solved exercises/problems in Sipser, and suggested exercises on the homework
exercises, so make sure you understand these
this note sheet is a great way to study.
2/19/2020 CS332 ‐ Theory of Computation 11
practice midterm and are familiar with the format. The format/length of the real midterm will be very similar.
the book. We’re happy to talk about any of these problems in office hours.
2/19/2020 CS332 ‐ Theory of Computation 12
regexes, CFGs, non‐regular/non‐CF languages
problems, (solved) exercise/problems in the text
us give you partial credit
2/19/2020 CS332 ‐ Theory of Computation 13
2/19/2020 CS332 ‐ Theory of Computation 14
2/19/2020 CS332 ‐ Theory of Computation 15
2/19/2020 CS332 ‐ Theory of Computation 16
2/19/2020 CS332 ‐ Theory of Computation 17
2/19/2020 CS332 ‐ Theory of Computation 18
2/19/2020 CS332 ‐ Theory of Computation 19
2/19/2020 CS332 ‐ Theory of Computation 20
2/19/2020 CS332 ‐ Theory of Computation 21
2/19/2020 CS332 ‐ Theory of Computation 22
0,1
1
2/19/2020 CS332 ‐ Theory of Computation 23
0,1
1
2/19/2020 CS332 ‐ Theory of Computation 24
CS332 ‐ Theory of Computation 25
CS332 ‐ Theory of Computation 26
Let
∗
. Let be a pumping length and
𝑞.
Give a decomposition of which can be pumped in . Is regular?
2/19/2020 CS332 ‐ Theory of Computation 27
2/19/2020 CS332 ‐ Theory of Computation 28
2/19/2020 CS332 ‐ Theory of Computation 29
2/19/2020 CS332 ‐ Theory of Computation 30
2/19/2020 CS332 ‐ Theory of Computation 31
𝜁, 𝜁 → $ 0, 𝜁 → 0 1,0 → 𝜁
1 2 𝑔
1,0 → 𝜁 𝜁, 0 → 𝜁
CS332 ‐ Theory of Computation 32
CS332 ‐ Theory of Computation 33
Prove that
∗
is not context‐free
2/19/2020 CS332 ‐ Theory of Computation 34