DAA PPT - Unit - IV
DAA PPT - Unit - IV
and
Design
Bharati Vidyapeeth’s Institute of Computer Applications and Management (GGS IP University) New Delhi, India by Mr. Manish Kumar
Pre-Requisites & Course Outcomes
© Bharati
Bharati Vidyapeeth’s
Vidyapeeth’s Institute
Institute of
of Computer
Computer Applications
Applications and
and Management,
Management, New
New Delhi-63
Delhi-63 by
by Mr.
Mr. Manish
Manish Kumar
Kumar U1.2
U3.2
Syllabus (Unit-IV)
• Backtracking: n-Queen’s Problem, Hamiltonian Circuit Problem, Subset-Sum Problem,
Graph Coloring Problem.
• Branch and Bound: Assignment Problem, Travelling Salesman Problem.
• Introduction to Computability, Polynomial-time Verification, NP-Completeness.
Complexity Classes: Reducibility, NP-Completeness Proof, NP-Complete & NP-Hard,
Problem Classification-P, NP, NPC, NP-Hard; Circuit Satisfiability, 3SAT, Vertex Cover,
Clique, Cook's Theorem..
• No. of Hours: 12
• Books:
T.H. Cormen, C.E. Leiserson, R.L. Rivest and C. Stein, “Introduction to Algorithms”, PHI, 2nd Edition, 2006.
Chapters[34-35]
S. Dasgupta, C. Papadimitriou and U.Vazirani, “Algorithms”, McGraw Hill Higher Education, 1st Edition, 2017.
Chapters[8-9]
J. Kleinberg and E. Tardos, “Algorithm Design”, Pearson Education, 2nd Edition, 2009. Chapters[8]
© Bharati
Bharati Vidyapeeth’s
Vidyapeeth’s Institute
Institute of
of Computer
Computer Applications
Applications and
and Management,
Management, New
New Delhi-63
Delhi-63 by
by Mr.
Mr. Manish
Manish Kumar
Kumar U1.3
U3.3
Branch and Bound
• Branch and Bound is a Systematic method for solving optimization problem.
• Branch and Bound applies on those optimization problem where greedy and
dynamic programming fails.
• Branching: Splitting into subregion
• Bound: Computes a lower bound on the value of any candidate solution in the
space represented by branching
• Pruning is the act of removing whole branches from the tree that cannot fulfill
constraints.
• Backtracking is effective for decision problems, but it is not designed for
optimization problem.
• Backtracking requires DFS while B&B requires BFS.
© Bharati
Bharati Vidyapeeth’s
Vidyapeeth’s Institute
Institute of
of Computer
Computer Applications
Applications and
and Management,
Management, New
New Delhi-63
Delhi-63 by
by Mr.
Mr. Manish
Manish Kumar
Kumar U1.4
U3.4
Branch and Bound
• Live Node: A node which has been generated and whose all children are not been
generated.
• E-node: A live node whose children are currently being generated is called E-node
(Expanding node)
• A dead node is that which is not going to be expanded further.
All children has been generated
Bounding function (which computes the lower bound) has killed live node
without generating all its children.
• FIFO Branch and Bound
• LIFO Branch and Bound
• Least Cost search Branch and Bound
© Bharati
Bharati Vidyapeeth’s
Vidyapeeth’s Institute
Institute of
of Computer
Computer Applications
Applications and
and Management,
Management, New
New Delhi-63
Delhi-63 by
by Mr.
Mr. Manish
Manish Kumar
Kumar U1.5
U3.5
P, NP, NPC, NPH
• Computability: Computability is the ability to solve a problem in an effective
manner.
• Some common synonyms for “computable” are “solvable”, “decidable”, and
“recursive”.
• Tractable problem, in computational complexity theory, a problem that can be
solved in polynomial time.
• Intractable problems are problems for which there exist no efficient algorithms
(i.e. exponential time) to solve them.
• Most intractable problems have an algorithm, and that algorithm is the brute-
force search.
Example: TSP, Graph Coloring, N-Queen’s Problem, Subset Sum Problem
© Bharati
Bharati Vidyapeeth’s
Vidyapeeth’s Institute
Institute of
of Computer
Computer Applications
Applications and
and Management,
Management, New
New Delhi-63
Delhi-63 by
by Mr.
Mr. Manish
Manish Kumar
Kumar U1.6
U3.6
P, NP, NPC, NPH
• Problems that can be solved in polynomial time is called easy problem.
• P is the set of problem that can be solved in polynomial time deterministically.
Deterministic means the algorithm is aware that what will be the next step and
not guessing.
© Bharati
Bharati Vidyapeeth’s
Vidyapeeth’s Institute
Institute of
of Computer
Computer Applications
Applications and
and Management,
Management, New
New Delhi-63
Delhi-63 by
by Mr.
Mr. Manish
Manish Kumar
Kumar U1.7
U3.7
The test can be scheduled in any lecture
next week. Be Ready.
Bharati Vidyapeeth’s Institute of Computer Applications and Management (GGS IP University) New Delhi, India by Mr. Manish Kumar
Thank You
Bharati Vidyapeeth’s Institute of Computer Applications and Management (GGS IP University) New Delhi, India by Mr. Manish Kumar