heinz nixdorf institute university of paderborn algorithms and complexity algorithms for radio...

14
HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithms for Radio Networks Exercise 12 Stefan Rührup [email protected]

Upload: bartholomew-potter

Post on 03-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithms for Radio Networks Exercise 12 Stefan Rührup sr@upb.de

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Algorithms for Radio Networks

Exercise 12

Stefan Rü[email protected]

Page 2: HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithms for Radio Networks Exercise 12 Stefan Rührup sr@upb.de

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

2

Exercise 24

• Assume that a start node s in the center (0, 0) of a square [−1, 1] × [−1, 1] of edge length 2 chooses uniformly at random a target node t in this square

1. What is the cumulative probability function P[R ≤ r] for the distance R = |s-t|2 between the start node and target

node if r ≤ 1?

2. What is the cumulative probability function P[R ≤ r]if 1 ≤ r ≤ √2?

3. Compute the corresponding probability density function and draw the graph of the function.

4. What is the expected value of R?

Page 3: HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithms for Radio Networks Exercise 12 Stefan Rührup sr@upb.de

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

3

Exercise 24

1.) r ≤ 1 2.) 1 ≤ r ≤ √2

s

t

s

t

A1

A2

P[R ≤ r] = / = r2 / 4

P[R ≤ r] = (8 A1 + 4 A2) / 4

Page 4: HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithms for Radio Networks Exercise 12 Stefan Rührup sr@upb.de

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

4

Exercise 24

s

t

A1

A2

P[R ≤ r] = (8 A1 + 4 A2) / 4

=

A1

r

1

√r2-1

A2

= /2 - 2cos = 1/r

A2 = r2 · /(2)

A1 = √r2-1

Page 5: HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithms for Radio Networks Exercise 12 Stefan Rührup sr@upb.de

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

5

Exercise 24

• r ≤ 1: P[R ≤ r] = r2 / 4 P[R = r] = r / 2

• 1 ≤ r ≤ √2: P[R ≤ r] =

P[R = r] =

E[R] ≈ 0.765Numerical integration of

where fR is the probability density function (PDF),

which is piecewise defined by the two functions above

=: F1(r)

=: F2(r)

Page 6: HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithms for Radio Networks Exercise 12 Stefan Rührup sr@upb.de

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

6

Exercise 24

• Distribution function (cumulative probability)

0 F1(r) F2(r) 1

r

P[R ≤ r]

Page 7: HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithms for Radio Networks Exercise 12 Stefan Rührup sr@upb.de

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

7

Exercise 24

• Probability Density Function (PDF) for 0 ≤ r ≤ √2

r

P[R = r]

Page 8: HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithms for Radio Networks Exercise 12 Stefan Rührup sr@upb.de

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

8

Exercise 25

• Find a counter-example that disproves

for independent random variables X and Y.

• Chose X = {1,2} and Y={1,2} with P[X=1] = P[X=2] = 1/2 and P[Y=1] = P[Y=1] = 1/2

• E[X] = k · P[X=k] = 3/2

E[Y] = k · P[Y=k] = 3/2

• E[X/Y] = k · P[X/Y=k] = 9/8

P[X/Y]

X=1

X=2

Y=1 1/4 1/4

Y=2 1/4 1/4

X/Y

X=1

X=2

Y=1

1 2

Y=2

1/2 1

Page 9: HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithms for Radio Networks Exercise 12 Stefan Rührup sr@upb.de

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

9

Exercise 26 (additional exercise)

• An object moves with a constant speed for a fixed distance d. The speed V is chosen uniformly at random between either vmin or vmax, i.e. the speed is vmin with probability 1/2

and vmax with probability 1/2.

–What is the average speed v?

–What is the expected speed E[V]?

–Show that v ≤ E[V]

If the speed is constant, one needs a time of t = d/v to cover a fixed distance d.

The average speed is given by

Page 10: HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithms for Radio Networks Exercise 12 Stefan Rührup sr@upb.de

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

10

Exercise 26

• P[V = vmin] = 1/2 and P[V = vmax] = 1/2.

• The average speed is given by

E[D] = d is fixed. But what is the expected time E[T]?

If the speed is constant, one needs a time of t = d/v to cover a fixed distance d.

Page 11: HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithms for Radio Networks Exercise 12 Stefan Rührup sr@upb.de

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

11

Exercise 26

• P[V = vmin] = 1/2 and P[V = vmax] = 1/2.

• The expected speed is

The expected speed is also given by

So, this is another example, where

(see Exercise 25)

Page 12: HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithms for Radio Networks Exercise 12 Stefan Rührup sr@upb.de

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

12

Exercise 26

• Show that

Page 13: HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithms for Radio Networks Exercise 12 Stefan Rührup sr@upb.de

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

13

Exercise 26

• What is the minimum of the function x+1/x for x > 0?

(this is a relative minimum, because the second derivative is greater than 0)

• x+1/x = 2 for x=1

Therefore,

Page 14: HEINZ NIXDORF INSTITUTE University of Paderborn Algorithms and Complexity Algorithms for Radio Networks Exercise 12 Stefan Rührup sr@upb.de

HEINZ NIXDORF INSTITUTEUniversity of Paderborn

Algorithms and Complexity

Thanks for your attention!

End of the lecture

Mini-Exam No. 4 on Monday 13 Feb 2006, 2pm, FU.511 (Mozart)

Good Luck!

Stefan Rü[email protected]