25
Distance and Routing Distance and Routing Labeling Schemes in Labeling Schemes in Graphs Graphs Feodor F. Dragan Feodor F. Dragan Computer Science Department Kent State University http://www.cs.kent.edu/~dragan

Distance and Routing Labeling Schemes in Graphs Feodor F. Dragan Computer Science Department Kent State University dragan

Embed Size (px)

Citation preview

Distance and Routing Distance and Routing Labeling Schemes in GraphsLabeling Schemes in Graphs

Feodor F. DraganFeodor F. Dragan

Computer Science DepartmentKent State University

http://www.cs.kent.edu/~dragan

Talk is based onTalk is based on

• Known results for trees – Kannan&Naor&Rudich’88,

– Peleg’99 and ’00,

– Thorup&Zwick’01,

– Fraigniaud&Gavoille’01

Traditional graph representationTraditional graph representation

Store adjacency information in global data structure

– Requires much storage

– Node labels contain no information, serve only as “pointers” to global data structure

Local graph representationLocal graph representation

IDEA: Store local pieces of information, i.e.,

– Associate label Label(v) with each node v, s.t. labels allow inferring adjacency information locally, without using additional memory and information

Question: Can this be done compactly & efficiently?

““Ancient” Example: Ancient” Example: Hamming adjacency labeling

Goal: Label each node v with m-bit label Label(v) s.t. Label(v), Label (u) allow deciding if u and v are adjacent:

Question: Can this be done with short labels?

[Breuer&Folkman’67]: For any n-node graph there exists a Hamming distance adjacency labeling with m=2n, T=4 -4, where = max node degree.

Interest Revived: Interest Revived: Adjacency Labeling

[Kannan&Naor&Rudich’88] What’s in label?

Note: - Algorithm knows nothing beyond the labels (even, it does not know which graph they come from)

Adjacency-labeling (for graph family Adjacency-labeling (for graph family F ): ):

1. Function Label labeling nodes of any graph in F with short distinct labels (compactness)

2. Efficient algorithm for deciding adjacency of two nodes given their labels (efficiency) (polylogarithmic labels polylogarithmic time)

Adjacency Labeling on Trees[Kannan&Naor&Rudich’88]

Labeling: Labeling:

1. Arbitrarily root the tree and prelabel each node v with distinct integer I(v) from [1..n].

2. Label root r by Label(r)=(I(r)).

3. Label each non-root node v with parent w by

Label(v)=(I(v),I(w)).

nlog2Labels contain bitsLabels contain bits

Adjacency Labeling on Trees[Kannan&Naor&Rudich’88]

Adjacency Decoder for u,v: Check if 1st entry in Label(v) = 2nd entry in Label(u) or vice versa.

Constant time!

Labeling: Labeling: (with bits)(with bits)

1. Arbitrarily root the tree and prelabel each node v with distinct integer I(v) from [1..n].

2. Label root r by Label(r)=(I(r)).

3. Label each non-root node v with parent w by

Label(v)=(I(v),I(w)).

nlog2

Extensions

Question (compactness): Is this doable for all graphs with -bit labels?

1. Bounded arboricity graphs

– Bounded degree

– Bounded-genus graphs (e.a., planar graphs)

2. Intersection-based graphs (e.a., interval graphs)

3. c-decomposable graphs

)(log nO

Labels contain bitsLabels contain bits)(log nO

Negative results

Negative examples: Bipartite / chordal graphs

)(log nO

Note: Note: Graph classGraph class F is adjacency-labelable using -bit labels

)(log nO

each G from F is fully defined by bits )log( nnO

# of represented graphs )log(2 nnO

Therefore: Graph family F containing n-node graphs is not adjacency-labelable using -bit labels.

)log(2 nnO

Question: Can this be done for other types of information beyond adjacency?

Distance• In general graphs

• Distance • Edge / node connectivity • Routing• Flow• …

• In trees • Ancestry• Lowest common ancestor (LCA or NCA)• Depth of NCA (separation level)

Question: Can this be done for other types of information beyond adjacency?

Distance• In general graphs

• Distance • Edge / node connectivity • Routing• Flow• …

• In trees • Ancestry• Lowest common ancestor (LCA or NCA)• Depth of NCA (separation level)

Distance Labeling SchemeDistance Labeling Scheme

Distance

Goal:Goal: Short labels that encode distances and distance decoder, an algorithm for inferring the distance between two nodes only from their labels (in time polynomial in the label length)

…a method for storing and extracting distances in a “distributed” fashion…

• Labeling: v Label(v)

• Distance decoder: D(Label(v), Label(u)) dist(u,v)

Simple examplesSimple examples

Distance

Enjoy -bit distance labeling schemes with Enjoy -bit distance labeling schemes with constant-time decoderconstant-time decoder

)(log nO

General graphsGeneral graphs

Distance

Easy labeling: Label each node in n-node graph G on

with all distances

Hence, for the class of all n-node graphs

Currently:

Similar bounds apply for other large graph families (bipartite / chordal / …)

[Gavoille,&Peleg&Perennes&Raz’01]

Distance labeling on trees Distance labeling on trees [Peleg’99]

Preprocessing: Arbitrarily label each node v of T with distinct integers I(v) from [1..n]

Recursive partitioning and Recursive partitioning and decomposition tree decomposition tree

Tree separator: node v in n-node tree T, whose removal breaks T into subtrees of size at most n/2.

Known fact: Every tree has a separator (can be found in linear time)

TH

nHDepth log)(

LabelingLabeling

TH

• Construct for H Depth of NCA labeling scheme ( -bit labels [Peleg’00] and constant (can be made) decision time)

• Then,

)(log2 nO

v A(v)

rc 0

1c

2c

vc 3

0...26)),(),...,,(),,(),(()( 10 hTTT cvdistcvdistcvdistvAvLabel

)(log2 nO• Hence, -bit labels

Constant Time Distance Decoder Constant Time Distance Decoder

TH

Given Label(u) and Label(v)Function distance_decoder_trees(Label(u),Label(v))• Extract A(u), A(v)• Use A(u), A(v) to find the depth k of NCA(u,v) in H 1• Output , by extracting appropriate entries from labels 2+2=4

u

v

),(),( kTkT cudistcvdist

(A(u),2,2,0))

(A(v),6,2,1,0))

u

v

Lower bounds and Planar graphs Lower bounds and Planar graphs [Gavoille,&Peleg&Perennes&Raz’01]

Routing Labeling SchemeRouting Labeling Scheme

Distance

Goal:Goal: Short labels that encode the routing information and routing protocol, an algorithm for inferring port number of the first edge on a shortest path from source to destination,giving only labels and nothing else

• Labeling: v Label(v)

• Distance decoder: R(Label(v), Label(u)) port(v,u)

vnode

1

2

3

d

General graphsGeneral graphs

Distance

Easy labeling (full routing tables): Label each node in n-node graph G on

with full routing information

Hence, for the class of all n-node graphs one needs nlogn -bit labels

Currently: Nothing better can be done for general graphs if we insist on routing via shortest paths

)),(),...,,(),,(()( 21 niiii vvportvvportvvportvLabel

Labeling trees with -bit labels Labeling trees with -bit labels

TH

• Construct for H Depth of NCA labeling scheme ( -bit labels

• Then,

)(log2 nO

v A(v)

rc 0

1c

2c

vc 3

))),(),,(()),...,,(),,((),(),(()( 1100 vcportcvportvcportcvportvhvAvLabel hh )(log2 nO• Hence, -bit labels

)(log2 nO

Constant Time Routing Decision Constant Time Routing Decision

THGiven Label(v) and Label(u)Function routing_decision_trees(Label(u),Label(v))• Extract A(v), A(u)• Use A(v), A(u) to find the depth k of NCA(v,u) in H 1• If k<h(v) output from Label(v) port(4,12)=1 else (i.e., k=h(v)) output from Label(u)

u

v

),( kcvport

u

v

))),(),,(()),...,,(),,((),(),(()( 1100 vcportcvportvcportcvportvhvAvLabel hh

),( ucport k

1

Best routing labeling scheme for Best routing labeling scheme for trees and Planar graphs trees and Planar graphs

[Thorup&Zwick’01] For family of n-node trees there is a routing labeling scheme with labels of size O(logn)-bits per node and constant time routing decision.[Fraigniaud&Gavoille’01] For family of n-node trees there is a routing labeling scheme with labels of size -bits per node and constant time routing decision.

)loglog/(log2 nnO

[Gavoille&Hanusse’99] For family of n-node planar graphs there is a routing labeling scheme with labels of size (8n +o(n))-bits per node.