“ibm research report a faster exponential-time algorithm for max 2-sat, max cut, and max k-...

43
IBM Research Report IBM Research Report A faster Exponential-Time A faster Exponential-Time Algorithm for Max 2-Sat, Algorithm for Max 2-Sat, Max Cut, and Max k-Cut”, Max Cut, and Max k-Cut”, Alexander D. Scott, Gregory Alexander D. Scott, Gregory B. Sorkin, IBM Research B. Sorkin, IBM Research Division Division Presented By Troy McMahon Presented By Troy McMahon

Post on 21-Dec-2015

225 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

““IBM Research ReportIBM Research ReportA faster Exponential-Time Algorithm A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k-for Max 2-Sat, Max Cut, and Max k-

Cut”,Cut”,Alexander D. Scott, Gregory B. Alexander D. Scott, Gregory B. Sorkin, IBM Research DivisionSorkin, IBM Research Division

Presented By Troy McMahonPresented By Troy McMahon

Page 2: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Problems AddressedProblems Addressed

Max 2-SatMax 2-SatMax CutMax CutMax k-CutMax k-Cut

Page 3: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

BackgroundBackground

The fastest previous algorithm for Max 2-The fastest previous algorithm for Max 2-Sat has a runtime of ~O(2Sat has a runtime of ~O(2m/5m/5), where m is ), where m is the number of clausesthe number of clauses

The fastest previous algorithm for Max Cut The fastest previous algorithm for Max Cut has a runtime of ~O(2has a runtime of ~O(2m/4m/4), where m is the ), where m is the number of edgesnumber of edges

Page 4: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

MethodMethod

This paper considers a single, more This paper considers a single, more general class of problems that includes general class of problems that includes both Max Cut and 2-Sat.both Max Cut and 2-Sat.

Page 5: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

NotationNotation

D-vertex = “Vertex of degree d”D-vertex = “Vertex of degree d”m and n are the number of vertices and m and n are the number of vertices and

edges in a graph.edges in a graph. [r] = {1,…,r} is the set of colors a vertex [r] = {1,…,r} is the set of colors a vertex

can be coloredcan be colored

Page 6: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Max (r, 2)-CSPMax (r, 2)-CSP

An instance consists of a graph G=(E,V), and a An instance consists of a graph G=(E,V), and a set of score functions, and a set of available set of score functions, and a set of available colors [r]={1,…,r}colors [r]={1,…,r}

For every edge there exists a dyadic function For every edge there exists a dyadic function ssuvuv(r(rii,r,rjj) that maps [r]) that maps [r]22 -> -> RR

For every vertex there exists a monadic function For every vertex there exists a monadic function ssvv(r(rii) that maps [r]) that maps [r]11 -> -> RR

There is single also a “niladic” score function, There is single also a “niladic” score function, ssoo() that maps [r]() that maps [r]00 -> -> RR This function has no effect on the solution to the This function has no effect on the solution to the

problem, and exists only for convenient bookkeepingproblem, and exists only for convenient bookkeeping

Page 7: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Max (r, 2)-CSPMax (r, 2)-CSP

A candidate solution, A candidate solution, :V->[r] is a coloring :V->[r] is a coloring of the vertices (with colorings from [r]) of the vertices (with colorings from [r])

The score of a coloring is given by the The score of a coloring is given by the functionfunction

The solution to an instance of the Max The solution to an instance of the Max (r, 2)-CSP problem is the coloring of the (r, 2)-CSP problem is the coloring of the graph that maximizes the total scoregraph that maximizes the total score

Page 8: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Max CutMax Cut

Max Cut is the partition of a graph into two Max Cut is the partition of a graph into two classes that maximizes the number of classes that maximizes the number of edges cut by the petition.edges cut by the petition.

Page 9: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Max CutMax Cut

Reduction to (r,2)CSP: Reduction to (r,2)CSP: Consider each edge to be a function that is 1 Consider each edge to be a function that is 1

if the vertices it connects are different colors, if the vertices it connects are different colors, and 0 otherwiseand 0 otherwise

Max Cut is equivalent to finding a 2-coloring Max Cut is equivalent to finding a 2-coloring of the vertices that maximizes the sum of all of of the vertices that maximizes the sum of all of the edge functionsthe edge functions

Max Cut Max Cut (r,2)CSP(r,2)CSP

Page 10: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Max 2-SatMax 2-SatAn instance of Max 2-sat consists of a set An instance of Max 2-sat consists of a set

of 2ary Boolean functionsof 2ary Boolean functionsA solution is a setting of the variables that A solution is a setting of the variables that

maximizes the number satisfied functionsmaximizes the number satisfied functions

Page 11: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Max 2-SatMax 2-SatReduction to (r,2)CSPReduction to (r,2)CSP

Max 2-sat can be reduced to (r,2)CSP by Max 2-sat can be reduced to (r,2)CSP by creating a vertex for each variable and an creating a vertex for each variable and an edge fore every functionedge fore every function

The score of an edge is 1 whenever the The score of an edge is 1 whenever the corresponding function is satisfied and 0 corresponding function is satisfied and 0 otherwiseotherwise

Max 2-sat Max 2-sat (r,2)CSP(r,2)CSP

Page 12: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

AlgorithmAlgorithm

Reduce vertices of degree 0Reduce vertices of degree 0Reduce vertices of degree 1Reduce vertices of degree 1Reduce vertices of degree 2Reduce vertices of degree 2BranchBranch

Page 13: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Reducing Vertices of Degree 0Reducing Vertices of Degree 0

If a vertex, y has no edges then that vertex If a vertex, y has no edges then that vertex has no dyadic constraintshas no dyadic constraints

Color y the color that maximizes the Color y the color that maximizes the function for vertex yfunction for vertex yColor(y) = maxargColor(y) = maxargCCXX[r][r](s(syy(C) )(C) )

An equivalent problem can be formed by An equivalent problem can be formed by increasing sincreasing soo by max(s by max(syy(r) ), and removing (r) ), and removing y form the graphy form the graph

This can be done in O(r) timeThis can be done in O(r) time

Page 14: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Reducing Vertices of Degree 1Reducing Vertices of Degree 1

Let y be a vertex of degree 1, and x be y’s Let y be a vertex of degree 1, and x be y’s neighborneighbor

Can be reduced to an equivalent problem Can be reduced to an equivalent problem by removing vertex y, and edge xy from by removing vertex y, and edge xy from the graph, and modifying the score the graph, and modifying the score functions in the following wayfunctions in the following wayFor all CFor all CXX[r], s[r], sxx(C)= s(C)= sxx(C)+ max(C)+ maxDDXX[r][r]{s{sxyxy(CD)+ (CD)+

ssyy(D)}(D)}

This can be done in O(rThis can be done in O(r22) time) time

Page 15: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Reducing Vertices of Degree 1Reducing Vertices of Degree 1

Once an optimal coloring, Once an optimal coloring, ‘ is found for ‘ is found for the reduced graph, and optimal coloring, the reduced graph, and optimal coloring, for the original graph can be found in the for the original graph can be found in the following mannerfollowing manner(y)=maxarg(y)=maxargDDXX[r][r]{s{sxyxy((‘(x)D)+ s‘(x)D)+ syy(D)}(D)}For all other verities v, For all other verities v, (v)= (v)= ‘(v)‘(v)

This can be done in O(1) timeThis can be done in O(1) time

Page 16: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Reducing Vertices of Degree 1Reducing Vertices of Degree 1

Page 17: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Reducing Vertices of Degree 2Reducing Vertices of Degree 2

Let y be a vertex of degree 2, and x and z Let y be a vertex of degree 2, and x and z be y’s neighborsbe y’s neighbors

Can be reduced to an equivalent problem Can be reduced to an equivalent problem by removing vertex y, and the edges xy by removing vertex y, and the edges xy and zy from the graph, and modifying the and zy from the graph, and modifying the score functions in the following wayscore functions in the following wayFor all C,DFor all C,DXX[r], s[r], sxzxz(CD)= s(CD)= sxzxz(CD)+ max(CD)+ maxEEXX[r][r]

{s{sxyxy(CE) + s(CE) + syzyz(ED)+ s(ED)+ syy(E)}(E)}

This can be done in O(rThis can be done in O(r33) time) time

Page 18: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Reducing Vertices of Degree 2Reducing Vertices of Degree 2

Once an optimal coloring, Once an optimal coloring, ‘ is found for ‘ is found for the reduced graph, and optimal coloring, the reduced graph, and optimal coloring, for the original graph can be found in the for the original graph can be found in the following mannerfollowing manner(y)=maxarg(y)=maxargEEXX[r][r]{s{sxyxy((‘(x)E) + s‘(x)E) + syzyz(E(E‘(z))+ ‘(z))+

ssyy(E)}(E)}For all other verities v, For all other verities v, (v)= (v)= ‘(v)‘(v)

This can be done in O(1) timeThis can be done in O(1) time

Page 19: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Reducing Vertices of Degree 2Reducing Vertices of Degree 2

Page 20: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

BranchingBranching Branching AlgorithmBranching Algorithm

y=highest degree vertex in Gy=highest degree vertex in G V’=V/yV’=V/y E’=E-neighbors(y)E’=E-neighbors(y) For C=every color in [r]For C=every color in [r]

So’=So+Sy(C)So’=So+Sy(C) For x=every neighbor of yFor x=every neighbor of y

Sx(D)’=Sx(D)+Sxy(CD) Sx(D)’=Sx(D)+Sxy(CD)

CC=recurse on (V’, E’, S’) + {=recurse on (V’, E’, S’) + {(y)=C}(y)=C}

=max(=max(, , CC))

Return Return This algorithm only branches if there are no This algorithm only branches if there are no

vertices of degree <3 that it can reducevertices of degree <3 that it can reduce

Page 21: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

BranchingBranching Graphical representation of a reduction on vertex x. Graphical representation of a reduction on vertex x. In this case the colors in [r] are red and blueIn this case the colors in [r] are red and blue Vertex x is removed, and 2 new graphs are created (one Vertex x is removed, and 2 new graphs are created (one

where the vertex is red and one where it is blue)where the vertex is red and one where it is blue) The optimal coloring of the original graph is the max of The optimal coloring of the original graph is the max of

the optimal colorings of the two new graphs. the optimal colorings of the two new graphs.

Page 22: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Recursion DepthRecursion Depth

Lemma: If a graph has n vertices and m Lemma: If a graph has n vertices and m edges, than the graph is empty after m/5 edges, than the graph is empty after m/5 branchesbranches

Page 23: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Recursion DepthRecursion Depth

Case 1: If the graph has any vertices of Case 1: If the graph has any vertices of degree degree PP5, then the algorithm will branch 5, then the algorithm will branch on one of these vertices destroying at on one of these vertices destroying at least 5 edgesleast 5 edges

Page 24: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Recursion DepthRecursion Depth

Graphs containing only vertices of degree Graphs containing only vertices of degree 3 and 43 and 4

Page 25: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Recursion DepthRecursion Depth Case 2: The highest degree vertex has degree 4.Case 2: The highest degree vertex has degree 4. If the vertex it branches on has at least one neighbor If the vertex it branches on has at least one neighbor

of degree 3of degree 3 4 edges will be destroyed directly4 edges will be destroyed directly The neighbor of degree 3 will be reduced to degree 2The neighbor of degree 3 will be reduced to degree 2 This vertex will be reduced at the next level destroying 1 This vertex will be reduced at the next level destroying 1

additional edgeadditional edge If the vertex it branches on has at least 4 neighbor of If the vertex it branches on has at least 4 neighbor of

degree 4degree 4 4 edges are destroyed4 edges are destroyed 4 vertices of degree 3 are created4 vertices of degree 3 are created The fact that this algorithm terminates with no vertices of The fact that this algorithm terminates with no vertices of

degree 3 is enough to limit the number of such reductionsdegree 3 is enough to limit the number of such reductions

Page 26: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Recursion DepthRecursion Depth

Case 3: The graph contains only vertices Case 3: The graph contains only vertices of degree 3of degree 3Branching will eliminate 3 edges directlyBranching will eliminate 3 edges directlyRemoving a vertex will reduce the degree of Removing a vertex will reduce the degree of

each of that vertex’s neighbors to 2each of that vertex’s neighbors to 2These neighbors will be reduced at the next These neighbors will be reduced at the next

level without branchinglevel without branchingAt least 1 edge is destroyed for each of these At least 1 edge is destroyed for each of these

neighborsneighbors In total at least 6 edges are destroyedIn total at least 6 edges are destroyed

Page 27: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Recursion DepthRecursion Depth

Every time the algorithm branches, the Every time the algorithm branches, the number of edges is reduced by at least 5number of edges is reduced by at least 5

The graph will be empty after m/5 The graph will be empty after m/5 branchesbranches

The maximum number of times this The maximum number of times this algorithm can branch is therefore m/5algorithm can branch is therefore m/5

Page 28: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Space ComplexitySpace Complexity

This algorithm needs to store the best This algorithm needs to store the best solution found at each levelsolution found at each level

The space complexity of this algorithm is The space complexity of this algorithm is therefore O(nd), or O(nm/5), therefore O(nd), or O(nm/5),

Page 29: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Time of AlgorithmTime of Algorithm

This algorithm has a branching factor of rThis algorithm has a branching factor of rThe time for each level is bounded by the The time for each level is bounded by the

function function T(T(ll)= O(2r)= O(2r33n) + rT(n) + rT(ll-1)-1)

This algorithm therefore runs in O(rThis algorithm therefore runs in O(r33nrnrm/5m/5) ) timetime

Page 30: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Improved AlgorithmImproved Algorithm

Preference for selecting branching verticesPreference for selecting branching vertices Vertices of degree >=6Vertices of degree >=6 Vertices of degree 5 that have at least 1 neighbor of Vertices of degree 5 that have at least 1 neighbor of

degree 3 or 4degree 3 or 4 Vertices of degree 5 with only degree 5 neighborsVertices of degree 5 with only degree 5 neighbors Vertices of degree 4 that have at least 1 neighbor of Vertices of degree 4 that have at least 1 neighbor of

degree 3degree 3 Vertices of degree 4 with only degree 4 neighborsVertices of degree 4 with only degree 4 neighbors Vertices of Degree 3Vertices of Degree 3

All other aspects of this algorithm are the same All other aspects of this algorithm are the same as the first algorithmas the first algorithm

Page 31: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Reduction ForestReduction Forest A reduction on a vertex, v, can split component of A reduction on a vertex, v, can split component of

the graph containing G into multiple the graph containing G into multiple subcomponentssubcomponents

Let k(v) be the number of sub-components that a Let k(v) be the number of sub-components that a reduction on v will yieldreduction on v will yield

This defines a “reduction forest”This defines a “reduction forest” Nodes in the reduction forest correspond to possible Nodes in the reduction forest correspond to possible

vertex reductions vertex reductions Each node has a child for every sub-component that is Each node has a child for every sub-component that is

created by that node’s corresponding reductioncreated by that node’s corresponding reduction A node n’s children correspond to the first reductions inA node n’s children correspond to the first reductions in

Page 32: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Splitting TreeSplitting TreeSplitting trees can be formed by contracting Splitting trees can be formed by contracting

out all of the nodes that correspond to out all of the nodes that correspond to reductions on vertices of degreereductions on vertices of degreeOO22

The depth of a splitting tree is equal to the The depth of a splitting tree is equal to the maximum number of branching reductions maximum number of branching reductions that occur along the corresponding sequencethat occur along the corresponding sequence

The maximum number of branching The maximum number of branching reductions is bounded by the maximum reductions is bounded by the maximum splitting tree depthsplitting tree depth

Page 33: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Depth of Splitting TreeDepth of Splitting Tree

Lemma: For a graph with m edges, the Lemma: For a graph with m edges, the depth of the splitting tree is at most depth of the splitting tree is at most 2+19m/1002+19m/100

Page 34: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Depth of Splitting TreeDepth of Splitting Tree

Case 1: If the graph has a vertex of Case 1: If the graph has a vertex of degree degree PP6, then the algorithm branches on 6, then the algorithm branches on this vertex destroying 6 edgesthis vertex destroying 6 edges

We only need to consider graphs with We only need to consider graphs with vertices of degree <6vertices of degree <6

Page 35: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Depth of Splitting TreeDepth of Splitting Tree

There are only two types of branching There are only two types of branching reductions that don’t destroy at least 6 reductions that don’t destroy at least 6 edgesedgesReductions on vertices of degree 5 that have Reductions on vertices of degree 5 that have

only degree 5 neighborsonly degree 5 neighborsReductions on verities of degree 4 that have Reductions on verities of degree 4 that have

only degree 4 neighborsonly degree 4 neighborsThe improved algorithm works by limiting The improved algorithm works by limiting

the number of occurrences of these types the number of occurrences of these types of reductionsof reductions

Page 36: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Degree 5 Vertices With 5 Degree 5 Degree 5 Vertices With 5 Degree 5 NeighborsNeighbors

If a component requires a reduction on a If a component requires a reduction on a degree 5 vertex with 5 degree 5 neighbors degree 5 vertex with 5 degree 5 neighbors on of 4 things must be trueon of 4 things must be truea. The reduction is the first degree 5 reduction a. The reduction is the first degree 5 reduction

in this branch of the splitting treein this branch of the splitting treeThis only occurs once per branch, and contributes This only occurs once per branch, and contributes

at most 1 to the height of the treeat most 1 to the height of the tree

b. The previous reduction produced vertices b. The previous reduction produced vertices of degree 3 or 4 that were destroyedof degree 3 or 4 that were destroyedWe can pair this reduction with the previous We can pair this reduction with the previous

reductionreduction

Page 37: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Degree 5 Vertices With 5 Degree 5 Degree 5 Vertices With 5 Degree 5 NeighborsNeighbors

c. The previous reduction was a reduction on a c. The previous reduction was a reduction on a degree 5 vertex that destroyed all 5 of that vertex’s degree 5 vertex that destroyed all 5 of that vertex’s neighborsneighbors

Again w can pair this reduction with the previous Again w can pair this reduction with the previous

The previous reduction was on a degree 5 vertex and The previous reduction was on a degree 5 vertex and produced vertices of degree 3 or 4 that were split off produced vertices of degree 3 or 4 that were split off into a different connected componentinto a different connected component

Produces a non-empty subcomponent, but does not add to Produces a non-empty subcomponent, but does not add to the depth of the component of interestthe depth of the component of interest

We can construct a similar argument for vertices We can construct a similar argument for vertices of degree 4 with 4 neighbors of degree 4of degree 4 with 4 neighbors of degree 4

Page 38: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Depth of Splitting TreeDepth of Splitting Tree Case 2: Graphs containing only vertices of degree Case 2: Graphs containing only vertices of degree <<6.6.

Page 39: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Depth of Splitting TreeDepth of Splitting Tree

The dept of a vertex in the splitting tree is at The dept of a vertex in the splitting tree is at most xm+2most xm+2 The +2 comes from the first occurrences of degree 5 The +2 comes from the first occurrences of degree 5

and degree 4 verticesand degree 4 vertices Solve for xSolve for x

x=19/100x=19/100 The depth of the splitting tree is therefore The depth of the splitting tree is therefore

19m/100+219m/100+2 The recursive depth of this algorithm is therefore The recursive depth of this algorithm is therefore

19m/100+219m/100+2

Page 40: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Space ComplexitySpace Complexity

This algorithm needs to store the best This algorithm needs to store the best solution found at each levelsolution found at each level

The space complexity of this algorithm is The space complexity of this algorithm is therefore O(nd), or O((19m/100+1)n)therefore O(nd), or O((19m/100+1)n)

Page 41: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

Time of AlgorithmTime of Algorithm

This algorithm has a branching factor of rThis algorithm has a branching factor of rThe time for each level is bounded by the The time for each level is bounded by the

function function T(T(ll)= O(2r)= O(2r33n) + rT(n) + rT(ll-1)-1)

This algorithm therefore runs in This algorithm therefore runs in O(rO(r33nrnr19m/100+219m/100+2) time) time

Page 42: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

ConclusionConclusion

This paper presents 2 algorithms for solving This paper presents 2 algorithms for solving (r,2)-CSP(r,2)-CSPThe first runs in time O(2rThe first runs in time O(2r33nrnrm/5m/5) and space ) and space

O(mn/5) O(mn/5) The second runs in time O(2rThe second runs in time O(2r33nrnr19m/10019m/100) and space ) and space

O((19m/100+1)n)O((19m/100+1)n)2-Sat and max cut can be reduced to (r,2)-2-Sat and max cut can be reduced to (r,2)-

CSPCSP2-Sat and max cut can therefore be solved in 2-Sat and max cut can therefore be solved in

time O(2rtime O(2r33nrnr19m/10019m/100) and space ) and space O((19m/100+1)n)O((19m/100+1)n)

Page 43: “IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division

ReferencesReferences

““IBM Research Report IBM Research Report A faster Exponential-Time A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k-Cut”,Algorithm for Max 2-Sat, Max Cut, and Max k-Cut”,Alexander D. Scott, Gregory B. Sorkin, IBM Research Alexander D. Scott, Gregory B. Sorkin, IBM Research Division, IBM Research Division, Thomas J. Watson Division, IBM Research Division, Thomas J. Watson Research Center, 2004Research Center, 2004