SlideShare une entreprise Scribd logo
1  sur  23
EECS 2001: Introduction to the
Theory of Computation
Muhammad Umair Khan
Reduction via computation histories
EECS 2001 Introduction to Theory of Computation 2
 Post correspondence problem
 Suppose we have two sets of strings over the alphabet {a,b}.
 Suppose we make a longer string by concatenating members of the first set (repetition is
allowed)
 Suppose we make another longer string by concatenating members of the second set (repetition
is allowed)
 Is it possible to make the above two longer strings identical using the members of the sets
provided to us – is it decidable?
Reduction via computation histories
EECS 2001 Introduction to Theory of Computation 3
 Post correspondence problem
 Suppose Set 1 = {bb, ab, c}
 Suppose Set 2 = {b, ba, bc}
 The longer string from Set 1 = bbababababababc (we repeated the second string from set 1)
 The longer string from Set 2 = bbababababababc (we repeated the second string from set 2)
 Is this possible for all sets?
Reduction via computation histories
EECS 2001 Introduction to Theory of Computation 4
 Post correspondence problem
 Suppose Set 3 = {a, ab, bba}
 Suppose Set 4 = {baa, aa, bb}
 The longer string from Set 3 = bbaabbbaa
 The longer string from Set 4 = bbaabbbaa
 Is this possible for all sets?
Reduction via computation histories
EECS 2001 Introduction to Theory of Computation 5
 Post correspondence problem
PCP = {⟨P⟩| P is an instance of the Post Correspondence Problem with a match}
 Overview of the proof
 The strings will be accepted by the TM if there is a computation history. If there is no computation
history, the TM can say reject. This is the functionality we need for deciding ATM. Contradiction.
Hence PCP is undecidable.
Detailed proof in the book. Read – not in the exam.
Reducibility
EECS 2001 Introduction to Theory of Computation 6
 Until now, we have been using reducibility to prove whether a
language is decidable or not
 Can we use reducibility to check a language for Turing-
recognizability?
Mapping Reducibility
EECS 2001 Introduction to Theory of Computation 7
 Mapping reducibility (not a new concept – just formalizing
what we have already discussed)
 If we can reduce problem A to B by using mapping reducibility, then
this means that there is a computable function which converts
instances of A into instances of B
 There are other ways to formally define reducing one problem
to another
 Mapping reducibility is just one way to define
 Depends on the application of reducibility
Mapping Reducibility
EECS 2001 Introduction to Theory of Computation 8
 Mapping reducibility (not a new concept – just formalizing
what we have already discussed)
 If we can reduce problem A to B by using mapping reducibility, then
this means that there is a computable function which converts
instances of A to instances of B
 Such a function is called a reduction
 We can solve A with a solver for B
Mapping Reducibility
EECS 2001 Introduction to Theory of Computation 9
 Computable function
 A TM computes a function by starting with the input to the function and
stopping (halts) when the output of the function is on the tape
 Formally, f: Σ*Σ*, where f is a computable function if there is a TM M
such that for every input w, M halts with only f(w) on the tape
Mapping Reducibility
EECS 2001 Introduction to Theory of Computation 10
 Computable function example
 Arithmetic operation on integers are computable functions
 Think of a TM which takes as input one or more integers (m1,
m2, m3, m4, …) and returns
 m1+m2+…,
 m1-m2,
 m1/m2,
 m1*m2,
 - m1
Mapping Reducibility
EECS 2001 Introduction to Theory of Computation 11
 More complex computable function example
 Takes a description of a TM as a string, and converts it into another
TM (output is the description of the new TM)
 e.g.,
 one which does not attempt to move left of the leftmost cell,
 one that does not use any symbol to mark the start of the tape,
 …
Mapping Reducibility
EECS 2001 Introduction to Theory of Computation 12
 Formal definition
 Language A is mapping reducible to Language B (A ≤m B), if there is a
computable function f: Σ*Σ*, where
w  A  f(w)  B
Mapping Reducibility
EECS 2001 Introduction to Theory of Computation 13
 Theorem 5.22
 If A ≤m B and B is decidable, then A is decidable
 Proof
 Let M be the decider for B
 Let f be the reduction from A to B
 N (a decider for A) is described as
 When w is received as input
 Compute f(w)
 Run M on f(w) and let N output whatever M outputs
 In essence, If f(w) belongs to B, then w belongs to A
Mapping Reducibility
EECS 2001 Introduction to Theory of Computation 14
 Previously, we have been using the following
 Corollary 5.23
 If A ≤m B and A is undecidable, then B is undecidable
 Using the proven undecidability of something (ATM) to decide the
undecidability of some other problems
 As compared to
 Theorem 5.22 (previous slide)
 If A ≤m B and B is decidable, then A is decidable
 Using the proven decidability of something to decide the decidability of
some other problems
 Note: the results will not change
Mapping Reducibility
EECS 2001 Introduction to Theory of Computation 15
 Revisiting HALTTM
 Previously: a decider for HALTTM was used to decide ATM, and we
ended up with a contradiction
 Mapping reducibility from ATM to HALTTM
 Computable function:
 Input ⟨M, w⟩, Output ⟨M’, w’⟩
 ⟨M, w⟩ ∈ ATM if and only if ⟨M′, w′⟩ ∈ HALTTM.
 Why is that?
 Answer: if the HALT machine stops on the complement of the input then
only our input will be accepted by ATM
 Remember: complement of something decidable should be recognizable
otherwise the original will not be decidable (HALT is a recognizer)
Mapping Reducibility
EECS 2001 Introduction to Theory of Computation 16
 Revisiting HALTTM
 Previously: a decider for HALTTM was used to decide ATM, and we
ended up with a contradiction
 Mapping reducibility from ATM to HALTTM
 Let F be a TM which computes the reduction f as follows
 On input ⟨M, w⟩
 F Constructs M’ which works as follows (on input x)
 Run M on x (any string)
 If M accepts, M’ accepts. If M rejects, M’ enters a loop.
 Let D be the decider for HALT
 Run D on ⟨M’, w⟩ as follows
 If D accepts ⟨M’, w⟩ then F accepts ⟨M, w⟩
 If D rejects ⟨M’, w⟩ then F rejects ⟨M, w⟩
Mapping Reducibility
EECS 2001 Introduction to Theory of Computation 17
 Theorem 5.28
 If A ≤m B and B is Turing-recognizable, then A is Turing-recognizable
 Proof (similar to 5.22)
 Let M be the Turing-recognizer for B
 Let f be the reduction from A to B
 N (a Turing-recognizer for A) is described as
 When w is received as input
 Compute f(w)
 Run M on f(w) and output whenever M outputs
Mapping Reducibility
EECS 2001 Introduction to Theory of Computation 18
 Corollary 5.29
If A ≤m B and A is not Turing-recognizable, then B is not
Turing-recognizable.
Mapping Reducibility
EECS 2001 Introduction to Theory of Computation 19
 Corollary 4.23
 ATM’ is not Turing recognizable
 ATM is Turing recognizable
 If ATM’ was also Turing recognizable, then ATM would be decidable
 Since we have already proved that ATM is not decidable (Theorem 4.11), ATM’
must not be Turing-recognizable
EQTM is neither T-recognizable nor co-T-recognizable
EECS 2001 Introduction to Theory of Computation 20
 Step 1: EQTM is not T-recognizable
 Reducing ATM to EQTM’
 Reducing function f
 TM F takes (M, w) as input
 1. Construct M1 and M2
 M1 rejects on all inputs
 M2 runs M on all inputs (w)
 If M accepts w, then M2 accepts
 2. Output (M1, M2)
 The above steps mean that M1 accepts nothing and M2 accepts everything
(provided M accepts w). Hence the machines are not equivalent
 Conversely, if M does not accept w, then M2 accepts nothing and they are
equivalent
 Hence f reduces ATM to EQTM
EQTM is neither T-recognizable nor co-T-recognizable
EECS 2001 Introduction to Theory of Computation 21
 Step 2: EQTM’ is not T-recognizable
 Reducing ATM to EQTM (complement of EQTM’)
 Showing ATM ≤m EQTM
 Let the reducing function be g
 TM G takes (M, w) as input
 1. Construct M1 and M2
 M1 Accept on all inputs
 M2 run M on all inputs
 If M accepts, then accept
 2. Output (M1, M2)
 The above steps mean that M1 accepts everything and M2 accepts
everything (provided M accepts w)
EQTM is neither T-recognizable nor co-T-recognizable
EECS 2001 Introduction to Theory of Computation 22
 Difference between f and g
 f
 M1 always rejects
 M accepts w iff M1 and M2 are equivalent
 g
 M1 always accepts
 f and g
 M accepts iff M2 always accepts
References
EECS 2001 Introduction to Theory of Computation 23
Ideas, problems and their solutions in this lecture/tutorial have been taken from
• Prof. Jeffery Edmonds’ Lecture notes for EECS 2001 at York University
• Prof. Suprakash Datta’ Lecture notes for EECS 2001 at York University
• Introduction to the Theory of Computation (3rd edition) by Michael Sipser
• Introduction to Theory of Computation by Anil Maheshwari and Michiel Smid
• Wikipedia and other webpages of different professors/universities

Contenu connexe

Similaire à Winter 12 Lecture Mapping Reducibility.pptx

Matlab intro notes
Matlab intro notesMatlab intro notes
Matlab intro notespawanss
 
LP linear programming (summary) (5s)
LP linear programming (summary) (5s)LP linear programming (summary) (5s)
LP linear programming (summary) (5s)Dionísio Carmo-Neto
 
[AAAI2021] Combinatorial Pure Exploration with Full-bandit or Partial Linear ...
[AAAI2021] Combinatorial Pure Exploration with Full-bandit or Partial Linear ...[AAAI2021] Combinatorial Pure Exploration with Full-bandit or Partial Linear ...
[AAAI2021] Combinatorial Pure Exploration with Full-bandit or Partial Linear ...Yuko Kuroki (黒木祐子)
 
journal of mathematics
journal of mathematicsjournal of mathematics
journal of mathematicsrikaseorika
 
journals to publish paper
journals to publish paperjournals to publish paper
journals to publish paperrikaseorika
 
journal publishers
journal publishersjournal publishers
journal publishersrikaseorika
 
journalism research
journalism researchjournalism research
journalism researchrikaseorika
 
journalism paper
journalism paperjournalism paper
journalism paperrikaseorika
 
mathematic journal
mathematic journalmathematic journal
mathematic journalrikaseorika
 
mathematica journal
mathematica journalmathematica journal
mathematica journalrikaseorika
 
EmacsRedisplayAlgorithm
EmacsRedisplayAlgorithmEmacsRedisplayAlgorithm
EmacsRedisplayAlgorithmJames Gosling
 
Meeting w3 chapter 2 part 1
Meeting w3   chapter 2 part 1Meeting w3   chapter 2 part 1
Meeting w3 chapter 2 part 1mkazree
 
Meeting w3 chapter 2 part 1
Meeting w3   chapter 2 part 1Meeting w3   chapter 2 part 1
Meeting w3 chapter 2 part 1Hattori Sidek
 
Numerical Solution of Linear algebraic Equation
Numerical Solution of Linear algebraic EquationNumerical Solution of Linear algebraic Equation
Numerical Solution of Linear algebraic Equationpayalpriyadarshinisa1
 
Maximizing a Nonnegative, Monotone, Submodular Function Constrained to Matchings
Maximizing a Nonnegative, Monotone, Submodular Function Constrained to MatchingsMaximizing a Nonnegative, Monotone, Submodular Function Constrained to Matchings
Maximizing a Nonnegative, Monotone, Submodular Function Constrained to Matchingssagark4
 

Similaire à Winter 12 Lecture Mapping Reducibility.pptx (20)

Matlab intro notes
Matlab intro notesMatlab intro notes
Matlab intro notes
 
LP linear programming (summary) (5s)
LP linear programming (summary) (5s)LP linear programming (summary) (5s)
LP linear programming (summary) (5s)
 
boyd 11.6
boyd 11.6boyd 11.6
boyd 11.6
 
[AAAI2021] Combinatorial Pure Exploration with Full-bandit or Partial Linear ...
[AAAI2021] Combinatorial Pure Exploration with Full-bandit or Partial Linear ...[AAAI2021] Combinatorial Pure Exploration with Full-bandit or Partial Linear ...
[AAAI2021] Combinatorial Pure Exploration with Full-bandit or Partial Linear ...
 
journal of mathematics
journal of mathematicsjournal of mathematics
journal of mathematics
 
journals to publish paper
journals to publish paperjournals to publish paper
journals to publish paper
 
journal publishers
journal publishersjournal publishers
journal publishers
 
journalism research
journalism researchjournalism research
journalism research
 
journalism paper
journalism paperjournalism paper
journalism paper
 
mathematic journal
mathematic journalmathematic journal
mathematic journal
 
mathematica journal
mathematica journalmathematica journal
mathematica journal
 
Daa chapter11
Daa chapter11Daa chapter11
Daa chapter11
 
EmacsRedisplayAlgorithm
EmacsRedisplayAlgorithmEmacsRedisplayAlgorithm
EmacsRedisplayAlgorithm
 
Meeting w3 chapter 2 part 1
Meeting w3   chapter 2 part 1Meeting w3   chapter 2 part 1
Meeting w3 chapter 2 part 1
 
Meeting w3 chapter 2 part 1
Meeting w3   chapter 2 part 1Meeting w3   chapter 2 part 1
Meeting w3 chapter 2 part 1
 
Numerical Solution of Linear algebraic Equation
Numerical Solution of Linear algebraic EquationNumerical Solution of Linear algebraic Equation
Numerical Solution of Linear algebraic Equation
 
Absorbing Random Walk Centrality
Absorbing Random Walk CentralityAbsorbing Random Walk Centrality
Absorbing Random Walk Centrality
 
Maximizing a Nonnegative, Monotone, Submodular Function Constrained to Matchings
Maximizing a Nonnegative, Monotone, Submodular Function Constrained to MatchingsMaximizing a Nonnegative, Monotone, Submodular Function Constrained to Matchings
Maximizing a Nonnegative, Monotone, Submodular Function Constrained to Matchings
 
smtlecture.5
smtlecture.5smtlecture.5
smtlecture.5
 
Support Vector Machine
Support Vector MachineSupport Vector Machine
Support Vector Machine
 

Dernier

$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...PsychicRuben LoveSpells
 
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)Delhi Call girls
 
CALL ON ➥8923113531 🔝Call Girls Jankipuram Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Jankipuram Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Jankipuram Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Jankipuram Lucknow best sexual serviceanilsa9823
 
The Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by MindbrushThe Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by MindbrushShivain97
 
CALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual serviceanilsa9823
 
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)Delhi Call girls
 
CALL ON ➥8923113531 🔝Call Girls Rajajipuram Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Rajajipuram Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Rajajipuram Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Rajajipuram Lucknow best sexual serviceanilsa9823
 
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female serviceanilsa9823
 
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,dollysharma2066
 
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girlsPooja Nehwal
 
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)Delhi Call girls
 
LC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdfLC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdfpastor83
 
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morcall Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morvikas rana
 
Lilac Illustrated Social Psychology Presentation.pptx
Lilac Illustrated Social Psychology Presentation.pptxLilac Illustrated Social Psychology Presentation.pptx
Lilac Illustrated Social Psychology Presentation.pptxABMWeaklings
 
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...anilsa9823
 
Introducing to billionaire brain wave.pdf
Introducing to billionaire brain wave.pdfIntroducing to billionaire brain wave.pdf
Introducing to billionaire brain wave.pdfnoumannajam04
 
Pokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy TheoryPokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy Theorydrae5
 

Dernier (20)

$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
 
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
 
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
 
CALL ON ➥8923113531 🔝Call Girls Jankipuram Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Jankipuram Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Jankipuram Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Jankipuram Lucknow best sexual service
 
The Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by MindbrushThe Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by Mindbrush
 
CALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual service
 
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
 
CALL ON ➥8923113531 🔝Call Girls Rajajipuram Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Rajajipuram Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Rajajipuram Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Rajajipuram Lucknow best sexual service
 
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
 
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
 
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
 
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
 
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
 
LC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdfLC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdf
 
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morcall Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
 
Lilac Illustrated Social Psychology Presentation.pptx
Lilac Illustrated Social Psychology Presentation.pptxLilac Illustrated Social Psychology Presentation.pptx
Lilac Illustrated Social Psychology Presentation.pptx
 
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
 
Introducing to billionaire brain wave.pdf
Introducing to billionaire brain wave.pdfIntroducing to billionaire brain wave.pdf
Introducing to billionaire brain wave.pdf
 
Pokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy TheoryPokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy Theory
 

Winter 12 Lecture Mapping Reducibility.pptx

  • 1. EECS 2001: Introduction to the Theory of Computation Muhammad Umair Khan
  • 2. Reduction via computation histories EECS 2001 Introduction to Theory of Computation 2  Post correspondence problem  Suppose we have two sets of strings over the alphabet {a,b}.  Suppose we make a longer string by concatenating members of the first set (repetition is allowed)  Suppose we make another longer string by concatenating members of the second set (repetition is allowed)  Is it possible to make the above two longer strings identical using the members of the sets provided to us – is it decidable?
  • 3. Reduction via computation histories EECS 2001 Introduction to Theory of Computation 3  Post correspondence problem  Suppose Set 1 = {bb, ab, c}  Suppose Set 2 = {b, ba, bc}  The longer string from Set 1 = bbababababababc (we repeated the second string from set 1)  The longer string from Set 2 = bbababababababc (we repeated the second string from set 2)  Is this possible for all sets?
  • 4. Reduction via computation histories EECS 2001 Introduction to Theory of Computation 4  Post correspondence problem  Suppose Set 3 = {a, ab, bba}  Suppose Set 4 = {baa, aa, bb}  The longer string from Set 3 = bbaabbbaa  The longer string from Set 4 = bbaabbbaa  Is this possible for all sets?
  • 5. Reduction via computation histories EECS 2001 Introduction to Theory of Computation 5  Post correspondence problem PCP = {⟨P⟩| P is an instance of the Post Correspondence Problem with a match}  Overview of the proof  The strings will be accepted by the TM if there is a computation history. If there is no computation history, the TM can say reject. This is the functionality we need for deciding ATM. Contradiction. Hence PCP is undecidable. Detailed proof in the book. Read – not in the exam.
  • 6. Reducibility EECS 2001 Introduction to Theory of Computation 6  Until now, we have been using reducibility to prove whether a language is decidable or not  Can we use reducibility to check a language for Turing- recognizability?
  • 7. Mapping Reducibility EECS 2001 Introduction to Theory of Computation 7  Mapping reducibility (not a new concept – just formalizing what we have already discussed)  If we can reduce problem A to B by using mapping reducibility, then this means that there is a computable function which converts instances of A into instances of B  There are other ways to formally define reducing one problem to another  Mapping reducibility is just one way to define  Depends on the application of reducibility
  • 8. Mapping Reducibility EECS 2001 Introduction to Theory of Computation 8  Mapping reducibility (not a new concept – just formalizing what we have already discussed)  If we can reduce problem A to B by using mapping reducibility, then this means that there is a computable function which converts instances of A to instances of B  Such a function is called a reduction  We can solve A with a solver for B
  • 9. Mapping Reducibility EECS 2001 Introduction to Theory of Computation 9  Computable function  A TM computes a function by starting with the input to the function and stopping (halts) when the output of the function is on the tape  Formally, f: Σ*Σ*, where f is a computable function if there is a TM M such that for every input w, M halts with only f(w) on the tape
  • 10. Mapping Reducibility EECS 2001 Introduction to Theory of Computation 10  Computable function example  Arithmetic operation on integers are computable functions  Think of a TM which takes as input one or more integers (m1, m2, m3, m4, …) and returns  m1+m2+…,  m1-m2,  m1/m2,  m1*m2,  - m1
  • 11. Mapping Reducibility EECS 2001 Introduction to Theory of Computation 11  More complex computable function example  Takes a description of a TM as a string, and converts it into another TM (output is the description of the new TM)  e.g.,  one which does not attempt to move left of the leftmost cell,  one that does not use any symbol to mark the start of the tape,  …
  • 12. Mapping Reducibility EECS 2001 Introduction to Theory of Computation 12  Formal definition  Language A is mapping reducible to Language B (A ≤m B), if there is a computable function f: Σ*Σ*, where w  A  f(w)  B
  • 13. Mapping Reducibility EECS 2001 Introduction to Theory of Computation 13  Theorem 5.22  If A ≤m B and B is decidable, then A is decidable  Proof  Let M be the decider for B  Let f be the reduction from A to B  N (a decider for A) is described as  When w is received as input  Compute f(w)  Run M on f(w) and let N output whatever M outputs  In essence, If f(w) belongs to B, then w belongs to A
  • 14. Mapping Reducibility EECS 2001 Introduction to Theory of Computation 14  Previously, we have been using the following  Corollary 5.23  If A ≤m B and A is undecidable, then B is undecidable  Using the proven undecidability of something (ATM) to decide the undecidability of some other problems  As compared to  Theorem 5.22 (previous slide)  If A ≤m B and B is decidable, then A is decidable  Using the proven decidability of something to decide the decidability of some other problems  Note: the results will not change
  • 15. Mapping Reducibility EECS 2001 Introduction to Theory of Computation 15  Revisiting HALTTM  Previously: a decider for HALTTM was used to decide ATM, and we ended up with a contradiction  Mapping reducibility from ATM to HALTTM  Computable function:  Input ⟨M, w⟩, Output ⟨M’, w’⟩  ⟨M, w⟩ ∈ ATM if and only if ⟨M′, w′⟩ ∈ HALTTM.  Why is that?  Answer: if the HALT machine stops on the complement of the input then only our input will be accepted by ATM  Remember: complement of something decidable should be recognizable otherwise the original will not be decidable (HALT is a recognizer)
  • 16. Mapping Reducibility EECS 2001 Introduction to Theory of Computation 16  Revisiting HALTTM  Previously: a decider for HALTTM was used to decide ATM, and we ended up with a contradiction  Mapping reducibility from ATM to HALTTM  Let F be a TM which computes the reduction f as follows  On input ⟨M, w⟩  F Constructs M’ which works as follows (on input x)  Run M on x (any string)  If M accepts, M’ accepts. If M rejects, M’ enters a loop.  Let D be the decider for HALT  Run D on ⟨M’, w⟩ as follows  If D accepts ⟨M’, w⟩ then F accepts ⟨M, w⟩  If D rejects ⟨M’, w⟩ then F rejects ⟨M, w⟩
  • 17. Mapping Reducibility EECS 2001 Introduction to Theory of Computation 17  Theorem 5.28  If A ≤m B and B is Turing-recognizable, then A is Turing-recognizable  Proof (similar to 5.22)  Let M be the Turing-recognizer for B  Let f be the reduction from A to B  N (a Turing-recognizer for A) is described as  When w is received as input  Compute f(w)  Run M on f(w) and output whenever M outputs
  • 18. Mapping Reducibility EECS 2001 Introduction to Theory of Computation 18  Corollary 5.29 If A ≤m B and A is not Turing-recognizable, then B is not Turing-recognizable.
  • 19. Mapping Reducibility EECS 2001 Introduction to Theory of Computation 19  Corollary 4.23  ATM’ is not Turing recognizable  ATM is Turing recognizable  If ATM’ was also Turing recognizable, then ATM would be decidable  Since we have already proved that ATM is not decidable (Theorem 4.11), ATM’ must not be Turing-recognizable
  • 20. EQTM is neither T-recognizable nor co-T-recognizable EECS 2001 Introduction to Theory of Computation 20  Step 1: EQTM is not T-recognizable  Reducing ATM to EQTM’  Reducing function f  TM F takes (M, w) as input  1. Construct M1 and M2  M1 rejects on all inputs  M2 runs M on all inputs (w)  If M accepts w, then M2 accepts  2. Output (M1, M2)  The above steps mean that M1 accepts nothing and M2 accepts everything (provided M accepts w). Hence the machines are not equivalent  Conversely, if M does not accept w, then M2 accepts nothing and they are equivalent  Hence f reduces ATM to EQTM
  • 21. EQTM is neither T-recognizable nor co-T-recognizable EECS 2001 Introduction to Theory of Computation 21  Step 2: EQTM’ is not T-recognizable  Reducing ATM to EQTM (complement of EQTM’)  Showing ATM ≤m EQTM  Let the reducing function be g  TM G takes (M, w) as input  1. Construct M1 and M2  M1 Accept on all inputs  M2 run M on all inputs  If M accepts, then accept  2. Output (M1, M2)  The above steps mean that M1 accepts everything and M2 accepts everything (provided M accepts w)
  • 22. EQTM is neither T-recognizable nor co-T-recognizable EECS 2001 Introduction to Theory of Computation 22  Difference between f and g  f  M1 always rejects  M accepts w iff M1 and M2 are equivalent  g  M1 always accepts  f and g  M accepts iff M2 always accepts
  • 23. References EECS 2001 Introduction to Theory of Computation 23 Ideas, problems and their solutions in this lecture/tutorial have been taken from • Prof. Jeffery Edmonds’ Lecture notes for EECS 2001 at York University • Prof. Suprakash Datta’ Lecture notes for EECS 2001 at York University • Introduction to the Theory of Computation (3rd edition) by Michael Sipser • Introduction to Theory of Computation by Anil Maheshwari and Michiel Smid • Wikipedia and other webpages of different professors/universities