Unit 1.4:-Complexity Theory 6: Class

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Unit 1.

4 :- Complexity Theory

Class 6

Unit 1.4 Parallel and Distributed Computing 1


Complexity Theory
• Estimates the amount of computational resources (time and
storage) need to solve a problem
• Basic Terms
1. Introducing a notation to specify complexity
 Introduce a mathematical notation to specify the functional relationship
between the input size of the problem and consumption and
computational resources
2. Choice of machine model to standardize the measure
 Specify the underlying machine model to prescribe the measures for the
consumption of resources
 So that machine cannot exceed the resources prescribed by the writer of
the algorithm
3. Refinement of the measures of parallel computation
 How fast can we solve the problem, when a large number of processors
are put together to work in parallel

Unit 1.4 Parallel and Distributed Computing 2


Turing Machine as a basis of consequences

1. Simplicity of abstraction
2. Dual nature of TM
3. Inclusion of non – determinism
4. Realization of unbounded parallelism
5. Provision of an easy abstract measure for
resources

Unit 1.4 Parallel and Distributed Computing 3


Simplicity of abstraction
• Simple model of an abstract machine that consists of three components
– Finite state machine
– A read/write head
– Infinite tape memory
• Mathematically Turing machine can be defined by
TM = (Q, , , , q0, B, F), where
Q  set of states
  set of input alphabet
  set of tape symbols
  transition function
q0  starting state
B  blank symbol
F  set of final states

Unit 1.4 Parallel and Distributed Computing 4


Dual nature of TM
 Universal TM
 TM whose input consists of program and a
data set for the program to process
 Specialty (an simulate any special purpose
algorithm) and universality (can simulate any
other TM)

Unit 1.4 Parallel and Distributed Computing 5


Inclusion of non – determinism
• NDTM  alternative moves
• Branching tree called OR tree
• A computation halts, if there is a sequence
that leads to an accepting state
• Rejects an input if and only if there is no
possible sequence of moves

Unit 1.4 Parallel and Distributed Computing 6


Realization of unbounded parallelism
• NDTM can be simulated using DTMs by allowing
unbounded parallelism in computation
• Each time a choice is made, the DTM makes
several copies of itself
• One copy is made for each possible choice
• Thus many copies of DTM are executing at the
same time at different nodes in the tree
• The copy of DTM that reaches a solution early
halts all other DTM, if a copy fails, it only
terminates

Unit 1.4 Parallel and Distributed Computing 7


Provision of an easy abstract measure
for resources
• DTM  by counting each moves as one unit
time and each cell as scanned as one
space time
• NDTM  complexity is the number of moves
required for an accepting sequence
of moves since there are accepting
sequence

Unit 1.4 Parallel and Distributed Computing 8


ATM (Alternating Turing Machine)
• Consists of an infinite memory tape and a finite state
control as in TM
• States of ATM are partitioned into normal, existential and
universal states
1. Universal State  it leads to an acceptance, if and
only if all of its descendants
lead to an accepting state i.e. AND tree
2. Existential State  a computation is accepting if and only
if at least one of its descendants is
accepting i.e. OR tree
3. Normal State  computation leads to an acceptance if
and only if its unique descendent is
accepting

Unit 1.4 Parallel and Distributed Computing 9


Satisfiabilty Problem
• Let S = (x1  x2)  (x3  x4  x5) ………
• Is there an assignment to each literal such that
the sentence is true
• Example
• Let E be an CNF (Conjunctive Normal Form)
E = (x  y  z)  (x  y  w)  (z  w)  (x)
• Satisfiable under x = z = w = F and y = T
• But E = (x  y)  (x)  (y) ??????

Unit 1.4 Parallel and Distributed Computing 10


Parallel Complexity Models
• Synchronous parallel computation can be used
to solve problems like matrix multiplication
• In a synchronous parallel system, it is easy to
measure the time in terms of clock cycle
• It is because all identical processors work
under the control of centralized clock

Unit 1.4 Parallel and Distributed Computing 11


VLSI Computational Complexity
• Practical use of algorithm depends upon the
design of VLSI
• Because the manner in which the signal
propagates, influences the algorithm
• Two fundamental parameters deciding the
efficiency of VLSI chip is
1. Area of circuit (Space complexity)
2. Time taken to provide an output for a given
input (Time complexity)
Unit 1.4 Parallel and Distributed Computing 12
End of Session

Unit 1.4 Parallel and Distributed Computing 13

You might also like