Download presentation
Presentation is loading. Please wait.
Published bySherman Butler Modified over 9 years ago
1
O N G ENERATING A LL M AXIMAL A CYCLIC S UBHYPERGRAPHS WITH P OLYNOMIAL D ELAY Taishin Daigo (Kyushu Inst. of Tech.) Kouichi Hirata (Kyushu Inst. of Tech.) 1 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
2
C ONTENTS Acyclic hypergraph Maximal acyclic subhypergraph (MAS) Generating all MASs in a hypergraph with polynomial delay Intractability in lexicographic order with polynomial delay A polynomial delay algorithm (by ignoring the order of outputs) 2 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
3
G RAPH AND H YPERGRAPH Graph G =( V, E ), E V 2 Hypergraph H =( V, E ), E 2 V Acyclic graph (Tree) A (connected) graph without cycles Acyclic hypergraph Many equivalent definitions [Berri et al. 83] 3 1980’s : Database Theory Today : Artificial Intelligence constraint satisfaction, clause subsumption, theory revision, abductive explanation, machine learning, data mining, … On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
4
A CYCLIC H YPERGRAPH H =( V, E ), E v ={ E E | v E } A tree scheme T of H : A tree with vertices E such that E v induces a subtree of T for every v V H : acyclic iff H has a tree scheme H : cyclic iff H has no tree scheme 123123 345345156156 135135 a d c b 1 2 3 45 6 a b c d acyclic HT 4 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
5
A CYCLIC H YPERGRAPH 1 2 3 45 6 a b c d 1 2 3 45 6 a b c d e 123 345156 135 a d c b cyclic 123 345156 135 a d cb 26 e 1 2 3 45 6 a b c d e f acyclic a d c b 156 123 345135 26 e 123456 f acyclic 5 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
6
S PANNING T REE Spanning tree in G =( V, E ) : A tree with vertices V (spanning connected acyclic graph) Generating all spanning trees in a graph G =( V, E ) O (| V |+| E |+ | V |) time and O (| V |+| E |) space [Gabow & Myers 78] : the number of all spanning trees in G Optimal to output all spanning trees explicitly 6 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
7
F ROM S PANNING T REES TO A CYCLIC S UBHYPERGRAPHS A hypergraph has not always a spanning connected acyclic subhypergraph Whether or not a hypergraph has a spanning connected acyclic subhypergraph? NP-complete [Hirata et al. 05] 7 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
8
F ROM S PANNING T REES TO A CYCLIC S UBHYPERGRAPHS Maximal acyclic subhypergraph (MAS) H 1 : an MAS of H iff there exists no acyclic subhypergraph of H containing H 1 8 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
9
F ROM S PANNING T REES TO A CYCLIC S UBHYPERGRAPHS Maximal acyclic subhypergraph (MAS) H 1 : an MAS of H iff there exists no acyclic subhypergraph of H containing H 1 A linear time algorithm MAS to find an MAS of H [Hirata et al. 05] || E ||= E E | E | O (| V |+|| E ||) time Generating all MASs in a hypergraph H =( V, E ) 9 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
10
C OMPLEXITY OF G ENERATING P ROBLEMS Polynomial total time (Output polynomial time) Time to output all solutions is bounded by a polynomial in the number m of solutions and the input size n Polynomial delay Time between two consecutive solutions is bounded by a polynomial in the input size n poly( m, n ) poly( n ) 10 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
11
G ENERATING A LL MAS S IN A H YPERGRAPH WITH P OLYNOMIAL D ELAY Intractability for generating all MASs in a hypergrpah in lexicographic order with polynomial delay A polynomial delay algorithm for generating all MASs in a hypergraph (by ignoring the order of outputs) 11 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
12
I NTRACTABILITY FOR G ENERATING A LL MAS S IN L EXICOGRAPHIC O RDER LexFirstMAS( H, H 1 ) Hypergraphs H and H 1 Is H 1 the lexicographically first MAS of H ? LexFirstMAS( H, H 1 ) is coNP-complete 12 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
13
I NTRACTABILITY FOR G ENERATING A LL MAS S IN L EXICOGRAPHIC O RDER Reduction from 3DM (3 Dimensional Matching) M X Y Z Does M have a perfect matching M 1 M of X Y Z that each element of X, Y and Z is contained in exactly one triple in M 1 ? XYZ M M1M1 13 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
14
I NTRACTABILITY FOR G ENERATING A LL MAS S IN L EXICOGRAPHIC O RDER Em1Em1 Em4Em4 Em2Em2 Em5Em5 Em3Em3 Em6Em6 ExEx E m1m1 m2m2 m3m3 m4m4 m5m5 m6m6 E M <E x <E y <E z <E m i <E EMEM EyEy EzEz H 14 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
15
I NTRACTABILITY FOR G ENERATING A LL MAS S IN L EXICOGRAPHIC O RDER Em1Em1 Em4Em4 Em2Em2 Em5Em5 Em3Em3 Em6Em6 ExEx E m1m1 m2m2 m3m3 m4m4 m5m5 m6m6 E M <E x <E y <E z <E m i <E EMEM EyEy EzEz H H 1 = H -{ E m i }: an MAS of H 15 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
16
I NTRACTABILITY FOR G ENERATING A LL MAS S IN L EXICOGRAPHIC O RDER Em1Em1 Em4Em4 Em2Em2 Em5Em5 Em3Em3 Em6Em6 ExEx E m1m1 m2m2 m3m3 m4m4 m5m5 m6m6 E M <E x <E y <E z <E m i <E EMEM EyEy EzEz H Lexicographically previous MAS of H from H 1 16 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
17
I NTRACTABILITY FOR G ENERATING A LL MAS S IN L EXICOGRAPHIC O RDER Em1Em1 Em4Em4 Em2Em2 Em5Em5 Em3Em3 Em6Em6 ExEx E m1m1 m2m2 m3m3 m4m4 m5m5 m6m6 E M <E x <E y <E z <E m i <E EMEM EyEy EzEz H Lexicographically previous MAS of H from H 1 Perfect Matching 17 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
18
I NTRACTABILITY FOR G ENERATING A LL MAS S IN L EXICOGRAPHIC O RDER H 1 is not the lexicographically first MAS of H There exists the lexicographically previous MAS of H from H 1 M has a perfect matching (NP-complete) LexFirstMAS( H 1, H ): coNP-complete Unless P=NP, there exists no algorithm for generating all MASs in lexicographic order with polynomial delay 18 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
19
G ENERATING A LL MAS S WITH P OLYNOMIAL D ELAY Intractability for generating all MASs in a hypergraph in lexicographic order with polynomial delay A polynomial delay algorithm for generating all MASs in a hypergraph (by ignoring the order of outputs) 19 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
20
A LGORITHM F IND MAS FindMAS( H, H 1 ) Output an MAS of H containing H 1 (if H 1 is acyclic) RMCS [Tarjan & Yannakakis 83] Restricted Maximum Cardinality Search Test the acyclicity of hypergraphs MAS [Hirata et al. 05] Find an MAS of H MAS( H ) = FindMAS( H, ) H 1 = FindMAS( H, H 1 ) : H 1 is an MAS of H H =( V, E ) FindMAS( H, H 1 ) runs in O (| V |+|| E ||) time 20 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
21
O UTLINE OF A LGORITHM G EN MAS H 1 : MAS of H H 11 : MAS of H containing E 1 H 111 : MAS of H containing E 1, E 11 H 1111 : MAS of H containing E 1, E 11, E 111 H 12 : MAS of H containing E 2 but not containing E 1 H 1112 : MAS of H containing E 1, E 11, E 112 but not containing E 111 H 112 : MAS of H containing E 1, E 12 but not containing E 11 When we cannot find an MAS in the branch, then backtrack to the node with another candidate of E, add the already selected hyperedges to Out in this node and find an MAS of H containing In U { E } but not containing Out After selecting a new hyperedge E, find an MAS of H containing In U { E } E 1 H - H 1 : ({ E 1 }, ) E 11 H - H 11 : ({ E 1, E 11 }, ) E 111 H - H 111 : ({ E 1, E 11, E 111 }, ) E 112 H -( H 111 U { E 111 }) : ({ E 1, E 11, E 112 },{ E 111 }) E 12 H -( H 11 U { E 11 }) : ({ E 1, E 12 },{ E 11 }) E 2 H -( H 1 U { E 1 }) : ({ E 2 },{ E 1 }) E 3 H -( H 1 U { E 1,E 2 }) : ({ E 3 },{ E 1,E 2 }) H 13 : MAS of H containing E 3 but not containing E 1, E 2 Find an MAS of H containing In but not containing Out 21 ( In, Out )
22
H Out H2H2 In Sec H 2 : Output of FindMAS( H - Out, In ) H 2 is an MAS of H - Out containing In (and not containing Out ), but not always an MAS of H Find an MAS of H containing In but not containing Out by using the set Sec of hyperedges F INDING AN MAS OF H C ONTAINING I N B UT N OT C ONTAINING O UT H In Out H2H2 Sec H3H3 H Out H2H2 Sec H3H3 H Out H2H2 Sec H 2 - In H 3 FindMAS( H -( Out U Sec ), In ) H 2 FindMAS( H - Out,H 3 ) While H 2 is not an MAS of H or H 3 In, repeat the same procedure If H 2 is an MAS of H Output H 2 If H 3 = In Finish to search (Every MAS containing In but not containing Out has been already appeared in the search tree) Sec Sec U ( H 3 - In ) 22 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
23
A R UNNING E XAMPLE OF G EN MAS {a,b,e} FindMAS( H, ) e ab c d H {b,c,d,e} FindMAS( H,{c} ) {a,c,e} FindMAS( H,{a,c} ) c H -{a,b,e} : ({c}, ) a H -{b,c,d,e} : ({a,c}, ) b H -{a,c,e} : {a,b,c} : cyclic d H -{a,c,e} : {a,c,d} : cyclic 23 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
24
A R UNNING E XAMPLE OF G EN MAS {a,b,e} e ab c d H ({c}, ) {b,c,d,e} ({a,c}, ) {a,c,e} {b,d,e} FindMAS( H -{ c },{d} ) : not an MAS of H Sec = {b,e} {b,d,e}-{d} H 3 = {a,d} FindMAS( H -{b,c,e},{d} ) H 2 = {a,d,e} FindMAS( H -{c},{a,d} ) H 2 = FindMAS( H, H 2 ) d H -({a,b,e} U {c}) : ({d},{c}) 24 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
25
A R UNNING E XAMPLE OF G EN MAS {a,b,e} e ab c d H ({c}, ) {b,c,d,e} ({a,c}, ) {a,c,e} {a,d,e} ({d},{c}) b H -({a,d,e} ∪ {c}) : ({b,d},{c}) {b,d,e} FindMAS( H -{ c },{b,d} ) : not an MAS of H Sec = {e} {b,d,e}-{b,d} H 3 = {b,d} FindMAS( H -{c,e},{b,d} ) H 3 = {b,d} 25 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
26
|E||E| C OMPLEXITY OF A LGORITHM G EN MAS |E||E| O (| V |+|| E ||) The delay of the algorithm GenMAS is O (| E | 2 (| V |+|| E ||)) Find the MAS H 2 of H by using Sec 26 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
27
C ONCLUSION AND F UTURE W ORKS Generating all MASs in a hypergraph with polynomial delay Intractability in lexicographic order with polynomial delay A polynomial delay algorithm (by ignoring the order of outputs) Generating all maximal totally balanced subhypergraphs (in lexicographic order) with polynomial delay Totally balanced hypergraph ( -acyclic): every subhypergraph is acyclic [Fagin 83, Lovasz 79] Implementation and application to data mining (frequent acyclic hypergraphs (cf. [Horvath et al. 07])) 27 On Generating Maximal Acyclic Subhypergraphs with Polynomial Delay
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.