Today. Cuckoo hashing. Today. Cuckoo hashing. - - PowerPoint PPT Presentation

today
SMART_READER_LITE
LIVE PREVIEW

Today. Cuckoo hashing. Today. Cuckoo hashing. - - PowerPoint PPT Presentation

Today. Cuckoo hashing. Today. Cuckoo hashing. Johnson-Lindenstrass. Cuckoo hashing. Hashing with two choices: max load O ( loglog n ) . Cuckoo hashing. Hashing with two choices: max load O ( loglog n ) . Cuckoo hashing: Cuckoo hashing.


slide-1
SLIDE 1

Today.

Cuckoo hashing.

slide-2
SLIDE 2

Today.

Cuckoo hashing. Johnson-Lindenstrass.

slide-3
SLIDE 3

Cuckoo hashing.

Hashing with two choices: max load O(loglogn).

slide-4
SLIDE 4

Cuckoo hashing.

Hashing with two choices: max load O(loglogn). Cuckoo hashing:

slide-5
SLIDE 5

Cuckoo hashing.

Hashing with two choices: max load O(loglogn). Cuckoo hashing: Array.

slide-6
SLIDE 6

Cuckoo hashing.

Hashing with two choices: max load O(loglogn). Cuckoo hashing:

  • Array. Two hash functions h1, h2.
slide-7
SLIDE 7

Cuckoo hashing.

Hashing with two choices: max load O(loglogn). Cuckoo hashing:

  • Array. Two hash functions h1, h2.

Insert x: place in h1(x) or h2(x) if space.

slide-8
SLIDE 8

Cuckoo hashing.

Hashing with two choices: max load O(loglogn). Cuckoo hashing:

  • Array. Two hash functions h1, h2.

Insert x: place in h1(x) or h2(x) if space. Else bump elt y in hi(x) u.a.r. for i ∈ [1,2].

slide-9
SLIDE 9

Cuckoo hashing.

Hashing with two choices: max load O(loglogn). Cuckoo hashing:

  • Array. Two hash functions h1, h2.

Insert x: place in h1(x) or h2(x) if space. Else bump elt y in hi(x) u.a.r. for i ∈ [1,2]. Bump y,x: place y in hj(y) where j = i if space.

slide-10
SLIDE 10

Cuckoo hashing.

Hashing with two choices: max load O(loglogn). Cuckoo hashing:

  • Array. Two hash functions h1, h2.

Insert x: place in h1(x) or h2(x) if space. Else bump elt y in hi(x) u.a.r. for i ∈ [1,2]. Bump y,x: place y in hj(y) where j = i if space. Else bump y′ in hj(y).

slide-11
SLIDE 11

Cuckoo hashing.

Hashing with two choices: max load O(loglogn). Cuckoo hashing:

  • Array. Two hash functions h1, h2.

Insert x: place in h1(x) or h2(x) if space. Else bump elt y in hi(x) u.a.r. for i ∈ [1,2]. Bump y,x: place y in hj(y) where j = i if space. Else bump y′ in hj(y). And so on.

slide-12
SLIDE 12

Cuckoo hashing.

Hashing with two choices: max load O(loglogn). Cuckoo hashing:

  • Array. Two hash functions h1, h2.

Insert x: place in h1(x) or h2(x) if space. Else bump elt y in hi(x) u.a.r. for i ∈ [1,2]. Bump y,x: place y in hj(y) where j = i if space. Else bump y′ in hj(y). And so on.

slide-13
SLIDE 13

Cuckoo hashing.

Hashing with two choices: max load O(loglogn). Cuckoo hashing:

  • Array. Two hash functions h1, h2.

Insert x: place in h1(x) or h2(x) if space. Else bump elt y in hi(x) u.a.r. for i ∈ [1,2]. Bump y,x: place y in hj(y) where j = i if space. Else bump y′ in hj(y). And so on. If go too long.

slide-14
SLIDE 14

Cuckoo hashing.

Hashing with two choices: max load O(loglogn). Cuckoo hashing:

  • Array. Two hash functions h1, h2.

Insert x: place in h1(x) or h2(x) if space. Else bump elt y in hi(x) u.a.r. for i ∈ [1,2]. Bump y,x: place y in hj(y) where j = i if space. Else bump y′ in hj(y). And so on. If go too long. Fail.

slide-15
SLIDE 15

Cuckoo hashing.

Hashing with two choices: max load O(loglogn). Cuckoo hashing:

  • Array. Two hash functions h1, h2.

Insert x: place in h1(x) or h2(x) if space. Else bump elt y in hi(x) u.a.r. for i ∈ [1,2]. Bump y,x: place y in hj(y) where j = i if space. Else bump y′ in hj(y). And so on. If go too long. Fail. Rehash entire hash table.

slide-16
SLIDE 16

Cuckoo hashing.

Hashing with two choices: max load O(loglogn). Cuckoo hashing:

  • Array. Two hash functions h1, h2.

Insert x: place in h1(x) or h2(x) if space. Else bump elt y in hi(x) u.a.r. for i ∈ [1,2]. Bump y,x: place y in hj(y) where j = i if space. Else bump y′ in hj(y). And so on. If go too long. Fail. Rehash entire hash table. Fails if cycle for insert.

slide-17
SLIDE 17

Cuckoo hashing.

Hashing with two choices: max load O(loglogn). Cuckoo hashing:

  • Array. Two hash functions h1, h2.

Insert x: place in h1(x) or h2(x) if space. Else bump elt y in hi(x) u.a.r. for i ∈ [1,2]. Bump y,x: place y in hj(y) where j = i if space. Else bump y′ in hj(y). And so on. If go too long. Fail. Rehash entire hash table. Fails if cycle for insert. Cℓ - event of cycle of length ℓ at a vertex.

slide-18
SLIDE 18

Cuckoo hashing.

Hashing with two choices: max load O(loglogn). Cuckoo hashing:

  • Array. Two hash functions h1, h2.

Insert x: place in h1(x) or h2(x) if space. Else bump elt y in hi(x) u.a.r. for i ∈ [1,2]. Bump y,x: place y in hj(y) where j = i if space. Else bump y′ in hj(y). And so on. If go too long. Fail. Rehash entire hash table. Fails if cycle for insert. Cℓ - event of cycle of length ℓ at a vertex. Pr[Cℓ] ≤ m ℓ n ℓ ℓ n 2(ℓ) ≤ e2 8 ℓ (1)

slide-19
SLIDE 19

Cuckoo hashing.

Hashing with two choices: max load O(loglogn). Cuckoo hashing:

  • Array. Two hash functions h1, h2.

Insert x: place in h1(x) or h2(x) if space. Else bump elt y in hi(x) u.a.r. for i ∈ [1,2]. Bump y,x: place y in hj(y) where j = i if space. Else bump y′ in hj(y). And so on. If go too long. Fail. Rehash entire hash table. Fails if cycle for insert. Cℓ - event of cycle of length ℓ at a vertex. Pr[Cℓ] ≤ m ℓ n ℓ ℓ n 2(ℓ) ≤ e2 8 ℓ (1) Probability that an insert hits a cycle of length ℓ ≤ ℓ

n

  • e2

8

slide-20
SLIDE 20

Cuckoo hashing.

Hashing with two choices: max load O(loglogn). Cuckoo hashing:

  • Array. Two hash functions h1, h2.

Insert x: place in h1(x) or h2(x) if space. Else bump elt y in hi(x) u.a.r. for i ∈ [1,2]. Bump y,x: place y in hj(y) where j = i if space. Else bump y′ in hj(y). And so on. If go too long. Fail. Rehash entire hash table. Fails if cycle for insert. Cℓ - event of cycle of length ℓ at a vertex. Pr[Cℓ] ≤ m ℓ n ℓ ℓ n 2(ℓ) ≤ e2 8 ℓ (1) Probability that an insert hits a cycle of length ℓ ≤ ℓ

n

  • e2

8

ℓ Rehash every Ω(n) inserts (if ≤ n/8 items in table.)

slide-21
SLIDE 21

Cuckoo hashing.

Hashing with two choices: max load O(loglogn). Cuckoo hashing:

  • Array. Two hash functions h1, h2.

Insert x: place in h1(x) or h2(x) if space. Else bump elt y in hi(x) u.a.r. for i ∈ [1,2]. Bump y,x: place y in hj(y) where j = i if space. Else bump y′ in hj(y). And so on. If go too long. Fail. Rehash entire hash table. Fails if cycle for insert. Cℓ - event of cycle of length ℓ at a vertex. Pr[Cℓ] ≤ m ℓ n ℓ ℓ n 2(ℓ) ≤ e2 8 ℓ (1) Probability that an insert hits a cycle of length ℓ ≤ ℓ

n

  • e2

8

ℓ Rehash every Ω(n) inserts (if ≤ n/8 items in table.) O(1) time on average.

slide-22
SLIDE 22

Johnson-Lindenstrass

Points: x1,...,xn ∈ Rd.

slide-23
SLIDE 23

Johnson-Lindenstrass

Points: x1,...,xn ∈ Rd. Random k = c logn

ε2

dimensional subspace.

slide-24
SLIDE 24

Johnson-Lindenstrass

Points: x1,...,xn ∈ Rd. Random k = c logn

ε2

dimensional subspace. Claim: with probability 1−

1 nc−2 ,

(1−ε)

  • k

d |xi −xj| ≤ |yi −yj| ≤ (1+ε)

  • k

d |xi −xj|

slide-25
SLIDE 25

Johnson-Lindenstrass

Points: x1,...,xn ∈ Rd. Random k = c logn

ε2

dimensional subspace. Claim: with probability 1−

1 nc−2 ,

(1−ε)

  • k

d |xi −xj| ≤ |yi −yj| ≤ (1+ε)

  • k

d |xi −xj| “Projecting and scaling by

  • d

k preserves all pairwise distances w/in

factor of 1±ε.”

slide-26
SLIDE 26

Random subspace.

Method 1:

slide-27
SLIDE 27

Random subspace.

Method 1: Pick unit v1

slide-28
SLIDE 28

Random subspace.

Method 1: Pick unit v1 ,

slide-29
SLIDE 29

Random subspace.

Method 1: Pick unit v1 , v2 orthogonal to v1,

slide-30
SLIDE 30

Random subspace.

Method 1: Pick unit v1 , v2 orthogonal to v1, ...

slide-31
SLIDE 31

Random subspace.

Method 1: Pick unit v1 , v2 orthogonal to v1, ... vk orthogonal to previous vectors...

slide-32
SLIDE 32

Random subspace.

Method 1: Pick unit v1 , v2 orthogonal to v1, ... vk orthogonal to previous vectors... Method 2:

slide-33
SLIDE 33

Random subspace.

Method 1: Pick unit v1 , v2 orthogonal to v1, ... vk orthogonal to previous vectors... Method 2: Choose k vectors v1,...,vk

slide-34
SLIDE 34

Random subspace.

Method 1: Pick unit v1 , v2 orthogonal to v1, ... vk orthogonal to previous vectors... Method 2: Choose k vectors v1,...,vk Gram Schmidt orthonormalization of k ×d matrix where rows are vi.

slide-35
SLIDE 35

Random subspace.

Method 1: Pick unit v1 , v2 orthogonal to v1, ... vk orthogonal to previous vectors... Method 2: Choose k vectors v1,...,vk Gram Schmidt orthonormalization of k ×d matrix where rows are vi. remove projection onto previous subspace.

slide-36
SLIDE 36

Projections.

Project x into subspace spanned by v1,v2,··· ,vk.

slide-37
SLIDE 37

Projections.

Project x into subspace spanned by v1,v2,··· ,vk. y1 = x ·v1,y2 = x·,v2,··· ,yk = x ·vk

slide-38
SLIDE 38

Projections.

Project x into subspace spanned by v1,v2,··· ,vk. y1 = x ·v1,y2 = x·,v2,··· ,yk = x ·vk Projection: (y1,...,yk).

slide-39
SLIDE 39

Projections.

Project x into subspace spanned by v1,v2,··· ,vk. y1 = x ·v1,y2 = x·,v2,··· ,yk = x ·vk Projection: (y1,...,yk). Have: Arbitrary vector, random k-dimensional subspace.

slide-40
SLIDE 40

Projections.

Project x into subspace spanned by v1,v2,··· ,vk. y1 = x ·v1,y2 = x·,v2,··· ,yk = x ·vk Projection: (y1,...,yk). Have: Arbitrary vector, random k-dimensional subspace. View As: Random vector, standard basis for k dimensions.

slide-41
SLIDE 41

Projections.

Project x into subspace spanned by v1,v2,··· ,vk. y1 = x ·v1,y2 = x·,v2,··· ,yk = x ·vk Projection: (y1,...,yk). Have: Arbitrary vector, random k-dimensional subspace. View As: Random vector, standard basis for k dimensions. Orthogonal U - rotates v1,...,vk onto e1,...,ek

slide-42
SLIDE 42

Projections.

Project x into subspace spanned by v1,v2,··· ,vk. y1 = x ·v1,y2 = x·,v2,··· ,yk = x ·vk Projection: (y1,...,yk). Have: Arbitrary vector, random k-dimensional subspace. View As: Random vector, standard basis for k dimensions. Orthogonal U - rotates v1,...,vk onto e1,...,ek yi

slide-43
SLIDE 43

Projections.

Project x into subspace spanned by v1,v2,··· ,vk. y1 = x ·v1,y2 = x·,v2,··· ,yk = x ·vk Projection: (y1,...,yk). Have: Arbitrary vector, random k-dimensional subspace. View As: Random vector, standard basis for k dimensions. Orthogonal U - rotates v1,...,vk onto e1,...,ek yi = vi|x

slide-44
SLIDE 44

Projections.

Project x into subspace spanned by v1,v2,··· ,vk. y1 = x ·v1,y2 = x·,v2,··· ,yk = x ·vk Projection: (y1,...,yk). Have: Arbitrary vector, random k-dimensional subspace. View As: Random vector, standard basis for k dimensions. Orthogonal U - rotates v1,...,vk onto e1,...,ek yi = vi|x = Uvi|Ux

slide-45
SLIDE 45

Projections.

Project x into subspace spanned by v1,v2,··· ,vk. y1 = x ·v1,y2 = x·,v2,··· ,yk = x ·vk Projection: (y1,...,yk). Have: Arbitrary vector, random k-dimensional subspace. View As: Random vector, standard basis for k dimensions. Orthogonal U - rotates v1,...,vk onto e1,...,ek yi = vi|x = Uvi|Ux = ei|Ux

slide-46
SLIDE 46

Projections.

Project x into subspace spanned by v1,v2,··· ,vk. y1 = x ·v1,y2 = x·,v2,··· ,yk = x ·vk Projection: (y1,...,yk). Have: Arbitrary vector, random k-dimensional subspace. View As: Random vector, standard basis for k dimensions. Orthogonal U - rotates v1,...,vk onto e1,...,ek yi = vi|x = Uvi|Ux = ei|Ux = ei|z

slide-47
SLIDE 47

Projections.

Project x into subspace spanned by v1,v2,··· ,vk. y1 = x ·v1,y2 = x·,v2,··· ,yk = x ·vk Projection: (y1,...,yk). Have: Arbitrary vector, random k-dimensional subspace. View As: Random vector, standard basis for k dimensions. Orthogonal U - rotates v1,...,vk onto e1,...,ek yi = vi|x = Uvi|Ux = ei|Ux = ei|z Inverse of U maps ei to random vector vi

slide-48
SLIDE 48

Projections.

Project x into subspace spanned by v1,v2,··· ,vk. y1 = x ·v1,y2 = x·,v2,··· ,yk = x ·vk Projection: (y1,...,yk). Have: Arbitrary vector, random k-dimensional subspace. View As: Random vector, standard basis for k dimensions. Orthogonal U - rotates v1,...,vk onto e1,...,ek yi = vi|x = Uvi|Ux = ei|Ux = ei|z Inverse of U maps ei to random vector vi

slide-49
SLIDE 49

Projections.

Project x into subspace spanned by v1,v2,··· ,vk. y1 = x ·v1,y2 = x·,v2,··· ,yk = x ·vk Projection: (y1,...,yk). Have: Arbitrary vector, random k-dimensional subspace. View As: Random vector, standard basis for k dimensions. Orthogonal U - rotates v1,...,vk onto e1,...,ek yi = vi|x = Uvi|Ux = ei|Ux = ei|z Inverse of U maps ei to random vector vi z = Ux is uniformly distributed on d sphere for unit x ∈ Rd.

slide-50
SLIDE 50

Projections.

Project x into subspace spanned by v1,v2,··· ,vk. y1 = x ·v1,y2 = x·,v2,··· ,yk = x ·vk Projection: (y1,...,yk). Have: Arbitrary vector, random k-dimensional subspace. View As: Random vector, standard basis for k dimensions. Orthogonal U - rotates v1,...,vk onto e1,...,ek yi = vi|x = Uvi|Ux = ei|Ux = ei|z Inverse of U maps ei to random vector vi z = Ux is uniformly distributed on d sphere for unit x ∈ Rd. yi is ith coordinate of random vector z.

slide-51
SLIDE 51

Expected value of yi.

Random projection: first k coordinates of random unit vector, zi.

slide-52
SLIDE 52

Expected value of yi.

Random projection: first k coordinates of random unit vector, zi. E[∑i∈[d] z2

i ] = 1.

slide-53
SLIDE 53

Expected value of yi.

Random projection: first k coordinates of random unit vector, zi. E[∑i∈[d] z2

i ] = 1. Linearity of Expectation.

slide-54
SLIDE 54

Expected value of yi.

Random projection: first k coordinates of random unit vector, zi. E[∑i∈[d] z2

i ] = 1. Linearity of Expectation.

By symmetry, each zi is identically distributed.

slide-55
SLIDE 55

Expected value of yi.

Random projection: first k coordinates of random unit vector, zi. E[∑i∈[d] z2

i ] = 1. Linearity of Expectation.

By symmetry, each zi is identically distributed. E[∑i∈[k] z2

i ] = k d .

slide-56
SLIDE 56

Expected value of yi.

Random projection: first k coordinates of random unit vector, zi. E[∑i∈[d] z2

i ] = 1. Linearity of Expectation.

By symmetry, each zi is identically distributed. E[∑i∈[k] z2

i ] = k d . Linearity of Expectation.

slide-57
SLIDE 57

Expected value of yi.

Random projection: first k coordinates of random unit vector, zi. E[∑i∈[d] z2

i ] = 1. Linearity of Expectation.

By symmetry, each zi is identically distributed. E[∑i∈[k] z2

i ] = k d . Linearity of Expectation.

Expected length is

  • k

d .

slide-58
SLIDE 58

Expected value of yi.

Random projection: first k coordinates of random unit vector, zi. E[∑i∈[d] z2

i ] = 1. Linearity of Expectation.

By symmetry, each zi is identically distributed. E[∑i∈[k] z2

i ] = k d . Linearity of Expectation.

Expected length is

  • k

d .

Johnson-Lindenstrass: close to expectation.

slide-59
SLIDE 59

Expected value of yi.

Random projection: first k coordinates of random unit vector, zi. E[∑i∈[d] z2

i ] = 1. Linearity of Expectation.

By symmetry, each zi is identically distributed. E[∑i∈[k] z2

i ] = k d . Linearity of Expectation.

Expected length is

  • k

d .

Johnson-Lindenstrass: close to expectation. k is large enough →

slide-60
SLIDE 60

Expected value of yi.

Random projection: first k coordinates of random unit vector, zi. E[∑i∈[d] z2

i ] = 1. Linearity of Expectation.

By symmetry, each zi is identically distributed. E[∑i∈[k] z2

i ] = k d . Linearity of Expectation.

Expected length is

  • k

d .

Johnson-Lindenstrass: close to expectation. k is large enough → ≈ (1±ε)

  • k

d with decent probability.

slide-61
SLIDE 61

Concentration Bounds.

z is uniformly random unit vector.

slide-62
SLIDE 62

Concentration Bounds.

z is uniformly random unit vector. Random point on the unit sphere. E[∑i∈[k] z2

i ] = k d .

slide-63
SLIDE 63

Concentration Bounds.

z is uniformly random unit vector. Random point on the unit sphere. E[∑i∈[k] z2

i ] = k d .

Claim: Pr[|z1| >

t √ d ] ≤ e−t2/2

slide-64
SLIDE 64

Concentration Bounds.

z is uniformly random unit vector. Random point on the unit sphere. E[∑i∈[k] z2

i ] = k d .

Claim: Pr[|z1| >

t √ d ] ≤ e−t2/2

Sphere view: surface “far” from equator defined by e1.

slide-65
SLIDE 65

Concentration Bounds.

z is uniformly random unit vector. Random point on the unit sphere. E[∑i∈[k] z2

i ] = k d .

Claim: Pr[|z1| >

t √ d ] ≤ e−t2/2

Sphere view: surface “far” from equator defined by e1. ∆

slide-66
SLIDE 66

Concentration Bounds.

z is uniformly random unit vector. Random point on the unit sphere. E[∑i∈[k] z2

i ] = k d .

Claim: Pr[|z1| >

t √ d ] ≤ e−t2/2

Sphere view: surface “far” from equator defined by e1. ∆ |z1| ≥ ∆ if

slide-67
SLIDE 67

Concentration Bounds.

z is uniformly random unit vector. Random point on the unit sphere. E[∑i∈[k] z2

i ] = k d .

Claim: Pr[|z1| >

t √ d ] ≤ e−t2/2

Sphere view: surface “far” from equator defined by e1. ∆ |z1| ≥ ∆ if z ≥ ∆ from equator of sphere.

slide-68
SLIDE 68

Concentration Bounds.

z is uniformly random unit vector. Random point on the unit sphere. E[∑i∈[k] z2

i ] = k d .

Claim: Pr[|z1| >

t √ d ] ≤ e−t2/2

Sphere view: surface “far” from equator defined by e1. ∆ |z1| ≥ ∆ if z ≥ ∆ from equator of sphere. Point on “∆-spherical cap”.

slide-69
SLIDE 69

Concentration Bounds.

z is uniformly random unit vector. Random point on the unit sphere. E[∑i∈[k] z2

i ] = k d .

Claim: Pr[|z1| >

t √ d ] ≤ e−t2/2

Sphere view: surface “far” from equator defined by e1. ∆ |z1| ≥ ∆ if z ≥ ∆ from equator of sphere. Point on “∆-spherical cap”. Area of caps

slide-70
SLIDE 70

Concentration Bounds.

z is uniformly random unit vector. Random point on the unit sphere. E[∑i∈[k] z2

i ] = k d .

Claim: Pr[|z1| >

t √ d ] ≤ e−t2/2

Sphere view: surface “far” from equator defined by e1. ∆ |z1| ≥ ∆ if z ≥ ∆ from equator of sphere. Point on “∆-spherical cap”. Area of caps ≤ S.A. of sphere of radius √ 1−∆2

slide-71
SLIDE 71

Concentration Bounds.

z is uniformly random unit vector. Random point on the unit sphere. E[∑i∈[k] z2

i ] = k d .

Claim: Pr[|z1| >

t √ d ] ≤ e−t2/2

Sphere view: surface “far” from equator defined by e1. ∆ |z1| ≥ ∆ if z ≥ ∆ from equator of sphere. Point on “∆-spherical cap”. Area of caps ≤ S.A. of sphere of radius √ 1−∆2 ∝ r d =

  • 1−∆2d/2
slide-72
SLIDE 72

Concentration Bounds.

z is uniformly random unit vector. Random point on the unit sphere. E[∑i∈[k] z2

i ] = k d .

Claim: Pr[|z1| >

t √ d ] ≤ e−t2/2

Sphere view: surface “far” from equator defined by e1. ∆ |z1| ≥ ∆ if z ≥ ∆ from equator of sphere. Point on “∆-spherical cap”. Area of caps ≤ S.A. of sphere of radius √ 1−∆2 ∝ r d =

  • 1−∆2d/2

  • 1− t2

d

d/2

slide-73
SLIDE 73

Concentration Bounds.

z is uniformly random unit vector. Random point on the unit sphere. E[∑i∈[k] z2

i ] = k d .

Claim: Pr[|z1| >

t √ d ] ≤ e−t2/2

Sphere view: surface “far” from equator defined by e1. ∆ |z1| ≥ ∆ if z ≥ ∆ from equator of sphere. Point on “∆-spherical cap”. Area of caps ≤ S.A. of sphere of radius √ 1−∆2 ∝ r d =

  • 1−∆2d/2

  • 1− t2

d

d/2 ≈ e

−t2 2

slide-74
SLIDE 74

Concentration Bounds.

z is uniformly random unit vector. Random point on the unit sphere. E[∑i∈[k] z2

i ] = k d .

Claim: Pr[|z1| >

t √ d ] ≤ e−t2/2

Sphere view: surface “far” from equator defined by e1. ∆ |z1| ≥ ∆ if z ≥ ∆ from equator of sphere. Point on “∆-spherical cap”. Area of caps ≤ S.A. of sphere of radius √ 1−∆2 ∝ r d =

  • 1−∆2d/2

  • 1− t2

d

d/2 ≈ e

−t2 2

Constant of ∝ is unit sphere area.

slide-75
SLIDE 75

Concentration Bounds.

z is uniformly random unit vector. Random point on the unit sphere. E[∑i∈[k] z2

i ] = k d .

Claim: Pr[|z1| >

t √ d ] ≤ e−t2/2

Sphere view: surface “far” from equator defined by e1. ∆ |z1| ≥ ∆ if z ≥ ∆ from equator of sphere. Point on “∆-spherical cap”. Area of caps ≤ S.A. of sphere of radius √ 1−∆2 ∝ r d =

  • 1−∆2d/2

  • 1− t2

d

d/2 ≈ e

−t2 2

Constant of ∝ is unit sphere area. Pr[any z2

i > (2logd)E[z2 i ]] is small.

slide-76
SLIDE 76

Many coordinates.

Argued Pr[any z2

i > (2logd)E[z2 i ]] is small.

slide-77
SLIDE 77

Many coordinates.

Argued Pr[any z2

i > (2logd)E[z2 i ]] is small.

Total Length?

slide-78
SLIDE 78

Many coordinates.

Argued Pr[any z2

i > (2logd)E[z2 i ]] is small.

Total Length? z =

  • z2

1 +z2 2 +···z2 k .

slide-79
SLIDE 79

Many coordinates.

Argued Pr[any z2

i > (2logd)E[z2 i ]] is small.

Total Length? z =

  • z2

1 +z2 2 +···z2 k .

Pr[

  • (z2

1 +z2 2 +···+z2 k )−

  • k

d

  • > t] ≤ e−t2d/2
slide-80
SLIDE 80

Many coordinates.

Argued Pr[any z2

i > (2logd)E[z2 i ]] is small.

Total Length? z =

  • z2

1 +z2 2 +···z2 k .

Pr[

  • (z2

1 +z2 2 +···+z2 k )−

  • k

d

  • > t] ≤ e−t2d/2

Substituting t = ε

  • k

d , k = c logn ε2 .

slide-81
SLIDE 81

Many coordinates.

Argued Pr[any z2

i > (2logd)E[z2 i ]] is small.

Total Length? z =

  • z2

1 +z2 2 +···z2 k .

Pr[

  • (z2

1 +z2 2 +···+z2 k )−

  • k

d

  • > t] ≤ e−t2d/2

Substituting t = ε

  • k

d , k = c logn ε2 .

Pr[

  • z2

1 +z2 2 +···+z2 k −

  • k

d

slide-82
SLIDE 82

Many coordinates.

Argued Pr[any z2

i > (2logd)E[z2 i ]] is small.

Total Length? z =

  • z2

1 +z2 2 +···z2 k .

Pr[

  • (z2

1 +z2 2 +···+z2 k )−

  • k

d

  • > t] ≤ e−t2d/2

Substituting t = ε

  • k

d , k = c logn ε2 .

Pr[

  • z2

1 +z2 2 +···+z2 k −

  • k

d

  • > ε
  • k

d ]

slide-83
SLIDE 83

Many coordinates.

Argued Pr[any z2

i > (2logd)E[z2 i ]] is small.

Total Length? z =

  • z2

1 +z2 2 +···z2 k .

Pr[

  • (z2

1 +z2 2 +···+z2 k )−

  • k

d

  • > t] ≤ e−t2d/2

Substituting t = ε

  • k

d , k = c logn ε2 .

Pr[

  • z2

1 +z2 2 +···+z2 k −

  • k

d

  • > ε
  • k

d ] ≤ e−ε2k

slide-84
SLIDE 84

Many coordinates.

Argued Pr[any z2

i > (2logd)E[z2 i ]] is small.

Total Length? z =

  • z2

1 +z2 2 +···z2 k .

Pr[

  • (z2

1 +z2 2 +···+z2 k )−

  • k

d

  • > t] ≤ e−t2d/2

Substituting t = ε

  • k

d , k = c logn ε2 .

Pr[

  • z2

1 +z2 2 +···+z2 k −

  • k

d

  • > ε
  • k

d ] ≤ e−ε2k = e−c logn = 1 nc

slide-85
SLIDE 85

Many coordinates.

Argued Pr[any z2

i > (2logd)E[z2 i ]] is small.

Total Length? z =

  • z2

1 +z2 2 +···z2 k .

Pr[

  • (z2

1 +z2 2 +···+z2 k )−

  • k

d

  • > t] ≤ e−t2d/2

Substituting t = ε

  • k

d , k = c logn ε2 .

Pr[

  • z2

1 +z2 2 +···+z2 k −

  • k

d

  • > ε
  • k

d ] ≤ e−ε2k = e−c logn = 1 nc

Johnson-Lindenstraus: For n points, x1,...,xn, all distances preserved to within 1±ε under

  • k

d -scaled projection above.

slide-86
SLIDE 86

Many coordinates.

Argued Pr[any z2

i > (2logd)E[z2 i ]] is small.

Total Length? z =

  • z2

1 +z2 2 +···z2 k .

Pr[

  • (z2

1 +z2 2 +···+z2 k )−

  • k

d

  • > t] ≤ e−t2d/2

Substituting t = ε

  • k

d , k = c logn ε2 .

Pr[

  • z2

1 +z2 2 +···+z2 k −

  • k

d

  • > ε
  • k

d ] ≤ e−ε2k = e−c logn = 1 nc

Johnson-Lindenstraus: For n points, x1,...,xn, all distances preserved to within 1±ε under

  • k

d -scaled projection above.

View one pair xi −xj as vector.

slide-87
SLIDE 87

Many coordinates.

Argued Pr[any z2

i > (2logd)E[z2 i ]] is small.

Total Length? z =

  • z2

1 +z2 2 +···z2 k .

Pr[

  • (z2

1 +z2 2 +···+z2 k )−

  • k

d

  • > t] ≤ e−t2d/2

Substituting t = ε

  • k

d , k = c logn ε2 .

Pr[

  • z2

1 +z2 2 +···+z2 k −

  • k

d

  • > ε
  • k

d ] ≤ e−ε2k = e−c logn = 1 nc

Johnson-Lindenstraus: For n points, x1,...,xn, all distances preserved to within 1±ε under

  • k

d -scaled projection above.

View one pair xi −xj as vector. Scale to unit.

slide-88
SLIDE 88

Many coordinates.

Argued Pr[any z2

i > (2logd)E[z2 i ]] is small.

Total Length? z =

  • z2

1 +z2 2 +···z2 k .

Pr[

  • (z2

1 +z2 2 +···+z2 k )−

  • k

d

  • > t] ≤ e−t2d/2

Substituting t = ε

  • k

d , k = c logn ε2 .

Pr[

  • z2

1 +z2 2 +···+z2 k −

  • k

d

  • > ε
  • k

d ] ≤ e−ε2k = e−c logn = 1 nc

Johnson-Lindenstraus: For n points, x1,...,xn, all distances preserved to within 1±ε under

  • k

d -scaled projection above.

View one pair xi −xj as vector. Scale to unit. Projection fails to preserve |xi −xj|

slide-89
SLIDE 89

Many coordinates.

Argued Pr[any z2

i > (2logd)E[z2 i ]] is small.

Total Length? z =

  • z2

1 +z2 2 +···z2 k .

Pr[

  • (z2

1 +z2 2 +···+z2 k )−

  • k

d

  • > t] ≤ e−t2d/2

Substituting t = ε

  • k

d , k = c logn ε2 .

Pr[

  • z2

1 +z2 2 +···+z2 k −

  • k

d

  • > ε
  • k

d ] ≤ e−ε2k = e−c logn = 1 nc

Johnson-Lindenstraus: For n points, x1,...,xn, all distances preserved to within 1±ε under

  • k

d -scaled projection above.

View one pair xi −xj as vector. Scale to unit. Projection fails to preserve |xi −xj| with probability ≤ 1

nc

slide-90
SLIDE 90

Many coordinates.

Argued Pr[any z2

i > (2logd)E[z2 i ]] is small.

Total Length? z =

  • z2

1 +z2 2 +···z2 k .

Pr[

  • (z2

1 +z2 2 +···+z2 k )−

  • k

d

  • > t] ≤ e−t2d/2

Substituting t = ε

  • k

d , k = c logn ε2 .

Pr[

  • z2

1 +z2 2 +···+z2 k −

  • k

d

  • > ε
  • k

d ] ≤ e−ε2k = e−c logn = 1 nc

Johnson-Lindenstraus: For n points, x1,...,xn, all distances preserved to within 1±ε under

  • k

d -scaled projection above.

View one pair xi −xj as vector. Scale to unit. Projection fails to preserve |xi −xj| with probability ≤ 1

nc

Scaled vector length also preserved.

slide-91
SLIDE 91

Many coordinates.

Argued Pr[any z2

i > (2logd)E[z2 i ]] is small.

Total Length? z =

  • z2

1 +z2 2 +···z2 k .

Pr[

  • (z2

1 +z2 2 +···+z2 k )−

  • k

d

  • > t] ≤ e−t2d/2

Substituting t = ε

  • k

d , k = c logn ε2 .

Pr[

  • z2

1 +z2 2 +···+z2 k −

  • k

d

  • > ε
  • k

d ] ≤ e−ε2k = e−c logn = 1 nc

Johnson-Lindenstraus: For n points, x1,...,xn, all distances preserved to within 1±ε under

  • k

d -scaled projection above.

View one pair xi −xj as vector. Scale to unit. Projection fails to preserve |xi −xj| with probability ≤ 1

nc

Scaled vector length also preserved. ≤ n2 pairs

slide-92
SLIDE 92

Many coordinates.

Argued Pr[any z2

i > (2logd)E[z2 i ]] is small.

Total Length? z =

  • z2

1 +z2 2 +···z2 k .

Pr[

  • (z2

1 +z2 2 +···+z2 k )−

  • k

d

  • > t] ≤ e−t2d/2

Substituting t = ε

  • k

d , k = c logn ε2 .

Pr[

  • z2

1 +z2 2 +···+z2 k −

  • k

d

  • > ε
  • k

d ] ≤ e−ε2k = e−c logn = 1 nc

Johnson-Lindenstraus: For n points, x1,...,xn, all distances preserved to within 1±ε under

  • k

d -scaled projection above.

View one pair xi −xj as vector. Scale to unit. Projection fails to preserve |xi −xj| with probability ≤ 1

nc

Scaled vector length also preserved. ≤ n2 pairs plus union bound

slide-93
SLIDE 93

Many coordinates.

Argued Pr[any z2

i > (2logd)E[z2 i ]] is small.

Total Length? z =

  • z2

1 +z2 2 +···z2 k .

Pr[

  • (z2

1 +z2 2 +···+z2 k )−

  • k

d

  • > t] ≤ e−t2d/2

Substituting t = ε

  • k

d , k = c logn ε2 .

Pr[

  • z2

1 +z2 2 +···+z2 k −

  • k

d

  • > ε
  • k

d ] ≤ e−ε2k = e−c logn = 1 nc

Johnson-Lindenstraus: For n points, x1,...,xn, all distances preserved to within 1±ε under

  • k

d -scaled projection above.

View one pair xi −xj as vector. Scale to unit. Projection fails to preserve |xi −xj| with probability ≤ 1

nc

Scaled vector length also preserved. ≤ n2 pairs plus union bound → prob any pair fails to be preserved with ≤

1 nc−2 .

slide-94
SLIDE 94

Locality Preserving Hashing

Find nearby points in high dimensional space.

slide-95
SLIDE 95

Locality Preserving Hashing

Find nearby points in high dimensional space. Points could be images!

slide-96
SLIDE 96

Locality Preserving Hashing

Find nearby points in high dimensional space. Points could be images! Hash function h(·) s.t. h(xi) = h(xj) if d(xi,xj) ≤ δ.

slide-97
SLIDE 97

Locality Preserving Hashing

Find nearby points in high dimensional space. Points could be images! Hash function h(·) s.t. h(xi) = h(xj) if d(xi,xj) ≤ δ. Low dimensions: grid cells give √ d-approximation.

slide-98
SLIDE 98

Locality Preserving Hashing

Find nearby points in high dimensional space. Points could be images! Hash function h(·) s.t. h(xi) = h(xj) if d(xi,xj) ≤ δ. Low dimensions: grid cells give √ d-approximation. Not quite a solution.

slide-99
SLIDE 99

Locality Preserving Hashing

Find nearby points in high dimensional space. Points could be images! Hash function h(·) s.t. h(xi) = h(xj) if d(xi,xj) ≤ δ. Low dimensions: grid cells give √ d-approximation. Not quite a solution. Why?

slide-100
SLIDE 100

Locality Preserving Hashing

Find nearby points in high dimensional space. Points could be images! Hash function h(·) s.t. h(xi) = h(xj) if d(xi,xj) ≤ δ. Low dimensions: grid cells give √ d-approximation. Not quite a solution. Why? Close to grid boundary.

slide-101
SLIDE 101

Locality Preserving Hashing

Find nearby points in high dimensional space. Points could be images! Hash function h(·) s.t. h(xi) = h(xj) if d(xi,xj) ≤ δ. Low dimensions: grid cells give √ d-approximation. Not quite a solution. Why? Close to grid boundary. Find close points to x:

slide-102
SLIDE 102

Locality Preserving Hashing

Find nearby points in high dimensional space. Points could be images! Hash function h(·) s.t. h(xi) = h(xj) if d(xi,xj) ≤ δ. Low dimensions: grid cells give √ d-approximation. Not quite a solution. Why? Close to grid boundary. Find close points to x: Check grid cell and neighboring grid cells.

slide-103
SLIDE 103

Locality Preserving Hashing

Find nearby points in high dimensional space. Points could be images! Hash function h(·) s.t. h(xi) = h(xj) if d(xi,xj) ≤ δ. Low dimensions: grid cells give √ d-approximation. Not quite a solution. Why? Close to grid boundary. Find close points to x: Check grid cell and neighboring grid cells.

slide-104
SLIDE 104

Locality Preserving Hashing

Find nearby points in high dimensional space. Points could be images! Hash function h(·) s.t. h(xi) = h(xj) if d(xi,xj) ≤ δ. Low dimensions: grid cells give √ d-approximation. Not quite a solution. Why? Close to grid boundary. Find close points to x: Check grid cell and neighboring grid cells. Project high dimensional points into low dimensions.

slide-105
SLIDE 105

Locality Preserving Hashing

Find nearby points in high dimensional space. Points could be images! Hash function h(·) s.t. h(xi) = h(xj) if d(xi,xj) ≤ δ. Low dimensions: grid cells give √ d-approximation. Not quite a solution. Why? Close to grid boundary. Find close points to x: Check grid cell and neighboring grid cells. Project high dimensional points into low dimensions. Use grid hash function.

slide-106
SLIDE 106

Implementing Johnson-Lindenstraus

Random vectors

slide-107
SLIDE 107

Implementing Johnson-Lindenstraus

Random vectors have many bits

slide-108
SLIDE 108

Implementing Johnson-Lindenstraus

Random vectors have many bits Use random bit vectors: {−1,+1}d instead.

slide-109
SLIDE 109

Implementing Johnson-Lindenstraus

Random vectors have many bits Use random bit vectors: {−1,+1}d instead. Almost orthogonal.

slide-110
SLIDE 110

Implementing Johnson-Lindenstraus

Random vectors have many bits Use random bit vectors: {−1,+1}d instead. Almost orthogonal. Project z.

slide-111
SLIDE 111

Implementing Johnson-Lindenstraus

Random vectors have many bits Use random bit vectors: {−1,+1}d instead. Almost orthogonal. Project z. Coordinate for bit vector b.

slide-112
SLIDE 112

Implementing Johnson-Lindenstraus

Random vectors have many bits Use random bit vectors: {−1,+1}d instead. Almost orthogonal. Project z. Coordinate for bit vector b. Cl =

1 √ d ∑i bizi

slide-113
SLIDE 113

Implementing Johnson-Lindenstraus

Random vectors have many bits Use random bit vectors: {−1,+1}d instead. Almost orthogonal. Project z. Coordinate for bit vector b. Cl =

1 √ d ∑i bizi

E[C2

l ] =

slide-114
SLIDE 114

Implementing Johnson-Lindenstraus

Random vectors have many bits Use random bit vectors: {−1,+1}d instead. Almost orthogonal. Project z. Coordinate for bit vector b. Cl =

1 √ d ∑i bizi

E[C2

l ] = E[ 1 d ∑i,j bibjzizj]

slide-115
SLIDE 115

Implementing Johnson-Lindenstraus

Random vectors have many bits Use random bit vectors: {−1,+1}d instead. Almost orthogonal. Project z. Coordinate for bit vector b. Cl =

1 √ d ∑i bizi

E[C2

l ] = E[ 1 d ∑i,j bibjzizj] = 1 d ∑i,j E[bibj]zizj = 1 d ∑i z2 i

slide-116
SLIDE 116

Implementing Johnson-Lindenstraus

Random vectors have many bits Use random bit vectors: {−1,+1}d instead. Almost orthogonal. Project z. Coordinate for bit vector b. Cl =

1 √ d ∑i bizi

E[C2

l ] = E[ 1 d ∑i,j bibjzizj] = 1 d ∑i,j E[bibj]zizj = 1 d ∑i z2 i = 1 d

slide-117
SLIDE 117

Implementing Johnson-Lindenstraus

Random vectors have many bits Use random bit vectors: {−1,+1}d instead. Almost orthogonal. Project z. Coordinate for bit vector b. Cl =

1 √ d ∑i bizi

E[C2

l ] = E[ 1 d ∑i,j bibjzizj] = 1 d ∑i,j E[bibj]zizj = 1 d ∑i z2 i = 1 d

slide-118
SLIDE 118

Implementing Johnson-Lindenstraus

Random vectors have many bits Use random bit vectors: {−1,+1}d instead. Almost orthogonal. Project z. Coordinate for bit vector b. Cl =

1 √ d ∑i bizi

E[C2

l ] = E[ 1 d ∑i,j bibjzizj] = 1 d ∑i,j E[bibj]zizj = 1 d ∑i z2 i = 1 d

E[∑l C2

l ] = k d

slide-119
SLIDE 119

Binary Johnson-Lindenstrass

Project onto [−1,+1] vectors.

slide-120
SLIDE 120

Binary Johnson-Lindenstrass

Project onto [−1,+1] vectors. E[C] = E[∑l C2

l ] = k d

slide-121
SLIDE 121

Binary Johnson-Lindenstrass

Project onto [−1,+1] vectors. E[C] = E[∑l C2

l ] = k d

Concentration?

slide-122
SLIDE 122

Binary Johnson-Lindenstrass

Project onto [−1,+1] vectors. E[C] = E[∑l C2

l ] = k d

Concentration? Pr

  • |C − k

d | ≥ ε k d

  • ≤ e−ε2k
slide-123
SLIDE 123

Binary Johnson-Lindenstrass

Project onto [−1,+1] vectors. E[C] = E[∑l C2

l ] = k d

Concentration? Pr

  • |C − k

d | ≥ ε k d

  • ≤ e−ε2k

Choose k = c logn

ε2 .

slide-124
SLIDE 124

Binary Johnson-Lindenstrass

Project onto [−1,+1] vectors. E[C] = E[∑l C2

l ] = k d

Concentration? Pr

  • |C − k

d | ≥ ε k d

  • ≤ e−ε2k

Choose k = c logn

ε2 .

→ failure probability ≤ 1/nc.

slide-125
SLIDE 125

Analysis Idea.

Pr

  • |C − k

d | ≥ ε k d

  • ≤ e−ε2k
slide-126
SLIDE 126

Analysis Idea.

Pr

  • |C − k

d | ≥ ε k d

  • ≤ e−ε2k

Variance of C2?

slide-127
SLIDE 127

Analysis Idea.

Pr

  • |C − k

d | ≥ ε k d

  • ≤ e−ε2k

Variance of C2? Recall Cl =

1 √ d ∑i bizi

slide-128
SLIDE 128

Analysis Idea.

Pr

  • |C − k

d | ≥ ε k d

  • ≤ e−ε2k

Variance of C2? Recall Cl =

1 √ d ∑i bizi

Var(C) ≤

  • k

d2

  • (∑i zi 4 +4∑i,j z2

i z2 j )

slide-129
SLIDE 129

Analysis Idea.

Pr

  • |C − k

d | ≥ ε k d

  • ≤ e−ε2k

Variance of C2? Recall Cl =

1 √ d ∑i bizi

Var(C) ≤

  • k

d2

  • (∑i zi 4 +4∑i,j z2

i z2 j ) ≤

  • k

d2

  • 2(∑i z2

i )2

slide-130
SLIDE 130

Analysis Idea.

Pr

  • |C − k

d | ≥ ε k d

  • ≤ e−ε2k

Variance of C2? Recall Cl =

1 √ d ∑i bizi

Var(C) ≤

  • k

d2

  • (∑i zi 4 +4∑i,j z2

i z2 j ) ≤

  • k

d2

  • 2(∑i z2

i )2 ≤ 2k d2 .

slide-131
SLIDE 131

Analysis Idea.

Pr

  • |C − k

d | ≥ ε k d

  • ≤ e−ε2k

Variance of C2? Recall Cl =

1 √ d ∑i bizi

Var(C) ≤

  • k

d2

  • (∑i zi 4 +4∑i,j z2

i z2 j ) ≤

  • k

d2

  • 2(∑i z2

i )2 ≤ 2k d2 .

Roughly normal (gaussian):

slide-132
SLIDE 132

Analysis Idea.

Pr

  • |C − k

d | ≥ ε k d

  • ≤ e−ε2k

Variance of C2? Recall Cl =

1 √ d ∑i bizi

Var(C) ≤

  • k

d2

  • (∑i zi 4 +4∑i,j z2

i z2 j ) ≤

  • k

d2

  • 2(∑i z2

i )2 ≤ 2k d2 .

Roughly normal (gaussian): Density ∝ e−t2/2 for t std deviations away.

slide-133
SLIDE 133

Analysis Idea.

Pr

  • |C − k

d | ≥ ε k d

  • ≤ e−ε2k

Variance of C2? Recall Cl =

1 √ d ∑i bizi

Var(C) ≤

  • k

d2

  • (∑i zi 4 +4∑i,j z2

i z2 j ) ≤

  • k

d2

  • 2(∑i z2

i )2 ≤ 2k d2 .

Roughly normal (gaussian): Density ∝ e−t2/2 for t std deviations away. So, assuming normality

slide-134
SLIDE 134

Analysis Idea.

Pr

  • |C − k

d | ≥ ε k d

  • ≤ e−ε2k

Variance of C2? Recall Cl =

1 √ d ∑i bizi

Var(C) ≤

  • k

d2

  • (∑i zi 4 +4∑i,j z2

i z2 j ) ≤

  • k

d2

  • 2(∑i z2

i )2 ≤ 2k d2 .

Roughly normal (gaussian): Density ∝ e−t2/2 for t std deviations away. So, assuming normality σ =

√ 2k d ,

slide-135
SLIDE 135

Analysis Idea.

Pr

  • |C − k

d | ≥ ε k d

  • ≤ e−ε2k

Variance of C2? Recall Cl =

1 √ d ∑i bizi

Var(C) ≤

  • k

d2

  • (∑i zi 4 +4∑i,j z2

i z2 j ) ≤

  • k

d2

  • 2(∑i z2

i )2 ≤ 2k d2 .

Roughly normal (gaussian): Density ∝ e−t2/2 for t std deviations away. So, assuming normality σ =

√ 2k d , t = ε k

d √ 2k d

slide-136
SLIDE 136

Analysis Idea.

Pr

  • |C − k

d | ≥ ε k d

  • ≤ e−ε2k

Variance of C2? Recall Cl =

1 √ d ∑i bizi

Var(C) ≤

  • k

d2

  • (∑i zi 4 +4∑i,j z2

i z2 j ) ≤

  • k

d2

  • 2(∑i z2

i )2 ≤ 2k d2 .

Roughly normal (gaussian): Density ∝ e−t2/2 for t std deviations away. So, assuming normality σ =

√ 2k d , t = ε k

d √ 2k d

= ε √ k/ √ 2.

slide-137
SLIDE 137

Analysis Idea.

Pr

  • |C − k

d | ≥ ε k d

  • ≤ e−ε2k

Variance of C2? Recall Cl =

1 √ d ∑i bizi

Var(C) ≤

  • k

d2

  • (∑i zi 4 +4∑i,j z2

i z2 j ) ≤

  • k

d2

  • 2(∑i z2

i )2 ≤ 2k d2 .

Roughly normal (gaussian): Density ∝ e−t2/2 for t std deviations away. So, assuming normality σ =

√ 2k d , t = ε k

d √ 2k d

= ε √ k/ √ 2. Probability of failure roughly ≤ e−t2/2

slide-138
SLIDE 138

Analysis Idea.

Pr

  • |C − k

d | ≥ ε k d

  • ≤ e−ε2k

Variance of C2? Recall Cl =

1 √ d ∑i bizi

Var(C) ≤

  • k

d2

  • (∑i zi 4 +4∑i,j z2

i z2 j ) ≤

  • k

d2

  • 2(∑i z2

i )2 ≤ 2k d2 .

Roughly normal (gaussian): Density ∝ e−t2/2 for t std deviations away. So, assuming normality σ =

√ 2k d , t = ε k

d √ 2k d

= ε √ k/ √ 2. Probability of failure roughly ≤ e−t2/2 → eε2k/4

slide-139
SLIDE 139

Analysis Idea.

Pr

  • |C − k

d | ≥ ε k d

  • ≤ e−ε2k

Variance of C2? Recall Cl =

1 √ d ∑i bizi

Var(C) ≤

  • k

d2

  • (∑i zi 4 +4∑i,j z2

i z2 j ) ≤

  • k

d2

  • 2(∑i z2

i )2 ≤ 2k d2 .

Roughly normal (gaussian): Density ∝ e−t2/2 for t std deviations away. So, assuming normality σ =

√ 2k d , t = ε k

d √ 2k d

= ε √ k/ √ 2. Probability of failure roughly ≤ e−t2/2 → eε2k/4 “Roughly normal.”

slide-140
SLIDE 140

Analysis Idea.

Pr

  • |C − k

d | ≥ ε k d

  • ≤ e−ε2k

Variance of C2? Recall Cl =

1 √ d ∑i bizi

Var(C) ≤

  • k

d2

  • (∑i zi 4 +4∑i,j z2

i z2 j ) ≤

  • k

d2

  • 2(∑i z2

i )2 ≤ 2k d2 .

Roughly normal (gaussian): Density ∝ e−t2/2 for t std deviations away. So, assuming normality σ =

√ 2k d , t = ε k

d √ 2k d

= ε √ k/ √ 2. Probability of failure roughly ≤ e−t2/2 → eε2k/4 “Roughly normal.” Chernoff, Berry-Esseen, Central Limit Theorems.

slide-141
SLIDE 141

Analysis Idea.

Pr

  • |C − k

d | ≥ ε k d

  • ≤ e−ε2k

Variance of C2? Recall Cl =

1 √ d ∑i bizi

Var(C) ≤

  • k

d2

  • (∑i zi 4 +4∑i,j z2

i z2 j ) ≤

  • k

d2

  • 2(∑i z2

i )2 ≤ 2k d2 .

Roughly normal (gaussian): Density ∝ e−t2/2 for t std deviations away. So, assuming normality σ =

√ 2k d , t = ε k

d √ 2k d

= ε √ k/ √ 2. Probability of failure roughly ≤ e−t2/2 → eε2k/4 “Roughly normal.” Chernoff, Berry-Esseen, Central Limit Theorems.

slide-142
SLIDE 142

Summary

Cuckoo hashing.

slide-143
SLIDE 143

Summary

Cuckoo hashing. Two hash functions.

slide-144
SLIDE 144

Summary

Cuckoo hashing. Two hash functions. Few cycles in random sparse graph.

slide-145
SLIDE 145

Summary

Cuckoo hashing. Two hash functions. Few cycles in random sparse graph. Chaining works!

slide-146
SLIDE 146

Summary

Cuckoo hashing. Two hash functions. Few cycles in random sparse graph. Chaining works! Johnson-Lindenstrass.

slide-147
SLIDE 147

Summary

Cuckoo hashing. Two hash functions. Few cycles in random sparse graph. Chaining works! Johnson-Lindenstrass. O(logn) dimensions give good approximation of distances.