Book description
A practical guide simplifying discrete math for curious minds and demonstrating its application in solving problems related to software development, computer algorithms, and data science
Key Features
- Apply the math of countable objects to practical problems in computer science
- Explore modern Python libraries such as scikit-learn, NumPy, and SciPy for performing mathematics
- Learn complex statistical and mathematical concepts with the help of hands-on examples and expert guidance
Book Description
Discrete mathematics deals with studying countable, distinct elements, and its principles are widely used in building algorithms for computer science and data science. The knowledge of discrete math concepts will help you understand the algorithms, binary, and general mathematics that sit at the core of data-driven tasks.
Practical Discrete Mathematics is a comprehensive introduction for those who are new to the mathematics of countable objects. This book will help you get up to speed with using discrete math principles to take your computer science skills to a more advanced level.
As you learn the language of discrete mathematics, you'll also cover methods crucial to studying and describing computer science and machine learning objects and algorithms. The chapters that follow will guide you through how memory and CPUs work. In addition to this, you'll understand how to analyze data for useful patterns, before finally exploring how to apply math concepts in network routing, web searching, and data science.
By the end of this book, you'll have a deeper understanding of discrete math and its applications in computer science, and be ready to work on real-world algorithm development and machine learning.
What you will learn
- Understand the terminology and methods in discrete math and their usage in algorithms and data problems
- Use Boolean algebra in formal logic and elementary control structures
- Implement combinatorics to measure computational complexity and manage memory allocation
- Use random variables, calculate descriptive statistics, and find average-case computational complexity
- Solve graph problems involved in routing, pathfinding, and graph searches, such as depth-first search
- Perform ML tasks such as data visualization, regression, and dimensionality reduction
Who this book is for
This book is for computer scientists looking to expand their knowledge of discrete math, the core topic of their field. University students looking to get hands-on with computer science, mathematics, statistics, engineering, or related disciplines will also find this book useful. Basic Python programming skills and knowledge of elementary real-number algebra are required to get started with this book.
Table of contents
- Practical Discrete Mathematics
- Why subscribe?
- Contributors
- About the authors
- About the reviewer
- Packt is searching for authors like you
- Preface
- Part I – Basic Concepts of Discrete Math
-
Chapter 1: Key Concepts, Notation, Set Theory, Relations, and Functions
- What is discrete mathematics?
-
Elementary set theory
- Definition–Sets and set notation
- Definition: Elements of sets
- Definition: The empty set
- Example: Some examples of sets
- Definition: Subsets and supersets
- Definition: Set-builder notation
- Example: Using set-builder notation
- Definition: Basic set operations
- Definition: Disjoint sets
- Example: Even and odd numbers
- Theorem: De Morgan's laws
- Example: De Morgan's Law
- Definition: Cardinality
- Example: Cardinality
- Functions and relations
- Summary
- Chapter 2: Formal Logic and Constructing Mathematical Proofs
- Chapter 3: Computing with Base-n Numbers
-
Chapter 4: Combinatorics Using SciPy
- The fundamental counting rule
-
Counting permutations and combinations of objects
- Definition – permutation
- Example – permutations of a simple set
- Theorem – permutations of a set
- Example – playlists
- Growth of factorials
- Theorem – k-permutations of a set
- Definition – combination
- Example – combinations versus permutation for a simple set
- Theorem – combinations of a set
- Binomial coefficients
- Example – teambuilding
- Example – combinations of balls
- Applications to memory allocation
- Efficacy of brute-force algorithms
- Summary
-
Chapter 5: Elements of Discrete Probability
-
The basics of discrete probability
- Definition – random experiment
- Definitions – outcomes, events, and sample spaces
- Example – tossing coins
- Example – tossing multiple coins
- Definition – probability measure
- Theorem – elementary properties of probability
- Example – sports
- Theorem – Monotonicity
- Theorem – Principle of Inclusion-Exclusion
- Definition – Laplacian probability
- Theorem – calculating Laplacian probabilities
- Example – tossing multiple coins
- Definition – independent events
- Example – tossing many coins
- Conditional probability and Bayes' theorem
- Bayesian spam filtering
- Random variables, means, and variance
- Google PageRank I
- Summary
-
The basics of discrete probability
- Part II – Implementing Discrete Mathematics in Data and Computer Science
-
Chapter 6: Computational Algorithms in Linear Algebra
-
Understanding linear systems of equations
- Definition – Linear equations in two variables
- Definition – The Cartesian coordinate plane
- Example – A linear equation
- Definition – System of two linear equations in two variables
- Definition – Systems of linear equations and their solutions
- Definition – Consistent, inconsistent, and dependent systems
- Matrices and matrix representations of linear systems
- Solving small linear systems with Gaussian elimination
- Solving large linear systems with NumPy
- Summary
-
Understanding linear systems of equations
- Chapter 7: Computational Requirements for Algorithms
- Chapter 8: Storage and Feature Extraction of Graphs, Trees, and Networks
- Chapter 9: Searching Data Structures and Finding Shortest Paths
- Part III – Real-World Applications of Discrete Mathematics
- Chapter 10: Regression Analysis with NumPy and Scikit-Learn
- Chapter 11: Web Searches with PageRank
- Chapter 12: Principal Component Analysis with Scikit-Learn
- Other Books You May Enjoy
Product information
- Title: Practical Discrete Mathematics
- Author(s):
- Release date: February 2021
- Publisher(s): Packt Publishing
- ISBN: 9781838983147
You might also like
book
Probability and Statistics for Computer Scientists, 2nd Edition
Student-Friendly Coverage of Probability, Statistical Methods, Simulation, and Modeling ToolsIncorporating feedback from instructors and researchers who …
book
Essential Math for AI
Companies are scrambling to integrate AI into their systems and operations. But to build truly successful …
book
Concrete Mathematics: A Foundation for Computer Science, 2nd Edition
This book introduces the mathematics that supports advanced computer programming and the analysis of algorithms. The …
book
Algorithms, 4th Edition
This fourth edition of Robert Sedgewick and Kevin Wayne’s Algorithms is the leading textbook on algorithms …