Algorithms specify the way computers process information and how they execute tasks. Many recent technological innovations and achievements rely on algorithmic ideas – they facilitate new applications in science, medicine, production, logistics, traffic, communication and entertainment. Efficient algorithms not only enable your personal computer to execute the newest generation of games with features unimaginable only a few years ago, they are also key to several recent scientific breakthroughs – for example, the sequencing of the human genome would not have been possible without the invention of new algorithmic ideas that speed up computations by several orders of magnitude. The greatest improvements in the area of algorithms rely on beautiful ideas for tackling computational tasks more efficiently. The problems solved are not restricted to arithmetic tasks in a narrow sense but often relate to exciting questions of nonmathematical flavor, such as: How can I find the exit out of amaze? How can I partition a treasure map so that the treasure can only be found if all parts of the map are recombined? How should I plan my trip to minimize cost? Solving these challenging problems requires logical reasoning, geometric and combinatorial imagination, and, last but not least, creativity – the skills needed for the design and analysis of algorithms. In this book we present some of the most beautiful algorithmic ideas in 41 articles written in colloquial, nontechnical language. Most of the articles arose out of an initiative among German-language universities to communicate the fascination of algorithms and computer science to high-school students. The book can be understood without any prior knowledge of algorithms and computing, and it will be an enlightening and fun read for students and interested adults.
Зміст
Part I – Searching and Sorting.- Overview.- 1 Binary Search.- 2 Insertion Sort.- 3 Fast Sorting Algorithms.- 4 Parallel Sorting – The Need for Speed.- 5 Topological Sorting – How Should I Begin to Complete My To Do List?.- 6 Searching Texts – But Fast! The Boyer—Moore—Horspool Algorithm.- 7 Depth-First Search (Ariadne & Co.).- 8 Pledge’s Algorithm – How to Escape from a Dark Maze.- 9 Cycles in Graphs.- 10 Page Rank – What Is Really Relevant in the World-Wide Web?.- Part II – Arithmetic and Encryption.- Overview.- 11 Multiplication of Long Integers – Faster than Long Multiplication.- 12 The Euclidean Algorithm.- 13 The Sieve of Eratosthenes – How Fast Can We Compute a Prime Number Table?.- 14 One-Way Functions – Mind the Trap – Escape Only for the Initiated.- 15 The One-Time Pad Algorithm – The Simplest and Most Secure Way to Keep Secrets.- 16 Public-Key Cryptography.- 17 How to Share a Secret.- 18 Playing Poker by Email.- 19 Fingerprinting.- 20 Hashing.- 21 Codes – Protecting Data Against Errors and Loss.- Part III – Planning, Coordination and Simulation.- Overview.- 22 Broadcasting – How Can I Quickly Disseminate Information?.- 23 Coverting Numbers into English Words.- 24 Majority – Who Gets Elected Class Rep?.- 25 Random Numbers – How Can We Create Randomness in Computers?.- 26 Winning Strategies for a Matchstick Game.- 27 Scheduling of Tournaments or Sports Leagues.- 28 Eulerian Circuits.- 29 High-Speed Circles.- 30 Gauß—Seidel Iterative Method for the Computation of Physical Problems.- 31 Dynamic Programming – Evolutionary Distance.- Part IV – Optimisation.- Overview.- 32 Shortest Paths.- 33 Minimum Spanning Trees – Sometimes Greed Pays Off.- 34 Maximum Flows – Towards the Stadium During Rush Hour.- 35 Marriage Broker.- 36 The Smallest Enclosing Circle – A Contribution to Democracy from Switzerland?.- 37 Online Algorithms – What Is It Worth to Know the Future?.- 38 Bin Packing – How Do I Get My Stuff into the Boxes.- 39 The Knapsack Problem.- 40 The Travelling Salesman Problem.- 41 Simulated Annealing.