Math for Programming : Learn the Math, Write Better Code

by Ronald T. Kneusel

Programming

Book Details

Book Title

Math for Programming : Learn the Math, Write Better Code

Author

Ronald T. Kneusel

Publisher

No Starch Press, Inc

Publication Date

2025

ISBN

9781718503595

Number of Pages

617

Language

English

Format

PDF

File Size

5.3MB

Subject

Mathematics

Table of Contents

  • About the Author
  • About the Technical Reviewer
  • Contents in Detail
  • Foreword
  • Acknowledgments
  • Introduction
  • 1. Computers and Numbers
  • Numbers and Number Bases
  • How Computers Represent Numbers
  • What You Need to Know About Floating-Point Arithmetic
  • Summary
  • 2. Sets and Abstract Algebra
  • Concerning Sets
  • The Laws of Set Theory
  • Experimenting with Number Sets in Python
  • Abstract Algebra and Groups
  • Cantor: To Infinity and Beyond
  • Computable and Uncomputable Numbers
  • Uncomputable Python
  • Summary
  • 3. Boolean Algebra
  • Definition and Laws
  • Boolean Algebra Leads to Digital Logic
  • Boolean Functions
  • Canonical Normal Forms
  • Karnaugh Maps
  • Algebraic Simplification of Boolean Expressions
  • Digital Circuits
  • Summary
  • 4. Functions and Relations
  • Functions
  • Binary Relations
  • Equivalence Relations and Classes
  • Partial Orderings
  • Summary
  • 5. Induction
  • Weak Induction
  • Strong Induction
  • Cautionary Tales
  • Proving with Loop Invariants
  • Summary
  • 6. Recurrence and Recursion
  • Recurrence Relations
  • Nonlinear Recurrence Relations
  • Solving Recurrence Relations
  • Recursion
  • Summary
  • 7. Number Theory
  • Primes
  • Divisibility
  • Modular Arithmetic
  • Diophantine Equations
  • Integer Sequences
  • Summary
  • 8. Counting and Combinatorics
  • The Principles of Counting
  • An Example: Hats in the Park
  • Sum and Product Rules
  • Inclusion-Exclusion
  • The Pigeonhole Principle
  • Permutations and Combinations
  • The Binomial Theorem
  • Summary
  • 9. Graphs
  • Basic Graph Concepts
  • Representing Graphs in Code
  • Breadth-First and Depth-First Traversal and Searching
  • The Shortest Path Between Nodes
  • Directed Acyclic Graphs and Topological Sort
  • Summary
  • 10. Trees
  • Defining Trees
  • Spanning Trees
  • Rooted and Ordered Trees
  • Binary Trees
  • Binary Tree Traversals and Searches
  • Binary Trees in Code
  • The Animals Game
  • Summary
  • 11. Probability
  • Events and Random Variables
  • The Rules of Probability
  • Joint and Marginal Probabilities
  • Probability Distributions
  • The Central Limit Theorem and the Law of Large Numbers
  • Bayes’ Theorem
  • Summary
  • 12. Statistics
  • Types of Data
  • Summary Statistics
  • Quantiles and Box Plots
  • Correlation
  • A Cautionary Tale: Anscombe’s Quartet
  • Hypothesis Testing
  • Confidence Intervals
  • Summary
  • 13. Linear Algebra
  • Vectors and Vector Spaces
  • Vector Space Concepts
  • Matrices
  • Solving Systems of Linear Equations
  • Square Matrices
  • Linear Transformations
  • Eigenvalues and Eigenvectors
  • Summary
  • 14. Differential Calculus
  • Derivatives
  • Minima and Maxima of Functions
  • Partial Derivatives
  • Derivatives in Code
  • Optimization with Gradient Descent
  • Summary
  • 15. Integral Calculus
  • Curves and Areas
  • Indefinite Integrals
  • Definite Integrals
  • Summary
  • 16. Differential Equations
  • Ordinary Differential Equations
  • Solving ODEs Numerically
  • Worked Examples
  • Summary
  • Final Words
  • Index