Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Practical Discrete Mathematics

You're reading from   Practical Discrete Mathematics Discover math principles that fuel algorithms for computer science and machine learning with Python

Arrow left icon
Product type Paperback
Published in Feb 2021
Publisher Packt
ISBN-13 9781838983147
Length 330 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Ryan T. White Ryan T. White
Author Profile Icon Ryan T. White
Ryan T. White
Archana Tikayat Ray Archana Tikayat Ray
Author Profile Icon Archana Tikayat Ray
Archana Tikayat Ray
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Part I – Basic Concepts of Discrete Math
2. Chapter 1: Key Concepts, Notation, Set Theory, Relations, and Functions FREE CHAPTER 3. Chapter 2: Formal Logic and Constructing Mathematical Proofs 4. Chapter 3: Computing with Base-n Numbers 5. Chapter 4: Combinatorics Using SciPy 6. Chapter 5: Elements of Discrete Probability 7. Part II – Implementing Discrete Mathematics in Data and Computer Science
8. Chapter 6: Computational Algorithms in Linear Algebra 9. Chapter 7: Computational Requirements for Algorithms 10. Chapter 8: Storage and Feature Extraction of Graphs, Trees, and Networks 11. Chapter 9: Searching Data Structures and Finding Shortest Paths 12. Part III – Real-World Applications of Discrete Mathematics
13. Chapter 10: Regression Analysis with NumPy and Scikit-Learn 14. Chapter 11: Web Searches with PageRank 15. Chapter 12: Principal Component Analysis with Scikit-Learn 16. Other Books You May Enjoy

What is discrete mathematics?

Discrete mathematics is the study of countable, distinct, or separate mathematical structures. A good example is a pixel. From phones to computer monitors to televisions, modern screens are made up of millions of tiny dots called pixels lined up in grids. Each pixel lights up with a specified color on command from a device, but only a finite number of colors can be displayed in each pixel.

The millions of colored dots taken together form intricate patterns and give our eyes the impression of shapes with smooth curves, as in the boundary of the following circle:

Figure 1.1 – The boundary of a circle

Figure 1.1 – The boundary of a circle

But if you zoom in and look closely enough, the true "curves" are revealed to be jagged boundaries between differently colored regions of pixels, possibly with some intermediate colors, as shown in the following diagram:

Figure 1.2 – A zoomed-in view of the circle

Figure 1.2 – A zoomed-in view of the circle

Some other examples of objects studied in discrete mathematics are logical statements, integers, bits and bytes, graphs, trees, and networks. Like pixels, these too can form intricate patterns that we will try to discover and exploit for various purposes related to computer and data science throughout the course of the book.

In contrast, many areas of mathematics that may be more familiar, such as elementary algebra or calculus, focus on continuums. These are mathematical objects that take values over continuous ranges, such as the set of numbers x between 0 and 1, or mathematical functions plotted as smooth curves. These objects come with their own class of mathematical methods, but are mostly distinct from the methods for discrete problems on which we will focus.

In recent decades, discrete mathematics has been a topic of extensive research due to the advent of computers with high computational capabilities that operate in "discrete" steps and store data in "discrete" bits. This makes it important for us to understand the principles of discrete mathematics as they are useful in understanding the underlying ideas of software development, computer algorithms, programming languages, and cryptography. These computer implementations play a crucial role in applying principles of discrete mathematics to real-world problems.

Some real-world applications of discrete mathematics are as follows:

  • Cryptography: The art and science of converting data or information into an encoded form that can ideally only be decoded by an authorized entity. This field makes heavy use of number theory, the study of the counting numbers, and algorithms on base-n number systems. We will learn more about these topics in Chapter 2, Formal Logic and Constructing Mathematical Proofs.
  • Logistics: This field makes use of graph theory to simplify complex logistical problems by converting them to graphs. These graphs can further be used to find the best routes for shipping goods and services, and so on. For example, airlines use graph theory to map their global airplane routing and scheduling. We investigate some of these issues in the chapters of Part II, Implementing Discrete Mathematics in Data and Computer Science.
  • Machine Learning: This is the area that seeks to automate statistical and analytical methods so systems can find useful patterns in data, learn, and make decisions with minimal human intervention. This is frequently applied to predictive modeling and web searches, as we will see in Chapter 5, Elements of Discrete Probability, and most of the chapters in Part III, Real-World Applications of Discrete Mathematics.
  • Analysis of Algorithms: Any set of instructions to accomplish a task is an algorithm. An effective algorithm must solve the problem, terminate in a useful amount of time, and not take up too much memory. To ensure the second condition, it is often necessary to count the number of operations an algorithm must complete in order to terminate, which can be complex, but can be done through methods of combinatorics. The third condition requires a similar counting of memory usage. We will encounter some of these ideas in Chapter 4, Combinatorics Using SciPy, Chapter 6, Computational Algorithms in Linear Algebra, and Chapter 7, Computational Requirements for Algorithms.
  • Relational Databases: They help to connect the different traits between data fields. For example, in a database containing information about accidents in a city, the "relational feature" allows the user to link the location of the accident to the road condition, lighting condition, and other necessary information. A relational database makes use of the concept of set theory in order to group together relevant information. We see some of these ideas in Chapter 8, Storage and Feature Extraction of Trees, Graphs, and Networks.

Now that we have a rough idea of what discrete mathematics is and some of its applications, we will discuss set theory, which forms the basis for this field in the next section.

You have been reading a chapter from
Practical Discrete Mathematics
Published in: Feb 2021
Publisher: Packt
ISBN-13: 9781838983147
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image