An introduction to np-complete problems, focusing on the concepts of hamiltonian cycles in graphs and polynomial reductions. It explains how encodings are used to map abstract problems to concrete ones, and discusses the significance of studying np-complete problems. The document also includes an example of a polynomial reduction from the problem of determining if a sequence of boolean values contains at least one true value to the problem of finding the maximum integer in a sequence of integers.
Download NP-Complete Problems: Understanding Hamiltonian Cycles and Polynomial Reductions and more Slides Data Structures and Algorithms in PDF only on Docsity!
NP-complete Problem
Encodings
An encoding "e" is a mapping from a set S to binary strings
Use encodings to map abstract problems to concrete problems
Example - Shortest Path
Hamiltonian cycle of an undirected graph G= (V, E) is a simple cycle
that contains each vertex in V
A hamiltonian graph is a graph that has a hamiltonian cycle.
Let m = |V|, it takes m! operations to determine if G= (V, E) is a
hamiltonian graph
If Mary claims a graph is hamiltonian graph and provides the vertices in
order on the hamiltonian cycle then we can verify her claim in