Updating Directed Minimum Cost Spanning Trees Orestis A. Telelis - - PowerPoint PPT Presentation

updating directed minimum cost spanning trees
SMART_READER_LITE
LIVE PREVIEW

Updating Directed Minimum Cost Spanning Trees Orestis A. Telelis - - PowerPoint PPT Presentation

Introduction Complexity of Updates A dynamic algorithm Experiments Updating Directed Minimum Cost Spanning Trees Orestis A. Telelis joint work with Gerasimos G. Pollatos Vassilis Zissimopoulos Department of Informatics and


slide-1
SLIDE 1

Introduction Complexity of Updates A dynamic algorithm Experiments

Updating Directed Minimum Cost Spanning Trees

Orestis A. Telelis

joint work with Gerasimos G. Pollatos Vassilis Zissimopoulos

Department of Informatics and Telecommunications University of Athens, Hellas (Greece)

Workshop on Experimental Algorithms, 2006

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-2
SLIDE 2

Introduction Complexity of Updates A dynamic algorithm Experiments

Outline

1 Introduction 2 Complexity of Updates 3 A dynamic algorithm

The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

4 Experiments

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-3
SLIDE 3

Introduction Complexity of Updates A dynamic algorithm Experiments

Introduction

A DMST is a min-cost subset of (directed) edges T ⊆ E such that:

1 T is acyclic 2 (u, v), (x, y) ∈ T ⇒ v = y 3 T is maximal with respect to 1 and 2.

Branchings vs. Trees G strongly connected ⇒ a DMST T is a tree of n − 1 edges. Otherwise T may be forest of directed trees called branching. We can always augment G with infinite cost edges to make it strongly connected.

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-4
SLIDE 4

Introduction Complexity of Updates A dynamic algorithm Experiments

Algorithms

For a digraph G(V , E), |V | = n, |E| = m:

1 Same algorithm (Edmonds’ algorithm) independently by:

Edmonds 1967, Chu& Liu 1965, Bock 1971: O(mn)

2 Best known implementation for general digraphs:

Gabow, Galil, Spencer, Tarjan 1986: O(m + n log n)

3 Best known implementation for sparse digraphs (O(n) edges):

Mendelson, Tarjan, Thorup, Zwick, 2004: O(m log log n)

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-5
SLIDE 5

Introduction Complexity of Updates A dynamic algorithm Experiments

Dynamic Updates

Efficiently updating the DMST T ⊆ E of a digraph G(V , E) when:

1 An edge is deleted from the graph. 2 An edge is inserted to the graph.

... in less time than re-evaluating it from scratch. The dynamic complexity of DMST is not known. For MST see Holm, de Lichtenberg, Thorup, JACM 2001

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-6
SLIDE 6

Introduction Complexity of Updates A dynamic algorithm Experiments

Is it Possible?

DMST on a Directed Acyclic Graph: For each v ∈ V choose the min-cost incoming edge. Cycles will not occur. Verification Time on a DAG cost(T) minimum iff ∀(u, v) ∈ T min-cost edge entering v. This amounts testing O(m) inequalities. Ω(m) time is required (Rabin 1972).

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-7
SLIDE 7

Introduction Complexity of Updates A dynamic algorithm Experiments

A weak lower bound

v0 v1 v2 v3 v4 1 1 1 1 1 + ǫ 1 + ǫ 1 + ǫ 1 + ǫ Sensitivity to edge operations Removal of (v3, v4) from the digraph and the DMST... Theorem

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-8
SLIDE 8

Introduction Complexity of Updates A dynamic algorithm Experiments

A weak lower bound

v0 v1 v2 v3 v4 1 1 1 1 1 + ǫ 1 + ǫ 1 + ǫ 1 + ǫ Sensitivity to edge operations ... causes the DMST to change entirely! At least verification time is required to update: Ω(n2) for dense digraphs. Theorem A dynamic algorithm retaining and using only the DMST itself requires Ω(m) time, which is Ω(n2) for dense digraphs.

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-9
SLIDE 9

Introduction Complexity of Updates A dynamic algorithm Experiments

Note: O(log n) Update Time on DAGs

For each vertex v store its incoming edges in a FHeap H(v). Deletion of (u, v) ∈ E from G(V , E):

1

(u, v) ∈ T: extract least-cost e from H(v) to replace (u, v).

2

(u, v) ∈ T: decrease-cost to −∞ of (u, v) in H(v) and extract (u, v) from H(v).

Insertion of (u, v) to E:

1

∃(x, v) ∈ T with cost(x, v) ≤ cost(u, v): insert (u, v) in H(v).

2

∃(x, v) ∈ T with cost(x, v) > cost(u, v): replace (x, v) with (u, v) and insert (x, v) in H(v).

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-10
SLIDE 10

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

An algorithm for dynamic updates

A dynamization of Edmonds’ algorithm: Encode output into an Augmented Tree (ATree) structure. Modify the data structure per edge operation. Identify maximal portion of unaffected output to maintain. Execute a modified implementation to augment the maintained output.

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-11
SLIDE 11

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Edmonds’ Algorithm

1 Set v = v0. 2 Repeat until a single vertex remains: 1

Select the min-cost edge entering v, say (u, v).

2

For each edge (x, v) set cost(x, v) ← cost(x, v) − cost(u, v).

3

Contract dicycle (if any) due to (u, v), to vertex u.

4

Set v = u.

3 Remove redundant selected edges. Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-12
SLIDE 12

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Edmonds’ Algorithm

1 Set v = v0. 2 Repeat until a single vertex remains: [O(m + n log n) Time] 1

Select the min-cost edge entering v, say (u, v).

2

For each edge (x, v) set cost(x, v) ← cost(x, v) − cost(u, v).

3

Contract dicycle (if any) due to (u, v), to vertex u.

4

Set v = u.

3 Remove redundant selected edges. [O(n) Time]

We dynamize the loop

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-13
SLIDE 13

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Example on Edmonds’ Algorithm

Next Step Take the least cost edge entering vertex a. That is edge (b, a). a b c d 10 1 1 2 1 1 2

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-14
SLIDE 14

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Example on Edmonds’ Algorithm

Next Step Take the least cost edge entering vertex b. That is edge (a, b). Reduce the cost of (c, b) to 2 − cost(a, b) = 2 − 1 = 1. a b c d 10 1 1 2 1 2 1

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-15
SLIDE 15

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Example on Edmonds’ Algorithm

Next Step Contract cycle a → b → a into a vertex A. a b c d 10 1 1 2 1 1 2 − 1 = 1

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-16
SLIDE 16

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Example on Edmonds’ Algorithm

Next Step Take the least cost edge entering vertex A. That is edge (c, A) (which was edge (c, b)). A c d 10 2 1 1 1

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-17
SLIDE 17

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Example on Edmonds’ Algorithm

Next Step Take the least cost edge entering c. That is edge (d, c). A c d 10 2 1 1 1

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-18
SLIDE 18

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Example on Edmonds’ Algorithm

Next Step Take the least cost edge entering d. That is edge (c, d). Reduce the cost of (a, d) to 2 − cost(c, d) = 2 − 1 = 1. Reduce the cost of (b, d) to 10 − cost(c, d) = 10 − 1 = 9. A c d 10 2 1 1 1

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-19
SLIDE 19

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Example on Edmonds’ Algorithm

Next Step Contract cycle c → d → c into a vertex B. A c d 1 1 1 1 9

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-20
SLIDE 20

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Example on Edmonds’ Algorithm

Next Step Take the least cost edge entering B. That is edge (A, B) (which was edge (a, d)). A B 9 1 1

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-21
SLIDE 21

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Example on Edmonds’ Algorithm

Next Step Contract cycle A → B → A into a vertex C. A B 9 1 1

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-22
SLIDE 22

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Example on Edmonds’ Algorithm

Next Step End of loop. Removal of redundant edges produces the DMST. C

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-23
SLIDE 23

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Example on Edmonds’ Algorithm

Next Step a b c d 10 1 1 2 1 1 2

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-24
SLIDE 24

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Encode the output of the loop into a hierarchical structure (ATree):

1 Leaf Nodes: one for each vertex of the digraph. 2 Internal Nodes: Represent vertices emerging from

contractions.

3 Each node is labelled with the edge selected for the

represented vertex.

4 Each internal node has an associated list of edges absorbed

due to contraction.

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-25
SLIDE 25

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Bottom-Up Construction of an ATree (Example)

a b c d Next Step Label Na with (b, a). Na Nb Nc Nd

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-26
SLIDE 26

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Bottom-Up Construction of an ATree (Example)

a b c d Next Step Label Nb with (a, b). Na Nb Nc Nd Na

(b, a)

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-27
SLIDE 27

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Bottom-Up Construction of an ATree (Example)

a b c d Next Step Create NA, parent of Na, Nb. Na Nb Nc Nd Na

(b, a)

Nb

(a, b)

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-28
SLIDE 28

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Bottom-Up Construction of an ATree (Example)

A c d Next Step Label NA with (c, b). Na Nb Nc Nd Na

(b, a)

Nb

(a, b)

NA (a, b) (b, a)

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-29
SLIDE 29

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Bottom-Up Construction of an ATree (Example)

A c d Next Step Label c with (d, c). Na Nb Nc Nd Na

(b, a)

Nb

(a, b)

NA (a, b) (b, a) NA

(c, b)

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-30
SLIDE 30

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Bottom-Up Construction of an ATree (Example)

A c d Next Step Label d with (c, d). Na Nb Nc Nd Na

(b, a)

Nb

(a, b)

NA (a, b) (b, a) NA

(c, b)

Nc

(d, c)

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-31
SLIDE 31

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Bottom-Up Construction of an ATree (Example)

A c d Next Step Create NB, parent of Nc, Nd. Na Nb Nc Nd Na

(b, a)

Nb

(a, b)

NA (a, b) (b, a) NA

(c, b)

Nc

(d, c)

Nd

(c, d)

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-32
SLIDE 32

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Bottom-Up Construction of an ATree (Example)

A B Next Step Label NB with (a, d). Na Nb Nc Nd Na

(b, a)

Nb

(a, b)

NA (a, b) (b, a) NA

(c, b)

Nc

(d, c)

Nd

(c, d)

NB (c, d) (d, c)

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-33
SLIDE 33

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Bottom-Up Construction of an ATree (Example)

A B Next Step Create NC, parent of NA, NB. Na Nb Nc Nd Na

(b, a)

Nb

(a, b)

NA (a, b) (b, a) NA

(c, b)

Nc

(d, c)

Nd

(c, d)

NB (c, d) (d, c) NB

(a, d)

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-34
SLIDE 34

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Bottom-Up Construction of an ATree (Example)

C Next Step The labelset L of the ATree is the set of edges label its nodes. Na Nb Nc Nd Na

(b, a)

Nb

(a, b)

NA (a, b) (b, a) NA

(c, b)

Nc

(d, c)

Nd

(c, d)

NB (c, d) (d, c) NB

(a, d)

NC (a, d) (c, b) (b, d)

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-35
SLIDE 35

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Deleting an edge

Let e be the deleted edge. Two cases must be considered: e ∈ L: Update the ATree and Stop. e ∈ L:

1

Maintain a maximal portion of the ATree, unaffected by the deletion.

2

This represents a maximally contracted digraph G ′.

3

Initialize and execute Edmonds’ algorithm on G ′.

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-36
SLIDE 36

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Edge Deletion Example

NA (a, b) (b, a) NA

(c, b)

NC (a, d) (c, b) (b, d) Nb

(a, b)

Na Nb Nc Nd Na

(b, a)

Nb Nc

(d, c)

Nd

(c, d)

NB (c, d) (d, c) NB

(a, d)

Case 1: Deleting (b, d) not in the labelset L

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-37
SLIDE 37

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Edge Deletion Example

NA (a, b) (b, a) NA

(c, b)

NC (a, d) (c, b) (b, d) Nb

(a, b)

Na Nb Nc Nd Na

(b, a)

Nb Nc

(d, c)

Nd

(c, d)

NB (c, d) (d, c) NB

(a, d)

(b, d) Case 1: Deleting (b, d) not in the labelset L Remove (b, d) from the list containing it.

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-38
SLIDE 38

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Edge Deletion Example

NA (a, b) (b, a) NA

(c, b)

NC (a, d) (c, b) (b, d) Nb

(a, b)

Na Nb Nc Nd Na

(b, a)

Nb Nc

(d, c)

Nd

(c, d)

NB (c, d) (d, c) NB

(a, d)

Case 2: Deleting (a, b) from the labelset L

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-39
SLIDE 39

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Edge Deletion Example

NA (a, b) (b, a) NA

(c, b)

NC (a, d) (c, b) (b, d) Nb

(a, b)

Na Nb Nc Nd Na

(b, a)

Nb Nc

(d, c)

Nd

(c, d)

NB (c, d) (d, c) NB

(a, d)

NA NC Case 2: Deleting (a, b) from the labelset L Remove the path from Nb to the root, NC, and unite the orphaned associated lists.

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-40
SLIDE 40

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Edge Deletion Example

Na Nb Nc Nd Na

(b, a)

Nb Nc

(d, c)

Nd

(c, d)

NB (c, d) (d, c) NB

(a, d)

(a, b) (b, a) (b, d) (c, b) (a, d) Case 2: Deleting (a, b) from the labelset L Roots {Na, Nb, NB} are vertex set of maintained contracted digraph. List union of removed nodes (but (a, b)) is the edge set.

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-41
SLIDE 41

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Edge Deletion Example

a b B 1 9 1 2 A maximally contracted digraph unaffected by deletion Cost assignment on edges can be done in O(n) time. Execute Edmonds’ algorithm on this digraph.

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-42
SLIDE 42

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Inserting an Edge

Two cases must be considered: cost(T) is not affected: update the ATree and stop. The newly inserted edge reduces cost(T).

1

e substitues some e′ ∈ L.

2

Engage virtual deletion of e′.

3

Initialize and execute Edmonds’ algorithm on G ′(V ′, E ′ ∪ {e}).

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-43
SLIDE 43

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Edge Insertion Example

Na Nb Nc Nd Na

(b, a)

Nb

(a, b)

NA (a, b) (b, a) NA

(c, b)

Nc

(d, c)

Nd

(c, d)

NB (c, d) (d, c) NB

(a, d)

NC (a, d) (c, b) (b, d) Insertion of edge (a, c) at cost 10.

1 Find Least Common Ancestor (LCA) of Na and Nc. Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-44
SLIDE 44

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Edge Insertion Example

Na Nb Nc Nd Na

(b, a)

Nb

(a, b)

NA (a, b) (b, a) NA

(c, b)

Nc

(d, c)

Nd

(c, d)

NB (c, d) (d, c) NB

(a, d)

NC (a, d) (c, b) (b, d) Insertion of edge (a, c) at cost 10.

1 2 Take the subtree rooted at the found LCA (NC). Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-45
SLIDE 45

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Edge Insertion Example

Na Nb Nc Nd Na

(b, a)

Nb

(a, b)

NA (a, b) (b, a) NA

(c, b)

Nc

(d, c)

Nd

(c, d)

NB (c, d) (d, c) NB

(a, d)

NC (a, d) (c, b) (b, d) Nc

(d, c)

NB NC Insertion of edge (a, c) at cost 10.

1 2 3 Follow the path Nc · · · NC, comparing cost(a, c) with the cost

  • f the labelling edges of the nodes in the order visited.

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-46
SLIDE 46

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Edge Insertion Example

Na Nb Nc Nd Na

(b, a)

Nb

(a, b)

NA (a, b) (b, a) NA

(c, b)

Nc

(d, c)

Nd

(c, d)

NB (c, d) (d, c) NB

(a, d)

NC (a, d) (c, b) (b, d) Nc

(d, c)

NB NC Case 1: (a, c) costs less than (d, c) or than (a, d).

1 Engage a virtual deletion of (d, c) or (a, d) respectively. Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-47
SLIDE 47

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Edge Insertion Example

Na Nb Nc Nd Na

(b, a)

Nb

(a, b)

NA (a, b) (b, a) NA

(c, b)

Nc

(d, c)

Nd

(c, d)

NB (c, d) (d, c) NB

(a, d)

NC (a, d) (c, b) (b, d) Nc

(d, c)

NB NC (a, c) Case 2: (a, c) cannot replace an edge from labelset

1 2 Insert (a, c) into the list of the LCA Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-48
SLIDE 48

Introduction Complexity of Updates A dynamic algorithm Experiments The ATree structure Edge Deletion Edge Insertion Implementation and Complexity

Technical Details

All operations on ATree structure take O(n) time. Implementation relies on ideas of Gabow et al., 1986. For sparse digraphs use heaps of Mendelson et al. 2004. Output Complexity (in terms of minimal output subset needing update):

ρ denotes vertex set of maximally contracted digraph. Can be shown to be O(n + ||ρ|| + |ρ| log |ρ|). ||ρ|| denotes edge set entering vertices of ρ|. Worst case equal to complexity of re-evaluation.

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-49
SLIDE 49

Introduction Complexity of Updates A dynamic algorithm Experiments

Experimental Evaluation

Random Digraphs of orders 500 − 5000, step 500.

1

Dense Digraphs: d ∈ {0.2, 0.4, 0.6, 0.8, 1.0}.

2

Sparse Digraphs: d =

c n−1, c ∈ {10, 20, 30, 40, 50}.

Sparse digraphs with embedded clique of increasing order. Evaluating updates in comparison to static DMST re-evaluation. Average time over 104 deletions/insertions decided with 0.5.

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-50
SLIDE 50

Introduction Complexity of Updates A dynamic algorithm Experiments

Performance on Complete Digraphs

50 100 150 200 250 300 350 5 10 15 20 25 30 35 40 45 50 CPU Time (sec) |V|/100 Complete static dynamic

Over 60% relative gain in execution time in dense digraphs.

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-51
SLIDE 51

Introduction Complexity of Updates A dynamic algorithm Experiments

Performance on Sparse Digraphs

1 2 3 4 5 6 7 8 9 10 5 10 15 20 25 30 35 40 45 50 CPU Time (sec) |V|/100 Sparse (c=10) static dynamic

Increasing gain with digraph order in sparse digraphs: 60% to 80%

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-52
SLIDE 52

Introduction Complexity of Updates A dynamic algorithm Experiments

Embedded Cliques

50 100 150 200 250 300 350 400 5 10 15 20 25 30 35 40 45 50 CPU Time (sec) (clique size)/100 static dynamic 20 40 60 80 100 5 10 15 20 25 30 35 40 45 50 (clique size)/100 % CPU Time Gain

As the clique grows the performance falls from a 95% to a 60%.

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-53
SLIDE 53

Introduction Complexity of Updates A dynamic algorithm Experiments

Conclusions

A (weak) lower bound on the complexity of DMST updates. A dynamic algorithm studied in terms of output complexity and experimentally. Achieving a factor > 2 speedup on dense digraphs. Achieving huge speedup on sparse digraphs:

For DAGs our scheme reduces to the O(log n) update time What about average case complexity for sparse digraphs?

The complexity of updates is still open.

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees

slide-54
SLIDE 54

Introduction Complexity of Updates A dynamic algorithm Experiments

Platform of Experimentation

Standard C++ implementation, gcc 3.2 P4 2.6 GHz, 512 MB Main memory Linux Kernel 2.6

Pollatos, Telelis, Zissimopoulos Updating Directed Minimum Cost Spanning Trees