Yonatan Itai March 2020 Treewidth/Pathwidth Seminar on Exact Exponential Algorithms • Definitions & motivation • Treewidth • Pathwidth • Dynamic programming examples on What are we graphs with bounded pathwidth going to talk • Maximum cut about? • Counting perfect matchings • Bounding a graph’s pathwidth • Independent set of size 푖 • Trees • Upper-bound in graphs of maximum degree 3 Why is the notion of treewidth/pathwidth interesting?
• It is fundamental in graph theory and graph algorithms • Intuitively: measures the “similarity” of the graph to a tree/path
• Multiple applications in exact algorithms on graphs • We can solve hard problems faster on graphs with bounded treewidth/pathwidth using dynamic programming
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Tree Decomposition
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Tree Decomposition
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Tree Decomposition
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Tree Decomposition
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Tree Decomposition
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Tree Decomposition
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Tree Decomposition
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Tree Decomposition
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Path Decomposition
• The path decomposition of a graph is a tree decomposition with tree T being a path
• A path decomposition is often denoted by listing the successive sets:
• The width of a path decomposition is max • The pathwidth of a graph 퐺, denoted by 푝푤(퐺), is the minimum width of a path decomposition
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Path Decomposition
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Nice Path Decomposition
• A path decomposition (푋1, 푋2, … , 푋푟) of a graph 퐺 is nice if:
• |푋1| = |푋푟| = 1 • For every 푖 ∈ {1,2, … , 푟 − 1} there is a vertex v of G such that either
푋푖+1 = 푋푖 ∪ {푣} or 푋푖+1 = 푋푖\{푣}
• Given a path decomposition of a graph 퐺 of width 푘, a nice path decomposition of the same width can be constructed in a linear time
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Nice Path Decomposition
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Path Decomposition – Another Definition
• Every vertex of the graph is an interval in ℝ • For every edge (푢, 푣) in the graph, there must be an intersection between the intervals of 푢 and 푣
The width is the maximum number of overlapping intervals minus 1
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Path Decomposition – Another Definition
A,B,C A,C,D C,D,E C,D,F F,G
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Path Decomposition – Another Definition
A A,B A,B,C A,C A,C,D C,D C,D,E C,D C,D,F C,F FF F,G G
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Maximum Cut
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Maximum Cut
• The naïve solution – enumerate all possible cuts
• There are 2푛 cuts, so the time complexity is 풪∗(2푛)
• What about graphs with bounded pathwidth?
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Maximum Cut
• We’re given a graph 퐺 and its path decomposition of width 푘 • Our goal: find a maximum cut in 풪∗(2푘)
• More Formally:
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Maximum Cut
• We can transform in linear time the given path decomposition to a nice path decomposition of width 푘:
푃 = (푋1, 푋2, … , 푋푟)
• For 푖 ∈ {1,2, … , 푟}, we denote 푖
푉푖 = ራ 푋푗 푗=1 • Note that 푉푟 = 푉
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Maximum Cut
• We want to use dynamic programming • How can we partition our problem into smaller sub-problems?
• Consider some 푋푖, and every partition of it into sets (퐴, 퐵)
• We want to compute the maximum size of a cut in 퐺 푉푖 • The maximum is taken over all cuts (퐴′, 퐵′), s.t 퐴 ⊆ 퐴′ and 퐵 ⊆ 퐵′ • Denote it 푐푖(퐴, 퐵)
• The maximum cut size in 퐺 is max{푐푟 퐴, 퐵 : 퐴, 퐵 is a partition of 푋푟}
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 푉푖 (A,B,C,D,E) 푋푖
A A,B A,B,C A,C A,C,D C,D C,D,E C,D C,D,F C,F FF F,G G
D C E
A B
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Maximum Cut
• Our dynamic programming algorithm – for every 푖: • Compute 푐푖(퐴, 퐵) for every partition (퐴, 퐵) of 푋푖
• 푖 = 1: • 푋1 = 푣 for some 푣 ∈ 푉 • Only 2 possible partitions: (∅, 푣 ) and ( 푣 , ∅) • The size of a cut in both is 0
• 푖 > 1: We consider 2 cases • 푋푖 = 푋푖−1 ∪ 푣 for some 푣 ∈ 푉 • 푋푖 = 푋푖−1 \ 푣 for some 푣 ∈ 푉
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Maximum Cut
• 푋푖 = 푋푖−1 ∪ 푣 for some 푣 ∈ 푉 • We note that all neighbors of 푣 in 푉푖 are in 푋푖−1 ∩ 푋푖 = 푋푖−1 푉푖
푋1 푋2 푋푖−2 푋푖−1 푋푖 푋푟
푋푖−1 ∪ 푣
• Consider 푢, a neighbor of 푣 which is in 푉푖−1\X푖−1 • There exists 푗 < 푖 − 1 s.t 푢 ∈ 푋푗 • Also, as 푢, 푣 are neighbors, there must be a 푘 > 푖 s.t 푢 ∈ 푋푘 • But 푢 ∉ 푋푖−1, thus the sets containing it are not in the same connected sub-path
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 푉푖 (A,B,C,D,E) 푋푖
A A,B A,B,C A,C A,C,D C,D C,D,E C,D C,D,F C,F FF F,G G
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Maximum Cut
• 푋푖 = 푋푖−1 ∪ 푣 for some 푣 ∈ 푉
• We note that all neighbors of 푣 in 푉푖 are in 푋푖−1 ∩ 푋푖 = 푋푖−1
• Then for every partition (퐴, 퐵) of 푋푖
푐푖−1(퐴\ {푣}, 퐵) + 퐶푈푇({푣}, 퐵), if 푣 ∈ 퐴 푐푖(퐴, 퐵) = ቊ 푐푖−1 퐴, 퐵\ 푣 + 퐶푈푇 푣 , 퐴 , if 푣 ∉ 퐴
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 푉푖 (A,B,C,D,E) 푋푖
A A,B A,B,C A,C A,C,D C,D C,D,E C,D C,D,F C,F FF F,G G
D C E
B A
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Maximum Cut
• 푋푖 = 푋푖−1\ 푣 for some 푣 ∈ 푉 • We notice that in this case 푉푖 = 푉푖−1 • For every partition (퐴, 퐵) of 푋푖 • 푋푖−1 has 2 partitions that “respect” (퐴, 퐵) • Hence: 푐푖 퐴, 퐵 = max{푐푖−1 퐴 ∪ 푣 , 퐵 , 푐푖−1(퐴, 퐵 ∪ 푣 )
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 푉푖 (A,B,C,D,E) 푋푖
A A,B A,B,C A,C A,C,D C,D C,D,E C,D C,D,F C,F FF F,G G
D C E
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Maximum Cut – Complexity
• For every 푖 ∈ {1, … , 푟} 푋푖 • There are 2 partitions (퐴, 퐵) of 푋푖 • 푐푖(퐴, 퐵) can be computed in 풪 |푋푖| • We store the computation for every partition (we need the computatioms for 푖 − 1 when we do the computations for 푖)
• Total running time: 푟
푋푖 푘 ∗ 푘 풪 2 |푋푖| = 풪 2 ⋅ 푘 ⋅ 푛 = 풪 (2 ) 푖=1 • Total space used: 풪∗ 2푘 Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Counting Perfect Matchings
• Reminder – we talked last week about perfect matchings in bipartite graphs • A matching 푀 of a graph 퐺 = 푉, 퐸 is perfect if 푀 is an edge cover of 퐺
1 a
2 b
3 c
4 d
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Counting Perfect Matchings
• Example of a perfect matching in non-bipartite graph:
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Counting Perfect Matchings
• For bipartite graphs – inclusion/exclusion algorithm • Time: 풪∗ 2푛 • Space: Polynomial • We haven’t seen an algorithm for the general case
• We can use dynamic programming algorithm to count perfect matchings in a general graph with bounded pathwidth:
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Counting Perfect Matchings
• We can transform in linear time the given path decomposition to a nice path decomposition of width 푘: 푃 = (푋1, 푋2, … , 푋푟)
• For 푖 ∈ {1,2, … , 푟}, we denote 푖
푉푖 = ራ 푋푗 푗=1 • Note that 푉푟 = 푉
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Counting Perfect Matchings
• Consider some 푋푖, and every partition of it into sets (퐴, 퐵)
• We’ll compute the number of matchings 푀 in 퐺 푉푖 such that: • 푀 covers every vertex of 푉푖 \B • 푀 doesn’t cover any of the vertices of 퐵 • Denote it 푚푖(퐴, 퐵)
• The number of perfect matchings in 퐺 is 푚푟 푋푟, ∅
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Counting Perfect Matchings
• Our dynamic programming algorithm – for every 푖: • Compute 푚푖(퐴, 퐵) for every partition (퐴, 퐵) of 푋푖
• 푖 = 1: • 푋1 = 푣 for some 푣 ∈ 푉 • Only 2 possible partitions: (∅, 푣 ) and ( 푣 , ∅) • The number of matchings 푀 in both is 0
• 푖 > 1: We consider 2 cases • 푋푖 = 푋푖−1 ∪ 푣 for some 푣 ∈ 푉 • 푋푖 = 푋푖−1 \ 푣 for some 푣 ∈ 푉
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Counting Perfect Matchings
• 푋푖 = 푋푖−1 ∪ 푣 for some 푣 ∈ 푉 • We note that all neighbors of 푣 in 푉푖 are in 푋푖 • Then for every partition (퐴, 퐵) of 푋푖
• If 푣 ∈ 퐴 • We count matchings that cover 푉푖\B = 퐴′ • For every neighbor 푢 of 푣 in 퐴, we add the matchings that contain (푢, 푣)
• 푚푖 퐴, 퐵 = σ푢∈퐴: 푢,푣 ∈퐸 푚푖−1 퐴\{푢, 푣 , 퐵 ∪ {푢})
• If 푣 ∈ 퐵 • 푚푖 퐴, 퐵 = 푚푖−1 퐴, 퐵\ 푣
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Counting Perfect Matchings
• 푋푖 = 푋푖−1\ 푣 for some 푣 ∈ 푉 • Then for every partition (퐴, 퐵) of 푋푖 • 푉푖 = 푉푖−1, hence 푉푖\B = 푉푖−1\퐵 • We’ll get: 푚푖 퐴, 퐵 = 푚푖−1 퐴 ∪ 푣 , 퐵
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Counting Perfect Matchings – Complexity
• For every 푖 ∈ {1, … , 푟} 푋푖 • There are 2 partitions (퐴, 퐵) of 푋푖 • 푚푖(퐴, 퐵) can be computed in 풪 |푋푖| • We store the computation for every partition (we need the computatioms for 푖 − 1 when we do the computations for 푖)
• Total running time: 푟
푋푖 푘 ∗ 푘 풪 2 |푋푖| = 풪 2 ⋅ 푘 ⋅ 푛 = 풪 (2 ) 푖=1 • Total space used: 풪∗ 2푘 Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Bounding pathwidth
• Given a path decomposition of a graph of width 푘, we can solve NP-complete and #P-complete problems regarding this graph, in time 풪∗ 2푘
• 2 interesting cases where we can upper-bound the pathwidth: • Graphs with independent set of size 푖 • Bipartite graphs • Trees
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Graphs with independent set of size 푖
• Upper bound on the pathwidth: 푛 − 푖 • We can easily construct a path decomposition of width 푛 − 푖 for such graphs 푃 = (푋1, 푋2, … , 푋푖)
• We denote the independent set of size 푖 as 퐼 = {푣1, 푣2, … , 푣i} • Then for every 푚 ∈ {1, … , 푖} 푋푚 = 푉\I ∪ 푣푚
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Graphs with independent set of size 푖
퐼 = {0,2,4} 푉\퐼 = {1,3,5,6}
1,3,5,6,0 1,3,5,6,2 1,3,5,6,4
푤푖푑푡ℎ = 5 − 1 = 4 푛 − 푖 = 7 − 3 = 4
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Graphs with independent set of size 푖
• Let us check that 푃 is valid 푃 = 푋1, 푋2, … , 푋푖 s.t ∀푚 ∈ 1, … , 푖 : 푋푚 = 푉\I ∪ 푣푚
• Path decomposition properties: For every 푣 ∈ 푉, there exists 푚 s.t. 푣 ∈ 푋푚 For every {푣, 푤} ∈ 퐸, there exists 푚 s.t. 푣, 푤 ∈ 푋푚 For every 푣 ∈ 푉, the set of all 푋푚 s.t. 푣 ∈ 푋푚 forms a connected sub-path
• 푃’s width = max |푋푚| − 1 = 푛 − 푖 + 1 − 1 = 푛 − 푖
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Bipartite Graphs
푛 • Every bipartite graph has independent set of size ≥ 2 푛 • Its pathwidth is at most 2 푛 • The following problems are solvable on bipartite graphs in 풪∗ 22 푛 time and 풪∗ 22 space: • Counting perfect matchings • Maximum cut • Maximum independent set
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Pathwidth of Trees
• Bounding the pathwidth is trees will be used in the next section
• For any tree 푇 on 푛 ≥ 2 vertices, pw(푇)= 푂(log 푛 ) • The main argument – in order to find path decomposition T we can do the following recursively: • Find a vertex 푣 ∈ 푉(푇) s.t 푇\{푣} contains 2 or more connected components of size at most 푛/2 • For every connected component of 푇\{푣} find its path decomposition • Concatenate all the connected components’ path decompositions, while adding 푣 to all “bags” • This will result in a path decomposition of width 푂(log 푛 )
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Pathwidth of Trees
{0}
{0,1} {0,2}
{0,1,3} {0,1,4}
푃: {0,1,3,7} {0,1,3,8} {0,1,4,9} {0,1,4,10} {0,2,5,11} {0,2,6} 푷′풔 width is: ퟒ − ퟏ = ퟑ
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Pathwidth in graphs with maximum degree 3
• The main result in this section: The pathwidth of an 푛-vertex graph with all vertices of degree at most 3, is roughly at most 풏/ퟔ
• We’ll prove the following lemma: • Let 퐺 = (푉, 퐸) be a graph on n vertices and with maximum degree at most 3 • Then for any vertex subset 푋 ⊆ 푉 there is a path decomposition 푃 = (푋1, 푋2, . . . , 푋푟) of 퐺 such that: • 푃 is of width at most max 푋 , 푛/3 + 1 + log 푛 + 1 • 푋푟 = 푋 • We’ll use the trees pathwidth upper-bound from the previous section
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Pathwidth in graphs with maximum degree 3
• Reminder: we want an upper-bound of roughly 푛/6 for the pathwidth of a graph with 푛 vertices and maximum degree 3 • Formally, we’ll prove the following theorem:
• We’ll use the following result of Monien and Preis: • For any 휀 > 0, there exists an integer 푛휀, such that for every graph 퐺 = (푉, 퐸) of maximum degree at most 3 satisfying 푉 > 푛휀, there is a partition 푉1 and 푉2 of 푉, such that:
• 푉1 − 푉2 ≤ 1 • 퐶푈푇 푉1, 푉2 ≤ (1/6 + 휀)|푉| Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Pathwidth in graphs with maximum degree 3
• Let 휀 > 0. We choose 푛휀 such that: 2 휀 • The result of Monien and Preis will hold for 2 • Let 퐺 be a graph on 푛 > 푛휀 vertices, with maximum degree at most 3 • By the result of Monien and Preis, there’s a partition of 푉 into 푉1 and 1 휀 푉 of sizes 푛/2 and 푛/2 such that 퐶푈푇 푉 , 푉 ≤ + 푛 2 1 2 6 2 • We define 휕(푉1) to be the set of vertices in 푉1 having a neighbor in 푉2 • We define similarly 휕 푉2 1 휀 • Note that 휕 푉 ≤ + 푛 1/2 6 2 Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Pathwidth in graphs with maximum degree 3
휕(푉1) 휕 푉2 푉1 푉2
푉1 = 푛/2 푉2 = 푛/2
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Pathwidth in graphs with maximum degree 3
• By the lemma that we previously proved, there are two path decompositions: • 푃1 = (퐴1, 퐴2, … , 퐴푝 = 휕(푉1)) of 퐺 푉1 • 푃3 = (퐶1 = 휕(푉2), 퐶2, … , 퐶푠) of 퐺 푉2
• Both 푃1 and 푃3 are of width at most 1 휀 max + 푛, 푛/6 + 1 + log 푛 + 1 ≤ 1/6 + 휀 푛 6 2
• We construct a path decomposition from 푃1 and 푃3
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Pathwidth in graphs with maximum degree 3
• Let’s find a path decomposition 푃2 of 퐺[휕 푉1 ∪ 휕(푉2)] • 푃2 = 퐵1 = 휕 푉1 , 퐵2, . . 퐵푟 = 휕 푉2 • 푃2’s width≤ 1/6 + 휀 푛
• Then, if we combine 푃1, 푃2, 푃3 we’ll get a path decomposition 푃 of 퐺 • 푃 = (퐴1, … Ap = B1, … Br = C1, … Cs) • 푃’s width is at most 1/6 + 휀 푛
• Why 푃 is a legal path decomposition of 퐺? • No edges between 푉1\휕 푉1 to 푉2\휕 푉2
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Pathwidth in graphs with maximum degree 3
• How do we construct 푃2 = 퐵1 = 휕 푉1 , 퐵2, . . 퐵푟 = 휕 푉2 ? • We initialize 퐵1 = 휕 푉1 and 푗 = 1 • While Bj ≠ 휕 푉2 : • We choose 푣 ∈ 퐵푗 ∩ 휕 푉1 • 퐵푗+1 = 퐵푗 ∪ (푁 푣 ∩ 휕 푉2 ) • 퐵푗+2 = 퐵푗+1\{푣} • 푗 = 푗 + 2
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Pathwidth in graphs with maximum degree 3
휕(푉1) 휕 푉2
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Pathwidth in graphs with maximum degree 3
• We’ll show the following • 푃2 construction algorithm termination • 푃2 is a valid path decomposition • Bound 푃2’s width
• When does the loop stop? • Every 2 iterations we remove a vertex from 휕 푉1 • Before we remove it, we add its neighbors from 휕 푉2 • 휕 푉2 ⊆ 푁(휕 푉1 )
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Pathwidth in graphs with maximum degree 3
• 푃2 = (퐵1, 퐵2, . . 퐵푟) is a legal path decomposition of 퐺[휕 푉1 ∪ 휕(푉2)]
• All vertices in 휕 푉1 ∪ 휕(푉2) are in at least one of 퐵1, 퐵2, . . 퐵푟
• For every edge (푣1, 푣2) in 퐺 휕 푉1 ∪ 휕 푉2 there’s a bag containing 푣1 and 푣2
• This is the bag where we added 푣1 neighbors from 휕 푉2 just before removing 푣1 in the next bag • Every vertex we remove is not added back later
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Pathwidth in graphs with maximum degree 3
• To conclude the proof, we still need to show that for any 푗 ∈ {1, … , 푟}
|퐵푗| ≤ 1/6 + 휀 푛
• We consider a partition of 휕 푉1 into 3 sets – according to their number of neighbors is 휕(푉2)
• 퐷푚, 푚 = 1,2,3 is the subset of 휕 푉1 that have exactly 푚 neighbors in 휕(푉2) • We note that:
• 퐵1 = 휕 푉1 = 퐷1 + 퐷2 + 퐷3
• 퐶푈푇 푉1, 푉2 = 퐷1 + 2 ⋅ 퐷2 + 3 ⋅ 퐷3 ≤ 1/6 + 휀 푛
퐷1 + 퐷2 + 퐷3 ≤ 1/6 + 휀 푛 − 퐷2 − 2 ⋅ 퐷3
퐵1 ≤ 1/6 + 휀 푛 − 퐷2 − 2 ⋅ 퐷3
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Pathwidth in graphs with maximum degree 3
• We showed that 퐵1 ≤ 1/6 + 휀 푛 − 퐷2 − 2 ⋅ 퐷3
• Every time we add vertices to create a new bag, one vertex is removed to create the next bag 1 • So for every 푗, 퐵 ≤ 퐵 + 퐷 + 2 ⋅ 퐷 + 1 ≤ + 휀 푛 + 1 푗 1 2 3 6
• We conclude that for every large enough graph with maximum degree 3, its pathwidth is bounded by roughly 푛/6
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Pathwidth in graphs with maximum degree 3
• We conclude that for every large enough graph with maximum degree 3, its pathwidth is bounded by roughly 푛/6
• The proof of the result of Monien and Preis and the theorem we proved can be turned into a polynomial time algorithms • First to find the desired cut • Then to find the path decomposition of width at most 1/6 + 휀 푛
• On graphs with maximum degree 3 we can solve the following in 풪∗ 2 1/6+휀 푛 • Counting perfect matchings • Maximum cut • Maximum independent set Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Pathwidth in graphs with maximum degree 3
• There’s an extension for large graphs with maximum degree more than 3:
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Pathwidth in graphs with maximum degree 3
• The main result in this section: The pathwidth of an 푛-vertex graph with all vertices of degree at most 3, is roughly at most 풏/ퟔ
• We’ll prove the following lemma: • Let 퐺 = (푉, 퐸) be a graph on n vertices and with maximum degree at most 3 • Then for any vertex subset 푋 ⊆ 푉 there is a path decomposition 푃 = (푋1, 푋2, . . . , 푋푟) of 퐺 such that: • 푃 is of width at most max 푋 , 푛/3 + 1 + log 푛 + 1 • 푋푟 = 푋 • We’ll use the trees pathwidth upper-bound from the previous section
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Pathwidth in graphs with maximum degree 3
• We prove by induction on the number of vertices in a graph • For 푛 = 1 the lemma is trivial • Assume it holds for graphs with < 푛 vertices, for some 푛 > 1 • Let 퐺 = (푉, 퐸) be a graph on 푛 vertices and let 푋 ⊆ 푉 • We consider 3 cases: • There is a vertex in 푋 with no neighbors outside 푿 • There is a vertex in 푋 with one neighbor outside 푿 • All vertices in 푋 have at least 2 neighbors outside 푿
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Pathwidth in graphs with maximum degree 3
• Case 1. ∃푣 ∈ 푋 such that 푁 푣 \X = ∅
• By the induction assumption, there is a path decomposition (푋1, 푋2, … , 푋푟) of 퐺\{푣} such that 푋푟 = 푋\{푣} and its width is at most max 푋 − 1, (푛 − 1)/3 + 1 + log 푛 − 1 + 1
• By adding 푣 to the bag 푋푟 we obtain a path decomposition of 퐺 of width at most max 푋 , 푛/3 + 1 + log 푛 + 1
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Pathwidth in graphs with maximum degree 3
• Case 2. ∃푣 ∈ 푋 such that |푁 푣 \X| = 1 • Let 푢 be 푣’s only neighbor outside 푋 • By the induction assumption, there is a path decomposition (푋1, 푋2, … , 푋푟) of 퐺\{푣} such that 푋푟 = 푋\{푣} ∪ {푢} and its width is at most max 푋 , (푛 − 1)/3 + 1 + log 푛 − 1 + 1
• We create a path decomposition 푃 by adding bags 푋푟+1 = 푋 ∪ 푢 , 푋푟+2 = 푋 푃 = 푋1, 푋2, … , 푋푟, 푋푟+1, 푋푟+2 • The width of this decomposition is at most max 푋 , 푛/3 + 1 + log 푛 + 1
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Pathwidth in graphs with maximum degree 3
• Case 3. ∀푣 ∈ 푋, |푁 푣 \X| ≥ 2 • Case3A. 푋 ≥ 푛/3 + 1
• The number of vertices in 퐺\X is 푛 − 푋 • The number of edges in 퐺\X is at most 3 푛 − 푋 − 2 푋 3푛 − 5 푋 푛 − 3 푋 = = 푛 − 푋 + 2 2 2
푛 − 3 푛/3 + 1 ≤ 푛 − 푋 + < 푛 − |푋| = |푉 \푋| 2
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Pathwidth in graphs with maximum degree 3
• Case 3. ∀푣 ∈ 푋, |푁 푣 \X| ≥ 2 • Case3A. 푋 ≥ 푛/3 + 1 • The number of edges in 퐺\X is (strictly) less than |푉 \푋| • Thus there is a connected component 푇 = (푉푇 , 퐸푇 ) of 퐺\X that is a tree 1 • There is a path decomposition 푃 = (푋1, 푋2, … , 푋푟) of 푇 of width at most log(푛) • By the induction assumption, there is a path decomposition 푃2 = (푌1, 푌2, … , 푌푡 = 푋) of 퐺 \VT of width at most 푋 + log 푛 + 1 1 • We create a path decomposition 푃 by adding 푌푡 = 푋 to all bags of 푃 and by appending the altered 푃1 to 푃2: 푃 = (푌1, 푌2, … , 푌푡 = 푋, 푋1 ∪ 푋, 푋2 ∪ 푋, … , 푋푟 ∪ 푋, 푋) • The width of this decomposition is at most 푋 + log 푛 + 1
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Pathwidth in graphs with maximum degree 3
• Case 3. ∀푣 ∈ 푋, |푁 푣 \X| ≥ 2 • Case3B. 푋 ≤ 푛/3 • We choose a set 푆 ⊆ 푉\X of size 푛/3 − 푋 + 1 > 0 • By the induction assumption, there is a path decomposition (푋1, 푋2, … , 푋푟) of 퐺 such that 푋푟 = 푋 ∪ 푆 and its width is at most ( 푛/3 + 1) + log 푛 + 1 • This is because one of our previous cases holds for 푋 ∪ 푆: • It has a vertex having at most one neighbor outside 푋 ∪ 푆 • All its vertices have at least two neighbors outside 푋 ∪ 푆 • We create a path decomposition 푃 by adding the bag 푋푟+1 = 푋 푃 = 푋1, 푋2, … , 푋푟 = 푋 ∪ 푆, 푋푟+1 = 푋 • The width of this decomposition is at most ( 푛/3 + 1) + log 푛 + 1 Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Pathwidth in graphs with maximum degree 3
• Let 퐺 = (푉, 퐸) be a graph on n vertices and with maximum degree at most 3 • Then for any vertex subset 푋 ⊆ 푉 there is a path decomposition 푃 = (푋1, 푋2, . . . , 푋푟) of 퐺 such that: • 푃 is of width at most max 푋 , 푛/3 + 1 + log 푛 + 1 • 푋푟 = 푋
Definitions & Counting perfect Bounding Pathwidth when Maximum Cut motivation matchings pathwidth Δ = 3 Treewidth/Pathwidth – Summary
• Treewidth/Pathwidth are graph parameters measuring the “similarity” of the graph to a tree or a path
• Given a decomposition of a graph with small width, many hard problems can be solved in polynomial time (or at least in 풪∗ 2푘 ) • Using dynamic programming algorithms
• We have a pathwidth upper-bound for many types of graphs • Bipartite graphs (푛/2) • Trees (log(푛)) • Graphs with Δ = 3 (roughly 푛/6) This lecture brought to you by…
Thank You