Labeling Schemes for Nearest Common Ancestors through Minor-Universal Trees ´ 1 Paweł Gawrychowski1 Fabian Kuhn2 Jakub Łopuszanski 3 4 Konstantinos Panagiotou Pascal Su 1 University

of Wrocław, Poland

2 University

of Freiburg, Germany

3 University

of Munich, Germany

4 ETH

Zürich, Switzerland

January 10, 2018

Gawrychowski et al.

Labeling Schemes for NCA

( University of Wrocław, January Poland, 10, 2018 University1 of / 13 Frei

Nearest Common Ancestors

Harel and Tarjan 1984 An n-vertex tree T can be preprocessed in O(n) time and space, so that for any u, v ∈ T we can find NCAT (u, v ) in constant time. Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

2 / 13

Nearest Common Ancestors

u v Harel and Tarjan 1984 An n-vertex tree T can be preprocessed in O(n) time and space, so that for any u, v ∈ T we can find NCAT (u, v ) in constant time. Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

2 / 13

Nearest Common Ancestors NCAT (u, v)

u v Harel and Tarjan 1984 An n-vertex tree T can be preprocessed in O(n) time and space, so that for any u, v ∈ T we can find NCAT (u, v ) in constant time. Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

2 / 13

Nearest Common Ancestors NCAT (u, v)

u v Harel and Tarjan 1984 An n-vertex tree T can be preprocessed in O(n) time and space, so that for any u, v ∈ T we can find NCAT (u, v ) in constant time. Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

2 / 13

Labeling schemes for distance Goal Assign a binary string `(u) to each node u of the network, such that given `(u) and `(v ) we can compute the distance d(u, v ) from u to v . `(u) is called the label of u. We optimize: 1

maxu |`(u)|,

2

time to compute d(u, v ) from `(u) and `(v ).

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

3 / 13

Labeling schemes for distance Goal Assign a binary string `(u) to each node u of the network, such that given `(u) and `(v ) we can compute the distance d(u, v ) from u to v . `(u) is called the label of u. We optimize: 1

maxu |`(u)|,

2

time to compute d(u, v ) from `(u) and `(v ).

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

3 / 13

Labeling schemes for distance Goal Assign a binary string `(u) to each node u of the network, such that given `(u) and `(v ) we can compute the distance d(u, v ) from u to v . `(u) is called the label of u. We optimize: 1

maxu |`(u)|,

2

time to compute d(u, v ) from `(u) and `(v ).

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

3 / 13

Labeling schemes for distance Goal Assign a binary string `(u) to each node u of the network, such that given `(u) and `(v ) we can compute the distance d(u, v ) from u to v . `(u) is called the label of u. We optimize: 1

maxu |`(u)|,

2

time to compute d(u, v ) from `(u) and `(v ).

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

3 / 13

Labeling schemes for adjacency Goal Assign a binary string `(u) to each node u of the network, such that given `(u) and `(v ) we can check if u and v are adjacent. `(u) is called the label of u. We optimize: 1

maxu |`(u)|,

2

time to check if u and v are adjacent given `(u) and `(v ).

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

3 / 13

Labeling schemes for NCA Goal Assign a binary string `(u) to each node u of the tree, such that given `(u) and `(v ) we can compute NCAT (u, v ). `(u) is called the label of u. We optimize: 1

maxu |`(u)|,

2

time to compute NCAT (u, v ) from `(u) and `(v ).

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

3 / 13

Labeling schemes for NCA Goal Assign a binary string `(u) to each node u of the tree, such that given `(u) and `(v ) we can compute NCAT (u, v ). `(u) is called the label of u. We optimize: 1

maxu |`(u)|,

time to compute NCAT (u, v ) from `(u) and `(v ). Not clear how to modify any of the linear-space constant-time structures, but... 2

Peleg 2000 An NCA labeling scheme with labels consisting of O(log2 n) bits. ..and any such scheme needs labels consisting of Ω(log2 n) bits. Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

3 / 13

Labeling schemes for NCA Goal Assign a binary string `(u) to each node u of the tree, such that given `(u) and `(v ) we can compute NCAT (u, v ). `(u) is called the label of u. We optimize: 1

maxu |`(u)|,

time to compute NCAT (u, v ) from `(u) and `(v ). Not clear how to modify any of the linear-space constant-time structures, but... 2

Peleg 2000 An NCA labeling scheme with labels consisting of O(log2 n) bits. ..and any such scheme needs labels consisting of Ω(log2 n) bits. Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

3 / 13

Labeling schemes for NCA Goal Assign a binary string `(u) to each node u of the tree, such that given `(u) and `(v ) we can compute NCAT (u, v ). `(u) is called the label of u. We optimize: 1

maxu |`(u)|,

time to compute NCAT (u, v ) from `(u) and `(v ). Not clear how to modify any of the linear-space constant-time structures, but... 2

Peleg 2000 An NCA labeling scheme with labels consisting of O(log2 n) bits. ..and any such scheme needs labels consisting of Ω(log2 n) bits. Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

3 / 13

Labeling schemes for NCA Goal Assign a binary string `(u) to each node u of the tree, such that given `(u) and `(v ) we can compute `(NCAT (u, v )). `(u) is called the label of u. We optimize: 1

maxu |`(u)|,

2

time to compute `(NCAT (u, v )) from `(u) and `(v ).

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

3 / 13

Labeling schemes for NCA Goal Assign a binary string `(u) to each node u of the tree, such that given `(u) and `(v ) we can compute `(NCAT (u, v )). `(u) is called the label of u. We optimize: 1

maxu |`(u)|,

2

time to compute `(NCAT (u, v )) from `(u) and `(v ).

We need to additionally require that labels are distinct.

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

3 / 13

NCA labeling scheme Given an n-node rooted tree T , assign a distinct label `(u) to every u ∈ T , such that `(NCA(u, v )) can be computed from `(u) and `(v ).

Alstrup, Gavoille, Kaplan, Rauhe SPAA 2002 An NCA labeling scheme with labels consisting of O(log n) bits.

Fischer ESA 2009 Variants of the above scheme with labels of length ≈ 8 log n.

Alstrup, Halvorsen, and Larsen SODA 2014 An NCA labeling scheme with labels consisting of 2.772 log n bits. ...and any such scheme needs labels consisting of at least 1.008 log n bits.

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

4 / 13

NCA labeling scheme Given an n-node rooted tree T , assign a distinct label `(u) to every u ∈ T , such that `(NCA(u, v )) can be computed from `(u) and `(v ).

Alstrup, Gavoille, Kaplan, Rauhe SPAA 2002 An NCA labeling scheme with labels consisting of O(log n) bits.

Fischer ESA 2009 Variants of the above scheme with labels of length ≈ 8 log n.

Alstrup, Halvorsen, and Larsen SODA 2014 An NCA labeling scheme with labels consisting of 2.772 log n bits. ...and any such scheme needs labels consisting of at least 1.008 log n bits.

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

4 / 13

NCA labeling scheme Given an n-node rooted tree T , assign a distinct label `(u) to every u ∈ T , such that `(NCA(u, v )) can be computed from `(u) and `(v ).

Alstrup, Gavoille, Kaplan, Rauhe SPAA 2002 An NCA labeling scheme with labels consisting of O(log n) bits.

Fischer ESA 2009 Variants of the above scheme with labels of length ≈ 8 log n.

Alstrup, Halvorsen, and Larsen SODA 2014 An NCA labeling scheme with labels consisting of 2.772 log n bits. ...and any such scheme needs labels consisting of at least 1.008 log n bits.

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

4 / 13

NCA labeling scheme Given an n-node rooted tree T , assign a distinct label `(u) to every u ∈ T , such that `(NCA(u, v )) can be computed from `(u) and `(v ).

Alstrup, Gavoille, Kaplan, Rauhe SPAA 2002 An NCA labeling scheme with labels consisting of O(log n) bits.

Fischer ESA 2009 Variants of the above scheme with labels of length ≈ 8 log n.

Alstrup, Halvorsen, and Larsen SODA 2014 An NCA labeling scheme with labels consisting of 2.772 log n bits. ...and any such scheme needs labels consisting of at least 1.008 log n bits.

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

4 / 13

NCA labeling scheme Given an n-node rooted tree T , assign a distinct label `(u) to every u ∈ T , such that `(NCA(u, v )) can be computed from `(u) and `(v ).

Alstrup, Gavoille, Kaplan, Rauhe SPAA 2002 An NCA labeling scheme with labels consisting of O(log n) bits.

Fischer ESA 2009 Variants of the above scheme with labels of length ≈ 8 log n.

Alstrup, Halvorsen, and Larsen SODA 2014 An NCA labeling scheme with labels consisting of 2.772 log n bits. ...and any such scheme needs labels consisting of at least 1.008 log n bits.

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

4 / 13

Minor-universal trees T is a minor-universal tree for the family of n-node trees if, for any n-node tree T , the nodes of T can be mapped to the nodes of T as to preserve the NCA relationship.

T T

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

5 / 13

Minor-universal trees T is a minor-universal tree for the family of n-node trees if, for any n-node tree T , the nodes of T can be mapped to the nodes of T as to preserve the NCA relationship.

T T

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

5 / 13

Minor-universal trees T is a minor-universal tree for the family of n-node trees if, for any n-node tree T , the nodes of T can be mapped to the nodes of T as to preserve the NCA relationship.

T T

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

5 / 13

Minor-universal trees T is a minor-universal tree for the family of n-node trees if, for any n-node tree T , the nodes of T can be mapped to the nodes of T as to preserve the NCA relationship.

T T

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

5 / 13

Minor-universal trees T is a minor-universal tree for the family of n-node trees if, for any n-node tree T , the nodes of T can be mapped to the nodes of T as to preserve the NCA relationship.

T T ...or: any n-node T must be a topological minor of T , that is, T should contain a division of T as a subgraph. Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

5 / 13

Minor-universal trees and NCA

Minor-universal tree of size |T | =⇒ NCA labeling with labels of length log |T | Adjacency labeling is equivalent to constructing an induced universal graph.

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

6 / 13

Minor-universal trees and NCA

Minor-universal tree of size |T | =⇒ NCA labeling with labels of length log |T | Adjacency labeling is equivalent to constructing an induced universal graph.

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

6 / 13

Other applications Hrubeš, Widgerson, and Yehudayoff 2010 Minor universal tree for binary trees of size O(n4 ) with applications to VP vs. VNP.

Young, Chu, and Wong 1999 A related notion of universal series-parallel boolean functions.

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

7 / 13

Other applications Hrubeš, Widgerson, and Yehudayoff 2010 Minor universal tree for binary trees of size O(n4 ) with applications to VP vs. VNP.

Young, Chu, and Wong 1999 A related notion of universal series-parallel boolean functions.

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

7 / 13

Minor-universal trees

We construct a minor-universal tree of size O(n2.318 ) for general n-node trees, and of size O(n1.984 ) for binary n-node trees. This implies an NCA labeling scheme with labels of length 2.318 log n for general trees and 1.984 log n for binary trees. We show that the size of a minor-universal tree is Ω(n2.174 ) for general n-node trees and Ω(n1.728 ) for binary n-node trees.

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

8 / 13

Minor-universal trees

We construct a minor-universal tree of size O(n2.318 ) for general n-node trees, and of size O(n1.984 ) for binary n-node trees. This implies an NCA labeling scheme with labels of length 2.318 log n for general trees and 1.984 log n for binary trees. We show that the size of a minor-universal tree is Ω(n2.174 ) for general n-node trees and Ω(n1.728 ) for binary n-node trees.

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

8 / 13

Minor-universal trees

We construct a minor-universal tree of size O(n2.318 ) for general n-node trees, and of size O(n1.984 ) for binary n-node trees. This implies an NCA labeling scheme with labels of length 2.318 log n for general trees and 1.984 log n for binary trees. We show that the size of a minor-universal tree is Ω(n2.174 ) for general n-node trees and Ω(n1.728 ) for binary n-node trees.

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

8 / 13

Un0

Un 0 Uλn

U n20

... U(1−λ)n

U n2 U n3 U n4 U n5 U n6

... U n20

Un U n2 U n3 U n4 U n5

Assume |Un | ≤ nβ and |Un0 | ≤ c · nβ , then:

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

9 / 13

Un0

Un 0 Uλn

U n20

... U(1−λ)n

U n2 U n3 U n4 U n5 U n6

... U n20

Un U n2 U n3 U n4 U n5

Assume |Un | ≤ nβ and |Un0 | ≤ c · nβ , then:

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

9 / 13

Un0

Un 0 Uλn

U n20

... U(1−λ)n

... U n20

U n2 U n3 U n4 U n5 U n6

Un U n2 U n3 U n4 U n5

Assume |Un | ≤ nβ and |Un0 | ≤ c · nβ , then: 0 |Un | ≤ |U(1−λ)n | + |Uλn |+

n X

|U n | i

i=2

|Un0 | ≤ |U 0n | + |U 0n | + 2

Gawrychowski et al.

2

n X

|U n | i

i=1

Labeling Schemes for NCA

January 10, 2018

9 / 13

Un0

Un 0 Uλn

U n20

... U(1−λ)n

... U n20

U n2 U n3 U n4 U n5 U n6

Un U n2 U n3 U n4 U n5

Assume |Un | ≤ nβ and |Un0 | ≤ c · nβ , then: 0 |Un | ≤ |U(1−λ)n | + |Uλn |+

n X

|U n | i

i=2

|Un0 | ≤ |U 0n | + |U 0n | + 2

Gawrychowski et al.

2

n X

|U n | i

i=1

Labeling Schemes for NCA

January 10, 2018

9 / 13

Un0

Un 0 Uλn

U n20

... U(1−λ)n

U n2 U n3 U n4 U n5 U n6

... U n20

Un U n2 U n3 U n4 U n5

Assume |Un | ≤ nβ and |Un0 | ≤ c · nβ , then:

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

9 / 13

Un0

Un 0 Uλn

U n20

... U(1−λ)n

U n2 U n3 U n4 U n5 U n6

... U n20

Un U n2 U n3 U n4 U n5

Assume |Un | ≤ nβ and |Un0 | ≤ c · nβ , then: |Un | ≤ ((1 − λ)n)β + c(λn)β + (ζ(β) − 1)nβ  n β  n β |Un0 | ≤ c +c + ζ(β)nβ 2 2 Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

9 / 13

Un0

Un 0 Uλn

U n20

... U(1−λ)n

U n2 U n3 U n4 U n5 U n6

... U n20

We need to choose β and λ such that, for c =

Un U n2 U n3 U n4 U n5

ζ(β) : 1−2β−1

(1 − λ)β + cλβ + (ζ(β) − 1)β ≤ 1. Holds for λ = 0.341395... and β = 2.31757....

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

9 / 13

Un0

Un 0 Uλn

U n20

... U(1−λ)n

U n2 U n3 U n4 U n5 U n6

... U n20

We need to choose β and λ such that, for c =

Un U n2 U n3 U n4 U n5

ζ(β) : 1−2β−1

(1 − λ)β + cλβ + (ζ(β) − 1)β ≤ 1. Holds for λ = 0.341395... and β = 2.31757....

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

9 / 13

Lower bound for binary trees b(n) = size of a minor-universal tree for binary trees on n leaves and no degree-1 nodes. b(n) ≥ 1 +

X

b(bn/sc)

s≥2

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

10 / 13

Lower bound for binary trees b(n) = size of a minor-universal tree for binary trees on n leaves and no degree-1 nodes. b(n) ≥ 1 +

X

b(bn/sc)

s≥2

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

10 / 13

Lower bound for binary trees b(n) = size of a minor-universal tree for binary trees on n leaves and no degree-1 nodes. b(n) ≥ 1 +

X

b(bn/sc)

s≥2

Why?

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

10 / 13

Lower bound for binary trees b(n) = size of a minor-universal tree for binary trees on n leaves and no degree-1 nodes. b(n) ≥ 1 +

X

b(bn/sc)

s≥2

Why?

6 5

4

6-caterpillar

3

4

1

1 1 Gawrychowski et al.

1

1 Labeling Schemes for NCA

1

1 January 10, 2018

10 / 13

Lower bound for binary trees b(n) = size of a minor-universal tree for binary trees on n leaves and no degree-1 nodes. b(n) ≥ 1 +

X

b(bn/sc)

s≥2

Why?

6 5

4 3

4

1

1 1 Gawrychowski et al.

1

1 Labeling Schemes for NCA

1

1 January 10, 2018

10 / 13

Lower bound for binary trees b(n) = size of a minor-universal tree for binary trees on n leaves and no degree-1 nodes. b(n) ≥ 1 +

X

b(bn/sc)

s≥2

Why?

6 5

4 2 3

4

3

1 1 1

1

3 2

2

1

2

1 1 Gawrychowski et al.

1

1

1 1

1

1

Labeling Schemes for NCA

1

1

1 January 10, 2018

10 / 13

Lower bound for binary trees b(n) = size of a minor-universal tree for binary trees on n leaves and no degree-1 nodes. b(n) ≥ 1 +

X

b(bn/sc)

s≥2

After some transformations this implies that, for any c such that ζ(c) > 2, we have b(n) = Ω(nc ). ζ(1.728) > 2 =⇒ b(n) = Ω(n1.728 )

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

10 / 13

Lower bound for binary trees b(n) = size of a minor-universal tree for binary trees on n leaves and no degree-1 nodes. b(n) ≥ 1 +

X

b(bn/sc)

s≥2

After some transformations this implies that, for any c such that ζ(c) > 2, we have b(n) = Ω(nc ). ζ(1.728) > 2 =⇒ b(n) = Ω(n1.728 )

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

10 / 13

Query time

If, for any n, there exists a minor-universal tree for n-node trees of size O(nc ), then there exists a labeling scheme for NCA with labels of length c log n + o(log n) and constant query time. A strong indication minor-universal trees are the right approach for NCA labeling!

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

11 / 13

Query time

If, for any n, there exists a minor-universal tree for n-node trees of size O(nc ), then there exists a labeling scheme for NCA with labels of length c log n + o(log n) and constant query time. A strong indication minor-universal trees are the right approach for NCA labeling!

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

11 / 13

Query time Preprocess all queries for trees of size b = (log n)1/4c using (bc )2 · c log b = o(log n) bits. Hide the lookup table in every label.

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

12 / 13

Query time Preprocess all queries for trees of size b = (log n)1/4c using (bc )2 · c log b = o(log n) bits. Hide the lookup table in every label.

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

12 / 13

Is there an NCA labeling scheme that cannot be converted into a minor-universal tree? Can we close the gap between the lower and upper bounds on the size of a minor-universal tree?

Questions?

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

13 / 13

Is there an NCA labeling scheme that cannot be converted into a minor-universal tree? Can we close the gap between the lower and upper bounds on the size of a minor-universal tree?

Questions?

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

13 / 13

Is there an NCA labeling scheme that cannot be converted into a minor-universal tree? Can we close the gap between the lower and upper bounds on the size of a minor-universal tree?

Questions?

Gawrychowski et al.

Labeling Schemes for NCA

January 10, 2018

13 / 13

Labeling Schemes for Nearest Common Ancestors ...

Jan 10, 2018 - We optimize: 1 maxu |l(u)|,. 2 time to compute d(u,v) from l(u) and l(v). Gawrychowski et al. Labeling Schemes for NCA. January 10, 2018. 3 / 13 ..... VP vs. VNP. Young, Chu, and Wong 1999. A related notion of universal series-parallel boolean functions. Gawrychowski et al. Labeling Schemes for NCA.

467KB Sizes 1 Downloads 253 Views

Recommend Documents

No documents