440 likes | 588 Views
Matroids & Representative Sets. Daniel Lokshtanov. Alice vs Bob. F = {{ a,b,c }, { a,c,d }, { b,c,e }}. {a, c}. {b, e}. { a,c,d }. Rules of the game. Board: universe of size n All Alice ’s sets have size p Bob a picks set B of size q
E N D
Matroids & Representative Sets Daniel Lokshtanov
Alice vs Bob F = {{a,b,c}, {a,c,d}, {b,c,e}} {a, c} {b, e} {a,c,d}
Rules ofthe game Board:universeofsizen All Alice’ssets have sizep Bob a pickssetBofsizeq Alicewinsifshe has a setdisjoint from B
Lazy Alice Alicedoes not like remembering all thosesets. Alice hates losing to Bob. Cansheforget a setA from F, and be sure thiswillnot make thedifferencebetweenwinning and losing?
(Ir)relevant Sets A F is irrelevantif: for everysetBofsizeqsuchthatA B = , there is a setA’ FsuchthatA’ B = . Alicemayforgetexactlythe irrelevant sets
Only relevant sets? F = { } … A2 A3 A1 Am B1 B2 B3 Bm
Bollobás’ Lemma [1966] Let A1, A2, … , Am be setsofsizep and B1, B2, … , Bm be setsofsizeq s.t: then. No dependenceonuniversesizen at all!
Bollobás’ helps Alice Bollobás’ lemma immediatelyimpliesthat Alice onlyneeds to remember at most sets. yay!
ProofofBollobás’ Lemma Consider a random permutationoftheuniverse. The events «all ofAibefore all ofBi» and «All ofAjbefore all ofBj» aredisjoint! So and hence. Bi Ai Bj Aj P[all of Ai is before all of Bi] = .
Representative Sets Let F be a familyofp-sets. Thenq-representsFif for everyBofsizeqsuchthatthereexists an withthereexists an with. CorollaryofBollobás: For everyFthere is an ofsize at most thatq-representsF.
Computational Problem Given a familyFofp-sets and an integerq, computea familyofsize at most thatq-representsF.
Computing Representative Sets Will show: wecancompute representative sets in time essentiallywhere is thematrixmultiplicationconstant< 2.38. But first – an easyapplication
d-Hitting Set Input: Family F = {S1,…,Sm}ofsetsofsized over universeU = {v1, …, vn}, integerk. Question:Doesthereexist a setX Uofsize at most ksuchthat for everySi F, SiX? Easybranching in time dk Next: kernelwithO(kd)sets and elements
d-Hitting Set as a Game F = {{a,b,c}, {a,c,d}, {b,c,e}} Is {b, e} a hittingset? No, since{a,c,d}
Kernel for d-Hitting Set Compute a k-representative subfamilyF’ F ofsize at most . Remove all elements not in F’ (at most dkd) Output theinstanceF’, k.
Why is thekernelcorrect? May not change a YESinstanceinto a NOinstance. Can a NOinstancechangeinto a YESinstance? NO instance = Alicealwayswins YESinstance = Bobcanwin Wedidnot forgetanysetsthatmadethedifferencebetweenAlicewinning and losing!
Playingon a matroid Suppose nowthattheuniverse is theedgesetof a matroid. A setAfitsa setBif - A and Baredisjointand - A B is independentin thematroid.
Alice vs Bob on a matroid F = {{a,b,c}, {a,c,d}, {b,c,e}} Do you have a setthatfits {b, e}? Note:this game on a uniformmatroidof rank p+q is exactlytheold game. &%¤&!!
Representative Sets Let F be a familyofp-sets (in a matroidM). Then q-representsFif: for everyBofsizeqsuchthat thereexists an thatfitsB thereexists an thatalsofitsB. Note:representation in a uniformmatroidof rank p+q is exactlytheoldrepresentation.
Computing Representative Sets Input: Family Fofp-sets over a matroid, integerq,matrixMrepresentingthematroid. Task: Compute a q-representative subfamilyofsize at most .
Playingon a matroidp=4, q=2 F ! ? 232401018920320110848338053002 Det 304958029038502923840293850230905801012095830321520385 292302302310958042093582023039528303202335020322022582 2202302350203209802104+4267429810983502239582820320502 340958683040938323035802092309532029385308209821522998 208357298739829872398253982359823987235239729019380205 230958203958293958203958203958203958522938572938575292 M = p+q
Fitvs Determinant If AlicessetA and Bob’ssetBoverlap, thenthe same column is used twice determinant is 0! Determinant is nonzeroif and onlyifAfitsB.
Matrix game p a c q b d p+q p+q c
GeneralizedLaplace Expansionalmostcorrect p q MB MA Det To compute p+q Compute thedeterminants ofall p psubmatricesofMA Compute thedeterminants of all q qsubmatricesofMB dimensionalvectorvA dimensionalvectorvB dotproduct!*
GiantVector game a b c d 0 ? c
Basis If Alice keepsvectorsv1,v2,v3 and v3 = v1 + v2 and v3fitsBob’svectorvB Theneitherv1 or v2fitsvB Aliceonlyneeds to keeplinearlyindependentvectors! At most ofthem, since vectorsare - dimensional Findingthe basis takes time.
Wrap up Alice has a familyofp-sets, familyofp (p+q) matrices • familyof - dimensonalvectors. Keeplinearlyindependentvectors, keepthecorrespondingsets!
Computing Representative Sets Theorem: wecancompute representative setsofsize in time essentiallywhere is thematrixmultiplicationconstant< 2.38.
Application - Treewidth DP Have seenseveralapproachesfor single exponentialalgorithms for connectivity problemsparameterized by treewidth. Representative setsgivesyetanotherone
Representative Sets for MatroidClasses Is it possible to compute representative sets for uniform matroids, graphicmatroidsor transversal matroidsfaster than for linear matroids in general? For uniform matroids, theanswer is yes (butproof is sort ofcomplicated)
Application – k-Path Input: (directed) graphG, integerk. Question: Is there a simple directedpathonkvertices? Theorem:There is a deterministic time algorithm for k-Path.
k-Path Fix a sourcevertexu. For vertexv and integerp, defineP[v,p] to be thesetof (vertexsetsof) pathsonexactlypvertices from u to v. Goal: for everyv and p k compute a setP’[v,p] that(k-p)-representsP[v,p].
k-Path Goal: for everyv, p k compute a setP’[v,p] that(k-p)-representsP[v,p]. Need to prove:that(k-p)-representsP[v,p] assuming(k-p+1)-representsP[w,p-1] Extend all pathsthatcan beextended by v
Need to prove:that(k-p)-representsP[v,p] assuming(k-p+1)-representsP[w,p-1] BB Sizeq+1 u v w In In
k-Path Sizeoffamily to reduce: Time to reduce: Total time: Alsoworks for weightedk-Path.
Application – k-Cycle Input: (directed) graphG, integerk. Question: Is there a simple directedcycleonat leastkvertices? Theorem:8kpoly(n)algorithm.
k-Cycle – main lemma In a shortestcycleCon at leastkvertices, wecanreplaceanysubpathonkvertices by anyotherpathonkvertices, which is disjoint from thekverticesafter it onC.
k-Cycle – main lemma proof u Puv Pwv v w Pvw
k-Cycle – algorithm Guess a vertexu that a shortestcycleCoflength at leastk passes through. For everyvertexvand integerp, defineP[u, p] to be thesetof (vertexsetsof) pathsonexactlypvertices from u to v. For everyvertexv compute a setP’[v] thatk-representsP[v,k]usingthemethod from thek-pathalgorithm. Size:
k-Cycle – algorithm Guess thek’thvertexvonthecycleC. Main lemma thereis a k-cycle containing a path from P’[v] as a subpath! Checkwhetherthere is a pathQin P’[v] suchthatthere is a path back from v to u inG\Q. Time 8kpoly(n).
Speeding up Using similarmethods, but trading offspace for time onecan speed up k-Path to 2.619k and k-Cycle to 6.75k.
Exercises Book: 12.9, 12.11, 12.13, 5.9