Algorithm Design: A Methodological Approach - 150 problems and detailed solutions

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

A best-seller in its French edition, the construction of this book is original and its success in the French market demonstrates its appeal. It is based on three principles: 1. An organization of the chapters by families of algorithms : exhaustive search, divide and conquer, etc. At the contrary, there is no chapter only devoted to a systematic exposure of, say, algorithms on strings. Some of these will be found in different chapters. 2. For each family of algorithms, an introduction is given to the mathematical principles and the issues of a rigorous design, with one or two pedagogical examples. 3. For its most part, the book details 150 problems, spanning on seven families of algorithms. For each problem, a precise and progressive statement is given. More important, a complete solution is detailed, with respect to the design principles that have been presented ; often, some classical errors are pointed at. Roughly speaking, two thirds of the book are devoted to the detailed rational construction of the solutions.

Author(s): Patrick Bosc, Marc Guyomard, Laurent Miclet
Edition: 1
Publisher: Chapman and Hall/CRC
Year: 2023

Language: English
Pages: 822
City: Boca Raton
Tags: Algorithm Design; Algorithm Design Methodologies; Exhaustive Search; Divide; Conquer; Algorithm Complexity; Invariants; Diminish; Resolve; Recursion; Greedy Algorithms; Dynamic Programming

Cover
Half Title
Title Page
Copyright Page
Contents
Preface
1. Mathematics and computer science: some useful notions
1.1. Reasoning and proving
1.1.1. Propositional and predicate calculus
1.1.2. Proof by contradiction
1.1.3. Proof by induction with one index
1.1.3.1. Proof by simple induction
1.1.3.2. Proof by partial induction
1.1.3.3. Proof by strong induction
1.1.4. Partition induction
1.1.5. Foundation of the proof by induction
1.1.6. Proof by induction with several indexes
1.2. Recurrence relations
1.2.1. Generalities, examples and closed forms
1.2.2. Establishing and computing a recurrence relation
1.2.2.1. Principles
1.2.2.2. Some examples
1.2.2.3. Designing the algorithm associated with a recurrence
1.3. Recurrence, induction, recursion, etc.
1.4. Sets
1.4.1. Basic notations
1.4.2. Definition of sets
1.4.3. Operations on sets
1.4.4. Special sets
1.4.5. Relations, functions and arrays
1.4.5.1. Relations
1.4.5.2. Functions
1.4.5.3. Arrays
1.4.6. Bags
1.4.7. Cartesian product and inductive structures
1.4.8. Strings and sequences
1.5. Graphs
1.5.1. Directed graphs
1.5.2. Undirected graphs
1.5.3. Weighted graphs
1.6. Trees
1.7. Priority queues
1.7.1. Definition
1.7.2. Implementations
1.8. FIFO and LIFO queues
1.9. Problems
1.10. Solutions
2. Complexity of an algorithm
2.1. Reminders
2.1.1. Algorithm
2.1.2. Algorithmics, complexity of an algorithm
2.1.3. Minimum and maximum complexity of an algorithm
2.1.4. Orders of growth
2.1.5. Some examples of complexity
2.1.6. About elementary operations
2.1.7. Practical computing time
2.1.8. Pseudo-polynomial problems
2.2. Problems
2.3. Solutions
3. Specification, invariants, and iteration
3.1. Principle for the construction of loops by invariant
3.2. An introductory example: the Euclidian division
3.3. Useful techniques
3.3.1. Sequential composition
3.3.2. Predicate strengthening and weakening
3.3.3. Strengthening by the introduction of programming variables
3.4. Heuristics for the discovery of invariants
3.4.1. Breakup of the postcondition
3.4.2. Hypothesis of the work carried out partly
3.4.3. Strengthening the invariant
3.5. About bounded linear search
3.5.1. An example
3.5.2. Special case and related pattern
3.6. Some key points to develop a loop
3.7. Problems
3.8. Solutions
4. Reduce and conquer, recursion
4.1. A few reminders about recursion
4.2. Recurrence relation and recursion
4.3. “Reduce and conquer” and its complexity
4.3.1. Presentation
4.3.2. Example 1: the spiral pattern
4.3.3. Example 2: Hanoi towers
4.4. What should be reminded for “Reduce and conquer”
4.5. Problems
4.6. Solutions
5. Generate and test
5.1. Fundamentals
5.1.1. Principle
5.1.2. Functions and related frames
5.1.2.1. Total functions
5.1.2.2. The case of partial functions
5.1.3. Patterns for “Generate and test”
5.1.3.1. Patterns derived from “AllSolutions”
5.1.3.2. Patterns derived from “OptimalSolution”
5.1.3.3. Patterns derived from “OneSolution”
5.1.3.4. Conclusion
5.2. An example: the optimal partition of an array
5.2.1. The basic problem
5.2.2. The initial problem with a strengthened precondition and a strengthened postcondition
5.2.3. The initial problem with a strengthened precondition
5.3. What should be remembered from “Generate and test”
5.4. Exercises
5.5. Solutions
6. Branch and bound
6.1. Introduction
6.1.1. Branch and bound: the principle
6.1.1.1. The separation phase
6.1.1.2. The selection phase
6.1.1.3. The evaluation phase
6.1.2. The generic “Branch and bound” algorithm
6.1.2.1. The priority queue
6.1.2.2. Construction of the generic “Branch and bound” algorithm
6.1.2.3. The generic “Branch and bound” algorithm itself
6.1.3. An interesting special case for the functions f∗ and f
6.1.4. An example: the traveling salesman
6.1.4.1. Initial choices
6.1.4.2. The algorithm
6.1.4.3. First case study: the zero heuristic function
6.1.4.4. Second case study: uniform cost
6.2. What should be remembered about the “Branch and bound” approach
6.3. Problems
6.4. Solutions
7. Greedy algorithms
7.1. Introduction
7.1.1. Presentation
7.1.2. Proving that a greedy algorithm is exact or optimal
7.1.3. An example: task scheduling on a photocopier
7.1.4. The “lead run” method
7.1.5. Proof a posteriori: the transformation technique
7.2. What to remember about greedy methods
7.3. Problems
7.4. Solutions
8. Divide and conquer
8.1. Introduction
8.1.1. Presentation and principle
8.1.2. An example: merge-sort
8.1.3. General pattern for “Divide and conquer”
8.1.4. A typology of “Divide and conquer” algorithms
8.1.5. Complexity of “Divide and conquer”
8.1.5.1. Introduction to the master theorem
8.1.5.2. Other types of recurrence equations
8.1.6. About the size of the problem
8.2. What to remember about the DaC approach
8.3. Problems
8.4. Solutions
9. Dynamic programming
9.1. Overview
9.2. An example: the longest sub-sequence common to two sequences
9.3. What should be remembered to apply dynamic programming
9.4. Problems
9.4.1. Cutting and sharing: one-dimensional problems
9.4.2. Cutting and sharing: two-dimensional problems
9.4.3. Graphs and trees
9.4.4. Sequences
9.4.4.1. Definitions
9.4.4.2. The problem
9.4.5. Images
9.4.6. Games
9.4.7. Pseudo-polynomial problems
9.5. Solutions
Notations
List of problems
Bibliography
Index