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.

Skepticism is<br />

healthy only to<br />

a limited extent.<br />

Being skeptical<br />

about proofs and<br />

programs (particularly<br />

your own) will<br />

probably keep your<br />

grades healthy and<br />

your job fairly secure.<br />

But applying<br />

that much skepticism<br />

will probably<br />

also keep you shut<br />

away working all<br />

the time, instead<br />

of letting you get<br />

out <strong>for</strong> exercise and<br />

relaxation.<br />

Too much skepticism<br />

is an open invitation<br />

to the state<br />

of rigor mortis,<br />

where you become<br />

so worried about<br />

being correct and<br />

rigorous that you<br />

never get anything<br />

finished. -A skeptic<br />

(This observation<br />

was made by R. J.<br />

McEliece when he<br />

was an undergrad.)<br />

3.2 FLOOR/CEILING APPLICATIONS 71<br />

Incidentally, when we’re faced with a “prove or disprove,” we’re usually<br />

better off trying first to disprove with a counterexample, <strong>for</strong> two reasons:<br />

A disproof is potentially easier (we need just one counterexample); and nitpicking<br />

arouses our creative juices. Even if the given assertion is true, our<br />

search <strong>for</strong> a counterexample often leads us to a proof, as soon as we see why<br />

a counterexample is impossible. Besides, it’s healthy to be skeptical.<br />

If we try to prove that [m] = L&J with the help of calculus, we might<br />

start by decomposing x into its integer and fractional parts [xJ + {x} = n + 0<br />

and then expanding the square root using the binomial theorem: (n+(3)‘/’ =<br />

n’/2 + n-‘/2(j/2 _ &/2@/g + . . . . But this approach gets pretty messy.<br />

It’s much easier to use the tools we’ve developed. Here’s a possible strategy:<br />

Somehow strip off the outer floor and square root of [ml, then remove<br />

the inner floor, then add back the outer stuff to get Lfi]. OK. We let<br />

m=llmj and invoke (3.5(a)), giving m 6 m < m + 1. That removes<br />

the outer floor bracket without losing any in<strong>for</strong>mation. Squaring, since all<br />

three expressions are nonnegative, we have m2 6 Lx] < (m + 1)‘. That gets<br />

rid of the square root. Next we remove the floor, using (3.7(d)) <strong>for</strong> the left<br />

inequality and (3.7(a)) <strong>for</strong> the right: m2 6 x < (m + 1)2. It’s now a simple<br />

matter to retrace our steps, taking square roots to get m 6 fi < m + 1 and<br />

invoking (3.5(a)) to get m = [J;;]. Thus \m] = m = l&J; the assertion<br />

is true. Similarly, we can prove that<br />

[ml=<br />

[J;;] ,<br />

real x 3 0.<br />

The proof we just found doesn’t rely heavily on the properties of square<br />

roots. A closer look shows that we can generalize the ideas and prove much<br />

more: Let f(x) be any continuous, monotonically increasing function with the<br />

property that<br />

f(x) = integer ===3 x = integer.<br />

(The symbol ‘==+I means “implies!‘) Then we have<br />

lf(x)J = lf(lxJ 11 and If(x)1 = Tf(Txl)l, (3.10)<br />

whenever f(x), f(lxJ), and f( [xl) are defined. Let’s prove this general property<br />

<strong>for</strong> ceilings, since we did floors earlier and since the proof <strong>for</strong> floors is<br />

almost the same. If x = [xl, there’s nothing to prove. Otherwise x < [xl,<br />

and f(x) < f ( [xl ) since f is increasing. Hence [f (x)1 6 [f ( [xl )I, since 11 is<br />

nondecreasing. If [f(x)] < [f( [xl)], there must be a number y such that<br />

x 6~ < [xl and f(y) = Tf(x)l, since f is continuous. This y is an integer, because<br />

of f's special property. But there cannot be an integer strictly between<br />

x and [xl. This contradiction implies that we must have [f (x)1 = If ( [xl )I.

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

Saved successfully!

Ooh no, something went wrong!