Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Practical Discrete Mathematics
Practical Discrete Mathematics

Practical Discrete Mathematics: Discover math principles that fuel algorithms for computer science and machine learning with Python

eBook
$9.99 $45.99
Paperback
$65.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Practical Discrete Mathematics

Chapter 1: Key Concepts, Notation, Set Theory, Relations, and Functions

This chapter is a general introduction to the main ideas of discrete mathematics. Alongside this, we will go through key terms and concepts in the field. After that, we will cover set theory, the essential notation and notions for referring to collections of mathematical objects and combining or selecting them. We will also think about mapping mathematical objects to one another with functions and relations and visualizing them with graphs.

In this chapter, we will cover the following topics:

  • What is discrete mathematics?
  • Elementary set theory
  • Functions and relations

By the end of the chapter, you should be able to speak in the language of discrete mathematics and understand notation common to the entire field.

Important Note

Please navigate to the graphic bundle link to refer to the color images for this chapter.

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.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • 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

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.

Who is this book 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.

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

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Feb 22, 2021
Length: 330 pages
Edition : 1st
Language : English
ISBN-13 : 9781838983505
Category :
Languages :
Concepts :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Feb 22, 2021
Length: 330 pages
Edition : 1st
Language : English
ISBN-13 : 9781838983505
Category :
Languages :
Concepts :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 159.97
Practical Discrete Mathematics
$65.99
Applying Math with Python
$49.99
Hands-On Mathematics for Deep Learning
$43.99
Total $ 159.97 Stars icon
Banner background image

Table of Contents

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

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.6
(16 Ratings)
5 star 81.3%
4 star 6.3%
3 star 6.3%
2 star 6.3%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




amazon222 Mar 28, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I am a 40+ year old software guy, when i ordered it i did it because it said "practical" :) i was still afraid it would just be a book of x's & y's & fancy notations akin to hieroglyphics better suited to CS grads :)Boy was it a surprise.A fantastic perspective on how all the x's & y's have practical use & was just superb.Even though i do own a few CS & algo books this gave me a different insight to stuff i already knew.Kudo to the authors.Superb.
Amazon Verified review Amazon
Ryan Zurrin Jun 03, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I love this book, I’ll be taking discrete math over the summer and wanted to get a jump start on the subject. I usually use khan academy but seems they didn’t have a dedicated section on this subject I needed to find another way to get introduced to this stuff and this book, with examples in python, has really been great for me. If you don’t have any experience in things like Boolean algebra or logic it may be a bit confusing at first, but if you already got a bit of a foundation in these things this book will be a breeze.
Amazon Verified review Amazon
MLEngineer Mar 28, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Disclaimer: The publisher asked me if I would review the book.This is a good book in regards to thinking in a mathematical away about ML & AI. Practically, there is a lot of mathematical and programming work to do in regards to ML & AI. For Computer Scientists: it is a nice introduction to continuous spaces and algorithms on those spaces. For the mathematically inclined: it is a nice introduction on how to pragmatically apply math to in-demand ML.I myself have a math-physics degree and have been an ML Engineer the last few years. This is a great book reconciling CS/Math perspectives.
Amazon Verified review Amazon
MLE PINON OLIVIA Apr 05, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book presents, through clear, concise and real world examples, key principles of discrete mathematics, making it a must read for practitioners looking to solve practical problems in computer and data sciences. This book is well-organized, allowing the reader to quickly grasp key concepts and test them out using the provided Python examples. Well done!
Amazon Verified review Amazon
Anirudh P Bhat Feb 22, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book covers the basics of discrete mathematics which opens avenues to broader computing projects. As an initiate in the study of computer science, I always believed that the mathematics of the "continuous element" was the most interesting part of engineering analysis. Apart from the necessary introduction to the notions of discrete probability, elementary theory of counting, the theory of graphs, and other additional topics, I did not give it the importance that it had. And this book showed me how wrong I was, because it is a special book for those who decide to learn the discipline in a self-taught way.The way of explaining the topics is very clear, concise, rigorous. In particular, combinatorial analysis and graph theory are presented in a way that satisfies the awake reader. The entire book is presented as separate units and is very enjoyable for anyone who wants to take this discipline seriously. It is an excellent introduction to the subject, a preamble to further studies of algorithms and computation.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.