Algorithms are at the heart of every nontrivial computer application, and algorithmics is a modern and active area of computer science. Every computer scientist and every professional programmer should know about the basic algorithmic toolbox: structures that allow efficient organization and retrieval of data, frequently used algorithms, and basic techniques for modeling, understanding and solving algorithmic problems. This book is a concise introduction addressed to students and professionals familiar with programming and basic mathematical language. Individual chapters cover arrays and linked lists, hash tables and associative arrays, sorting and selection, priority queues, sorted sequences, graph representation, graph traversal, shortest paths, minimum spanning trees, and optimization. The algorithms are presented in a modern way, with explicitly formulated invariants, and comment on recent trends such as algorithm engineering, memory hierarchies, algorithm libraries and certifying algorithms. The authors use pictures, words and high-level pseudocode to explain the algorithms, and then they present more detail on efficient implementations using real programming languages like C++ and Java. The authors have extensive experience teaching these subjects to undergraduates and graduates, and they offer a clear presentation, with examples, pictures, informal explanations, exercises, and some linkage to the real world. Most chapters have the same basic structure: a motivation for the problem, comments on the most important applications, and then simple solutions presented as informally as possible and as formally as necessary. For the more advanced issues, this approach leads to a more mathematical treatment, including some theorems and proofs. Finally, each chapter concludes with a section on further findings, providing views on the state of research, generalizations and advanced solutions. Appetizer: Integer Arithmetics Addition Multiplication: The School Method Result Checking A Recursive version of the School Method Karatsuba Multiplication Algorithm Engineering The Programs Proofs of Lemma 1.5 and Theorem 1.7 Implementation Notes Historical Notes and Further Findings Introduction Asymptotic Notation The Machine Model Pseudocode Designing Correct Algorithms and Programs An Example - Binary Search Basic Algorithm Analysis Average-Case Analysis Randomized Algorithms Graphs P and NP Implementation Notes Historical Notes and Further Findings Representing Sequences by Arrays and Linked Lists Linked Lists Unbounded Arrays *Amortized Analysis Stacks and Queues Lists Versus Arrays Implementation Notes Historical Notes and Further Findings Hash Tables and Associative Arrays Hashing and Chaining Universal Hashing Hashing with Linear Probing Chaining Versus Linear Probing *Perfect Hashing Implementation Notes Historical Notes and Further Findings Sorting and Selection Simple Sorters Mergesort - an O(n log n) Sorting Algorithm A Lower Bound Quicksort Selection Breaking the Lower Bound *External Sorting Implementation Notes Historical Notes and Further Findings Priority Queues Binary Heaps Addressable Priority Queues *External Memory Implementation Notes Historical Notes and Further Findings Sorted Sequences Binary Search Trees (a, b)-Trees and Red-Black Trees More Operations Amortized Analysis of Update Operations Augmented Search Trees Implementation Notes Historical Notes and Further Findings Graph Representation Unordered Edge Sequences Adjacency Arrays - Static Graphs Adjacency Lists - Dynamic Graphs The Adjacency Matrix Representation Implicit Representations Implementation Notes Historical Notes and Further Findings Graph Traversal Breadth-First Search Depth-First Search Implementation Notes Historical Notes and Further Findings Shortest Paths From Basic Concepts to a Generic Algorithm Directed Acyclic Graphs Nonnegative Edge Costs (Dijkstra's Algorithm) *Average-Case Analysis of Dijkstra's Algorithm Monotone Integer Priority Queues Arbitrary Edge Costs (Bellman-Ford Algorithm) All-Pairs Shortest Paths and Node Potentials Shortest-Path Queries Implementation Notes Historical Notes and Further Findings Minimum Spanning Trees Cut and Cycle Properties The Jarnik-Prim Algorithm Kruskal's Algorithm The Union-Find Data Structure *External Memory Applications Implementation Notes Historical Notes and Further Findings Generic Approaches to Optimization Linear Programming - a Black-Box Solver Greedy Algorithms - Never Look Back Dynamic Programming - Building It Piece by Piece Systematic Search - When in Doubt, Use Brute Force Local Search - Think Globally, Act Locally Evolutionary Algorithms Implementation Notes Historical Notes and Further Findings Appendix Mathematical Symbols Mathematical Concepts Basic Probability Theory Useful Formulae References Index