Algorithmic Aspects of Dynamic Intelligent Systems Part 1: Static networks, routing

Post on 05-Jan-2016

37 views 0 download

description

Algorithmic Aspects of Dynamic Intelligent Systems Part 1: Static networks, routing. Friedhelm Meyer auf der Heide. Aim of the lectures. I will present the algorithmic part of the CS-view of DIS I will introduce - static and dynamic network models - PowerPoint PPT Presentation

Transcript of Algorithmic Aspects of Dynamic Intelligent Systems Part 1: Static networks, routing

Friedhelm Meyer auf der Heide 1

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Algorithmic Aspects of Dynamic Intelligent SystemsPart 1: Static networks, routing

Friedhelm

Meyer auf der Heide

Friedhelm Meyer auf der Heide 2

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityAim of the lectures

I will present the algorithmic part of the

CS-view of DIS

I will introduce

- static and dynamic network models

- communication strategies

- scheduling strategies

- data management strategies

Important feature: strategies of choice are local, distributed, often online

Friedhelm Meyer auf der Heide 3

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityOverview

Part 1: Static networks, routing

Part 2: Introduction to online algorithms, with

applications in data management

Part 3: Page migration in dynamic networks

Part 4: Communication among mobile robots

Friedhelm Meyer auf der Heide 4

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Part 1: Static networks, routing

Friedhelm Meyer auf der Heide 5

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

How to realize communication among processors?

• via shared memory

• via busses

• via a network

Friedhelm Meyer auf der Heide 6

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityNetworks

… consist of nodes and links.

nodes: processing units, for example PC‘s

edges: connections between PC‘s,

forming, for example, a LAN, a WAN, the Internet.

nodes: webpages

links: hyperlinks,

forming the Web-Graph

Friedhelm Meyer auf der Heide 7

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexitySome designed topologies

A monolithic parallel computer with many nodes can benefit from a well designed communication network.

Demands:

Good routing quality:

- Small diameter

- High bandwidh

- Robustness

Good layout quality

- Embedable in a small 2D-area with short links

Friedhelm Meyer auf der Heide 8

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityA central problem

PPR Routing: Given a Routing problem ,send a packet from v to w, for each (v, w)

- path selection (which path from v to w to use?)- packet switching (how to resolve conflicts?)

R

Friedhelm Meyer auf der Heide 9

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityIntroduction to Routing

PPR Given a network G = (P, E), and a routing problem . • Path selection: yields a path system

W of paths from v to w in G, • for each (v, w)2R

• Dilation: D: the length of longest path in W• Congestion C :

C(e) = number of paths from W passing through e C = max {C(e), e2E }

(Note: max (C, D) ≤ Routing time ≤ C · D)

Friedhelm Meyer auf der Heide 10

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityAn introductory example: Routing on a ring

Ring: - nodes [n]:={0,…n-1}, - edges {i, i+1}, i= 0,..n-2, and {n-1,0}

- path system: shortest paths- routing problem R, arbitrary, #R = m

Example:

12

n

mRouting time: Dilation:2

n Congestion: ≤ m

Friedhelm Meyer auf der Heide 11

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Theorem: Every R, |R| = m, can be routed in time

Conflict resolution: If several packets contend to use the same edge (v,w) thenthe packet with largest distance to its destination is chosen. If two packets have the same distance to go, the one with larger index wins.

furthest-to-go (FTG) rule

Formal: rankv (pi) = (number of edges to be traversed by p from v to destination of p) + i/(m+1)

Packet p is prefered against q at v , iff rankv(p) > rankv(q)

12

n

m

Routing on a ring: a nice proof technique

Friedhelm Meyer auf der Heide 12

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityRouting on a ring: a stronger result

Theorem: Every R with congestion C and Dilation D can be routed in time D+C-1. There are such R so that this bound is tight.

Proof:

Tight: C messages have same start and destination.

Friedhelm Meyer auf der Heide 13

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityRouting on a ring: a stronger result

The routing protocol:

If several packets contend to use the same edge (v,w) then

the packet with largest distance from its source is chosen.

If two packets have gone the same distance, the one with

larger index wins. (LIS=longest in system)

Properties:

If a packet has started moving, it will never be delayed.

A packet starts moving as soon as there is no other packet in the buffer of its source, except for those with the same source and smaller index.

1. and 2. imply the result.

Friedhelm Meyer auf der Heide 14

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityThe (m,d)-mesh M(m,d)

Friedhelm Meyer auf der Heide 15

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexitySome meshes

Friedhelm Meyer auf der Heide 16

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityPermutation network

Friedhelm Meyer auf der Heide 17

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityRecursive definition of permutation networks

Friedhelm Meyer auf der Heide 18

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityExplicit definition of permutation networks

Friedhelm Meyer auf der Heide 19

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityPermutation routing in (n,d)-PN

A permutation routing problem is defines by a set

R ½ Sources X Sinks

such that every source/sink is start/destination of exactly one packet.

Theorem: For every permutation there is a vertex disjoint path system in (n,d)-PN.

Friedhelm Meyer auf der Heide 20

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityPermutation routing on (n,d)-PN and M(n,d)

Theorem: For every permutation there is a vertex disjoint path system in (n,d)-PN.

Corollary: Every permutation in (n,d)-PN can be routed in time 2d-1with buffer size 1, if a preprocessing is allowed for finding the routing paths. (offline routing; routing with preprocessing).

Theorem: Every permutation in M(n,d) can be routed in time (4d-2)(n-1), if preprocessing is allowed. (offline routing; routing with preprocessing).

(Note: d(n-1) is a lower bound, the diameter of (M(n,d).)

Friedhelm Meyer auf der Heide 21

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityOnline routing in the Butterfly Network

Can every permutation connecting sources and sinks be routed in time O(log(n)) by an online routing algorithm?

n=2d sinks

n=2d sources

Friedhelm Meyer auf der Heide 22

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityPath system in the Butterfly network

There is a unique path from every source to every sink.

Friedhelm Meyer auf der Heide 23

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityRouting in the Butterfly

We route from sources to sinks, along the unique paths.

What is the role of a routing protocol?

Each node has to decide which packet from its buffer to move.

FIFO, LIFO, LIS, FTG,….

Random Rank !

Friedhelm Meyer auf der Heide 24

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

The random rank protocol for the Butterfly network

Initially, each packed chooses a random rank.

Rule for each node:

packet with smallest rank is moved.

Theorem 1: If R has congestion C, than routing R in the Butterfly network needs time O(log(n) + C), w.h.p.

Friedhelm Meyer auf der Heide 25

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityAbout congestion in the Butterfly network

We consider permutation routing.

Worst case congestion: pn

Example : Matrix Transposition, Bit rerversal

Average case congestion: log(n)

Friedhelm Meyer auf der Heide 26

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityRouting times in the Butterfly network

For random permutations: expected O(log(n))

For worst case permutations: expected O(pn)

What to do with Matrix Transposition?

Friedhelm Meyer auf der Heide 27

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityValiant‘s trick in the Butterfly network

Route to random sink (expected time (O(log(n)))

Route upwards to source (exp. time (O(log(n)))

Route to final destination (exp. time (O(log(n)))

Result: We can route every permutation in expected time (exp. time (O(log(n)).

Friedhelm Meyer auf der Heide 28

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexitySome dynamic networks

mobile ad hoc networks

nodes move, communicate by wireless devices, e.g. WLAN,

nodes can enter and leave the network

goal: guarantee efficient communication among nodes

Peer-to-Peer systems

nodes can enter and leave the system

goal: maintain efficient access to data items in the systems

Grid computing

Processors of a network (LAN, Internet) offer varying computing

resources

goal: Use these resources to execute a parallel program efficiently

Friedhelm Meyer auf der Heide 29

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Thank you for your attention!Thank you for your attention!

Friedhelm Meyer auf der HeideHeinz Nixdorf Institute & Computer Science

DepartmentUniversity of Paderborn

Fürstenallee 1133102 Paderborn, Germany

Tel.: +49 (0) 52 51/60 64 80Fax: +49 (0) 52 51/60 64 82

Mailto: fmadh@upb.dehttp://wwwhni.upb.de/alg