0% found this document useful (0 votes)
10 views

Final Revision of Theory

The document discusses several topics related to theory of computation including automata theory, computability theory, complexity theory, post machines, Turing machines, undecidability, and algorithmic problem solving strategies like divide and conquer, backtracking, branch and bound, dynamic programming, and greedy techniques.

Uploaded by

fakemail233237
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Final Revision of Theory

The document discusses several topics related to theory of computation including automata theory, computability theory, complexity theory, post machines, Turing machines, undecidability, and algorithmic problem solving strategies like divide and conquer, backtracking, branch and bound, dynamic programming, and greedy techniques.

Uploaded by

fakemail233237
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Final Revision of theory

Theory of computation:

‐ It is a Study of power and limits of computing


It has three interacting components:

- 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

The Turing Machine

Turing machine is the accurate model for what any physical computing device is capable of
doing.

Definition: Formally, a Turing Machine is defined as follows: M = (S, Σ, Γ, δ, s0 , B, F) Here,

S is the finite set of states.

Γ is the finite set of allowable tape symbols.

B is the blank symbol; B ∈Γ.

Σ is the subset of Γ, not including B; it is the set of input symbols.

δ is the “next move” function which is a mapping from S× Γ to Q × Γ × { L, R}.

s0 is the start state.

F is the set of final states F ⊆ Q.

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.

A Turing-machine subroutine is a set of states that perform some useful process.


Ch9 Revision

Un-decidability:

There are specific problems that cannot be solved using a computer. These problems are called
as undecidable problems.

Computability: also known as recursion theory, is a branch of mathematical logic, computer


science, and the theory of computation that originated in the 1930s with the study of computable
functions and Turing degrees.

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

Problem Solving and Algorithmic Computing:

Solving a problem means taking proper actions to accomplish the task.

an algorithm for solving that particular problem. When problem-solving is to be accomplished


by using a computer, then an algorithm must be provided in a more precise way.

Problem Solving Strategies: An algorithmic strategy is sometimes also called a design


technique or design paradigm.

Problem Solving Strategies:

There are five algorithmic strategies, which are as follows:

Divide and conquer

Backtracking

Branch and bound

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.

Example: In the Merge Sort algorithm.


What is Backtracking Algorithm?

This approach does not follow fixed rules of computation. It follows trial and error to solve a
problem.

Backtracking is a problem-solving algorithmic technique that involves finding a solution


incrementally by trying different options and undoing them if they lead to a dead end

Branch and Bound:

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

What is Greedy Algorithm?


A greedy algorithm is a type of optimization algorithm that makes locally optimal choices at
each step to find a globally optimal solution.

Defining Algorithm:
Algorithm is a set of rules for carrying out some task, either by hand or more usually on a
machine.

Characteristics of an Algorithm: The following are the characteristics of an algorithm:


Input: An algorithm is supplied with zero or more external quantities.
Output: An algorithm must produce one or more results/outputs.
Unambiguous Steps/Definiteness: Each step in an algorithm must be clear and unambiguous.
This helps the one who is following the steps to take a definite action.
Finiteness: An algorithm must halt. Hence, it must have finite number of steps.
Effectiveness: Every instruction must be sufficiently basic.
Algorithmics is a field of computer science, defined as the study of algorithms.

An approximation algorithm is a way of dealing with NP-completeness for an optimization


problem.

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,

The advantages of using Randomized Algorithms are as follows:

Simplicity: Randomized algorithms are generally found to be simpler as compared to the


deterministic algorithm to solve the same problem.
Efficiency or Speed: Randomized algorithms are much faster as they have been shown to
provide better complexity bounds.
Paradigms: Randomized algorithms can be designed using various paradigms or approaches.

The disadvantages of using Randomized Algorithms are as follows:

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

in computer science, a parallel algorithm, as opposed to a traditional serial algorithm, is an


algorithm which can do multiple operations in a given time.
A sequential algorithm is run on a single processor.

You might also like