11.07.2015 Views

Data Structures and Algorithm Analysis - Computer Science at ...

Data Structures and Algorithm Analysis - Computer Science at ...

Data Structures and Algorithm Analysis - Computer Science at ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

46 Chap. 2 M<strong>at</strong>hem<strong>at</strong>ical PreliminariesSee “Technically Speaking” from the February 1995 issue of IEEE Spectrum[Sel95] for a discussion on the st<strong>and</strong>ard for indic<strong>at</strong>ing units of computer storageused in this book.Introduction to <strong>Algorithm</strong>s by Udi Manber [Man89] makes extensive use ofm<strong>at</strong>hem<strong>at</strong>ical induction as a technique for developing algorithms.For more inform<strong>at</strong>ion on recursion, see Thinking Recursively by Eric S. Roberts[Rob86]. To learn recursion properly, it is worth your while to learn the programminglanguages LISP or Scheme, even if you never intend to write a program ineither language. In particular, Friedman <strong>and</strong> Felleisen’s “Little” books (includingThe Little LISPer[FF89] <strong>and</strong> The Little Schemer[FFBS95]) are designed to teachyou how to think recursively as well as teach you the language. These books areentertaining reading as well.A good book on writing m<strong>at</strong>hem<strong>at</strong>ical proofs is Daniel Solow’s How to Read<strong>and</strong> Do Proofs [Sol09]. To improve your general m<strong>at</strong>hem<strong>at</strong>ical problem-solvingabilities, see The Art <strong>and</strong> Craft of Problem Solving by Paul Zeitz [Zei07]. Zeitzalso discusses the three proof techniques presented in Section 2.6, <strong>and</strong> the roles ofinvestig<strong>at</strong>ion <strong>and</strong> argument in problem solving.For more about estim<strong>at</strong>ion techniques, see two Programming Pearls by JohnLouis Bentley entitled The Back of the Envelope <strong>and</strong> The Envelope is Back [Ben84,Ben00, Ben86, Ben88]. Genius: The Life <strong>and</strong> <strong>Science</strong> of Richard Feynman byJames Gleick [Gle92] gives insight into how important back of the envelope calcul<strong>at</strong>ionwas to the developers of the <strong>at</strong>omic bomb, <strong>and</strong> to modern theoretical physicsin general.2.9 Exercises2.1 For each rel<strong>at</strong>ion below, explain why the rel<strong>at</strong>ion does or does not s<strong>at</strong>isfyeach of the properties reflexive, symmetric, antisymmetric, <strong>and</strong> transitive.(a) “isBrotherOf” on the set of people.(b) “isF<strong>at</strong>herOf” on the set of people.(c) The rel<strong>at</strong>ion R = {〈x, y〉 | x 2 + y 2 = 1} for real numbers x <strong>and</strong> y.(d) The rel<strong>at</strong>ion R = {〈x, y〉 | x 2 = y 2 } for real numbers x <strong>and</strong> y.(e) The rel<strong>at</strong>ion R = {〈x, y〉 | x mod y = 0} for x, y ∈ {1, 2, 3, 4}.(f) The empty rel<strong>at</strong>ion ∅ (i.e., the rel<strong>at</strong>ion with no ordered pairs for whichit is true) on the set of integers.(g) The empty rel<strong>at</strong>ion ∅ (i.e., the rel<strong>at</strong>ion with no ordered pairs for whichit is true) on the empty set.2.2 For each of the following rel<strong>at</strong>ions, either prove th<strong>at</strong> it is an equivalencerel<strong>at</strong>ion or prove th<strong>at</strong> it is not an equivalence rel<strong>at</strong>ion.(a) For integers a <strong>and</strong> b, a ≡ b if <strong>and</strong> only if a + b is even.(b) For integers a <strong>and</strong> b, a ≡ b if <strong>and</strong> only if a + b is odd.

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

Saved successfully!

Ooh no, something went wrong!