This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: NPcomplete and NPhard problems•Definition of complexity class NP–Nondeterministic computation–Problems that can be verified•The P = NP Question–Concept of NPhard and NPcomplete problemsTraditional definition of NP•Turing machine model of computation–Simple model where data is on an infinite capacity tape–Only operations are reading char stored in current tape cell, writing a char to current tape cell, moving tape head left or right one square•Deterministic versus nondeterministic computation–Deterministic: At any point in time, next move is determined–Nondeterministic: At any point in time, several next moves are possible•NP: Class of problems that can be solved by a nondeterminstic turing machine in polynomial timeTuring MachinesA Turing machine has a finitestatecontrol (its program), a two way infinite tape (its memory) and a readwrite head (its program counter) 111111HeadTape….….Finite StateControlNondeterministic Running Time•We measure running time by looking at height of computation tree, NOT number of nodes explored•Both computation have same height 4 and thus same running timeDeterministic ComputationNondeterministic ComputationND computation returning yes•If any leaf node returns yes, we consider the input to be a yes input.•If all leaf nodes return no, then we consider the input to be a no input.Yes ResultNo ResultShowing a problem is in NP•Hamiltonian Path–Input: Undirected graph G = (V,E)–Y/N Question: Does G contain a HP?•Nondeterministic polynomialtime solution–Guess a hamiltonian path P (ordering of vertices)•V! possible orderings•For binary tree, V log V height to generate all guesses–Verify guessed ordering is correct–Return yes/no if ordering is actually a HP Illustration123Yes input graph123132213231312321Guess PhaseNondeterministicVerify PhaseDeterministic123No input graph123132213231312321Guess PhaseNondeterministicVerify PhaseDeterministicAlternate definition of NP•Preliminary Definitions–...
View
Full
Document
 Fall '07
 TORNG
 Computational complexity theory, vertex cover, NPcomplete

Click to edit the document details