SlideShare a Scribd company logo
1 of 19
CHAPTER TWO
Turing
Decidability
Decidable
 A language is called Decidable or Recursive if there is a Turing
machine which accepts and halts on every input string w. Every
decidable language is Turing-Acceptable.
 For a decidable language, for each input string, the TM halts either at
the accept or the reject state as depicted in the following diagram −
Generally A problem is said to be Decidable if we can always construct a
corresponding algorithm that can answer the problem correctly.
 We can intuitively understand Decidable problems by considering a simple
example.
 Suppose we are asked to compute all the prime numbers in the range of
1000 to 2000. To find the solution of this problem, we can easily devise an
algorithm that can enumerate all the prime numbers in this range.
 Now talking about Decidability in terms of a Turing machine, a problem is
said to be a Decidable problem if there exists a corresponding Turing
machine which halts on every input with an answer- yes or no.
 It is also important to know that these problems are termed as Turing
Decidable since a Turing machine always halts on every input, accepting
or rejecting it.
Example 1
Find out whether the following problem is decidable or not −
Is a number ‘m’ prime?
Solution
Prime numbers = {2, 3, 5, 7, 11, 13, …………..}
Divide the number ‘m’ by all the numbers between ‘2’ and
‘√m’ starting from ‘2’.
If any of these numbers produce a remainder zero, then it goes
to the “Rejected state”, otherwise it goes to the “Accepted
state”. So, here the answer could be made by ‘Yes’ or ‘No’.
Hence, it is a decidable problem.
Example 2
Given a regular language L and string w, how can we check if w ∈ L?
Solution
Take the DFA that accepts L and check if w is accepted
Some more decidable problems are −
 Does DFA accept the empty language?
 Is L1 ∩ L2 = ∅ for regular sets?
Note −
 If a language L is decidable, then its complement L' is also decidable
 If a language is decidable, then there is an enumerator for it.
Semi- Decidable Problems
Semi-Decidable problems are those for which a Turing machine halts on
the input accepted by it but it can either halt or loop forever on the input
which is rejected by the Turing Machine.
Such problems are termed as Turing Recognizable problems.
Examples – We will now consider few important Decidable problems:
 Are two regular languages L and M equivalent?
We can easily check this by using Set Difference operation.
L-M =Null and M-L =Null.
Hence (L-M) U (M-L) = Null, then L,M are equivalent.
 Membership of a CFL?
We can always find whether a string exists in a given CFL by using an
algorithm based on dynamic programming.
 Emptiness of a CFL
By checking the production rules of the CFL we can easily state
whether the language generates any strings or not.
Undecidable Language
 For an undecidable language, there is no Turing Machine which
accepts the language and makes a decision for every input
string w (TM can make decision for some input string though).
 A decision problem P is called “undecidable” if the language L of all
yes instances to P is not decidable.
 Undecidable languages are not recursive languages, but sometimes,
they may be recursively enumerable languages.
 The problems for which we can’t construct an algorithm that can
answer the problem correctly in finite time are termed as Undecidable
Problems.
 These problems may be partially decidable but they will never be
decidable.
 That is there will always be a condition that will lead the Turing
Machine into an infinite loop without providing an answer at all.
 We can understand Undecidable Problems intuitively by
considering Fermat’s Theorem, a popular Undecidable Problem which
states that no three positive integers a, b and c for any n>2 can ever satisfy
the equation: a^n + b^n = c^n.
 If we feed this problem to a Turing machine to find such a solution which
gives a contradiction then a Turing Machine might run forever, to find the
suitable values of n, a, b and c.
 But we are always unsure whether a contradiction exists or not and hence
we term this problem as an Undecidable Problem.
Examples – These are few important Undecidable Problems:
 Whether a CFG generates all the strings or not?
As a CFG generates infinite strings, we can’t ever reach up to the last string and
hence it is Undecidable.
 Whether two CFG L and M equal?
Since we cannot determine all the strings of any CFG, we can predict that two
CFG are equal or not.
 Ambiguity of CFG?
There exist no algorithm which can check whether for the ambiguity of a CFL.
We can only check if any particular string of the CFL generates two different
parse trees then the CFL is ambiguous.
 Is it possible to convert a given ambiguous CFG into corresponding
non-ambiguous CFL?
It is also an Undecidable Problem as there doesn’t exist any algorithm
for the conversion of an ambiguous CFL to non-ambiguous CFL.
 Is a language Learning which is a CFL, regular?
This is an Undecidable Problem as we can not find from the
production rules of the CFL whether it is regular or not.
Example
 The halting problem of Turing machine
 The mortality problem
 The mortal matrix problem
 The Post correspondence problem, etc.
Turing Machine Halting Problem
Problem − Does the Turing machine finish computing of the string w in a
finite number of steps? The answer must be either yes or no.
Proof − At first, we will assume that such a Turing machine exists to solve
this problem and then we will show it is contradicting itself. We will call
this Turing machine as a Halting machine that produces a ‘yes’ or ‘no’ in a
finite amount of time. If the halting machine finishes in a finite amount of
time, the output comes as ‘yes’, otherwise as ‘no’. The following is the
block diagram of a Halting machine −
Now we will design an inverted halting machine (HM)’ as −
 If H returns YES, then loop forever.
 If H returns NO, then halt.
The following is the block diagram of an ‘Inverted halting machine’ −
Further, a machine (HM)2 which input itself is constructed as follows −
 If (HM)2 halts on input, loop forever.
 Else, halt.
Here, we have got a contradiction. Hence, the halting problem is undecidable.
chapter 2.pptx
chapter 2.pptx

More Related Content

What's hot

Pumping lemma Theory Of Automata
Pumping lemma Theory Of AutomataPumping lemma Theory Of Automata
Pumping lemma Theory Of Automatahafizhamza0322
 
Church Turing Thesis
Church Turing ThesisChurch Turing Thesis
Church Turing ThesisHemant Sharma
 
Control Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unitControl Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unitabdosaidgkv
 
Algorithms Lecture 2: Analysis of Algorithms I
Algorithms Lecture 2: Analysis of Algorithms IAlgorithms Lecture 2: Analysis of Algorithms I
Algorithms Lecture 2: Analysis of Algorithms IMohamed Loey
 
Deciability (automata presentation)
Deciability (automata presentation)Deciability (automata presentation)
Deciability (automata presentation)Sagar Kumar
 
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)Mohammad Ilyas Malik
 
Two-way Deterministic Finite Automata
Two-way Deterministic Finite AutomataTwo-way Deterministic Finite Automata
Two-way Deterministic Finite AutomataHafsa.Naseem
 
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDA
Push Down Automata (PDA) | TOC  (Theory of Computation) | NPDA | DPDAPush Down Automata (PDA) | TOC  (Theory of Computation) | NPDA | DPDA
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDAAshish Duggal
 

What's hot (20)

Turing machine-TOC
Turing machine-TOCTuring machine-TOC
Turing machine-TOC
 
Pumping lemma Theory Of Automata
Pumping lemma Theory Of AutomataPumping lemma Theory Of Automata
Pumping lemma Theory Of Automata
 
Church Turing Thesis
Church Turing ThesisChurch Turing Thesis
Church Turing Thesis
 
Control Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unitControl Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unit
 
Top down parsing
Top down parsingTop down parsing
Top down parsing
 
Loops in flow
Loops in flowLoops in flow
Loops in flow
 
Turing machine
Turing machineTuring machine
Turing machine
 
Compiler unit 2&3
Compiler unit 2&3Compiler unit 2&3
Compiler unit 2&3
 
Code Optimization
Code OptimizationCode Optimization
Code Optimization
 
Algorithms Lecture 2: Analysis of Algorithms I
Algorithms Lecture 2: Analysis of Algorithms IAlgorithms Lecture 2: Analysis of Algorithms I
Algorithms Lecture 2: Analysis of Algorithms I
 
Deciability (automata presentation)
Deciability (automata presentation)Deciability (automata presentation)
Deciability (automata presentation)
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
 
Back patching
Back patchingBack patching
Back patching
 
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
 
4.6 halting problem
4.6 halting problem4.6 halting problem
4.6 halting problem
 
Recognition-of-tokens
Recognition-of-tokensRecognition-of-tokens
Recognition-of-tokens
 
Interrupts
InterruptsInterrupts
Interrupts
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
 
Two-way Deterministic Finite Automata
Two-way Deterministic Finite AutomataTwo-way Deterministic Finite Automata
Two-way Deterministic Finite Automata
 
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDA
Push Down Automata (PDA) | TOC  (Theory of Computation) | NPDA | DPDAPush Down Automata (PDA) | TOC  (Theory of Computation) | NPDA | DPDA
Push Down Automata (PDA) | TOC (Theory of Computation) | NPDA | DPDA
 

Similar to chapter 2.pptx

Undecidability Basic definitions.pptx
Undecidability Basic definitions.pptxUndecidability Basic definitions.pptx
Undecidability Basic definitions.pptxsajinis3
 
Turing machine and Halting Introduction
Turing machine and Halting IntroductionTuring machine and Halting Introduction
Turing machine and Halting IntroductionAmartyaYandrapu1
 
9. chapter 8 np hard and np complete problems
9. chapter 8   np hard and np complete problems9. chapter 8   np hard and np complete problems
9. chapter 8 np hard and np complete problemsJyotsna Suryadevara
 
the halting_problem
the halting_problemthe halting_problem
the halting_problemRajendran
 
Theory of Computer Science - Post Correspondence Problem
Theory of Computer Science - Post Correspondence ProblemTheory of Computer Science - Post Correspondence Problem
Theory of Computer Science - Post Correspondence ProblemKaran Thakkar
 
hghghghhghghgggggggggggggggggggggggggggggggggg
hghghghhghghgggggggggggggggggggggggggggggggggghghghghhghghgggggggggggggggggggggggggggggggggg
hghghghhghghggggggggggggggggggggggggggggggggggadugnanegero
 
Formal language & automata theory
Formal language & automata theoryFormal language & automata theory
Formal language & automata theoryNYversity
 
Chapter 7 Undecidable Reducible_Theory_of_Computation.ppt
Chapter 7 Undecidable Reducible_Theory_of_Computation.pptChapter 7 Undecidable Reducible_Theory_of_Computation.ppt
Chapter 7 Undecidable Reducible_Theory_of_Computation.pptgiwix86938
 
Formal Languages and Automata Theory unit 5
Formal Languages and Automata Theory unit 5Formal Languages and Automata Theory unit 5
Formal Languages and Automata Theory unit 5Srimatre K
 
compatibility and complexity in the IS.ppt
compatibility and complexity in the IS.pptcompatibility and complexity in the IS.ppt
compatibility and complexity in the IS.pptMuhammadAbdullah311866
 
Winter 9 Decidability.pptx
Winter 9 Decidability.pptxWinter 9 Decidability.pptx
Winter 9 Decidability.pptxHarisPrince
 
Algorithm chapter 10
Algorithm chapter 10Algorithm chapter 10
Algorithm chapter 10chidabdu
 

Similar to chapter 2.pptx (20)

Unit v
Unit vUnit v
Unit v
 
HALTINGPROBLEM.pptx
HALTINGPROBLEM.pptxHALTINGPROBLEM.pptx
HALTINGPROBLEM.pptx
 
Undecidability Basic definitions.pptx
Undecidability Basic definitions.pptxUndecidability Basic definitions.pptx
Undecidability Basic definitions.pptx
 
Turing machine and Halting Introduction
Turing machine and Halting IntroductionTuring machine and Halting Introduction
Turing machine and Halting Introduction
 
9. chapter 8 np hard and np complete problems
9. chapter 8   np hard and np complete problems9. chapter 8   np hard and np complete problems
9. chapter 8 np hard and np complete problems
 
NP completeness
NP completenessNP completeness
NP completeness
 
the halting_problem
the halting_problemthe halting_problem
the halting_problem
 
Theory of Computer Science - Post Correspondence Problem
Theory of Computer Science - Post Correspondence ProblemTheory of Computer Science - Post Correspondence Problem
Theory of Computer Science - Post Correspondence Problem
 
Turing machine
Turing machineTuring machine
Turing machine
 
hghghghhghghgggggggggggggggggggggggggggggggggg
hghghghhghghgggggggggggggggggggggggggggggggggghghghghhghghgggggggggggggggggggggggggggggggggg
hghghghhghghgggggggggggggggggggggggggggggggggg
 
QB104545.pdf
QB104545.pdfQB104545.pdf
QB104545.pdf
 
Formal language & automata theory
Formal language & automata theoryFormal language & automata theory
Formal language & automata theory
 
Chapter 7 Undecidable Reducible_Theory_of_Computation.ppt
Chapter 7 Undecidable Reducible_Theory_of_Computation.pptChapter 7 Undecidable Reducible_Theory_of_Computation.ppt
Chapter 7 Undecidable Reducible_Theory_of_Computation.ppt
 
Formal Languages and Automata Theory unit 5
Formal Languages and Automata Theory unit 5Formal Languages and Automata Theory unit 5
Formal Languages and Automata Theory unit 5
 
lect_23.pdf
lect_23.pdflect_23.pdf
lect_23.pdf
 
compatibility and complexity in the IS.ppt
compatibility and complexity in the IS.pptcompatibility and complexity in the IS.ppt
compatibility and complexity in the IS.ppt
 
Np
NpNp
Np
 
Winter 9 Decidability.pptx
Winter 9 Decidability.pptxWinter 9 Decidability.pptx
Winter 9 Decidability.pptx
 
Algorithm chapter 10
Algorithm chapter 10Algorithm chapter 10
Algorithm chapter 10
 
UNIT -IV DAA.pdf
UNIT  -IV DAA.pdfUNIT  -IV DAA.pdf
UNIT -IV DAA.pdf
 

Recently uploaded

Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 

Recently uploaded (20)

Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 

chapter 2.pptx

  • 2. Decidable  A language is called Decidable or Recursive if there is a Turing machine which accepts and halts on every input string w. Every decidable language is Turing-Acceptable.
  • 3.  For a decidable language, for each input string, the TM halts either at the accept or the reject state as depicted in the following diagram −
  • 4. Generally A problem is said to be Decidable if we can always construct a corresponding algorithm that can answer the problem correctly.  We can intuitively understand Decidable problems by considering a simple example.  Suppose we are asked to compute all the prime numbers in the range of 1000 to 2000. To find the solution of this problem, we can easily devise an algorithm that can enumerate all the prime numbers in this range.  Now talking about Decidability in terms of a Turing machine, a problem is said to be a Decidable problem if there exists a corresponding Turing machine which halts on every input with an answer- yes or no.  It is also important to know that these problems are termed as Turing Decidable since a Turing machine always halts on every input, accepting or rejecting it.
  • 5. Example 1 Find out whether the following problem is decidable or not − Is a number ‘m’ prime? Solution Prime numbers = {2, 3, 5, 7, 11, 13, …………..} Divide the number ‘m’ by all the numbers between ‘2’ and ‘√m’ starting from ‘2’. If any of these numbers produce a remainder zero, then it goes to the “Rejected state”, otherwise it goes to the “Accepted state”. So, here the answer could be made by ‘Yes’ or ‘No’. Hence, it is a decidable problem.
  • 6. Example 2 Given a regular language L and string w, how can we check if w ∈ L? Solution Take the DFA that accepts L and check if w is accepted
  • 7. Some more decidable problems are −  Does DFA accept the empty language?  Is L1 ∩ L2 = ∅ for regular sets? Note −  If a language L is decidable, then its complement L' is also decidable  If a language is decidable, then there is an enumerator for it.
  • 8. Semi- Decidable Problems Semi-Decidable problems are those for which a Turing machine halts on the input accepted by it but it can either halt or loop forever on the input which is rejected by the Turing Machine. Such problems are termed as Turing Recognizable problems. Examples – We will now consider few important Decidable problems:  Are two regular languages L and M equivalent? We can easily check this by using Set Difference operation. L-M =Null and M-L =Null. Hence (L-M) U (M-L) = Null, then L,M are equivalent.
  • 9.  Membership of a CFL? We can always find whether a string exists in a given CFL by using an algorithm based on dynamic programming.  Emptiness of a CFL By checking the production rules of the CFL we can easily state whether the language generates any strings or not.
  • 10. Undecidable Language  For an undecidable language, there is no Turing Machine which accepts the language and makes a decision for every input string w (TM can make decision for some input string though).  A decision problem P is called “undecidable” if the language L of all yes instances to P is not decidable.  Undecidable languages are not recursive languages, but sometimes, they may be recursively enumerable languages.  The problems for which we can’t construct an algorithm that can answer the problem correctly in finite time are termed as Undecidable Problems.  These problems may be partially decidable but they will never be decidable.  That is there will always be a condition that will lead the Turing Machine into an infinite loop without providing an answer at all.
  • 11.  We can understand Undecidable Problems intuitively by considering Fermat’s Theorem, a popular Undecidable Problem which states that no three positive integers a, b and c for any n>2 can ever satisfy the equation: a^n + b^n = c^n.  If we feed this problem to a Turing machine to find such a solution which gives a contradiction then a Turing Machine might run forever, to find the suitable values of n, a, b and c.  But we are always unsure whether a contradiction exists or not and hence we term this problem as an Undecidable Problem.
  • 12.
  • 13. Examples – These are few important Undecidable Problems:  Whether a CFG generates all the strings or not? As a CFG generates infinite strings, we can’t ever reach up to the last string and hence it is Undecidable.  Whether two CFG L and M equal? Since we cannot determine all the strings of any CFG, we can predict that two CFG are equal or not.  Ambiguity of CFG? There exist no algorithm which can check whether for the ambiguity of a CFL. We can only check if any particular string of the CFL generates two different parse trees then the CFL is ambiguous.
  • 14.  Is it possible to convert a given ambiguous CFG into corresponding non-ambiguous CFL? It is also an Undecidable Problem as there doesn’t exist any algorithm for the conversion of an ambiguous CFL to non-ambiguous CFL.  Is a language Learning which is a CFL, regular? This is an Undecidable Problem as we can not find from the production rules of the CFL whether it is regular or not.
  • 15. Example  The halting problem of Turing machine  The mortality problem  The mortal matrix problem  The Post correspondence problem, etc. Turing Machine Halting Problem Problem − Does the Turing machine finish computing of the string w in a finite number of steps? The answer must be either yes or no. Proof − At first, we will assume that such a Turing machine exists to solve this problem and then we will show it is contradicting itself. We will call this Turing machine as a Halting machine that produces a ‘yes’ or ‘no’ in a finite amount of time. If the halting machine finishes in a finite amount of time, the output comes as ‘yes’, otherwise as ‘no’. The following is the block diagram of a Halting machine −
  • 16.
  • 17. Now we will design an inverted halting machine (HM)’ as −  If H returns YES, then loop forever.  If H returns NO, then halt. The following is the block diagram of an ‘Inverted halting machine’ − Further, a machine (HM)2 which input itself is constructed as follows −  If (HM)2 halts on input, loop forever.  Else, halt. Here, we have got a contradiction. Hence, the halting problem is undecidable.