创造稳定的软件需要有效的算法,但是程序设计者们很少能在问题出现之前就想到。《算法技术手册》描述了现有的可以解决多种问题的算法,并且能够帮助你根据需求选择并实现正确的算法——只需要一定的数学知识即可理解并分析算法执行。相对于理论来说,本书更注重实际运用,书中提供了多种程序语言中可用的有效代码解决方案,可轻而易举地适合一个特定的项目。有了这本书,你可以:
解决特定编码问题或改进现有解决方案的执行;
迅速确定与需要解决的问题相关的算法,并判定为什么这样的算法是正确的;
探索C、C++、Java、Ruby中的算法解决方案,伴有实现诀窍;
了解一个算法预期的执行情况及的执行条件;
发现不同算法中相似设计产生的冲突;
学习先进的数据结构以改进算法效率。
有了《算法技术手册》,你可以学习如何改进算法的性能,这是软件应用成功的关键。
"作者汲取了大量鲜为人知的文献资料,这本不可或缺的指南巩固了理论与实际操作的平衡。通过它来理解算法变得更加轻松容易。"
——Matthew Russell.高级技术总监,Digital Reasoning System;《Doj0:The Definitive Guide》的作者(O'Reilly)
作者简介:
George T.Heineman,Gary Pollice和Stanley Selkow均为 Woree ste r PolYteChniC In stitute(伍斯特理工学院)计算机科学系的教授。George是《Component—B ased Software Engineering:Putting the Pieces Together》(Addison—Wesley(的合编者,Gary则是《Head First Object-Oriented Analysis and Design》(O'Reilly)的合著者。
Preface
Part 1
1. Algorithms Matter
Understand the Problem
Experiment if Necessary
Algorithms to the Rescue
Side Story
The Moral of the Story
References
2. The Mathematics of Algorithms
Size of a Problem Instance
Rate of Growth of Functions
Analysis in the Best, Average, and Worst Cases.
Performance Families
Mix of Operations
Benchmark Operatxons
One Final Point
References
3. Patterns and Domains
Patterns: A Communication Language
Algorithm Pattern Format
Pseudocode Pattern Format
Design Format
Empirical Evaluation Format
Domains and Algorithms
Floating-Point Computations
Manual Memory Allocation
Choosing a Programming Language
References
Part 2
4. Sorting Algorithms
Overview
Insertion Sort
Median Sort
Quicksort
Selection Sort
Heap Sort
Counting Sort
Bucket Sort
Criteria for Choosing a Sorting Algorithm
References
5. Searching
Overview
Sequential Search
Binary Search
Hash-based Search
Binary Tree Search
6. GraphAIgorithms
Overview
Depth-First Search
Breadth-First Search
Single-Source Shortest Path
All Pairs Shortest Path
Minimum Spanning Tree Algorithms
References
7. Path Finding in AI
Overview
Depth-First Search
Breadth-First Search
A'Search
Comparison
Minimax
NegMax
AlphaBeta
References
8. Network Flow Algorithms
Overview
Maximum Flow
Bipartite Matching
Reflections on Augmenting Paths
Minimum Cost Flow
Transshipment
Transportation
Assignment
Linear Programming
References
9. Computational Geometry
Overview
Convex Hull Scan
LineSweep
Nearest Neighbor Queries
Range Queries
References
Part 3
10. When All Else Fails
Variations on a Theme
Approximation Algorithms
Offline Algorithms
Parallel Algorithms
Randomized Algorithms
Algorithms That Can Be Wrong, but with Diminishing Probability References
11. Epilogue
Overview
Principle: Know Your Data
Principle: Decompose the Problem into Smaller Problems
Principle: Choose the Right Data Structure
Principle: Add Storage to Increase Performance
Principle: If No Solution Is Evident, Construct a Search
Principle: If No Solution Is Evident, Reduce Your Problem to
Another Problem That Has a Solution
Principle: Writing Algorithms Is Hard--Testing Algorithms Is Harder
Part 4
Appendix: Benchmarking
Index