Top Banner
Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems Part 2: Introduction to online algorithms Friedhelm Meyer auf der Heide
47

Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Mar 26, 2015

Download

Documents

Kaitlyn Clark
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 1

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Algorithmic Aspects of Dynamic Intelligent Systems

Part 2: Introduction to online algorithms

Friedhelm

Meyer auf der Heide

Page 2: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 2

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityLectures on monday

take place at 10.15 am

in W0.209

Page 3: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 3

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityOnline Algorithms

An online algorithm is one that can process its input piece-by-piece, without having the entire input available from the start. In contrast, an offline algorithm is given the whole problem data from the beginning and is required to output an answer which solves the problem at hand.

Input: a sequence of requests.Task: process the requests as efficiently as possible

Online: i‘th request has to be processed before future requests are known

Offline: All requests are known in advance

Page 4: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 4

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityHow to measure quality of online algorithms?

1. Assume some a priori knowledge about request sequence, e.g., „requests are chosen randomly“

2. Assume worst case measure, compare online cost to offline cost

Online : standard competitive analysis – competitive ratio

Online randomized:

Page 5: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 5

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityToy Example: Ski rental problem

I go skiing one year after the other, until I am no longer interested in skiing. I do not know in advance, when I loose interest.

Bying skis costs D € (and I can use them for ever), renting them costs 1€.

Question: When should I buy skis?

Answer: Immediately, if I am interested for at least D years, never otherwise.

This can only be done offline!

Page 6: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 6

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityToy Example: Ski rental problem

What to do online?

I buy when I go skiing for a D‘th year.

Cost offline : D

Cost online : 2D

This strategy is 2-competitive

Page 7: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 7

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Paging

Page 8: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 8

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Paging:A basic problem for an operating system

Main memory

Size k=6

Disk

Paging: given a main memory that can hold k pages.

Input: sequence of pages to be used by the processor

Goal: Need as few page faults ( requests for pages that have to be moved from disk to main memory) as possible

The algorithm has to store the requested page in main memory in case of a page fault, and has to choose a page to be removed from main memory.

Page 9: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 9

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityPaging

Optimal offline:

Page 10: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 10

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityPaging

Two online strategies:

Theorem: LRU and FIFO are k-competitive.

Theorem: This competitive ratio is best possible.

Page 11: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 11

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityPaging

In practise, both algorithms are much better, the observed competitive ratio decreases with increasing memory size k.

Furthermore, LRU turns out to be better than FIFO.

Reasons: In practise, request sequences exhibit locality, i.e., they tend to use the same pages more often, and have dependencies among pages.

(„If page A is accessed, then it is likely that page B will be accessed shortly afterwards“)

Way out: Model restrictions to the „adversary“, i.e. the bad guy that generates the worst case sequences.

This is done using access graphs.

Page 12: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 12

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Page Migration

Page 13: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 13

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Page migration – Classical online problem

processors connected by a network

There are costs of communication associated with each

edge. Cost of communication between pair of nodes =

cost of the cheapest path between these nodes.

Costs of communication fulfill the triangle inequality.

Page Migration Model (1)

v1

v2

v3

v4

v7

v6

v5

Page 14: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 14

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Alternative view:

processors in a metric space

Indivisible memory page of size in the local memory of

one processor (initially at )

Page Migration Model (2)

v1

v2

v3

v4

v7

v6

v5

Page 15: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 15

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityPage Migration Model (3)

Input: sequence of processors,

dictated by a request adversary

- processor which wants to access (read or write)

one unit of data from the memory page.

After serving a request an algorithm may move the page

to a new processor.

v1

v2

v3

v4

v7

v6

v5

Page 16: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 16

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityPage Migration (cost model)

Cost model:

The page is at node .

Serving a request issued at costs .

Moving the page to node costs .

Page 17: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 17

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityA randomized algorithm

Memoryless coin-flipping algorithm CF [Westbrook 92]

Theorem: CF is 3-competitive against an adaptive-online

adversary

Remark: This ratio is optimal against adaptive-online

Adversary (may see the outcomes of the coinflips)

In each step after serving a request issued at ,move page to with probability .

Page 18: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 18

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityProof of competitiveness of CF

We run CF and OPT „in parallel” on the input sequence

We define potential function

There are two events to consider in each step

Request occurs at a node ,

CF and OPT serve the requests, part 1

CF optionally moves the page

OPT optionally moves the page } part 2

For each part separately, we prove that

Page 19: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 19

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityProof of competitiveness of CF

Note:

This is a telescopic sum.

Thus the cancel out

and we get the competitive ratio 3.

Page 20: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 20

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityCompetitiveness of CF, a step

Page in and resp.Request occurs at

CF and OPT serve the requestsCF optionally moves the page to part 1

OPT optionally moves the page part 2 to

Page 21: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 21

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityCompetitiveness of CF – part 1

Request occurs at

Cost of serving requests:

in CF : a, in OPT : b

Expected cost of moving the page:

Potential before:

Exp. potential after:

Exp. change of the potential:

Page 22: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 22

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityCompetitiveness of CF – part 2

OPT moves to

Page 23: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 23

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityDeterministic algorithm

Algorithm Move-To-Min (MTM) [Awerbuch, Bartal, Fiat 93]

Theorem: MTM is 7-competitive

Remark: The currently best deterministic algorithm achieves

competitive ratio of 4.086

After each steps, choose to be the node

which minimizes , and move to .

( is the best place for the page in the last steps)

Page 24: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 24

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityResults on page migration

The best known bounds:

Algorithm Lower boundDeterministic

[Bartal, Charikar, Indyk ‘96]

[Chrobak, Larmore, Reingold, Westbrook ‘94]

Randomized:

Oblivious

adversary

[Westbrook ‘91] [Chrobak, Larmore, Reingold, Westbrook ‘94]

Randomized:

Adaptive-online adversary

[Westbrook ‘91] [Westbrook ‘91]

Page 25: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 25

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Data management in networks

Page 26: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 26

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Scenario

Networks have low bandwidth, global objects are small, access is fine grained.

• typical for parallel processor networks, partially also for the internet.

• bottleneck: link-congestion

task: distribute global objects (maybe dynamically) among

processors such that

• an application (sequence of read/write access to global

variables) can be executed using small link-congestion

• storage overhead is small.

- Exploit Locality -

Page 27: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 27

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Basic Strategy

• Design strategy for trees

• Produce strategy for target-network by tree embedding

Page 28: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 28

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Dynamic Model

Application: Sequence of read / write requests from processorsto objects. Each processor decides solely based onits local knowledge.

distributed online-strategy

Goal: Develop strategy that produces only by a factor c morecongestion than an optimal offline strategy.

c-competitive strategy

(and by a factor m more storage per processor

(m, c) – competitive strategy )

Page 29: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 29

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Dynamic strategy for trees

• v writes to x :v creates (or updates) copy of x in v,and invalidates all other copies (consistency!)

• v reads x:v reads the closest copy of x and creates copies in every processor on the path back to v.

(Remark: Data Tracking in trees is easy!)

Page 30: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 30

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Example and Analysis

Consider phase write (v0), read (v1), read (v2), ... , read (vk-1), write (vk)

v0

Page 31: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 31

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Example and Analysis

Consider phase write (v0), read (v1), read (v2), ... , read (vk-1), write (vk)

v0

v1

Page 32: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 32

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Example and Analysis

Consider phase write (v0), read (v1), read (v2), ... , read (vk-1), write (vk)

v0

v1

Page 33: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 33

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Example and Analysis

Consider phase write (v0), read (v1), read (v2), ... , read (vk-1), write (vk)

v0

v1

v2

Page 34: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 34

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Example and Analysis

Consider phase write (v0), read (v1), read (v2), ... , read (vk-1), write (vk)

v0

v1

v2

Page 35: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 35

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Example and Analysis

Consider phase write (v0), read (v1), read (v2), ... , read (vk-1), write (vk)

v0

v1

v2

v3

Page 36: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 36

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Example and Analysis

Consider phase write (v0), read (v1), read (v2), ... , read (vk-1), write (vk)

v0

v1

v2

v3

vk

Page 37: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 37

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Example and Analysis

Consider phase write (v0), read (v1), read (v2), ... , read (vk-1), write (vk)

v0

v1

v2

v3

Each strategy has to use each link of the red subtree at least once. Our strategy uses each of these links at most three times.

Strategy is 3-competitive for trees

vk

Page 38: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 38

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Other networks

Idea: Simulate suitable tree in target-network M.

tree embedding:

Goals: - small dilation (in order to reduce overall load)

- randomized embedding (in order to reduce congestion)

Goals contradict?!?

Page 39: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 39

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Tree embedding

Example: nxn-mesh1 2 30

M‘

v

• leaves: nodes of the mesh• link-capacity: # links leaving the submesh

Randomized, locality preserving embedding!

Page 40: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 40

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Result for meshes

The static and dynamic strategies are

O (log(n))-competitive in nxn-meshes, w.h.p.

Finding an optimal static placement for several variables is

NP-hard already on 3x3-meshes.

Page 41: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 41

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Some Results

competitive ratio w.h.p.

d-dimensional meshes O(d log n)

Fat Trees O(log n)

Hypercubes O(log n)

SE Networks

De Bruijn Networks

Direct Butterflies

Indirect Butterflies

Arbitrary Networks

O(log n)

O(log n)

O(log n)

O(1)

polylog n (Räcke 2002)

Page 42: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 42

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Conclusions

• Provably efficient protocols for data management in networks

• Different models for different application scenarios

• Experimental evaluation (Presto, DIVA)

• Some open problems: - startup times - combination with load balancing - randomized, locality preserving embedding and routing in dynamic networks

Page 43: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 43

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Robot Navigation

Page 44: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 44

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityRobot navigation

Theorem: This competitive ratio can be achieved.

Page 45: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 45

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityA simple navigation problem

The playground is a line, no obstacles.

The robot has to find the treaure, but does not know in advance where it is. It only finds it when it touches it.

Page 46: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 46

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and ComplexityA simple navigation problem

Offline : n

Online : Go left, right, left, right,.. In i‘th step, go distance .

This gives total cost

This algorithm is 9-competitive.This is best possible!!

Distance n

i2

Page 47: Friedhelm Meyer auf der Heide 1 HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithmic Aspects of Dynamic Intelligent Systems.

Friedhelm Meyer auf der Heide 47

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Heinz Nixdorf Institute& Computer Science InstituteUniversity of PaderbornFürstenallee 1133102 Paderborn, Germany

Tel.: +49 (0) 52 51/60 64 66Fax: +49 (0) 52 51/62 64 82E-Mail: [email protected]://www.upb.de/cs/ag-madh

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