Book description
In this substantive yet accessible book, pioneering software designer Alexander Stepanov and his colleague Daniel Rose illuminate the principles of generic programming and the mathematical concept of abstraction on which it is based, helping you write code that is both simpler and more powerful.
If you’re a reasonably proficient programmer who can think logically, you have all the background you’ll need. Stepanov and Rose introduce the relevant abstract algebra and number theory with exceptional clarity. They carefully explain the problems mathematicians first needed to solve, and then show how these mathematical solutions translate to generic programming and the creation of more effective and elegant code. To demonstrate the crucial role these mathematical principles play in many modern applications, the authors show how to use these results and generalized algorithms to implement a realworld publickey cryptosystem.
As you read this book, you’ll master the thought processes necessary for effective programming and learn how to generalize narrowly conceived algorithms to widen their usefulness without losing efficiency. You’ll also gain deep insight into the value of mathematics to programming—insight that will prove invaluable no matter what programming languages and paradigms you use.
You will learn about
How to generalize a four thousandyearold algorithm, demonstrating indispensable lessons about clarity and efficiency
Ancient paradoxes, beautiful theorems, and the productive tension between continuous and discrete
A simple algorithm for finding greatest common divisor (GCD) and modern abstractions that build on it
Powerful mathematical approaches to abstraction
How abstract algebra provides the idea at the heart of generic programming
Axioms, proofs, theories, and models: using mathematical techniques to organize knowledge about your algorithms and data structures
Surprising subtleties of simple programming tasks and what you can learn from them
How practical implementations can exploit theoretical knowledge
Table of contents
 About This eBook
 Title Page
 Copyright Page
 Contents
 Acknowledgments
 About the Authors
 Authors’ Note
 1. What This Book Is About
 2. The First Algorithm
 3. Ancient Greek Number Theory
 4. Euclid’s Algorithm
 5. The Emergence of Modern Number Theory
 6. Abstraction in Mathematics
 7. Deriving a Generic Algorithm

8. More Algebraic Structures
 8.1 Stevin, Polynomials, and GCD
 8.2 Göttingen and German Mathematics
 8.3 Noether and the Birth of Abstract Algebra
 8.4 Rings
 8.5 Matrix Multiplication and Semirings
 8.6 Application: Social Networks and Shortest Paths
 8.7 Euclidean Domains
 8.8 Fields and Other Algebraic Structures
 8.9 Thoughts on the Chapter
 9. Organizing Mathematical Knowledge
 10. Fundamental Programming Concepts
 11. Permutation Algorithms
 12. Extensions of GCD
 13. A RealWorld Application
 14. Conclusions
 Further Reading
 Appendix A. Notation
 Appendix B. Common Proof Techniques

Appendix C. C++ for NonC++ Programmers
 C.1 Template Functions
 C.2 Concepts
 C.3 Declaration Syntax and Typed Constants
 C.4 Function Objects
 C.5 Preconditions, Postconditions, and Assertions
 C.6 STL Algorithms and Data Structures
 C.7 Iterators and Ranges
 C.8 Type Aliases and Type Functions with using in C++11
 C.9 Initializer Lists in C++11
 C.10 Lambda Functions in C++11
 C.11 A Note about inline
 Bibliography
 Index
 Photo Credits
 Code Snippets
Product information
 Title: From Mathematics to Generic Programming
 Author(s):
 Release date: November 2014
 Publisher(s): AddisonWesley Professional
 ISBN: 9780133491791
You might also like
book
Codeless Data Structures and Algorithms : Learn DSA Without Writing a Single Line of Code
In the era of selftaught developers and programmers, essential topics in the industry are frequently learned …
book
AWS Certified Solutions Architect Official Study Guide
Validate your AWS skills. This is your opportunity to take the next step in your career …
book
Software Engineering at Google
Today, software engineers need to know not only how to program effectively but also how to …
book
Graph Algorithms
Learn how graph algorithms can help you leverage relationships within your data to develop intelligent solutions …