BU CS 332 – Theory of Computation
Lecture 13:
- Mid‐Semester Feedback
- Enumerators
- Decidable Languages
Reading: Sipser Ch 4.1
Mark Bun March 16, 2020
BU CS 332 Theory of Computation Lecture 13: Reading: Mid Semester - - PowerPoint PPT Presentation
BU CS 332 Theory of Computation Lecture 13: Reading: Mid Semester Feedback Sipser Ch 4.1 Enumerators Decidable Languages Mark Bun March 16, 2020 What aspects of the course help you learn best? Examples in class
Reading: Sipser Ch 4.1
Mark Bun March 16, 2020
3/16/2020 CS332 ‐ Theory of Computation 2
3/16/2020 CS332 ‐ Theory of Computation 3
3/16/2020 CS332 ‐ Theory of Computation 4
do some practice problems and then attempt the homework”
standards on homework
3/16/2020 CS332 ‐ Theory of Computation 5
3/16/2020 CS332 ‐ Theory of Computation 6
3/16/2020 CS332 ‐ Theory of Computation 7
stack PDAs
Java…) …
3/16/2020 CS332 ‐ Theory of Computation 8
strings eventually printed by
3/16/2020 CS332 ‐ Theory of Computation 9
Finite control Work tape “Printer”
What language does this enumerator enumerate?
3/16/2020 CS332 ‐ Theory of Computation 10
Theorem: A language is Turing‐recognizable some enumerator enumerates it Start with an enumerator for and give a TM
3/16/2020 CS332 ‐ Theory of Computation 11
Theorem: A language is Turing‐recognizable some enumerator enumerates it Start with a TM for and give an enumerator
3/16/2020 CS332 ‐ Theory of Computation 12
3/16/2020 CS332 ‐ Theory of Computation 13
3/16/2020 CS332 ‐ Theory of Computation 14
The “Decision Problem” Is there an algorithm which takes as input a formula (in first‐
Design a TM which takes as input a DFA and a string , and determines whether accepts How should the input to this TM be represented? Let
separated by ;
by ,‐separated binary strings
by a ,‐separated list of triples , … Denote the encoding of by
3/16/2020 CS332 ‐ Theory of Computation 15
Computability (i.e., decidability and recognizability) is not affected by the choice of encoding Why? A TM can always convert between different encodings For now, we can take to mean “any reasonable encoding”
3/16/2020 CS332 ‐ Theory of Computation 16
is decidable
Proof: Define a 3‐tape TM
is a valid encoding (reject if not)
ends in an accept state
3/16/2020 CS332 ‐ Theory of Computation 17
CS332 ‐ Theory of Computation 18
Theorem:
recognizable Proof idea: Define a TM recognizing
:
(i.e., all length‐1 derivations, all length‐2 derivations, …)
3/16/2020 CS332 ‐ Theory of Computation 19
Theorem:
Chomsky Normal Form for CFGs:
Lemma: Any CFG can be converted into an equivalent CFG in Chomsky Normal Form Lemma: If is in Chomsky Normal Form, any nonempty string w that can be derived from has a derivation with at most steps
3/16/2020 CS332 ‐ Theory of Computation 20
Theorem:
Proof idea: Define a TM recognizing
:
into Chomsky Normal Form
steps
3/16/2020 CS332 ‐ Theory of Computation 21
Theorem: Every CFL is decidable Proof: Let be a CFG generating . The following TM decides On input :
3/16/2020 CS332 ‐ Theory of Computation 22
3/16/2020 CS332 ‐ Theory of Computation 23
context free regular recognizable decidable
3/16/2020 CS332 ‐ Theory of Computation 24
Theorem:
decidable Proof: The following TM decides On input , where is a DFA with states:
steps of breadth‐first search on state diagram of to determine if an accept state is reachable from the start state
3/16/2020 CS332 ‐ Theory of Computation 25
3/16/2020 CS332 ‐ Theory of Computation 26
Theorem:
decidable Proof: The following TM decides
, where is a CFG with states:
Mark any variable 𝐵 where 𝐻 has a rule 𝐵 → 𝑉𝑉 … 𝑉 and every symbol 𝑉, … , 𝑉 is marked
3/16/2020 CS332 ‐ Theory of Computation 27
is decidable
Proof: The following TM decides
that recognizes the symmetric difference
and return its output
3/16/2020 CS332 ‐ Theory of Computation 28
3/16/2020 CS332 ‐ Theory of Computation 29