12
LATIN’02 April 4 Cancun, Mexico 1 On the Power of BFS to On the Power of BFS to Determine a Graph’s Determine a Graph’s Diameter Diameter Derek G. Corneil University of Toronto Feodor F. Dragan Kent State University, Ohio Ekkehard Kohler Technische Universitat Berlin .. ..

LATIN’02 April 4 Cancun, Mexico 1 On the Power of BFS to Determine a Graph’s Diameter Derek G. Corneil University of Toronto Feodor F. Dragan Kent State

Embed Size (px)

Citation preview

LATIN’02 April 4 Cancun, Mexico

1

On the Power of BFS to Determine a On the Power of BFS to Determine a Graph’s DiameterGraph’s Diameter

Derek G. CorneilUniversity of Toronto

Feodor F. DraganKent State University, Ohio

Ekkehard KohlerTechnische Universitat Berlin

....

LATIN’02 April 4 Cancun, Mexico

2

The Diameter Problem

(find a longest shortest path in a graph)

• G = (V,E) is a connected, finite, and undirected graph

• The length of a path from a vertex v to a vertex u is the number of edges in the path

• The distance d(u,v) is the length of a shortest (u,v)-path

• The eccentricity ecc(v) of a vertex v is the maximum distance from v to a vertex in G

• The radius r(G) is the minimum eccentricity of a vertex in G and the diameter d(G) is the maximum eccentricity

• The diameter problem: find d(G) and x,y such that d(x,y)=d(G) (in other words, find a vertex of maximum eccentricity)

vx

y

20),()(9),(

yxdGduvd

u

LATIN’02 April 4 Cancun, Mexico

3

Applications• The diameter problem is a basic problem in algorithmic graph theory and computational geometry. • It naturally arises in communication and transportation networks

(the linkage structure of communication networks is usually modeled by the graph).

• if the number of links in a path is roughly proportional to the time delay or signal degradation encountered by messages sent along the path, the diameter is then involved in the complexity analysis for the performance of the network;

• the diameter of a communication network gives a lower bound on the time needed to transmit a message from an arbitrary source node to all other nodes.

22)( Gd

LATIN’02 April 4 Cancun, Mexico

4

Known General Results• Determining the diameter of a graph is a basic but seemingly quite time consuming operation.

• No efficient algorithms for the diameter problem in general graphs, avoiding the computation of whole distance matrix, has been designed (Can the diameter be computed easier than the whole distance matrix?).

• A ratio 2/3 approximation to the diameter in time

• Diameter with an additive error 2:

• naïve approach: O(nm) ( for dense graphs)• via matrix multiplications: O(M(n) log n) [Seidel’92]

)()( 376.2nOnM [Coppersmith/Winograd’ 87]

)( 3nO

• not practical, large hidden constants

• distances with an additive one-sided error 2:

[Aingworth/Chekuri/Indyk/Motwani’ 96]

[Dor/Halperin/Zwick’ 96]

)(~ 2/5nO

Vuvuvduvd ,2),(),(ˆ0

)(~ 3/7nO

)loglog( 2 nnnnmO [Aingworth/Chekuri/Indyk/Motwani’ 96]

LATIN’02 April 4 Cancun, Mexico

5

Our Approach• Examine the naïve algorithm of

• choosing a vertex • performing some version of BFS from this vertex and then • showing a nontrivial bound on the eccentricity of the last vertex visited in this search.

• This approach has already received considerable attention• (classical result [Handler’73]) for trees this method produces a vertex of maximum eccentricity • [Dragan et al’ 97] if LexBFS is used for chordal graphs, then whereas for interval graphs and Ptolemaic graphs • [Corneil et al’99] if LexBFS is used on AT-free graphs, then • [Dragan’99] if LexBFS is used, then for HH-free graphs, for HHD-free graphs and for HHD-free and AT-free graphs • [Corneil et al’01] considers multi sweep LexBFSs …

1)()( Gdvecc).()( Gdvecc

.1)()( Gdvecc2)()( Gdvecc

)()( Gdvecc 1)()( Gdvecc

LATIN’02 April 4 Cancun, Mexico

6

Motivation for this paper

• Those results motivate a number of interesting questions:

• Is it an inherent property of LexBFS to end in a vertex of high eccentricity for the various restricted graph families mentioned above? What happens if we use other variants of BFS?

• Why do AT-free and chordal graphs, two families with very disparate structure, exhibit such similar behavior with respect to the efficacy of LexBFS to find vertices of high eccentricity?

• Although LexBFS ``fails'' to find vertices of high eccentricity for graphs in general, all known examples that exhibit such failure have large induced cycles. If we bound the size of the largest induced cycle, can we get a bound on the eccentricity of the vertex that appears last in an LexBFS?

• If the previous question is answered in the affirmative, is the full power of LexBFS needed? What happens if we just use BFS?

• This paper addresses these questions.

LATIN’02 April 4 Cancun, Mexico

7

Variants of BFS used

u

)6,7(

8

7 6

)6,7( )6()7(

)(

Can be implemented to run in linear time

)(

LATIN’02 April 4 Cancun, Mexico

8

Our Results on Restricted Families of Graphs

No induced cycles of length >3

No asteroidal triples

No asteroidal triples and

The intersection graph of intervals of a line

No induced cycles of length >4

asteroidal triple a,b,c

bc

a

LATIN’02 April 4 Cancun, Mexico

9

k-Chordal Graphs• To capture the notion of “small” induced cycles, we define a graph to be k-chordal if it has no induced cycles of length greater than k.

• Chordal graphs are exactly 3-chordal

• Hole-free graphs are exactly 4-chordal

• AT-free graphs are 5-chordal

• We have

Fig. 14 shows a 4k-chordal graph with ecc(v)=2k+1 and diam(G)=4k.

• We conjecture that • It is true for k=3 (chordal graphs), k=4 (hole-free graphs) and k=5 • For k=5 we have

2/)()( kGdiamvecc

LATIN’02 April 4 Cancun, Mexico

10

The Method: Chordal Graphs and BFS

LATIN’02 April 4 Cancun, Mexico

11

The Method (cont.)

If 1)()( Gdiamvecc

LATIN’02 April 4 Cancun, Mexico

12

The Method (cont.)If 1)()( Gdiamvecc