Discrete Mathematics #01 | Sets
This series gives the reader a flavour of discrete mathematics and its applications to the computing sector. My goal is to learn and share a mathematical field with applications to cryptography, coding theory, formal methods, language theory, computability, artificial intelligence, theory of databases, and software reliability.
What is discrete mathematics?
Discrete mathematics is a mathematical structure that is fundamentally discrete rather than continuous. To simplify the previous sentence, a discrete object is something that we can enumerate by integers. Discrete structures can be finite or infinite. For example, a collection of numbers represented by a graph is countable.
In contrast with discrete mathematics is continuous mathematics. Continuous mathematics is another mathematical structure that deals with collections that can range in value over the real numbers or have some non-separable quality. So, for example, a person’s height could be any value (within the range of human heights), not just certain fixed heights.
Sets
Most sets found in computer science are finite, as computers can only deal with finite entities. Therefore, Venn diagrams are often used to give an iconographic representation of a set and can be used to illustrate various set operations such as set union, intersection and set difference.
So, Let’s say that we have a box. And we want to pack it for our friend, Evangelos. Also, we have already decided on the objects that we will stuff inside. Therefore, we put one by one the things inside until none of them is outside of the box. So, now we have a collection of objects grouped so that we can count them one by one before the wrapping phase. A set can be a collection of things just like our package, and each of the objects which belong to our set is called an element. The elements in a set are of the same kind, and they are distinct with no repetition of the same element in the set.
The informal way to represent our set is to take a photo out of the box and put it below. However, we need a mathematical representation to express these sets and make others understand them properly.
Θ: is the name of the set (usually with a capital letter)
{}: is called set brackets or braces
As mentioned at the beginning of the article, sets can contain infinite elements. Therefore, we need a mathematical way to represent a set with infinite elements. Thus, they have introduced the ellipsis, which is three dots at the end of the set.
Numbers
When I say the word “numbers,” you probably immediately think about these: 1, 2, 3, 4, 5, …
But most of us, when we think about numbers in general, we don’t usually think about the negative numbers, fractions, decimals, or radical numbers. In this article, we will dive into all the different kinds of numbers, such as the ones that we mentioned.
Real Numbers
Almost all the numbers that we use in our lives, at least most of us, are called real numbers, and the whole universe of real numbers is what makes up the Real Number System.
The real number system is a combination of two subcategories the rational numbers and irrational numbers.
Let’s jump into the first huge category, which is Rational Numbers. Those numbers look like this:
1/4, 3/2, — 1/8, …
Decimals numbers that terminate or repeat are also rational numbers, and we represent them like this:
-0.5, 0.1333, 6.4, …
The rational numbers contain a well-known family of numbers which are called Integers. It contains those numbers plus the negatives that we learn when we are count things in a supermarket or fingers. They look like:
…, -3, -2, -1, 0, 1, 2, 3, ..
We can go deeper and discuss the subcategory of the Integers, which is the whole numbers. They are made up of all positive integers, plus 0. So the set of whole numbers is:
0, 1, 2, 3, 4, 5, ..
And within the set of whole numbers, we define a set called the natural numbers, which is only the set of all positive integers without 0. So the set of natural numbers is
1, 2, 3, 4, 5, …
We often refer to natural numbers as the “counting numbers,” since 1, 2, 3, 4, 5, … is how we learn to count when we’re young.
On the other hand, irrational numbers are that numbers that we are not able to write them down as a fraction. Those numbers are the weird ones such as:
π (The circle constant)≈3.1415…
√2 (Pythagoras’ constant)≈1.4142…
e (Euler’s number)≈2.7182…
Number sets
Each of these number categories we talked about has a symbol. We use these symbols to express them as a set. Therefore, we represent these categories as:
R represents the set of real numbers
Q represents the set of logical numbers
Z represents the set of integers
W represents the set of integers
N represents the set of natural numbers
The only category we express as a relation is irrational numbers. Irrational numbers are all real numbers R except rational numbers. And so, we illustrate them as follows:
R-Q represents the set of irrational numbers
Conclusion
That was it! Now you have a general idea of what a set is. Next, we will go through the notation and the relationships between the sets.