Deterministic distributed algorithms: using covering graphs for good - - PowerPoint PPT Presentation

deterministic distributed algorithms using covering
SMART_READER_LITE
LIVE PREVIEW

Deterministic distributed algorithms: using covering graphs for good - - PowerPoint PPT Presentation

Deterministic distributed algorithms: using covering graphs for good and evil Jukka Suomela Helsinki Institute for Information Technology HIIT University of Helsinki, Finland 1 2 2 1 2 3 Braunschweig, 1 1 1 1 26 October 2010 2 3 1


slide-1
SLIDE 1

Deterministic distributed algorithms: using covering graphs for good and evil

Jukka Suomela

Helsinki Institute for Information Technology HIIT University of Helsinki, Finland Braunschweig, 26 October 2010

1 1 2 2 2 3 1 1 1 1 2 2 2 3 1 1 1 2 1 1 3 2 2 1

slide-2
SLIDE 2

Running example: Vertex cover problem

2

  • Vertex cover C:
  • “covers” all edges
  • f the graph
  • each edge has at least
  • ne endpoint in C
slide-3
SLIDE 3

Part I: Port-numbering model

  • Synchronous deterministic distributed algorithms

in the port-numbering model

3

1 1 1 1 2 2 2 3

slide-4
SLIDE 4

Distributed algorithms

4

  • Communication graph G
  • Node = computer
  • e.g., Turing machine,

finite state machine

  • Edge = communication

link

  • computers can

exchange messages

G

slide-5
SLIDE 5

Distributed algorithms

5

  • All nodes are identical,

run the same algorithm

  • We can choose

the algorithm

  • An adversary chooses

the structure of G

  • Our algorithm must

produce a correct

  • utput in any graph G

G

slide-6
SLIDE 6

Distributed algorithms

6

  • Usually, computational

problems are related to the structure of the communication graph G

  • example: find a vertex

cover for G

  • the same graph is both

the input and the system that tries to solve the problem...

G

slide-7
SLIDE 7

Port-numbering model

7

  • A node of degree d can

refer to its neighbours by integers 1, 2, ..., d

  • Port-numbering chosen

by adversary

1 1 1 1 2 2 2 3 1 1 2 2 2 3 1 1

slide-8
SLIDE 8

Synchronous distributed algorithms

8

  • 1. Each node reads its
  • wn local input
  • Depends on the problem,

for example:

  • node weight
  • weights of

incident edges

  • May be empty

4 3 1 2 1 1 2 2 2 3 1 1

slide-9
SLIDE 9

Synchronous distributed algorithms

9

  • 1. Each node reads its
  • wn local input
  • 2. Repeat synchronous

communication rounds ...

1 1 2 2 2 3 1 1

slide-10
SLIDE 10

Synchronous distributed algorithms

10

1 1

  • 1. Each node reads its
  • wn local input
  • 2. Repeat synchronous

communication rounds until all nodes have announced their local outputs

  • Solution of the problem

1 1 2 2 2 3 1 1

slide-11
SLIDE 11

Synchronous distributed algorithms

11

1 1

  • 1. Each node reads its
  • wn local input
  • 2. Repeat synchronous

communication rounds until all nodes have announced their local outputs

Example: Find a vertex cover C Local output of a node v indicates whether v ∈ C 1 1 2 2 2 3 1 1

slide-12
SLIDE 12

Synchronous distributed algorithms

12

  • Communication round:

each node

1.sends a message to each port 1 1 2 2 2 3 1 1

slide-13
SLIDE 13

Synchronous distributed algorithms

13

  • Communication round:

each node

1.sends a message to each port (message propagation...) 1 1 2 2 2 3 1 1

slide-14
SLIDE 14

Synchronous distributed algorithms

14

  • Communication round:

each node

1.sends a message to each port 2.receives a message from each port 1 1 2 2 2 3 1 1

slide-15
SLIDE 15

Synchronous distributed algorithms

15

  • Communication round:

each node

1.sends a message to each port 2.receives a message from each port 3.updates its own state 1 1 2 2 2 3 1 1

slide-16
SLIDE 16

Synchronous distributed algorithms

16

1

  • Communication round:

each node

1.sends a message to each port 2.receives a message from each port 3.updates its own state 4.possibly stops and announces its output 1 1 2 2 2 3 1 1

slide-17
SLIDE 17

Synchronous distributed algorithms

17

1 1

  • Communication rounds

are repeated until all nodes have stopped and announced their outputs

  • Running time =

number of rounds

  • Worst-case analysis

1 1 2 2 2 3 1 1

slide-18
SLIDE 18

Part II: Computability in port-numbering model

  • Impossibility of symmetry breaking
  • Covering maps and covering graphs:

tools for proving more impossibility results

18

slide-19
SLIDE 19

Symmetry can’t be broken

19

  • Input may be symmetric
  • symmetric graph
  • symmetric port

numbering

  • identical local inputs

1 2 2 2 1 1

slide-20
SLIDE 20

Symmetry can’t be broken

20

  • Same input
  • Same algorithm
  • Same initial state

X X X 1 2 2 2 1 1

slide-21
SLIDE 21

Symmetry can’t be broken

21

  • Same current state
  • Messages sent to port 1

are identical to each

  • ther
  • Messages sent to port 2

are identical to each

  • ther

1 2 2 2 1 1

slide-22
SLIDE 22

Symmetry can’t be broken

22

1 2 2 2 1 1

slide-23
SLIDE 23

Symmetry can’t be broken

23

  • Messages received from

port 1 are identical to each other

  • Messages received from

port 2 are identical to each other

1 2 2 2 1 1

slide-24
SLIDE 24

Symmetry can’t be broken

24

  • Same old state
  • Same set of

received messages

  • Same deterministic

algorithm

  • Same new state

1 2 2 2 1 1

slide-25
SLIDE 25

Symmetry can’t be broken

25

Z Z Z

  • Same new state
  • Either none of

the nodes stops —

  • r all of them

stop and produce identical outputs

  • Symmetry can’t

be broken!

  • let’s generalise this...

1 2 2 2 1 1

slide-26
SLIDE 26

Covering maps

26

1 1 2 2 2 3 1 1 1 1 2 2 2 3 1 1 1 2 1 1 3 2 2 1

H = (V’, E’) G = (V, E) Covering map f: V’ → V

  • surjection
  • preserves neighbourhoods
  • preserves port numbering

f

slide-27
SLIDE 27

Covering maps

27

1 1 2 2 2 3 1 1 1 1 2 2 2 3 1 1 1 2 1 1 3 2 2 1

H = (V’, E’) G = (V, E) Covering map f: V’ → V

  • surjection
  • preserves neighbourhoods
  • preserves port numbering
slide-28
SLIDE 28

Covering maps

28

1 1 2 2 2 3 1 1 1 1 2 2 2 3 1 1 1 2 1 1 3 2 2 1

H = (V’, E’) G = (V, E) Covering map f: V’ → V

  • surjection
  • preserves neighbourhoods
  • preserves port numbering
slide-29
SLIDE 29

Covering maps

29

1 1 2 2 2 3 1 1 1 1 2 2 2 3 1 1 1 2 1 1 3 2 2 1

H = (V’, E’) G = (V, E) Covering map f: V’ → V

  • surjection
  • preserves neighbourhoods
  • preserves port numbering
slide-30
SLIDE 30

Covering maps

30

1 1 2 2 2 3 1 1 1 1 2 2 2 3 1 1 1 2 1 1 3 2 2 1

H = (V’, E’) G = (V, E) Covering map f: V’ → V

  • surjection
  • preserves neighbourhoods
  • preserves port numbering
slide-31
SLIDE 31

Covering maps and covering graphs

31

1 1 2 2 2 3 1 1 1 1 2 2 2 3 1 1 1 2 1 1 3 2 2 1

H = (V’, E’) G = (V, E) H is a covering graph of G if there is a covering map f: V’ → V

slide-32
SLIDE 32

Covering maps and covering graphs

  • Run the same algorithm in G and H
  • v’ ∈ V’ and f(v’) ∈ V have the same input for all v’
  • Then v’ ∈ V’ and f(v’) ∈ V:
  • have identical initial states
  • send and receive the same messages
  • have identical state transitions
  • produce identical

local outputs!

32

1 1 2 2 2 3 1 1 1 1 2 2 2 3 1 1 1 2 1 1 3 2 2 1

H = (V’, E’) G = (V, E)

slide-33
SLIDE 33

Covering maps and covering graphs

33

1 1 2 2 2 3 1 1 1 1 2 2 2 3 1 1 1 2 1 1 3 2 2 1

H = (V’, E’) G = (V, E) Same output

slide-34
SLIDE 34

Covering maps and covering graphs

34

1 1 2 2 2 3 1 1 1 1 2 2 2 3 1 1 1 2 1 1 3 2 2 1

H = (V’, E’) G = (V, E) Same output

slide-35
SLIDE 35

Covering maps and covering graphs

35

1 1 2 2 2 3 1 1 1 1 2 2 2 3 1 1 1 2 1 1 3 2 2 1

H = (V’, E’) G = (V, E) Same output

slide-36
SLIDE 36

Covering maps and covering graphs

36

1 2 2 2 1 1 2 1

H = (V’, E’) G = (V, E) Same output

  • Symmetric cycles are a simple special case
  • f covering maps
slide-37
SLIDE 37

Computability in the port-numbering model

37

  • Very limited model
  • in a cycle, we can only

find a trivial solution: empty set, all nodes, ...

  • we can’t even break

symmetry in a 2-node network!

  • What can be solved?

1 1 1 2 2 2 1 1

slide-38
SLIDE 38

Part III: Algorithms in port-numbering model

  • Some problems can be solved

in the port-numbering model...

  • and covering graphs can be used as

an algorithm design technique, too!

  • Example: vertex cover approximation

38

slide-39
SLIDE 39

Symmetry breaking out of thin air: bipartite double covers

39

  • Replace each node by

two virtual nodes: black and white

  • original nodes

simulate virtual nodes

  • each computers runs

two programs in parallel: “black program” and “white program”

  • Edges: black-to-white
slide-40
SLIDE 40

Symmetry breaking out of thin air: bipartite double covers

40

  • Virtual graph H is

a covering graph of G

  • It is a double cover:

2 nodes of H map to each node of G

  • It is bipartite
  • and we have already

coloured its two parts: black and white!

H = (V’, E’) G = (V, E)

slide-41
SLIDE 41

Symmetry breaking out of thin air: bipartite double covers

41 b a c d

b a c d

b a c d

=

b a c d b a c d

2-coloured graph

slide-42
SLIDE 42

Symmetry breaking out of thin air: bipartite double covers

42 b a c d

b a c d 1 1 2 2 2 3 1 1

b a c d

=

b a c d b a c d

Port-numbering inherited

1 2 2 1 1 1 3 3 1 1 2 2 2 2 1 1

slide-43
SLIDE 43

Symmetry breaking out of thin air: bipartite double covers

43 b a c d

b a c d 1 1 2 2 2 3 1 1

b a c d

=

b a c d b a c d

Port-numbering inherited

1 2 2 1 1 1 3 3 1 1 2 2 2 2 1 1

slide-44
SLIDE 44

Symmetry breaking out of thin air: bipartite double covers

44 b a c d

b a c d 1 1 2 2 2 3 1 1

b a c d

=

b a c d b a c d

Port-numbering inherited

1 2 2 1 1 1 3 3 1 1 2 2 2 2 1 1

slide-45
SLIDE 45

Symmetry breaking out of thin air: bipartite double covers

45

b a c d b a c d 1 2 2 1 1 1 3 3 1 1 2 2 2 2 1 1

  • Port-numbered graphs

without colouring:

  • not possible to find

a maximal matching (consider an even cycle)

  • Port-numbered graphs

with 2-colouring:

  • very easy to find

a maximal matching!

slide-46
SLIDE 46

Maximal matching in 2-coloured graphs

46

b a c d b a c d 1 2 2 1 1 1 3 3 1 1 2 2 2 2 1 1

  • Each white node sends

proposals to its black neighbours

  • one by one,
  • rder by port numbers
slide-47
SLIDE 47

Maximal matching in 2-coloured graphs

47

b a c d b a c d 1 2 2 1 1 1 3 3 1 1 2 2 2 2 1 1

  • Each white node sends

proposals to its black neighbours

  • one by one,
  • rder by port numbers
  • Each black node accepts

the first proposal it gets

  • break ties using

port numbers

slide-48
SLIDE 48

Maximal matching in 2-coloured graphs

48

b a c d b a c d 1 2 2 1 1 1 3 3 1 1 2 2 2 2 1 1

  • Each white node sends

proposals to its black neighbours

  • one by one,
  • rder by port numbers
  • until its proposal

is accepted, or all neighbours have rejected

slide-49
SLIDE 49

Maximal matching in 2-coloured graphs

49

b a c d b a c d 1 2 2 1 1 1 3 3 1 1 2 2 2 2 1 1

  • Each white node sends

proposals to its black neighbours

  • one by one,
  • rder by port numbers
  • Each black node accepts

the first proposal it gets

  • break ties using

port numbers

slide-50
SLIDE 50

Maximal matching in 2-coloured graphs

50

b a c d b a c d 1 2 2 1 1 1 3 3 1 1 2 2 2 2 1 1

  • Accepted proposals M:

matching

  • white nodes don’t propose

after acceptance

  • black nodes don’t accept

more than once

  • all nodes incident to

at most one edge

M ⊆ E’

slide-51
SLIDE 51

Maximal matching in 2-coloured graphs

51

b a c d b a c d 1 2 2 1 1 1 3 3 1 1 2 2 2 2 1 1

  • Accepted proposals M:

maximal matching!

  • assume {u, v} ∈ E \ M

u unmatched

  • then u has sent a proposal

to v and v has rejected it

  • therefore v had already

received another proposal, v is matched

  • can’t add {u, v} to M

M ⊆ E’

slide-52
SLIDE 52

Maximal matching in bipartite double cover

52 b a c d

b a c d 1 1 2 2 2 3 1 1

b a c d

=

b a c d b a c d

Map back to original graph

1 2 2 1 1 1 3 3 1 1 2 2 2 2 1 1 At least 1 of 2 virtual edges in M

M ⊆ E’ D ⊆ E

slide-53
SLIDE 53

Maximal matching in bipartite double cover

53 b a c d

b a c d

b a c d

=

b a c d b a c d

Different possibilities...

At least 1 of 2 virtual edges in M

M ⊆ E’ D ⊆ E

slide-54
SLIDE 54

Maximal matching in bipartite double cover

54 b a c d

b a c d

b a c d

=

b a c d b a c d

Different possibilities... M ⊆ E’ D ⊆ E

slide-55
SLIDE 55

Maximal matching in bipartite double cover

55 b a c d

b a c d

b a c d

M ⊆ E’ D ⊆ E

  • However, this is not

possible, because M is a matching

  • M induces a subgraph of

H with max. degree 1

  • therefore:

D induces a subgraph of G with max. degree 2

slide-56
SLIDE 56

Maximal matching in bipartite double cover

56 b a c d

b a c d

b a c d

M ⊆ E’ D ⊆ E

  • And this is not possible,

because M is maximal

  • each edge of H is

in M or shares at least

  • ne endpoint with M
  • endpoints of M form

a vertex cover in H

  • endpoints of D form

a vertex cover in G!

slide-57
SLIDE 57

Finding a vertex cover

57

  • So we will find a set D
  • f edges such that:
  • D induces a subgraph of

maximum degree 2

  • D must consist of

paths and cycles

  • endpoints of D form

a vertex cover C

  • is it a small vertex cover?
slide-58
SLIDE 58

Finding a vertex cover

58

  • So we will find a set D
  • f edges such that:
  • D induces a subgraph of

maximum degree 2

  • D must consist of

paths and cycles

  • endpoints of D form

a vertex cover C

  • is it a small vertex cover?

An optimal vertex cover C* needs to cover these edges, too! Thus C* must contain 2 of these 5 nodes

slide-59
SLIDE 59

Finding a vertex cover

59

  • Different cases:
  • Cycle with 3 edges:

3 nodes in C, ≥ 2 in C*

  • Cycle with 4 edges:

4 nodes in C, ≥ 2 in C*

  • Cycle with 5 edges:

5 nodes in C, ≥ 3 in C* ...

|C| ≤ 2|C*|

slide-60
SLIDE 60

Finding a vertex cover

60

  • Different cases:
  • Path with 1 edge:

2 nodes in C, ≥ 1 in C*

  • Path with 2 edges:

3 nodes in C, ≥ 1 in C*

  • Path with 3 edges:

4 nodes in C, ≥ 2 in C*

  • Path with 4 edges:

5 nodes in C, ≥ 2 in C* ...

|C| ≤ 3|C*|

slide-61
SLIDE 61

Finding a vertex cover

61

  • In each path or cycle:
  • C has at most 3 times

as many nodes as C*

  • Summing over all

paths and cycles:

  • |C| ≤ 3|C*|
  • The algorithm finds

a 3-approximation of minimum vertex cover!

slide-62
SLIDE 62

Finding a vertex cover: summary

  • Vertex cover is a graph problem

that can be solved reasonably well in the port-numbering model with a deterministic distributed algorithm

  • And the algorithm was simple and fast: O(∆) rounds!

(here ∆ = maximum degree)

  • Coming next month: how to find

a 2-approximation of vertex cover in O(∆) rounds

62

slide-63
SLIDE 63

Finding a vertex cover: two very different worlds

  • Centralised setting, polynomial-time algorithms:
  • trivial to find a minimal vertex cover: greedy algorithm
  • it requires more thought to find

a good approximation of minimum vertex cover

  • Distributed setting, port-numbering model:
  • impossible to find a minimal vertex cover:

symmetry breaking issues

  • but we have seen that it is possible to find

a good approximation of minimum vertex cover

63

slide-64
SLIDE 64

Summary

  • Deterministic distributed algorithms
  • Synchronous communication rounds
  • Port-numbering model
  • Covering maps and covering graphs
  • Technique for proving negative results:

these nodes will always produce the same output

  • Algorithm design technique:

bipartite double covers, 2-colouring

64