Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Data Structures and Algorithm Analysis Edition 3.2 (Java Version) a comprehensive treatment focusing on the creation of efficient data structures and algorithms, this text explains how to select or design the data structure best suited to specific problems. It uses Java as the programming language and is suitable for second-year data structure courses and computer science courses in algorithmic analysis. | Data Structures and Algorithm Analysis Edition 3.2 (Java Version) Clifford A. Shaffer Department of Computer Science Virginia Tech Blacksburg, VA 24061 January 2, 2012 Update 3.2.0.3 For a list of changes, see http://people.cs.vt.edu/˜shaffer/Book/errata.html Copyright © 2009-2012 by Clifford A. Shaffer. This document is made freely available in PDF form for educational and other non-commercial use. You may make copies of this file and redistribute in electronic form without charge. You may extract portions of this document provided that the front page, including the title, author, and this notice are included. Any commercial use of this document requires the written consent of the author. The author can be reached at shaffer@cs.vt.edu. If you wish to have a printed version of this document, print copies are published by Dover Publications (see http://store.doverpublications.com/0486485811.html). Further information about this text is available at http://people.cs.vt.edu/˜shaffer/Book/. Contents Preface xiii I 1 Preliminaries Data Structures and Algorithms 1.1 A Philosophy of Data Structures 1.1.1 The Need for Data Structures 1.1.2 Costs and Benefits 1.2 Abstract Data Types and Data Structures 1.3 Design Patterns 1.3.1 Flyweight 1.3.2 Visitor 1.3.3 Composite 1.3.4 Strategy 1.4 Problems, Algorithms, and Programs 1.5 Further Reading 1.6 Exercises Mathematical Preliminaries 2.1 Sets and Relations 2.2 Miscellaneous Notation 2.3 Logarithms 2.4 Summations and Recurrences 2.5 Recursion 2.6 Mathematical Proof Techniques 1 3 4 4 6 8 12 13 13 14 15 16 18 20 23 23 27 29 30 34 36 iii 2 iv 2.6.1 Direct Proof 2.6.2 Proof by Contradiction 2.6.3 Proof by Mathematical Induction Estimation Further Reading Exercises Contents 2.7 2.8 2.9 3 37 37 38 44 45 46 53 53 59 60 63 63 65 66 67 68 69 74 75 77 78 80 83 84 85 89 Algorithm Analysis 3.1 Introduction 3.2 Best, Worst, and Average Cases 3.3 A Faster Computer, or a Faster Algorithm? 3.4 Asymptotic Analysis 3.4.1 Upper Bounds 3.4.2 Lower