Docsity

NP-Complete Problems: Understanding Hamiltonian Cycles and Polynomial Reductions, Slides of Data Structures and Algorithms

Partial preview of the text

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

polynomial time

The potential cycle is called the certificate.