A fast Monte Carlo algorithm for the homogeneous set sandwich problem Vinícius Gusmão Pereira de Sá Guilherme Dias da Fonseca Celina Miraglia Herrera de Figueiredo Universidade Federal do Rio de Janeiro
Sandwich Graphs A graph G 2 ( V 2 , E 2 ) is said to be a supergraph of a graph G 1 ( V 1 , E 1 ) if and only if V 2 = V 1 and E 2 ⊆ E 1 . G 1 G 2 (supergraph of G 1 ) A graph G S ( V S , E S ) is said to be a sandwich graph of a pair G 1 ( V , E 1 ), G 2 ( V , E 2 ) if and only if V S = V and E 1 ⊆ E S ⊆ E 2 . G S (sandwich graph of G 1 , G 2 )
Sandwich Problems Input: two graphs G 1 ( V , E 1 ) and G 2 ( V , E 2 ) such that G 2 is a supergraph of G 1 . Question: is there any sandwich graph G S of pair ( G 1 , G 2 ) that has property ∏ ? G 1 G 2 (supergraph of G 1 ) An edge ( x , y ) is said to be • mandatory , if ( x , y ) ∈ E 1 • forbidden , if ( x , y ) ∉ E 2 • optional , if ( x , y ) ∈ E 2 \ E 1
Homogeneous Sets H (homogeneous set) Let G ( V , E ) be a graph. ... h A set H ⊂ V is a homogeneous set of G if and only if all vertices in H have exactly the same neighborhood outside H and 1 < | H | < | V |. The Homogeneous Set Sandwich Problem (HSSP): is there a sandwich graph of ( G 1 , G 2 ) which admits a homogeneous set?
History m = min {m M , m F } M = max {m M , m F } AUTHORS PUBLICATION ALGORITHM TIME DET./RAND. Cerioli, Everett, Ehaustive IPL, 1998 1 O(n 4 ) det. Figueiredo, Klein Envelopment O(M n 2 ) Strongly Connected Tang, Wang, Yeh IPL, 2001 2 O( Δ 2 n 2 ) det. Sinks O(m n) Figueiredo, M.Sc., 2003 3 Two-Phase O(m M) det. P. de Sá + IPL, 2004 Balanced Figueiredo, 4 O(n 3,5 ) det. LNCS, 2004 Subsets Fonseca, P. de Sá, (WEA) QUALIFYING Spinrad 5 Monte Carlo O(n 3 ) rand. Harmonic 6 O(n 3 log n) det. Series Growing 7 O(n 3 log n) det. Figueiredo, Algorithmica, Cliques Fonseca, P. de Sá 2005 8 Las Vegas O(n 3 ) rand. 9 Quick Fill O(n 3 log m/n) det. Bornstein, P. de Sá, Pair IPL, 2006 10 O(m n log n) det. Completion Figueiredo
Randomized Monte Carlo algorithms • Give the correct answer with known probability p • Their time complexity is computed deterministically One-sided error Monte Carlo algorithms YES-biased Monte Carlo NO-biased Monte Carlo • Whenever the answer is YES, the answer is correct for certain Defined analogously (a certificate is given) Several independent runs ⇔ any desired error ratio
Bias vertices Sandwich instance (HSSP input) Let G 1 ( V , E 1 ), G 2 ( V , E 2 ) be an input instance for the HSSP. A vertex b ∈ V is said to be a bias vertex of set S ⊆ V \ { b } iff there exists at least one mandatory edge [ b , x ] ∈ E 1 between b and some vertex x ∈ S and, also, at least one forbidden edge [ b , y ] ∉ E 2 between b and some Sandwich Homogeneous Sets vertex y ∈ S . Characterization A set H ⊂ V is a sandwich homogeneous set of pair G 1 ( V , E 1 ), The set B ( S ) containing all bias G 2 ( V , E 2 ) if and only if its bias set is vertices of S is called its bias set . the empty set.
Bias Envelopment H 1 x , y
Bias Envelopment H 2 = H 1 U B ( H 1 ) H 1 x , y
Bias Envelopment H 3 = H 2 U B ( H 2 ) H 2 H 1 x , y
Bias Envelopment |H q | = n H 3 ... H 2 H 1 x , y
Bias Envelopment |H q | = n H 3 ... H 2 H 1 x , y { x , y } is not contained in ANY sandwich homogeneous sets of ( G 1 , G 2 ) O( n 2 ) time
The Exhaustive Bias Envelopment algorithm (CERIOLI, EVERETT, FIGUEIREDO, KLEIN, 1998) 1. For each pair of vertices x , y ∈ V do 1.1. H ← { x , y } 1.2. While | H | < n do 1.2.1. Find the bias set T of H 1.2.2. If T = Ø then 1.2.1.1 Return YES. 1.2.3. H ← H U T 2. Return NO. Bias Envelopment
Incomplete Bias Envelopment |H q | > k ( k < n ) H 3 H 2 ... H 1 x , y
Incomplete Bias Envelopment |H q | > k ( k < n ) H 3 H 2 ... H 1 x , y { x , y } is not contained in ANY sandwich homogeneous sets of ( G 1 , G 2 ) with k vertices or less O( n.k ) time
The Monte Carlo HSSP algorithm Let G 1 ( V , E 1 ), G 2 ( V , E 2 ) be an input instance for the HSSP. Suppose there is a sandwich homogeneous set H ⊂ V with h vertices or more. V (| V | = n ) H | H | ≥ h
The Monte Carlo HSSP algorithm V Hypothesis: | H | ≥ h H What is the probability p 1 that a random pair of vertices { x , y } ⊂ V is NOT contained in H ?
The Monte Carlo HSSP algorithm V Hypothesis: | H | ≥ h H What is the probability p 1 that a random pair of vertices { x , y } ⊂ V is NOT contained in H ?
The Monte Carlo HSSP algorithm V Hypothesis: | H | ≥ h H What is the probability p 1 that a random pair of vertices { x , y } ⊂ V is NOT contained in H ? What is the probability p t that t random pairs of vertices fail to be contained in H ?
The Monte Carlo HSSP algorithm V Hypothesis: | H | ≥ h H What is the probability p 1 that a random pair of vertices { x , y } ⊂ V is NOT contained in H ? What is the probability p t that t random pairs of vertices fail to be contained in H ?
The Monte Carlo HSSP algorithm V Hypothesis: | H | ≥ h H What is the probability p 1 that a Now, what is the probability p t that, random pair of vertices { x , y } ⊂ V running t Bias Envelopment procedures is NOT contained in H ? (starting from t random pairs of vertices), a sandwich homogeneous set is successfully found? What is the probability p t that t random pairs of vertices fail to be contained in H ?
The Monte Carlo HSSP algorithm V Hypothesis: | H | ≥ h H What is the probability p 1 that a Now, what is the probability p t that, random pair of vertices { x , y } ⊂ V running t Bias Envelopment procedures is NOT contained in H ? (starting from t random pairs of vertices), a sandwich homogeneous set is successfully found? What is the probability p t that t random pairs of vertices fail to be contained in H ?
The Monte Carlo HSSP algorithm V Hypothesis: | H | ≥ h H Fix p t ≥ p = 1 – ε Running the Bias Envelopment on t random pairs suffices to find a sandwich homogeneous set with probability at least p , in case there exists any with h(t) vertices or more .
The Monte Carlo HSSP algorithm But the algorithm is meant to find one, if there exists any, no matter its size . What is the number t’ of Bias Envelopment procedures (on random pairs) that grants this? h ( t’ ) = 2
The Monte Carlo HSSP algorithm ... 0 2 3 4 5 n -2 n -1 n 1 Number t of Bias Envelopment Minimum integer h ( t ) such that t Bias Envelopment procedures undertaken on executions (on random pairs) suffice to find some random pairs of vertices: sandwich homogeneous set, in case there exists any with h(t) vertices or more : 0 we don’t know anything
The Monte Carlo HSSP algorithm ... 0 2 3 4 5 n -2 n -1 n 1 h (1) Number t of Bias Envelopment Minimum integer h ( t ) such that t Bias Envelopment procedures undertaken on executions (on random pairs) suffice to find some random pairs of vertices: sandwich homogeneous set, in case there exists any with h(t) vertices or more : 0 we don’t know anything 1 h (1)
The Monte Carlo HSSP algorithm ... 0 2 3 4 5 n -2 n -1 n 1 h (2) h (1) Number t of Bias Envelopment Minimum integer h ( t ) such that t Bias Envelopment procedures undertaken on executions (on random pairs) suffice to find some random pairs of vertices: sandwich homogeneous set, in case there exists any with h(t) vertices or more : 0 we don’t know anything 1 h (1) 2 h (2)
The Monte Carlo HSSP algorithm ... ... 0 2 3 4 5 n -2 n -1 n 1 ... h (2) h (1) Number t of Bias Envelopment Minimum integer h ( t ) such that t Bias Envelopment procedures undertaken on executions (on random pairs) suffice to find some random pairs of vertices: sandwich homogeneous set, in case there exists any with h(t) vertices or more : 0 we don’t know anything 1 h (1) 2 h (2) ... ...
The Monte Carlo HSSP algorithm ... ... 0 2 3 4 5 n -2 n -1 n 1 ... h ( t’ ) = 2 h (2) h (1) Number t of Bias Envelopment Minimum integer h ( t ) such that t Bias Envelopment procedures undertaken on executions (on random pairs) suffice to find some random pairs of vertices: sandwich homogeneous set, in case there exists any with h(t) vertices or more : 0 we don’t know anything 1 h (1) 2 h (2) ... ... t’ h ( t’ ) = 2
The Monte Carlo HSSP algorithm Determining t’ ... , given a fixed p = 1 – ε
The Monte Carlo HSSP algorithm Determining t’ ... , given a fixed p = 1 – ε But this leads to an O( n 4 ) algorithm!!!!!!
The Monte Carlo HSSP algorithm Determining t’ ... , given a fixed p = 1 – ε But this leads to an O( n 4 ) algorithm!!!!!! NO, IT DOESN’T.
The Monte Carlo HSSP algorithm ... 0 2 3 4 5 n -2 n -1 n 1 ... h ( k -1) h (1) t = k • pick a random pair { x k , y k } • Bias Envelopment |H q | > h ( k -1) H 2 H 1 ... x k , y k
The Monte Carlo HSSP algorithm ... 0 2 3 4 5 n -2 n -1 n 1 ... h ( k -1) h (1) t = k Two possibilities: • pick a random pair { x k , y k } • Bias Envelopment (1) THERE IS a sandwich homogeneous set with more than h ( k -1) vertices |H q | > h ( k -1) H 2 H 1 ... x k , y k (2) THERE IS NO sandwich homogeneous set with more than h(k -1 ) vertices
Recommend
More recommend