ebook img

Discrete Algorithmic Mathematics PDF

793 Pages·2005·148.85 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Discrete Algorithmic Mathematics

.-- ISCRETE LGORITHMIC ATHEMATICS Stephen B Ma1urer Anthony Ralston ( ) List of Algorithms This table lists all the numbered algorithms in the book. All algorithms displayed in boxes in the text are numbered, as well as the more important algorithrns displayed in boxes in the problems. In addition, there are numerous algorithm fragn1ents both in the text and in the problems. The fragrr1ents and unnumbered algorithms illustrate some point and are generally not important algorithms in themselves. Number Name Output or Purpose Page 1.1 Po,verA Computes integer powers of a number 74 1.2 PowerB Speed-up of 1.1 for some powers 75 1.3 Po,verC Speed-up of 1.1 75 1.4 PrimeNum First K prime numbers 77 1.5 FiberNet Minimum cost links in a network 80 1.6 Euclid Greatest common divisor (gcd) of two integers 84,123,170 1.7 Euclidl Possibly faster variant of 1.6 87 1.8 Euclid-RecFunc Recursive function version of 1.6 96,163 1.9 Euclid-RecPro Recursive procedure version of 1.6 97,165 1.10 Hanoi Towers of Hanoi 101 1.11 StringProc Process a string of characters 109 1.12 MaxNumber Maximum of n numbers 119,587 1.13 SeqS earch Sequential search of a list 125 1.14 BinSearch Binary search of a list 127, 172 1.15 Euclid2 Possibly faster variant of 1.6 132 2.1 Hanoi Slight rewrite of 1.10 160 2.2 TOH Variant recursive procedure for Hanoi 166 2.3 EuclidRound-Func Possibly faster variant of 1.8 167 2.4 EuclidRound-Pro Possibly faster variant of 1.9 167 2.5 Euclid-Round Up Possibly faster variant of 1.6 167 2.6 Iterative-TOH Non-recursive Towers of Hanoi 179 2.7 Sum-Search Find if one number is the sum of some others 213 2.8 EuclidZ Version of 1.6 that also \Vorks for negative integers 214 3.1 BuildTree Binary tree of a list of words 223 3.2 Warshall Path matrix of a graph 244 3.3 Pathgrow Grows a path in a graph 255 3.4 Ecycle An Eulerian cycle in a graph 256 Number Name Output or Purpose Page 3.5 HamPath A Hamiltonian path in a complete graph 261 3.6 Dijkstra Shortest path in a weighted graph 272 3.7 BreadthFirstSearch Breadth first search of a connected graph 279 3.8 PathLength Lengths of all paths from a given vertex 281 3.9 DepthFirstSearch Depth first search of a connected graph 282 3.10 Bipartite Determine if a graph is 2-colorable 288 3.11 K-Colorable A proper coloring of a graph 291 3.13 Color-by-Vertices Variant of 3.11 294 3.13 One-Color-at-a-Time Different approach to coloring a graph 294 3.14 Span'I'ree Spanning tree of a graph 297 3.15 MinSpanTree Minimurn weight spanning tree of a graph 299 3.16 Binary'I'reeTraversal Three ways of traversing a binary tree 306 3.17 Ford Shortest path in a ,veighted graph 314 4.1 PermV alue The permutation number P(n , r) 343 4.2 PermValue2 The permutation number P(n , r) 347 4.3 Permute-1 Randorn permutation of (n] 388, 590 4.4 Permute-2 Random permutation of (n] 390,592 4.5 Permute-3 Randorn permutation of (n] 391 4.6 AllPerm All permutations of [n] 394 4.7 Monotonic Longest monotonic subsequence 402 5.1 Straightfor,vard Polynomial evaluation 463 5.2 Horner Faster polynomial evaluation 464 5.3 FibA Fibonacci numbers 466 5.4 FibB Fibonacci numbers by recursion 466 5.5 Po,verPoly Polynomial evaluation 475 6.1 BigNext Two largest of n numbers 593 7.1 Mult Integer multi plication 615 7.2 Insertion Insertion sort of a list 678 E.l StringAlign-R.ec Optimal alignment of DNA strings 697 E.2 StringAlign Iterative Optimal Alignment 699 E.3 StringAlign2 Variant of E. 2 704 E.4 ProjectSched Minin1um completion time 709 • 1 s c r e e This page intentionally left blank • 1 s c r e e • • or1 I C I a ICS Third Edition Stephen B Maurer Swarthmore College Anthony Ralston State University of New York at Buffalo AK Peters, Ltd. Wellesley, Massachusetts CRC Press Taylor & Francis Group 6000 Broken Sound Parkway NW, Suite 300 Boca Raton, FL 33487-2742 © 2005 by Taylor & Francis Group, LLC CRC Press is an imprint of Taylor & Francis Group, an Inform a business No claim to original U.S. Government works Version Date: 20130204 International Standard Book Number-13: 978-1-4398-6375-6 (eBook - PDF) This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been made to pub lish reliable data and information, but the author and publisher cannot assun1e responsibility for the validity of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained. If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint. Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers. For permission to photocopy or use material electronically from this work, please access www.copyright.com (http://www.copy right.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a variety of users. For organizations that have been granted a photocopy license by the CCC, a separate system of payment has been arranged. Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe. Visit the Taylor & Francis Web site at http:// www.taylorandfrancis.com and the CRC Press Web site at http://www.crcpress.com Contents List of Algorithn1s inside front cover . Instructor's Preface lX . Student's Preface XIV Chapter Sumrnaries XVll Pathways Through the Book xx .. Problem Difficulty Rating XXll Symbols, Notation, Abbreviations arid Conventions XXlll PROLOGUE • What Is Discrete Algorithmic Mathematics? l • CHAPTER 0 Mathematical Preliminaries 9 0.1 Sets, Relations, and Functions 9 0.2 Some Important Functions 20 0.3 Growth Rates and Order Notation 30 0.4 Sumrnation and ProdU1ct Notation 40 0.5 Matrix Algebra 50 0.6 The Language and Methods of Reasoning 56 Supplementary Problems 69 CHAPTER l • Algorithms 73 l .1 Some Examples of Algorithms 73 l .2 Aspects of AL 88 1.3 Recursive Algorithms 94 l .4 Algorith1nic Language: Procedures and Functions 105 l .5 The Analysis of Algorithrns 117 Supplementary Problems 131 • CHAPTER2 Mathematical Induction 135 2.1 Introduction 135 2.2 First Exa1nples 137 V vi Contents 2.3 Strong Induction and Other Variants 151 2.4 Ir1duction and Recursive Algorithms 158 2.5 Ir1duction and Iterative Algorithms 168 2.6 How to Conjecture What to Prove 180 2.7 Inductive Defir1itions 194 2.8 Faulty Inductions 201 Supplementary Problems 210 CHAPTERJ • Graphs and Trees 217 3.1 Examples and Terminology 217 3.2 Paths, Cycles and the Adjacency Matrix 236 3.3 Eulerian and Hamiltonian Paths and Cycles 250 3.4 Shortest Paths 266 3.5 Breadth First Search and Depth First Search 278 3.6 Coloring Problems 285 3.7 Trees 296 Supplementary Problems 311 CHAPTER 4 • Fundamental Counting Methods 321 4.1 Introduction 321 4.2 First Exa1nples: The Sum and Product Rules 322 4.3 Subtler Examples and Further Rules 329 4.4 Permutations and Combinations 341 4.5 Cornbinatorial Identities and Combinatorial Arguments 348 4.6 The Binomial Theorem 355 4.7 Four Comn1on Problems with Balls and Urns 365 4.8 Generating Functions 375 4.9 Combinatorial Algorithms 385 4.10 Algorith1nic Pigeonholes 399 Supplementary Problems 406 CHAPTER 5 • Difference Equations 411 5.1 Introduction 411 5.2 Modeling with Difference Equations 413 5.3 Getting Inforrnation frorn Difference Equations 426 5.4 Terminology and a Fundamental Theorem 433 5.5 Constant Coefficient Homogeneous Linear Difference Equations 439 5.6 Qualitative Analysis 451 5.7 Nonhomogeneous Difference Equations 457 5.8 Applications to Algorithms 462 Contents vii 5.9 Variable Coefficients, Surns, and Recent Advances in Computer Algebra 479 5.10 Nonlinear Difference Equations 484 5. 11 Finite Differences 495 Supplementary Problems 508 CHAPTER 6 • Probability 513 6.1 Introduction 513 6.2 Probability Space 517 6.3 Conditional Probability, l11dependence, and Bayes' Theorem 527 6.4 Random Variables and Distributions 539 6.5 Expected Value 557 6.6 Variance 569 6. 7 Statistical Esti1nation 577 6.8 Applications to Algorithms: Proofs of Prior Claims 586 6.9 Recursive Methods in Probability 595 Supplementary Proble1ns 606 • CHAPTER 7 An Introduction to Mathematical Logic 611 7.1 Introduction and Terminology 611 7.2 The Propositional Calculus 616 7.3 Validity and Tautology 630 7 .4 Algorithm Verification 637 7.5 Boolean Algebra 643 7.6 The Predicate Calculus 663 7.7 Algorithm Verification Using the Predicate Calculus 676 7.8 Theorems and Proofs 682 Supplementary Proble1ns 689 EPILOGUE • Coming Full Circle with Biology and Minimax Theorems 691 E. l DNA Matching 691 E.2 Algorithmic lVIathematics and Minimax Theorems 707 Final Pro ble ms 717 References 723 Appendix: Limits 729 Hints and Answers 733 Index 761

Description:
Thoroughly revised for a one-semester course, this well-known and highly regarded book is an outstanding text for undergraduate discrete mathematics. It has been updated with new or extended discussions of order notation, generating functions, chaos, aspects of statistics, and computational biology.
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.