0% found this document useful (0 votes)
5 views24 pages

Comp CH3

The document discusses the concept of undecidability in computation, defining undecidable problems as those for which no algorithm can provide a definitive answer in finite time. It contrasts decidable problems, which can be solved by algorithms that always halt, with undecidable problems like the Halting Problem and the ambiguity of context-free languages. Additionally, it explores the significance of halt states in Turing machines and the implications of undecidability in understanding the limits of computation.

Uploaded by

danimicro08
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views24 pages

Comp CH3

The document discusses the concept of undecidability in computation, defining undecidable problems as those for which no algorithm can provide a definitive answer in finite time. It contrasts decidable problems, which can be solved by algorithms that always halt, with undecidable problems like the Halting Problem and the ambiguity of context-free languages. Additionally, it explores the significance of halt states in Turing machines and the implications of undecidability in understanding the limits of computation.

Uploaded by

danimicro08
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 24

CHAPTER THREE

UN-DECIDABILITY
UN-DECIDABILITY
 Introduction to Un-decidability

 Turing Decidable and Turing Acceptable

 Un-decidable problems:

 TM Halting Problems

 Unsolvable problems

 CFL(Context Free Language)

 Undividable problems
UN-DECIDABILITY
 The problems for which we can’t construct an algorithm that can
answer the problem correctly in the infinite time are termed as
Undecidable Problems in the theory of computation (TOC).

 The impossibility of proving or disproving a statement within a


formal system.

 A problem is undecidable if there is no Turing machine that will


always halt an infinite amount of time to answer as ‘yes’ or ‘no’.

 An undecidable problem has no algorithm to determine the


answer for a given input.
UN-DECIDABILITY
 Examples
 Ambiguity of context-free languages: Given a context-free language, there is
no Turing machine which will always halt in finite amount of time and give
answer whether language is ambiguous or not.

 Equivalence of two context-free languages: Given two context-free


languages, there is no Turing machine which will always halt in finite amount
of time and give answer whether two context free languages are equal or not.

 Everything or completeness of CFG: Given a CFG and input alphabet,


whether CFG will generate all possible strings of input alphabet (?*)is
undecidable.
Decidable Problems
 A problem is decidable if we can construct a Turing machine which will halt
in finite amount of time for every input and give answer as ‘yes’ or ‘no’.

 A decidable problem has an algorithm to determine the answer for a given


input.

 Examples

 Equivalence of two regular languages: Given two regular languages, there is an algorithm and
Turing machine to decide whether two regular languages are equal or not.

 Finiteness of regular language: Given a regular language, there is an algorithm and Turing
machine to decide whether regular language is finite or not.

 Emptiness of context free language: Given a context free language, there is an algorithm
whether CFL is empty or not.
Difference Between Decidable
and Undecidable Problems
Aspect Decidable Problems Undecidable Problems

Problems that can be solved by an algorithm that always Problems where no algorithm can give a solution for
Definition
gives a correct answer in a finite time. all possible cases.

Cannot be solved for all inputs using a single


Solvability Always solvable using a step-by-step process (algorithm).
algorithm.

There is an algorithm that works for every input and always


Algorithm No algorithm can solve the problem for every input.
finishes with an answer.

The algorithm stops (halts) and gives an answer for every The algorithm might never stop for some inputs, or
Halting
input. no algorithm exists.

Problems like checking if a number is even or odd, or if a Examples include the Halting Problem, where you
Examples string belongs to a regular language (like finding a match in can’t always tell if a program will finish running or
a search). run forever.

Decision There’s a clear method to always reach a correct No guaranteed method exists to solve the problem in
Procedure conclusion. every case.

Too complex to compute in general, and no universal


Complexity May be complex but can always be computed.
solution exists.

Useful in practical computing tasks like compiling code or Helps understand the limits of what computers can
Applications
searching for text patterns. do, showing what problems are beyond computation.
Acceptable (Recognizable):
 A TM accepts a string if it enters an accepting state when
processing that string.

 A language is considered acceptable if there is a TM that can


accept all strings belonging to that language, even if it might
not halt on strings not in the language.

 Decidable:

 A language is considered decidable if there exists a TM that not only


accepts strings in the language but also always halts on any input,
providing a clear "yes" or "no" answer for membership in the language.
Decidable
 Important distinction:

 Not all acceptable languages are decidable: A language can be recognized


by a TM (acceptable) but still not be decidable if the TM might run
indefinitely on some inputs that are not part of the language.

 Example:

 Acceptable but not decidable: The "Halting Problem" is an example of a


language that is recognizable (a TM can check if a given program will
halt on a specific input) but not decidable (there is no TM that can always
determine whether any given program will halt on any input).
Decision Problem
 A decision problem is a restricted type of an algorithmic problem
where for each input there are only two possible outputs.

 A decision problem is a function that associates with each input


instance of the problem a truth value true or false.

 A decision algorithm is an algorithm that computes the correct


truth value for each input instance of a decision problem.

 The algorithm has to terminate on all inputs!

 A decision problem is decidable if there exists a decision


algorithm for it. otherwise it is undecidable.
Decision Problem
 A decision problem is a computational problem that can be posed as a yes-no
question based on the given input values. Essentially, it boils down to determining
whether a specific input belongs to a particular set or satisfies a certain condition.

 Decision problems play a crucial role in understanding the limits of computation.

 By studying decidable and undecidable problems, we gain insights into:

 The power and limitations of algorithms: Understanding which problems can


and cannot be solved algorithmically.

 The nature of computation: Exploring the fundamental concepts of


computability and the boundaries of what computers can achieve.

 Complexity of problems: Classifying problems based on their difficulty and the


resources required to solve them.
Halt and Loop Problems
 The halting problem is a classic example of an undecidable
problem in computability theory.

 It asks whether, given an arbitrary computer program and an


input, we can determine if the program will eventually halt
(terminate its execution) or run forever (loop indefinitely).
Halt and Loop Problems
 The halting problem has profound implications in computer
science:
 Limits of Computation: It demonstrates the fundamental limitations of what
computers can do. There are problems that are inherently unsolvable by any
algorithm.

 Theoretical Foundations: The halting problem is a cornerstone of computability


theory, providing insights into the nature of computation and the boundaries of
what can be algorithmically achieved.

 Practical Considerations: While the halting problem doesn't directly affect


everyday programming, it highlights the importance of careful program design
and testing to avoid unintended infinite loops.
The Loop Problem
 The loop problem is a related problem that asks whether a
given program will ever enter an infinite loop.

 It's also undecidable, as it's essentially a variant of the halting


problem.
Halt State in Turing Machine
 In the context of Turing Machines, a halt state is a specific
state that signifies the completion of a computation. When a
Turing Machine enters a halt state, it means that the machine
has finished processing the input and will no longer change its
state or move its tape head.
Halt State in Turing Machine
 Significance of Halt States

 Decidability: Halt states are crucial for defining decidable


problems. A problem is decidable if there exists a Turing Machine
that halts on all inputs, providing a definitive "yes" or "no" answer.

 The Halting Problem: The concept of halt states is central to the


famous Halting Problem, which asks whether it's possible to
determine if an arbitrary Turing Machine will halt on a given input.

 Turing proved that no general algorithm can solve this problem,


highlighting the limitations of computation.
Halt State in Turing Machine
 A Turing Machine can have multiple halt states, each
potentially representing a different outcome or decision.

 When a Turing Machine enters a halt state, it stops its


operation.

 The absence of a halt state can indicate that a Turing Machine


is stuck in an infinite loop.
Unsolvable Problems
 A computational problem that cannot be solved by a Turing Machine

 The associated function is called un-computable function.

 In simple word, if it is impossible to develop an algorithm for a given


problem, then such problem is unsolvable problem.

 A problem in computer science is considered as unsolved when no solution


is known; or when experts in the field disagree about the proposed solution.

 For example: natural language processing algorithms, ….

 One of the well-known unsolvable problems is the halting problem.

 Church’s thesis estimates as the problem that can be solved by human can
also solved with Turing machine
Context Free Languages (CFL)
 In formal language theory, a context free language is a
language which is generated by a context free grammar
(CFG).
Context Free Languages (CFL)
Context Free Languages (CFL)
Context Free Languages (CFL)
Context Free Languages (CFL)
Context Free Languages (CFL)
Context Free Languages (CFL)

You might also like