09.12.2012 Views

Concrete mathematics : a foundation for computer science

Concrete mathematics : a foundation for computer science

Concrete mathematics : a foundation for computer science

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

488 ANSWERS TO EXERCISES<br />

2.2 This is lx]. Incidentally, the quantity ([x > 0] - [x < 01) is often called<br />

sign(x) or Signum(x); it is +1 when x > 0, 0 when x = 0, and -1 when x < 0.<br />

2.3 The first sum is, of course, a0 + al + a2 + a3 + a4 + as; the second is<br />

a4+al+ao+al+a4,becausethesumisoverthevalueskEj-2,-1,0,+1,+2}.<br />

The commutative law doesn’t hold here because the function p(k) = k2 is not<br />

a permutation. Some values of n (e.g., n = 3) have no k such that p(k) = n;<br />

others (e.g., n = 4) have two such k.<br />

2.4 (a) E:=I E;=i+J Et=j+l aijk = IE:f=j xfzi+, ~“,++I aijk = ((al23 +<br />

a1241 + a134) + a234.<br />

( b ) x”,==, x:i,’ x/l; aijk = x”,=3 x?i ~~~~ aijk = Cl123 -k (Cl124 +<br />

(a134 + a234)).<br />

2.5 The same index ‘k’ is being used <strong>for</strong> two different index variables, although<br />

k is bound in the inner sum. This is a famous mistake in <strong>mathematics</strong><br />

(and <strong>computer</strong> programming). The result turns out to be correct if oj = ok<br />

<strong>for</strong>alljandk, l 0. Then<br />

R(n) = A(n)ol+ B(n)0 + C(n)y + D(n)S. Setting R,, = 1 yields A(n) = 1.<br />

Setting R, = (-1)” yields A(n) +2B(n) = (-l)n. Setting R, = (-1)“n<br />

yields -B(n)+ZC(n) = (-1)“n. Setting R, = (-l)“n2 yields B(n)-ZC(n)+<br />

2D(n) = (-l)“n2. There<strong>for</strong>e 2D(n) = (-l)“(n2+n); the stated sum is D(n).<br />

2.14 The suggested rewrite is legitimate since we have k = ~,~i~k 1 when<br />

1 < k < n. Sum first on k; the multiple sum reduces to<br />

t (2n+’ - 2j) = nln+’ - (2”+1 - 2) .<br />

l

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

Saved successfully!

Ooh no, something went wrong!