BU CS 332 Theory of Computation Lecture 17: Reading: Midterm II - - PowerPoint PPT Presentation

bu cs 332 theory of computation
SMART_READER_LITE
LIVE PREVIEW

BU CS 332 Theory of Computation Lecture 17: Reading: Midterm II - - PowerPoint PPT Presentation

BU CS 332 Theory of Computation Lecture 17: Reading: Midterm II review Sipser Ch 3.1 5.1, 5.3 Mark Bun March 30, 2020 Format of the Exam 4/1/2020 CS332 Theory of Computation 2 4/1/2020 CS332 Theory of Computation 3 4/1/2020


slide-1
SLIDE 1

BU CS 332 – Theory of Computation

Lecture 17:

  • Midterm II review

Reading: Sipser Ch 3.1‐5.1, 5.3

Mark Bun March 30, 2020

slide-2
SLIDE 2

Format of the Exam

4/1/2020 CS332 ‐ Theory of Computation 2

slide-3
SLIDE 3

4/1/2020 CS332 ‐ Theory of Computation 3

slide-4
SLIDE 4

4/1/2020 CS332 ‐ Theory of Computation 4

slide-5
SLIDE 5

Midterm II Topics

4/1/2020 CS332 ‐ Theory of Computation 5

slide-6
SLIDE 6

Turing Machines (3.1, 3.3)

  • Know the three different “levels of abstraction” for

defining Turing machines and how to convert between them: Formal/state diagram, implementation‐level, and high‐level

  • Know the definition of a configuration of a TM and the

formal definition of how a TM computes

  • Know how to “program” Turing machines by giving

implementation‐level descriptions

  • Understand the Church‐Turing Thesis

4/1/2020 CS332 ‐ Theory of Computation 6

slide-7
SLIDE 7

TM Variants (3.2)

  • Understand the following TM variants: Multi‐tape TMs,

Nondeterministic TMs, Enumerators

  • Know how to give a simulation argument

(implementation‐level description) to compare the power of TM variants

  • Understand the specific simulation arguments we’ve

seen: multi‐tape TM by basic TM, nondeterministic TM by basic TM, enumerator by basic TM and basic TM by enumerator.

4/1/2020 CS332 ‐ Theory of Computation 7

slide-8
SLIDE 8

Decidability (4.1)

  • Understand how to use a TM to simulate another

machine (DFA, another TM)

  • Know the specific decidable languages from language

theory that we’ve discussed, and how to decide them:

,

  • ,

, etc.

  • Know how to use a reduction to one of these languages

to show that a new language is decidable

  • (You don’t need to know details of what Chomsky

Normal Form is, but understand how it is used to prove decidability of

)

4/1/2020 CS332 ‐ Theory of Computation 8

slide-9
SLIDE 9

Undecidability (4.2)

  • Know the definitions of countable and uncountable sets

and how to prove countability and uncountability

  • Understand how diagonalization is used to prove the

existence of explicit undecidable languages (

in the

book, or

from lecture)

  • Know that a language is decidable iff it is recognizable

and co‐recognizable, and understand the proof

4/1/2020 CS332 ‐ Theory of Computation 9

slide-10
SLIDE 10

Reducibility (5.1)

  • Understand how to use a reduction (contradiction

argument) to prove that a language is undecidable

  • Know the reductions showing that

,

  • are undecidable
  • You are not responsible for understanding the

computation history method. However, you should know that the language

is undecidable, and

reducing from it might be useful.

4/1/2020 CS332 ‐ Theory of Computation 10

slide-11
SLIDE 11

Mapping Reducibility (5.3)

  • Understand the definition of a computable function
  • Understand the definition of a mapping reduction
  • Know how to use mapping reductions to prove

decidability, undecidability, recognizability, and unrecognizability

4/1/2020 CS332 ‐ Theory of Computation 11

slide-12
SLIDE 12

Tips for Preparing Exam Solutions

4/1/2020 CS332 ‐ Theory of Computation 12

slide-13
SLIDE 13

True or False

4/1/2020 CS332 ‐ Theory of Computation 13

  • It’s all about the justification!
  • The logic of the argument has to be clear
  • Restating the question is not justification; we’re

looking for some additional insight

slide-14
SLIDE 14

Simulation arguments, constructing deciders

4/1/2020 CS332 ‐ Theory of Computation 14

  • Full credit for a clear and correct description of the new machine
  • Still a good idea to provide an explanation

(partial credit, clarifying ambiguity)

slide-15
SLIDE 15

Undecidability proofs

4/1/2020 CS332 ‐ Theory of Computation 15

slide-16
SLIDE 16

Uncountability proofs

4/1/2020 CS332 ‐ Theory of Computation 16

  • The 2‐D table is useful for thinking about diagonalization,

but is not essential to the argument

  • The essential part of the proof is the construction of the

“inverted diagonal” element, and the proof that it works

slide-17
SLIDE 17

Practice Problems

4/1/2020 CS332 ‐ Theory of Computation 17

slide-18
SLIDE 18

4/1/2020 CS332 ‐ Theory of Computation 18

slide-19
SLIDE 19

4/1/2020 CS332 ‐ Theory of Computation 19

slide-20
SLIDE 20

4/1/2020 CS332 ‐ Theory of Computation 20

slide-21
SLIDE 21

4/1/2020 CS332 ‐ Theory of Computation 21

slide-22
SLIDE 22

4/1/2020 CS332 ‐ Theory of Computation 22

slide-23
SLIDE 23

Decidability and Recognizability

4/1/2020 CS332 ‐ Theory of Computation 23

slide-24
SLIDE 24

Let Show that is decidable

4/1/2020 CS332 ‐ Theory of Computation 24

slide-25
SLIDE 25

Prove that is recognizable

4/1/2020 CS332 ‐ Theory of Computation 25

slide-26
SLIDE 26

Prove that if and are decidable, then so is

4/1/2020 CS332 ‐ Theory of Computation 26

slide-27
SLIDE 27

Countable and Uncountable Sets

4/1/2020 CS332 ‐ Theory of Computation 27

slide-28
SLIDE 28

Show that the set of all valid (i.e., compile without errors) C++ programs is countable

4/1/2020 CS332 ‐ Theory of Computation 28

slide-29
SLIDE 29

A Celebrity Twitter Feed is an infinite sequence of ASCII strings, each with at most 140 characters. Show that the set

  • f Celebrity Twitter Feeds is uncountable.

4/1/2020 CS332 ‐ Theory of Computation 29

slide-30
SLIDE 30

Undecidability and Unrecognizability

4/1/2020 CS332 ‐ Theory of Computation 30

slide-31
SLIDE 31

Prove or disprove: If and are recognizable, then so is

4/1/2020 CS332 ‐ Theory of Computation 31

slide-32
SLIDE 32

Prove that the language

∗ is undecidable

4/1/2020 CS332 ‐ Theory of Computation 32

slide-33
SLIDE 33

Give a nonregular language such that

  • r prove that none exists

4/1/2020 CS332 ‐ Theory of Computation 33

slide-34
SLIDE 34

Give an undecidable language such that

  • r prove that none exists

4/1/2020 CS332 ‐ Theory of Computation 34

slide-35
SLIDE 35

Give an undecidable language such that

  • r prove that none exists

4/1/2020 CS332 ‐ Theory of Computation 35