Algorithmic puzzles are puzzles involving well-defined procedures for solving problems. This book will provide an enjoyable and accessible introduction to algorithmic puzzles that will develop the reader's algorithmic thinking. The first part of this book is a tutorial on algorithm design strategies and analysis techniques. Algorithm design strategies - exhaustive search, backtracking, divide-and-conquer and a few others - are general approaches to designing step-by-step instructions for solving problems. Analysis techniques are methods for investigating such procedures to answer questions about the ultimate result of the procedure or how many steps are executed before the procedure stops. The discussion is an elementary level, with puzzle examples, and requires neither programming nor mathematics beyond a secondary school level. Thus, the tutorial provides a gentle and entertaining introduction to main ideas in high-level algorithmic problem solving. The second and main part of the book contains 150 puzzles, from centuries-old classics to newcomers often asked during job interviews at computing, engineering, and financial companies.
The puzzles are divided into three groups by their difficulty levels. The first fifty puzzles in the Easier Puzzles section require only middle school mathematics. The sixty puzzle of average difficulty and forty harder puzzles require just high school mathematics plus a few topics such as binary numbers and simple recurrences, which are reviewed in the tutorial. All the puzzles are provided with hints, detailed solutions, and brief comments. The comments deal with the puzzle origins and design or analysis techniques used in the solution. The book should be of interest to puzzle lovers, students and teachers of algorithm courses, and persons expecting to be given puzzles during job interviews.
Anany Levitin is a professor of Computing Sciences at Villanova University. He is the author of a popular textbook on design and analysis of algorithms, which has been translated into Chinese, Greek, Korean, and Russian. He has also published papers on mathematical optimization theory, software engineering, data management, algorithm design techniques, and computer science education. Maria Levitin is an independent consultant specializing in web applications and data compression. She has previously worked for several leading software companies.
Preface ; List of Puzzles ; Tutorial Puzzles ; Main Section Puzzles ; 1. Tutorials ; General Strategies for Algorithm Design ; Analysis Techniques ; 2. Puzzles ; Easier Puzzles (#1 - #50) ; Medium Dic culty Puzzles (51 - 110) ; Harder Puzzles (#111 - 150) ; 3. Hints ; 4. Solutions ; References ; Design Strategy and Analysis Index ; Index of Terms and Names