Optimal Orientation On-line Lech Duraj Grzegorz Gutowski - - PowerPoint PPT Presentation

optimal orientation on line
SMART_READER_LITE
LIVE PREVIEW

Optimal Orientation On-line Lech Duraj Grzegorz Gutowski - - PowerPoint PPT Presentation

Introduction Lower bound Upper bound Summary Optimal Orientation On-line Lech Duraj Grzegorz Gutowski Theoretical Computer Science Department Jagiellonian University SOFSEM 2008 Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line


slide-1
SLIDE 1

Introduction Lower bound Upper bound Summary

Optimal Orientation On-line

Lech Duraj Grzegorz Gutowski

Theoretical Computer Science Department Jagiellonian University

SOFSEM 2008

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-2
SLIDE 2

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

Building a one-way network

Imagine a network consisting of nodes and some links between

  • them. These links mark pairs which can be connected.

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-3
SLIDE 3

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

Building a one-way network

Imagine a network consisting of nodes and some links between

  • them. These links mark pairs which can be connected.

However, only one-way connections are available. We must build the best possible network, i.e. the one which allows the easiest communication.

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-4
SLIDE 4

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

Quality of solution

Some networks are clearly better then the others. How to measure the quality of a network?

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-5
SLIDE 5

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

Quality measures

Reachable pairs problem: maximize the number of pairs (u, v) s.t. v is reachable from u.

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-6
SLIDE 6

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

Quality measures

Reachable pairs problem: maximize the number of pairs (u, v) s.t. v is reachable from u. Average connectivity problem: maximize the sum of λ(u, v) (number of disjoint paths from u to v) over all pairs of vertices.

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-7
SLIDE 7

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

Off-line results

For trees, reachable pairs and average connectivity are the same problem.

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-8
SLIDE 8

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

Off-line results

For trees, reachable pairs and average connectivity are the same problem. There is a polynomial algorithm solving this case [Henning, Oellermann ’04]

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-9
SLIDE 9

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

Off-line results

For trees, reachable pairs and average connectivity are the same problem. There is a polynomial algorithm solving this case [Henning, Oellermann ’04] The optimal solution gives Θ

  • n2

connected pairs.

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-10
SLIDE 10

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

Off-line results

For trees, reachable pairs and average connectivity are the same problem. There is a polynomial algorithm solving this case [Henning, Oellermann ’04] The optimal solution gives Θ

  • n2

connected pairs. For general graphs, reachable pairs problem can be solved using a similar algorithm, whereas average connectivity problem is NP-complete.

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-11
SLIDE 11

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

On-line game

Now, imagine a game between two players: Spoiler and

  • Algorithm. The board is a growing graph G.

Spoiler Algorithm

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-12
SLIDE 12

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

On-line game

Now, imagine a game between two players: Spoiler and

  • Algorithm. The board is a growing graph G.

Spoiler adds a vertex with edges Algorithm

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-13
SLIDE 13

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

On-line game

Now, imagine a game between two players: Spoiler and

  • Algorithm. The board is a growing graph G.

Spoiler adds a vertex with edges Algorithm directs new edges

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-14
SLIDE 14

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

On-line game

Now, imagine a game between two players: Spoiler and

  • Algorithm. The board is a growing graph G.

Spoiler adds a vertex with edges Algorithm directs new edges decisions are permanent

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-15
SLIDE 15

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

On-line game

Now, imagine a game between two players: Spoiler and

  • Algorithm. The board is a growing graph G.

Spoiler adds a vertex with edges Constraint: graph is connected Algorithm directs new edges decisions are permanent

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-16
SLIDE 16

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

On-line game

Now, imagine a game between two players: Spoiler and

  • Algorithm. The board is a growing graph G.

Spoiler adds a vertex with edges Constraint: graph is connected Goal: minimize the number of connected pairs Algorithm directs new edges decisions are permanent Goal: maximize the number

  • f connected pairs

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-17
SLIDE 17

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

Sample game

Spoiler starts with a single edge Optimal score 1 Algorithm score 0+?

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-18
SLIDE 18

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

Sample game

Algorithm directs the edge Optimal score 1 Algorithm score 1

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-19
SLIDE 19

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

Sample game

Spoiler adds another edge Optimal score 3 Algorithm score 1+?

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-20
SLIDE 20

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

Sample game

Algorithm directs the edge Optimal score 3 Algorithm score 3

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-21
SLIDE 21

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

Sample game

Spoiler adds another edge Optimal score 5 Algorithm score 3+?

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-22
SLIDE 22

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

Sample game

Algorithm directs the edge Optimal score 5 Algorithm score 5

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-23
SLIDE 23

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

Sample game

Spoiler adds two edges Optimal score 16 Algorithm score 5+?

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-24
SLIDE 24

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

Sample game

Algorithm can’t achieve

  • ptimum

Optimal score 16 Algorithm score 9

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-25
SLIDE 25

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

Sample game

Spoiler Ha! Looser! Optimal score 16 Algorithm score 9

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-26
SLIDE 26

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

On-line results

Questions: What is the optimal strategy for both players?

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-27
SLIDE 27

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

On-line results

Questions: What is the optimal strategy for both players? In a graph of n vertices, what will be the outcome of such game, assuming both players play optimally?

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-28
SLIDE 28

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

On-line results

Questions: What is the optimal strategy for both players? In a graph of n vertices, what will be the outcome of such game, assuming both players play optimally? Answers: A certain Algorithm player can guarantee himself at least Ω

  • n

log n log log n

  • reachable pairs.

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-29
SLIDE 29

Introduction Lower bound Upper bound Summary Graph Orientation Off-line case On-line case

On-line results

Questions: What is the optimal strategy for both players? In a graph of n vertices, what will be the outcome of such game, assuming both players play optimally? Answers: A certain Algorithm player can guarantee himself at least Ω

  • n

log n log log n

  • reachable pairs.

Spoiler has a strategy of giving vertices and edges such that this number will always be bounded by O

  • n

log n log log n

  • .

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-30
SLIDE 30

Introduction Lower bound Upper bound Summary Algorithm Analysis

Greedy Algorithm

Suppose that the graph is a tree. In each round we are given vertex s with one edge (s, t).

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-31
SLIDE 31

Introduction Lower bound Upper bound Summary Algorithm Analysis

Greedy Algorithm

Suppose that the graph is a tree. In each round we are given vertex s with one edge (s, t). tout := the number of vertices reachable from t tin := the number of vertices from which t is reachable Choose direction s → t if tout is larger, t → s otherwise

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-32
SLIDE 32

Introduction Lower bound Upper bound Summary Algorithm Analysis

Sketch of proof

Let order(s) = max(tout, tin) + 1 The smaller of tout, tin goes up every time a new vertex is connected to t A vertex can have at most k children of order k. There are at most (k + 2)! vertices of order k.

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-33
SLIDE 33

Introduction Lower bound Upper bound Summary Algorithm Analysis

Sketch of proof

Let order(s) = max(tout, tin) + 1 The smaller of tout, tin goes up every time a new vertex is connected to t A vertex can have at most k children of order k. There are at most (k + 2)! vertices of order k. Corollary: The total number of connected pairs is Ω

  • n

log n log log n

  • .

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-34
SLIDE 34

Introduction Lower bound Upper bound Summary Algorithm Analysis

Sketch of proof

Let order(s) = max(tout, tin) + 1 The smaller of tout, tin goes up every time a new vertex is connected to t A vertex can have at most k children of order k. There are at most (k + 2)! vertices of order k. Corollary: The total number of connected pairs is Ω

  • n

log n log log n

  • .

The same proof works for general graphs.

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-35
SLIDE 35

Introduction Lower bound Upper bound Summary Strategy Analysis

Factorial tree Strategy

start with single node of rank 1

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-36
SLIDE 36

Introduction Lower bound Upper bound Summary Strategy Analysis

Factorial tree Strategy

start with single node of rank 1 choose a leaf of lowest rank r attach r children of rank r + 1

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-37
SLIDE 37

Introduction Lower bound Upper bound Summary Strategy Analysis

Factorial tree Strategy vs. Greedy Algorithm

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-38
SLIDE 38

Introduction Lower bound Upper bound Summary Strategy Analysis

Factorial tree Strategy vs. Greedy Algorithm

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-39
SLIDE 39

Introduction Lower bound Upper bound Summary Strategy Analysis

Factorial tree Strategy vs. Greedy Algorithm

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-40
SLIDE 40

Introduction Lower bound Upper bound Summary Strategy Analysis

Factorial tree Strategy vs. Greedy Algorithm

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-41
SLIDE 41

Introduction Lower bound Upper bound Summary Strategy Analysis

Factorial tree Strategy vs. Greedy Algorithm

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-42
SLIDE 42

Introduction Lower bound Upper bound Summary Strategy Analysis

Factorial tree Strategy vs. Greedy Algorithm

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-43
SLIDE 43

Introduction Lower bound Upper bound Summary Strategy Analysis

Factorial tree Strategy vs. Greedy Algorithm

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-44
SLIDE 44

Introduction Lower bound Upper bound Summary Strategy Analysis

Non-greedy opponent

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-45
SLIDE 45

Introduction Lower bound Upper bound Summary Strategy Analysis

Non-greedy opponent

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-46
SLIDE 46

Introduction Lower bound Upper bound Summary Strategy Analysis

Non-greedy opponent

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-47
SLIDE 47

Introduction Lower bound Upper bound Summary Strategy Analysis

Sketch of proof

The number of connected pairs is bounded by the sum of ranks If there is a vertex of rank r there are at least (r − 2)! vertices

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-48
SLIDE 48

Introduction Lower bound Upper bound Summary Strategy Analysis

Sketch of proof

The number of connected pairs is bounded by the sum of ranks If there is a vertex of rank r there are at least (r − 2)! vertices Corollary: The total number of connected pairs is O

  • n

log n log log n

  • .

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line

slide-49
SLIDE 49

Introduction Lower bound Upper bound Summary

Summary

Optimal players achieve Θ

  • n

log n log log n

  • connected pairs

This is poor, compared to Ω

  • n2

in the off-line case In the game defined, Spoiler always should construct a tree

Lech Duraj, Grzegorz Gutowski Optimal Orientation On-line