NP Np-Hard Np-Complete: Data Structure and Algorithm
NP Np-Hard Np-Complete: Data Structure and Algorithm
NP-COMPLETE
Data Structure And
Algorithm
Group 2:
• 2521311 Azka Muntazza
• 2521324 Munazza (Leader)
• 2521326 Zainab Shahid
• 2521332 Javeria Sohail
• 2521349 Tayyaba Khan
Add a footer 2
FR
Deterministic And Non-deterministic
Xi ={x1,x2,x3}
CNF={x1 V x2 V x3} ∧ {x1 V x2 V x3}
FR
Exponential Time:
• Satisfiability-2n
• 0/1knap sack-2n
• Traveling sp-2n
• Sum of Subset-2n
• Graph coloring-2n
• Hamiltonion cycle-2n
FR
Reduction:
In computability theory and computational
complexity theory, a reduction is an
algorithm for transforming one problem
into another problem. A sufficiently efficient
reduction from one problem to another may be
used to show that the second problem is at
least as difficult as the first.
Satisfiability-2n ∝ 0/1knap sack-2n
Reduction converting time must be polynomial
time.
FR
NP-hard
An NP-hard problem is at least as hard as the
hardest problem in NP and it is the class of the
problems such that every problem in NP reduces to
NP-hard.
• Some of the examples of problems in Np-hard are:
• Halting problem.
• Qualified Boolean formulas.
• No Hamiltonian cycle.
FR
Satisfiability-2n ∝ 0/1knap Sack-2n
Add a footer 17
FR
Thank you
18