ICS221 TOC Criteria and Intro
ICS221 TOC Criteria and Intro
HALTING
PROBLEM
THEORY OF COMPUTATION
In TOC, we mathematically prove that
such problems CAN or CANNOT be
solved using something called MODELS
OF COMPUTATION.
Models of computation is an abstract
representation of a machine; not the
same kind of machine that we use
everyday.
Any of the machines that takes an
input and computes an output, and we
can use these machines to solve problems
in computing.
TURING MACHINE
Most popular machine is Turing
machine.
Developed by Alan Turing to prove
how there are lot of problems in this
world that can never be solved through
computing.
APPROACH TO STUDY THEORY OF COMPUTATION
We’ll start from the very basic models of computation.
Understand the terminologies.
Understand the design patterns, working, mapping
functions.
Compare the models, understand the differences.
Practice,
practice more…,
practice more and more…..
WHAT IS COMPUTATION?
It is the step-by-step solution to a problem.
Examples:
Multiplication of two numbers
To search for a word in the dictionary.
Given a graph G. If s and t are two vertices in G, how to find out whether there
is a path from s to t?
Can a graph be coloured using three colours?
The step-by-step procedure, known as algorithm, helps us to solve these questions
either positive or negative.
COMPUTATIONAL PROBLEMS
Problem 1: I have a program P. If P will execute and terminate properly for an
input I.
Case 1: Runs, terminates and outputs the corresponding output
Case 2: Loops infinitely.
Problem 2: Is graph G three colourable?
Problem 3: Shortest path from home to IIITK.
COMPUTATIONAL PROBLEMS
One of the problem is easy.
One is hard.
One is impossible.
Which problem?
What computers can do and what cannot be done by computers!
Use computational models
COMPUTATIONAL MODELS
What kind of computational models/devices we use to solve these problems?
Calculator, cell phones, computers, pen and paper.
What are the power and limitations of computational devices.
What kind of problems cannot be solved.
The first kind of computational model is finite automata.
FINITE AUTOMATA
A computational model which has states and number of states is finite.
Does not depends on the input size.
Examples:
Electric switch
Fan regulator
BRANCHES OF THEORY OF COMPUTATION
Automata Theory: Studies abstract machines and the problems they solve.
Computability Theory: Explores what problems can be solved on a model of
computation.
Complexity Theory: Focuses on the resources required to solve computational
problems.
AUTOMATA THEORY
Studies abstract machines (automata) and the computational problems they can
solve.
Key Concepts:
Finite State Machines: Simple models used in parsing and control systems.
Pushdown Automata: Used to understand context-free languages, like
programming language syntax.
Turing Machines: The foundation of computability, used to define what it
means for a function to be computable.
Applications:
Designing compilers and parsers.
Regular expressions in text processing.
Understanding patterns in string matching and linguistics.
COMPUTABILITY THEORY
Explores what problems can or cannot be solved using a computational model.
Key Concepts:
Decidability: Determines whether a problem can be solved by an algorithm.
Undecidability: Problems like the Halting Problem, which cannot be solved
algorithmically.
Recursive and Recursively Enumerable Languages: Classes of problems based on
their solvability.
Applications:
Identifying the limits of automated systems.
Understanding problems in cryptography and formal verification.
COMPLEXITY THEORY
Examines the resources (time, space) required to solve computational problems.
Key Concepts:
Time Complexity: How the number of steps grows with input size (e.g., polynomial
time problems).
Space Complexity: Memory requirements for computation.
P vs NP Problem: The question of whether every problem whose solution can be
verified quickly can also be solved quickly.
Applications:
Optimizing algorithms.
Determining the feasibility of large-scale computations.
Cryptographic security (e.g., RSA relies on factoring being computationally hard).
HOW THEY ARE RELATED?
Automata Theory lays the groundwork by defining models of computation.
Computability Theory determines what problems those models can solve.
Complexity Theory focuses on how efficiently these problems can be solved.