midterm 2 review jundong liu school of eecs [email protected]

14
Midterm 2 review Jundong Liu School of EECS [email protected]

Upload: meghan-bradford

Post on 05-Jan-2016

215 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Midterm 2 review Jundong Liu School of EECS liu@cs.ohiou.edu

Midterm 2 review

Jundong LiuSchool of EECS

[email protected]

Page 2: Midterm 2 review Jundong Liu School of EECS liu@cs.ohiou.edu

True of false: The pumping lemma for CFLs can be used to prove that a language is Context-free.

Define the language EQUAL3 over {a, b, c} to be the language with an equal number of a’s, b’s and c’s. Can the string be used in a pumping lemma proof?

Can the string be used for EQUAL3?

Pumping Lemma for CFLs

101010 cba

ppp cba 2

Page 3: Midterm 2 review Jundong Liu School of EECS liu@cs.ohiou.edu

Pump lemma for CFLs You can’t control

The Pumping length p You can control

The selection of s S should be a string | S |>= p, for example, Then S can be

ppp 101 4

Next step: based on analysis to derive contradiction

Page 4: Midterm 2 review Jundong Liu School of EECS liu@cs.ohiou.edu

Closure Properties of CFLs, How to prove them?

Page 5: Midterm 2 review Jundong Liu School of EECS liu@cs.ohiou.edu

Turing Machines

Page 6: Midterm 2 review Jundong Liu School of EECS liu@cs.ohiou.edu

Turing Machine: Formal definition

Page 7: Midterm 2 review Jundong Liu School of EECS liu@cs.ohiou.edu

Turing Machines: Concepts, definitions

transitions of a TM accepting, rejecting states A language of a TM = set of strings it

accepts Turing recognizable language =

language of certain TM decidable language

Page 8: Midterm 2 review Jundong Liu School of EECS liu@cs.ohiou.edu

Skills Understand the difference between a

decidable and a recognizable language Given a configuration and the transition

table, what will be the next configuration?

How would one design TM that decides {02^n}, {w#w}, {a^n b^n c^n}?

Page 9: Midterm 2 review Jundong Liu School of EECS liu@cs.ohiou.edu

Turing Machines Variants

Stay put Turing Machine Multi-tape Turing Machine Doubly infinite Turing Machine Enumerator Nondeterministic Turing Machine The notion of simulation

Page 10: Midterm 2 review Jundong Liu School of EECS liu@cs.ohiou.edu

Church-Turing Thesis

Page 11: Midterm 2 review Jundong Liu School of EECS liu@cs.ohiou.edu

Algorithm in real world = Turing Machine

algorithm 3 levels of descriptions

Page 12: Midterm 2 review Jundong Liu School of EECS liu@cs.ohiou.edu

The languages A-DFA, A-NFA, A-REX, A-CFG are decidable.

The languages E-DFA, E-NFA, E-REX, E-CFG are decidable.

The languages EQ-DFA, EQ-NFA, EQ-REX are decidable.

The symmetric difference of S1 and S2. The languages EQ-CFG, A-TM, E-TM, EQ-

TM are not decidable.

(Un)solvable problems in the real world

(un)decidable languages under Turing Machine framework

Page 13: Midterm 2 review Jundong Liu School of EECS liu@cs.ohiou.edu

How to? Prove that the languages A-DFA, A-NFA,

A-REX, A-CFG are decidable. Prove that the languages E-DFA, E-NFA,

E-REX, E-CFG are decidable. Prove that the languages EQ-DFA, EQ-

NFA, EQ-REX are decidable.

Page 14: Midterm 2 review Jundong Liu School of EECS liu@cs.ohiou.edu

Understand …

The diagonalization technique Why E (the set of even numbers), Z

(set of integer numbers) are countable.

Why R (the set of real numbers) is uncountable.

Why there are more languages than Turing machines.