There is a 13 node graph (``widget'') s.t. the 4 extreme points are constrained so that each pair of opposite corner points must be the same color. Whenever there is a crossing of lines in a planar drawing, insert one of these widgets.
obvious.
The knapsack problem is:
|
|
Phrased as a decision problem this is 'Is there a set S¢ where B ³ k '?
Given a set of integers S is there a subset of S¢ such that åa Î S¢w(a) = B .
Given a set of integers S is there a partition into 2 sets with equal sum?
Can this list be partitioned into k bins such that each bin sums to £ B .
let M = ås Î Ss . Then let B = M/2
Add the numbers
For N large. Each of these 2 numbers will be in different partitions and one of these partitions (minus N-B ) is of the right size.
Just do 2 bin packing.
At one time people didn't think that linear programming was polynomial.
pick {xi} to maximize åicixi subject to "jåiaijxj £ bj .
Is there a choice of {xi} that satisfies the inequalities with integers?
This problem is np complete
Put in the constraints:
which implies: åiaixi = B .
Also require: "i 0 £ xi £ 1 to reduce subset sum to integer programming.
Does this graph have a path going through every node exactly once and returning to the start?
There is a 4 node directed 'widget' with 2 inputs and 2 outputs s.t. a hamiltonian path can enter through either (or both) input(s) and hit all nodes on a hamiltonian circuit.
A similar widget exists for the undirected case.
Then, you use these widgets in a way which I can't easily describe. For every node in the original graph a loop is created.
Is there a hamiltonian circuit such that:
Is there a hamiltonian circuit such that total cost £ k ?
Put weight one on all of the nodes then ask if there is a TSP with k = #nodes .
Given a graph G, can I make it bipartite by only deleting k nodes?
Can clique £ mp MNDBS?
reduction: Take the original graph, and complement it. Add the number of nodes again, fully interconnecting a new node to the complemented graph. Is this a reduction?
Does P = NC? Probably not. Example: Does program A finish in time n?
The example is in P-complete.