Final Revision of Theory
Final Revision of Theory
Theory of computation:
- Automata Theory
- Computability Theory
-Complexity Theory
The theories of computability and complexity are closely related. In complexity theory, the
objective is to classify problems as easy ones and hard ones; whereas in computability theory, the
classification of problems is by those that are solvable and those that are not. Computability
theory introduces several of the concepts used in complexity theory.
What is PDA?
We define PDA as FA augmented with stack, recognizing the class of languages, context free
language (CFL)
Ch7 Revision
A post machine is similar to a PDA, but with a few differences. It is deterministic, it has an
auxiliary queue instead of a stack, and the input is assumed to have been previously loaded onto
the queue.
A Post Machine (PM) is defined using a 5-tuple, as follows: (Σ, Queue, Γ, q0, δ)
Here q0 is the start state denoted using START and δ is the transition function represented using
pictorial representation with READ, ADD, START, ACCEPT and REJECT symbols. Γ is
queue alphabet.
The alphabet Σ: The alphabet Σ of input symbols and an additional symbol # denoties end of
string.
Queue, a Linear storage: A Queue or store is a linear storage. Initially, the input sting is stored in
a queue. The working principle of the queue is First In First Out (FIFO).
Read State: Read is used to remove the leftmost (front) symbol from the queue and branch
accordingly.
ADD state: Add state is used to add (concatenates) the symbol onto the right of (rear end) the
queue.
Accept and Reject state: If at the Read state, there is no labeled edge for the character read in,
the Post Machine transits to the REJECT state.
The language defined by Post Machine is the set of strings that it accepts. Like FA, PDA and
TM, Post Machine is a language recognizer or acceptor. Post machines are deterministic.
A post machine does not have a separate input store like FA, PDA, and TMs have. It has a
Queue.
Post machines are deterministic. Non-deterministic post machine, or NPM, is a Post Machine
which allows more than one edge with the same label to come from a READ state.
Ch8 Revision
Turing machine is the accurate model for what any physical computing device is capable of
doing.
Proof theory is a major branch of mathematical logic and theoretical computer science within
which proofs are treated as formal mathematical objects, facilitating their analysis by
mathematical techniques.
Un-decidability:
There are specific problems that cannot be solved using a computer. These problems are called
as undecidable problems.
Undecidable problems arise in a variety of areas. Let us show that a combinatorial problem
known as Post’s Correspondence problem is unsolvable.
Church-Turing Thesis
Alan Turing has claimed that anything that can be computed can be programmed on the Turing
machine. According to the Church-Turing hypothesis, any algorithm can be programmed on a
TM. Any problem that cannot be solved by a Turing machine is called as unsolvable. Unsolvable
problems are those which cannot have algorithmic solution, also known as undecidable
problems.
The Class P
An algorithm is said to have polynomial time complexity, if it has complexity O(nb) where b is
an integer (b ≥ 1).
Class NP
is the class of decision problems that can be solved by nondeterministic polynomial algorithms.
The problems that can be solved in polynomial time are known as called Tractable
Ch10 Revision
Backtracking
Dynamic programming
Greedy technique
Divide and Conquer algorithm is a problem-solving strategy that involves breaking down a
complex problem into smaller, more manageable parts, solving each part individually, and then
combining the solutions to solve the original problem. It is a widely used algorithmic technique
in computer science and mathematics.
This approach does not follow fixed rules of computation. It follows trial and error to solve a
problem.
Branch and bound is a method for solving optimization problems by breaking them down into
smaller sub-problems and using a bounding function to eliminate sub-problems that cannot
contain the optimal solution
Dynamic Programming (DP) is a method used in mathematics and computer science to solve
complex problems by breaking them down into simpler subproblems.
Greedy Approach
Defining Algorithm:
Algorithm is a set of rules for carrying out some task, either by hand or more usually on a
machine.
Randomized Algorithms:
An algorithm that uses random numbers to decide what to do next anywhere in its logic is
called a Randomized Algorithm.
For example, in Randomized Quick Sort,
Performance: It is possible that the randomized algorithm may or may not improve the
performance of an algorithm.
Probability of Error: For critical applications, a small probability of error or a small
probability of requiring more time to run an algorithm is not acceptable. Ex. nuclear reactor.
Probabilistic algorithms are algorithms that use random elements to solve problems or make
predictions