CSCI 3130: Formal languages and automata theory Tutorial 9

Slides:



Advertisements
Similar presentations
CSCI 3130: Formal Languages and Automata Theory Tutorial 5
Advertisements

INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 17: ProvingUndecidability.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Variants of Turing machines
Post Correspondence Problem [Section 5.2] Suppose we have dominos of strings, e.g.: The question: is it possible to arrange the dominos in line (repetitions.
1 CSC3130 Formal Languages and Automata Theory Tutorial 9 Undecidable Problem KN Hung SHB 1026.
February 6, 2015CS21 Lecture 141 CS21 Decidability and Tractability Lecture 14 February 6, 2015.
Reducibility 2 Theorem 5.1 HALT TM is undecidable.
1 Section 14.1 Computability Some problems cannot be solved by any machine/algorithm. To prove such statements we need to effectively describe all possible.
1 Introduction to Computability Theory Lecture14: Recap Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Reducibility Sipser 5.1 (pages ). CS 311 Fall Reducibility.
Decidable languages Sipser 4.1 (pages ). CS 311 Mount Holyoke College 2 Hierarchy of languages All languages Turing-recognizable Turing-decidable.
CS5371 Theory of Computation
Reducibility A reduction is a way of converting one problem into another problem in such a way that a solution to the second problem can be used to solve.
Theory of Computation What types of things are computable? How can we demonstrate what things are computable?
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
Tutorial CSC3130 : Formal Languages and Automata Theory Tu Shikui ( ) SHB 905, Office hour: Thursday 2:30pm-3:30pm
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 6 Decidability Jan Maluszynski, IDA, 2007
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 5 Reducibility Contents Undecidable Problems from Language Theory.
CS5371 Theory of Computation Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
Decidability A decision problem is a problem with a YES/NO answer. We have seen decision problems for - regular languages: - context free languages: [Sections.
Pushdown Automata CS 130: Theory of Computation HMU textbook, Chap 6.
Pushdown Automata (PDAs)
CSCI 3130: Formal languages and automata theory Tutorial 2 Chin.
The Halting Problem – Undecidable Languages Lecture 31 Section 4.2 Wed, Oct 31, 2007.
Decidable languages Section 4.1 CSC 4170 Theory of Computation.
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
The decidability of Presburger Arithmetic By Guillermo Guillen 04/13/05 Dr. Smith COT 6421 FIU Spring 2005.
CSCI 3130: Formal languages and automata theory Andrej Bogdanov The Chinese University of Hong Kong Undecidable.
CSCI 2670 Introduction to Theory of Computing October 13, 2005.
Lecture 14UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 14.
CSCI 3130: Formal languages and automata theory Tutorial 7 Chin.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Undecidable.
Sofya Raskhodnikova Intro to Theory of Computation L ECTURE 20 Last time Mapping reductions Computation history method Today Computation history method.
Transparency No. 1 Formal Language and Automata Theory Homework 6.
CSCI 3130: Formal languages and automata theory Andrej Bogdanov The Chinese University of Hong Kong Decidable.
CS 154 Formal Languages and Computability April 28 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron Mak.
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY * Read chapter 4 of the book for next time * Lecture9x.ppt.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Undecidable.
February 1, 2016CS21 Lecture 121 CS21 Decidability and Tractability Lecture 12 February 1, 2016.
Busch Complexity Lectures: Reductions
Turing Machines.
Intro to Theory of Computation
Pushdown Automata PDAs
Pushdown Automata PDAs
Undecidable problems for CFGs
Undecidable problems for CFGs
COSC 3340: Introduction to Theory of Computation
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
Reducibility The Chinese University of Hong Kong Fall 2010
Intro to Theory of Computation
Jaya Krishna, M.Tech, Assistant Professor
Decidability and Undecidability
Decidable and undecidable languages
Undecidable problems:
CS21 Decidability and Tractability
More undecidable languages
Theory of Computability
CS 461 – Nov. 14 Section 5.2 – Undecidable problems starting from ATM:
Theory of Computability
Pushdown automata The Chinese University of Hong Kong Fall 2011
Subject Name: FORMAL LANGUAGES AND AUTOMATA THEORY
More undecidable languages
Theory of Computability
Automata, Grammars and Languages
Presentation transcript:

CSCI 3130: Formal languages and automata theory Tutorial 9 Chin

Reminder Homework 5 is due at next Tuesday! No tutorial next week! :D This is the last one.

Undecidable problems for CFGs ALLCFG = {<G>: G is a CFG that generates all strings} ALLCFG is undecidable Reduction ATM = {<M, w>: M is a TM that does not accept w} = {<M, w>: M rejects or loops on input w} ATM is unrecognizable ⇒ ATM is undecidable If ALLCFG is decidable then ATM is decidable. Contradiction.

Undecidable problems for CFGs ALLCFG = {<G>: G is a CFG that generates all strings} ALLCFG is undecidable Suppose it is decidable, then there exists a universal TM H string H(string <G>) { // G is a CFG if G generates all strings, return “accept”; if G does not generates all strings, return “reject”; } Consider the following TM U (dependent on <M> and w) string U(string <M>, string w){ If M does not accept w, return <G> that generates all strings If M accepts w, return <G> that does not generate all strings If we can simulate H(U(<M>,w)), then U decides ATM and so ATM is decidable.

Undecidable problems for CFGs ALLCFG = {<G>: G is a CFG that generates all strings} ALLCFG is undecidable Consider the following TM U (dependent on <M, w>) string U(string <M>, string w){ If M does not accept w, return <G> that generates all strings If M accepts w, return <G> that does not generate all strings } We construct U as follows instead: If M does not accept w, construct <G> that generates all strings If M accepts w, construct <G> that generates all strings except the computation history of M(w) return H(<G>) How to construct <G>? We need to construct <G> so that even if M loops on w, <G> generates all strings.

Undecidable problems for CFGs Computation history #q0ab%ab#xq1b%ab# . . . #xx%xx☐qa# Each #xxxxxx# tells you the configuration of the TM in each step … a b ☐ q1 abq1a q1 qacc a/bR … a b ☐ qacc abbqacc

Undecidable problems for CFGs Computation history Suppose the current configuration is #xbq1xab# What does the next configuration look like? The head must be one symbol left or one symbol right Only these 3 symbols can change Use this fact to design a PDA that generates the computation history (see lecture notes). Convert the PDA to <G>.

Undecidable problems for CFGs PCP = {<T>: T is a collection of tiles that contains a top-bottom match} PCP is undecidable AMB = {<G>: G is an ambiguous CFG} AMB is undecidable If AMB is decidable, PCP is decidable. Contradiction.

Undecidable problems for CFGs T G (collection of tiles) (CFG) Terminals: a, b, c, 1, 2, 3 Variables: S, T, B 1 2 3 Productions: bab cc c ab a ab S → T | B T → babT1 T → cT2 T → aT3 T → bab1 T → c2 T → a3 B → ccB1 B → abB2 B → abB3 B → cc1 B → ab2 B → ab3

Undecidable problems for CFGs EQCFG = {<G1, G2>: G1 and G2 are two CFGs that describe the same language} Is it decidable?

Undecidable problems for CFGs EQCFG = {<G1, G2>: G1 and G2 are two CFGs that descript the same language} EQCFG is undecidable. Same idea as EQTM If EQCFG is decidable, ALLCFG is also decidable. Let G1 to be a CFG that generates all inputs.

Undecidable problems for CFGs EQCFG = {<G1, G2>: G1 and G2 are two CFGs that descript the same language} If EQCFG is decidable, there exists a TM H such that string H(string <G1>, string <G2>) { if G1 and G2 are equal, return “accept”; if G1 and G2 are not equal, return “reject”; } Let G1 to be a CFG that generates all inputs. We construct U as follows string U(string <G>) { G1 := a CFG that generates all inputs // hardcode return H(G1, G); Given a CFG <G>, U(<G>) returns accept if G generates all strings, rejects if G does not. Hence ALLCFG is decidable. Contradiction.

Post Correspondence Problem PCP1 : PCP over the alphabet S = {1}. The alphabet of a tile is the set of symbols that appear on the tiles. Is PCP1 decidable?

Post Correspondence Problem PCP1 : PCP over the alphabet S = {1}. The alphabet of a tile is the set of symbols that appear on the tiles. PCP1 is decidable. 3 – 1 = 2 2 – 5 = -3 Find x, y such that 2x – 3y = 0. Easy. If exists two tiles like above, accept. Otherwise reject. 111 1 11 11111

Post Correspondence Problem PCP2 : PCP over the alphabet S = {0, 1}. The alphabet of a tile is the set of symbols that appear on the tiles. Is PCP2 decidable?

Post Correspondence Problem PCP2 : PCP over the alphabet S = {0, 1}. The alphabet of a tile is the set of symbols that appear on the tiles. PCP2 is undecidable. If PCP2 is decidable, then PCP is also decidable. Represent the alphabet in PCP in binary form.

End Questions?