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
Free Learning
Arrow right icon
Practical Discrete Mathematics
Practical Discrete Mathematics

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

eBook
AU$50.99 AU$72.99
Paperback
AU$90.99
Subscription
Free Trial
Renews at AU$24.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
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

Shipping Address

Billing Address

Shipping Methods
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.

Elementary set theory

"A set is a Many that allows itself to be thought of as a One."

– Georg Cantor

In mathematics, set theory is the study of collections of objects, which is prerequisite knowledge for studying discrete mathematics.

Definition–Sets and set notation

A set is a collection of objects. If a set A is made up of objects a1, a2, …, we write it as A = {a1, a2, …}.

Definition: Elements of sets

Each object in a set A is called an element of A, and we write an A.

Definition: The empty set

The empty set is denoted .

Sets may contain many sorts of objects—numbers, points, vectors, functions, or even other sets.

Example: Some examples of sets

Examples of sets include the following:

  • The set of prime numbers less than 10 is A = {2, 3, 5, 7}.
  • The set of the three largest cities in the world is {Tokyo, Delhi, Shanghai}.
  • The natural numbers are a set N = {1, 2, 3, …}.
  • The integers are a set Z = {…, -3, -2, -1, 0, 1, 2, 3, …}.
  • If B, C, and D are sets, A = {B, C, D} is a set of sets.
  • The real numbers are written R = (-∞, ∞), which consists of the entire number line. Note that it is not possible to list the real numbers within braces, as we can with N or Z.

Definition: Subsets and supersets

A set A is a subset of B if all elements in A are also in B, and we write it as A B. We call B a superset of A. If A is a subset of B, but they are not the same set, we call A a proper subset of B, and write A B.

It is helpful to have an alternative notation in order to construct sets satisfying certain criteria, which we call set-builder notation, defined next.

Definition: Set-builder notation

A set may be written as {x A | Conditions}, which consists of the subset of A such that the given conditions are true.

Sometimes, sets will be expressed as {x | Conditions} when it is obvious what kind of mathematical object x is from the context.

Example: Using set-builder notation

Examples of sets constructed by set-builder notation include the following.

  • The set of even natural numbers is {2, 4, 6, ...} = {n | n = 2k for some k N}. This is an infinite set where each element n is 2 * k, where k is some natural number belonging to the set {1, 2, 3…..}.
  • The closed interval of real numbers from a to b is {x R | a ≤ x ≤ b} = [a, b].
  • The open interval of real numbers from a to b is {x R | a < x < b} = (a, b).
  • The set R2 = {(x, y) | x, y R} consists of the entire 2D coordinate plane.
  • The line with slope 2 and y-intercept 3 is the set {(x, y) R2 | y = 2x + 3}.
  • The open ball of radius r and center (0, 0) is {(x, y) R2 | x2 + y2 < r}, which is the interior, but not the boundary of a circle.
  • A circle of radius r and center (0, 0) is {(x, y) R2 | x2 + y2 = r}, which is the boundary of the circle.
  • The set of all African nations is {x Nations | x is in Africa}.

There are some useful operations that may be done to pairs of sets, which we will see in the next definition.

Definition: Basic set operations

Let A and B be sets. Let's take a look at the basic operations:

  • The union of sets A and B is the set of all elements in A or B (or both) and is denoted A B = {x | x A or x B}.
  • A union of sets A1, A2, … is denoted .
  • The intersection of sets A and B is the set of all elements in both A and B. It is denoted A B = {x | x A and x B}.
  • An intersection of sets A1, A2, … is denoted .
  • The complement of set A is all elements in the set that are not in A and is denoted AC = {x | x A}.
  • The difference between sets A and B is the set of all elements in A, but not B, denoted A - B = {x A | x B}.

It is often useful to represent these set operations with Venn diagrams, which are visual displays of sets. Here are some examples of the operations shown previously:

  • The following displays A B:
Figure 1.3 – A  B

Figure 1.3 – A B

  • The following displays A B:
Figure 1.4 – A  B

Figure 1.4 – A B

  • The following displays Ac:
Figure 1.5 – Ac

Figure 1.5 – Ac

  • The following displays A – B:
Figure 1.6 – A - B

Figure 1.6 – A - B

As an example, consider the following diagram. We can use the language of set theory to describe many aspects of the diagram:

  • Elements a, b, and d are in set A, which we can write as a, b, d A.
  • Elements c and d are in set B, and c, d B.
  • Element c is not in A, so we could write c A or c AC.
  • Element d is in both A and B, or d A B.
  • All four elements are in A or B (or both), so we could say a, b, c, d A B:
Figure 1.7 – Two sets with some elements

Figure 1.7 – Two sets with some elements

Definition: Disjoint sets

Sets A and B are disjoint (or mutually exclusive) if A B = . In other words, the sets share no elements in common.

Example: Even and odd numbers

Consider sets of even natural numbers E = {2, 4, 6, ...} and odd natural numbers O = {1, 3, 5, ...}. These sets are disjoint, E O = , since no number is both odd and even.

  • E is a subset of the natural numbers, E N.
  • O is a subset of the natural numbers, O N.

The union of E and O make up the set of all-natural numbers, E O = N.

Theorem: De Morgan's laws

De Morgan's laws state how mathematical concepts are related through their opposites. In set theory, these laws make use of complements to address the intersection and union of sets.

De Morgan's laws can be written as follows:

  1. (A B)C = AC BC
  2. (A B)C = AC BC

The following diagrams display De Morgan's laws:

Figure 1.8 – De Morgan's laws (A  B)C = AC  BC

Figure 1.8 – De Morgan's laws (A B)C = AC BC

Figure 1.9 – De Morgan's laws (A  B)C = AC  BC

Figure 1.9 – De Morgan's laws (A B)C = AC BC

Proof:

Let's now look at the proof of this theorem:

Let x (A B)C, then x (A B), which means x A and x B, or x AC and x BC, or x AC BC. Thus, (A B)C is a subset of AC BC.

Next, let x (AC BC), then x AC and x BC, or x A and x B, then x (A B) or x (A B)C. Like the last step, we see AC BC is a subset of (A B)C. Since (A B)C is a subset of AC BC and vice versa, (A B)C = AC BC.

The proof of this result is similar and is left as an exercise for the reader.

Notice that the preceding method of proof is designed to show that any element of (A B)C is an element of AC BC, and to show that any element of AC BC is an element of (A B)C, which establishes that the two sets are the same.

Example: De Morgan's Law

Consider two sets of natural numbers, the even numbers E = {2, 4, 6, …} and A = {1, 2, 3, 4}. If we take the set of elements in either set, or the complement of the union of the sets, we have (E A)C = {1, 2, 3, 4, 6, 8, 10, …}C = {5, 7, 9, …}.

De Morgan's law states that the intersection of the complements of the sets should be equal to this. Let's verify that this is true. The complements of the sets are EC = {1, 3, 5, …} and AC = {5, 6, 7, …}. The intersection of these complements is EC AC = {5, 7, 9, …}.

Definition: Cardinality

The cardinality, or size, of a set A is the number of elements in the set and is denoted |A|.

Example: Cardinality

The cardinalities of some sets are computed here:

  • If A = {0, 1}, then of course its cardinality is |A| = 2, since there are two elements in the set.
  • The cardinality of the set B = {x N | x < 10} is less obvious, but we can write B more explicitly. It is the set of natural numbers less than 10, so B = {1, 2, 3, 4, 5, 6, 7, 8, 9} and, clearly, |B| = 9.
  • For the set of odd natural numbers, O = {1, 3, 5, ...}, we have an infinite cardinality, |O| = ∞, as this sequence goes on forever.

With our knowledge of set theory, we can now move on to learn about relations between different sets and functions, which help us to map each element from a set to exactly one element in another set.

Functions and relations

"Gentlemen, mathematics is a language."

– Josiah Willard Gibbs

We are related to different people in different ways; for example, the relationship between a father and his son, the relationship between a teacher and their students, and the relationship between co-workers, to name just a few. Similarly, relationships exist between different elements in mathematics.

Definition: Relations, domains, and ranges

  • A relation r between sets X and Y is a set of ordered pairs (x, y) where x X and y Y.
  • The set {x X | (x, y) r for some y Y} is the domain of r.
  • The set {y Y | (x, y) r for some x X} is the range of r.

More informally, a relation pairs element of X with one or more elements of Y.

Definition: Functions

  • A function f from X to Y, denoted f : X→Y, is a relation that maps each element of X to exactly one element of Y.
  • X is the domain of f.
  • Elements of the function (x, y) are sometimes written (x, f(x)).

As the definitions reveal, functions are relations, but must satisfy a number of additional assumptions, in other words, every element of X is mapped to exactly 1 element of Y.

Examples: Relations versus functions

Let's look at X = {1, 2, 3, 4, 5} and Y = {2, 4, 6, …}. Consider two relations between X and Y:

  • r = {(3, 2), (3, 6), (5, 6)}
  • s = {(1, 4), (2, 4), (3, 8), (4, 6), (5, 2)}

The domain of r is {3,5} and the range of r is {2, 6} while the domain of s is all of X and the range of s is {2, 4, 6, 8}.

Relation r is not a function because it maps 3 to both 2 and 6. However, s is a function with domain X since it maps each element of X to exactly one element of Y.

Example: Functions in elementary algebra

Elementary algebra courses tend to focus on specific sorts of functions where the domain and range are intervals of the real number line. Domain values are usually denoted by x and values in the range are denoted by y because the set of ordered pairs (x, y) that satisfy the equation y = f(x) plotted on the Cartesian xy-plane form the graph of the function, as can be seen in the following diagram:

Figure 1.10 – Cartesian xy-plane

Figure 1.10 – Cartesian xy-plane

While this typical type of functions may be familiar to most readers, the concept of a function is more general than this. First, the input or the output is required to be a number. The domain of a function could consist of any set, so the members of the set may be points in space, graphs, matrices, arrays or strings, or any other types of elements.

In Python and most other programming languages, there are blocks of code known as "functions," which programmers give names and will run when you call them. These Python functions may or may not take inputs (referred to as "parameters") and return outputs, and each set of input parameters may or may not always return the same output. As such, it is important to note Python functions are not necessarily functions in the mathematical sense, although some of them are.

This is an example of conflicting vocabulary in the fields of mathematics and computer science. The next example will discuss some Python functions that are, and some that are not, functions in the mathematical sense.

Example: Python functions versus mathematical functions

Consider the sort() Python function, which is used for sorting lists. See this function applied to two lists – one list of numbers and one list of names:

numbers = [3, 1, 4, 12, 8, 5, 2, 9]
names = ['Wyatt', 'Brandon', 'Kumar', 'Eugene', 'Elise']
# Apply the sort() function to the lists
numbers.sort()
names.sort()
# Display the output
print(numbers)
print(names)

The output is as follows:

[1, 2, 3, 4, 5, 8, 9, 12]
['Brandon', 'Elise', 'Eugene', 'Kumar', 'Wyatt']

In each case, the sort() function sorts the list in ascending order by default (with respect to numerical order or alphabetical order).

Furthermore, we can say that sort() applies to any lists and is a function in the mathematical sense. Indeed, it meets all the criteria:

  1. The domain is all lists that can be sorted.
  2. The range is the set of all such lists that have been sorted.
  3. sort() always maps each list that can be inputted to a unique sorted list in the range.

Consider now the Python function random, shuffle(), which takes a list as an input and puts it into a random order. (Just like the shuffle option on your favorite music app!) Refer to the following code:

import random
# Set a random seed so the code is reproducible
random.seed(1)
# Run the random.shuffle() function 5 times and display the 
   # outputs
for i in range(0,5):
  numbers = [3, 1, 4, 12, 8, 5, 2, 9]
  random.shuffle(numbers)
  print(numbers)

The output is as follows:

[8, 4, 9, 2, 1, 3, 5, 12]
[5, 1, 3, 8, 2, 12, 9, 4]
[2, 1, 12, 9, 5, 4, 8, 3]
[1, 2, 3, 12, 5, 8, 4, 9]
[5, 8, 9, 12, 4, 3, 2, 1]

This code runs a loop where each iteration sets the list numbers to [3, 1, 4, 12, 8, 5, 2, 9], applies the shuffle function to it, and prints the output.

In each iteration, the Python function shuffle() takes the same input, but the output is different each time. Therefore, the Python function shuffle() is not a mathematical function. It is, however, a relation that can pair each list with any ordering of itself.

Summary

In this chapter, we have discussed the meaning of discrete mathematics and discrete objects. Furthermore, we provided an overview of some of the many applications of discrete mathematics in the real world, especially in the computer and data sciences, which we will discuss in depth in later chapters.

In addition, we have established some common language and notation of importance for discrete mathematics in the form of set notation, which will allow us to refer to mathematical objects with ease, count the size of sets, represent them as Venn diagrams, and much more. Beyond this, we learned about a number of operations that allow us to manipulate sets by combining them, intersecting them, and finding complements. These give rise to some of the foundational results in set theory in De Morgan's laws, which we will make use of in later chapters.

Lastly, we took a look at the ideas of functions and relations, which map mathematical objects such as numbers to one another. While certain types of functions may be familiar to the reader from high school or secondary school, these familiar functions are typically defined on continuous domains. Since we focus on discrete, rather than continuous, sets in discrete mathematics, we drew the distinction between the familiar idea and a new one we need in this field. Similarly, we showed the difference between functions in mathematics and functions in Python and saw that some Python "functions" are mathematical functions, but others are not.

In the remaining four chapters of Part I: Core Concepts of Discrete Mathematics, we will fill our discrete mathematics toolbox with more tools, including logic in Chapter 2, Formal Logic and Constructing Mathematical Proofs, numerical systems, such as binary and decimal, in Chapter 3, Computing with Base n Numbers, counting complex sorts of objects, including permutations and combinations, in Chapter 4, Combinatorics Using SciPy, and dealing with uncertainty and randomness in Chapter 5, Elements of Discrete Probability. With this array of tools, we will be able to consider more and more real-world applications of discrete mathematics.

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
Estimated delivery fee Deliver to Australia

Economy delivery 7 - 10 business days

AU$19.95

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 : 9781838983147
Category :
Languages :
Concepts :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
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

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Australia

Economy delivery 7 - 10 business days

AU$19.95

Product Details

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

Packt Subscriptions

See our plans and pricing
Modal Close icon
AU$24.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
AU$249.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 AU$5 each
Feature tick icon Exclusive print discounts
AU$349.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 AU$5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total AU$ 220.97
Hands-On Mathematics for Deep Learning
AU$60.99
Applying Math with Python
AU$68.99
Practical Discrete Mathematics
AU$90.99
Total AU$ 220.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

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact [email protected] with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at [email protected] using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on [email protected] with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on [email protected] within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on [email protected] who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on [email protected] within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela