spanning tree of that graph is a subgraph that is a tree and connects all the vertices together. Famous DFS/ BFS / Dijkstra's algorithm Work within O(|V|2)
But you (nor neither others in the world) can not solve it in a polynomial-time Definition NP stands for nondeterministic polynomial time, a term going back to the roots of complexity theory. Intuitively, it means that a solution to any search problem can be found and verified in polynomial time by a special (and quite unrealistic) sort of algorithm, called a nondeterministic algorithm. Such an algorithm has the power of guessing correctly at every step.
largest number of vertices) finding a maximum weight clique in a weighted graph listing all maximal cliques (cliques that cannot be enlarged) solving the decision problem of testing whether a graph contains a clique larger than a given size. I suspect it's hard... but how to show its HARDNESS?
problem.. 1. You know how to solve it... (DONE) 2. You don't know how to solve the current problem... Reduce it to another similar problem! If you know how to solve it
that v 1 , v 2 , v n do not have an edge connecting them Find min. vertex number to cover the graph G VertexCover(G,k) G' = G k' = |V| - k return IndependentSet(G',k')
time, then P = NP. If any NP-complete problem is not solvable in polynomial time, then P != NP. THEOREM 2 (Cook (1971) and Levin (1973)) Satisfiability is NP-complete. A search problem is NP-complete if all other search problems reduce to it
graph G and an integer K Question: Is there a vertex cover of size K or less for G, i. e., a subset V' of V with the size of V' less than K such that every edge has at least one endpoint in V'. C1 = (x1 V x2 V x3) C2 = (x2 V x3 V x4) C3 = (x1 V x2 V x4) C4 = (x1 V x3 V x4) Question: Find values for x1 to x4 that C1 && C2 && C3 && C4 -> true
of the application, experiments and often insights from physics or biology to attack a problem Approximation algorithms So, when faced with an NP-complete optimization problem, a reasonable goal is to look for an approximation algorithm A to obtain a nearest solution for the problem. Fixed-Parameter Tractable algorithm (FPT) Parameterized the problem, which makes it to be solvable in polynomial complexity time limit. Reduce the scale of the NP-hard problem.
http://www.mountainvistasoft.com/docs/BattleshipsAsDecidabilityProblem.pdf List of NPC problems http://en.wikipedia.org/wiki/List_of_NP-complete_problems