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.

Multiplication is modulo an irreducible polynomial. Thus<br />

(x 7 + x 5 + x)(x 6 + x 5 + x 4 ) = x 13 + x 12 + x 11 + x 11 + x 10 + x 9 + x 7 + x 6 + x 5<br />

= x 13 + x 12 + x 10 + x 9 + x 7 + x 6 + x 5<br />

= x 6 + x 4 + x 3 + x 2 mod x 8 + x 4 + x 3 + x + 1<br />

Division <strong>of</strong> x 13 + x 12 + x 10 + x 9 + x 7 + x 6 + x 5 by x 6 + x 4 + x 3 + x 2 is illustrated below.<br />

x 13 +x 12 +x 10 +x 9 +x 7 +x 6 +x 5<br />

−x 5 (x 8 + x 4 + x 3 + x 2 + 1) = x 13 +x 9 +x 8 +x 6 +x 5<br />

x 12 +x 10 +x 8 +x 7<br />

−x 4 (x 8 + x 4 + x 3 + x 2 + 1) = x 12 +x 8 +x 7 +x 5 +x 4<br />

x 10 +x 5 x 4<br />

−x 2 (x 8 + x 4 + x 3 + x 2 + 1) = x 10 x 6 +x 5 x 3 x 2<br />

12.9.3 Hash Functions<br />

Universal Hash Families<br />

ADD PARAGRAPH ON MOTIVATION integrate material with Chapter<br />

Let M = {1, 2, . . . , m} and N = {1, 2, . . . , n} where m ≥ n. A family <strong>of</strong> hash functions<br />

H = {h|h : M → N} is said to be 2-universal if for all x and y, x ≠ y, and for h chosen<br />

uniformly at random from H,<br />

x 6 +x 4 +x 3 +x 2<br />

P rob [h (x) = h (y)] ≤ 1 n<br />

Note that if H is the set <strong>of</strong> all possible mappings from M to N, then H is 2-universal. In<br />

fact P rob [h (x) = h (y)] = 1 . The difficulty in letting H consist <strong>of</strong> all possible functions<br />

n<br />

is that a random h from H has no short representation. What we want is a small set H<br />

where each h ∈ H has a short representation and is easy to compute.<br />

Note that for a 2-universal H, for any two elements x and y, h(x) and h(y) behave as<br />

independent random variables. For a random f and any set X the set {f (x) |x ∈ X} is<br />

a set <strong>of</strong> independent random variables.<br />

12.9.4 Application <strong>of</strong> Mean Value Theorem<br />

The mean value theorem states that if f(x) is continuous and differentiable on the<br />

interval [a, b], then there exists c, a ≤ c ≤ b such that f ′ (c) = f(b)−f(a) . That is, at some<br />

b−a<br />

point between a and b the derivative <strong>of</strong> f equals the slope <strong>of</strong> the line from f(a) to f(b).<br />

See Figure 12.9.4.<br />

424

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

Saved successfully!

Ooh no, something went wrong!