24
233-234 233-234 Sedgewick & Wayne (2004); Sedgewick & Wayne (2004); Chazelle (2005) Chazelle (2005)

233-234

Embed Size (px)

DESCRIPTION

233-234. Sedgewick & Wayne (2004); Chazelle (2005). How to check if adding an edge creates a cycle?. Label i all nodes of i-th tree. 2. 1. 1. 2. 1. 2. 2. How to check if adding an edge creates a cycle?. Label i all nodes of i-th tree. 2. 1. 1. 2. 1. 2. 2. - PowerPoint PPT Presentation

Citation preview

233-234233-234233-234233-234

Sedgewick & Wayne (2004); Chazelle (2005)Sedgewick & Wayne (2004); Chazelle (2005) Sedgewick & Wayne (2004); Chazelle (2005)Sedgewick & Wayne (2004); Chazelle (2005)

How to check if adding an edge creates a cycle?

Label i all nodes of i-th tree

1

1

12

2

2

2

How to check if adding an edge creates a cycle?

Label i all nodes of i-th tree

1

1

12

2

2

2

How to check if adding an edge creates a cycle?

Label i all nodes of i-th tree

1

1

12

2

2

2

Relabel smaller tree

How to check if adding an edge creates a cycle?

Label i all nodes of i-th tree

2

2

22

2

2

2

Relabel smaller tree

How to check if adding an edge creates a cycle?

Label i all nodes of i-th tree

2

2

22

2

2

2

Each node relabeled at most log V times

3

7

9

8

edge of the MSTcorrectness

A nodes

B nodes

3

A

B

3

8

A

AB

A

B

A

How much time ?

1. Sorting:

2. Cycle detection:

How much time ?

1. Sorting:

2. Cycle detection:

Time proportional to

Advanced MST Algorithms

Yao/Cheriton-Tarjan

(1976)

Fredman-Tarjan (1984)

Gabow-Galil-Spencer-Tarjan (1986)

Chazelle (2000)

number of particles in the universeIf E = 2

Ackermann’s function

Two times xTwo to the x-th

Tower of xTower of height equal to tower of x