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.

3 EXERCISES 99<br />

39 Prove that the double sum &k~‘og,x &j 1.<br />

40 The spiral function o(n), indicated in the diagram below, maps a nonnegative<br />

integer n onto an ordered pair of integers (x(n), y (n)). For<br />

example, it maps n = 9 onto the ordered pair (1,2).<br />

tY 4<br />

a Prove that if m = [J;;I,<br />

x(n) = (-l)“((n-m(m+l)).[[ZfiJ iseven] + [irnl),<br />

and find a similar <strong>for</strong>mula <strong>for</strong> y(n). Hint: Classify the spiral into<br />

segments Wk, Sk, Ek, Nk according as [2fij = 4k - 2, 4k - 1, 4k,<br />

4k+ 1.<br />

b Prove that, conversely, we can determine n from o(n) by a <strong>for</strong>mula<br />

of the <strong>for</strong>m<br />

Bonus problems<br />

n = WI2 f (2k+x(n) +y(n)) , k = m=(lx(n)l,lv(n)l).<br />

Give a rule <strong>for</strong> when the sign is + and when the sign is -.<br />

41 Let f and g be increasing functions such that the sets {f (1)) f (2), . . . } and<br />

{g (1) , g (2)) . . } partition the positive integers. Suppose that f and g are<br />

related by the condition g(n) = f(f(n)) + 1 <strong>for</strong> all n > 0. Prove that<br />

f(n) = [n@J and g(n) = ln@‘J, where @ = (1 + &)/2.<br />

42 Do there exist real numbers a, (3, and y such that Spec(a), Spec( (3), and<br />

Spec(y) together partition the set of positive integers?

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

Saved successfully!

Ooh no, something went wrong!