08.10.2016 Views

Foundations of Data Science

2dLYwbK

2dLYwbK

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Exercise 12.40 We are given the probability distribution for two random vectors x and<br />

y and we wish to stretch space to maximize the expected distance between them. Thus,<br />

d∑<br />

we will multiply each coordinate by some quantity a i . We restrict a 2 i = d. Thus, if we<br />

increase some coordinate by a i > 1, some other coordinate must shrink. Given random<br />

vectors x = (x 1 , x 2 , . . . , x d ) and y = (y 1 , y 2 , . . . , y d ) how should we select a i to maximize<br />

E ( |x − y| 2) ? The a i stretch different coordinates. Assume<br />

{ 0<br />

1<br />

y i =<br />

2<br />

1<br />

1<br />

2<br />

and that x i has some arbitrary distribution.<br />

E ( |x − y| 2) ∑<br />

= E d [<br />

a<br />

2<br />

i (x i − y i ) 2] ∑<br />

= d a 2 i E (x 2 i − 2x i y i + yi 2 )<br />

i=1<br />

i=1<br />

∑<br />

= d a 2 i E ( )<br />

x 2 i − x i + 1 2<br />

i=1<br />

Since E (x 2 i ) = E (x i ) we get . Thus, weighting the coordinates has no effect assuming<br />

d∑<br />

a 2 i = 1. Why is this? Since E (y i ) = 1.<br />

2<br />

i=1<br />

E ( |x − y| 2) is<br />

{<br />

independent <strong>of</strong> the value <strong>of</strong> x i hence its distribution.<br />

0<br />

3<br />

What if y i =<br />

4<br />

1 and E (y<br />

1 i ) = 1. Then<br />

4<br />

4<br />

E ( |x − y| 2) ∑<br />

= d ∑<br />

a 2 i E (x 2 i − 2x i y i + yi 2 ) = d a 2 i E ( x i − 1x )<br />

2 i + 1 4<br />

i=1<br />

i=1<br />

∑<br />

= d (<br />

.<br />

1 E (x 2 i) + 4)<br />

1<br />

a 2 i<br />

i=1<br />

To maximize put all weight on the coordinate <strong>of</strong> x with highest probability <strong>of</strong> one. What<br />

if we used 1-norm instead <strong>of</strong> the two norm?<br />

i=1<br />

E (|x − y|) = E<br />

d∑<br />

a i |x i − y i | =<br />

i=1<br />

d∑<br />

a i E |x i − y i | =<br />

i=1<br />

d∑<br />

a i b i<br />

i=1<br />

where b i = E (x i − y i ). If<br />

d∑<br />

i=1<br />

a 2 i = 1, then to maximize let a i = b i<br />

b<br />

. Taking the dot product<br />

<strong>of</strong> a and b is maximized when both are in the same direction.<br />

Exercise 12.41 Maximize x+y subject to the constraint that x 2 + y 2 = 1.<br />

Exercise 12.42 Draw a tree with 10 vertices and label each vertex with a unique integer<br />

from 1 to 10. Construct the Prfer sequence for the tree. Given the Prfer sequence recreate<br />

the tree.<br />

431

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!