1. Turing stop problem: No matter how long you can not be solved by any computer
Problem Description: The input data for h,h is P (p is a program (the program is also a string of data)), determine whether P can finally stop under the input W
H (P (w)) =0 if p is down at input W
-1 if P is dead in the input w (the output of H is State)
Analysis: If the problem H can be solved, then construct a process K (p), the input is a program, the output of k depends on the results of H (p))
Procedure K (input P):
if (H (p)) ==0) dead loop
else if (H (P (p)) ==-1) return 0;
K (k): If K (k) dies, then H (k (k)) =0,k (k) should be able to stop
If K (k) stops, then H (k (k)) =-1,k (k) should be a dead cycle
There are contradictions
It's really around ... It's changed three times before I know it.
2. Some examples of problems
1) in the graph g= (v,e), find the shortest path starting from a single source vertex in O (VE) time
Related NPC: Determines whether a graph contains a simple path in a given number of edges
2) at O (e) time, you can determine whether a diagram has a eular loop (which happens to pass through each side of the Loop) (22-3), in fact, you can traverse the various edges of the Euler circuit at O (e) time
Related NPC: Determine if a graph contains Hamiltonian loops (simple loops that pass through each vertex)
3) k-cnf:k a normal form, connecting several or clauses with and, and each clause just has k bool variable or its negation
Polynomial time judgment 2-cnf (whether there is a set of legal assignments): polynomial time
3-CNF of the meeting: NPC
3.P,NP,NPC problems
P class: Can be resolved within O (n^k) time
NP class: Can be validated in polynomial time (given a set of assignments)
Obviously, p-type problems are NP-problems.
The Ch34 is calculated as a guide. NP Complete