14-18 SWEBOK® Guide V3.0
allowable error has 2 signicant digits, whereas
a measurement of the same length using a caliper
and recorded as 15.47 mm with ±0.01 mm maxi-
mum allowable error has 3 signicant digits.
10. Number Theory
[1*, c4]
Number theory is one of the oldest branches
of pure mathematics and one of the largest. Of
course, it concerns questions about numbers,
usually meaning whole numbers and fractional or
rational numbers. The different types of numbers
include integer, real number, natural number,
complex number, rational number, etc.
10.1. Divisibility
Let’s start this section with a brief description of
each of the above types of numbers, starting with
the natural numbers.
Natural Numbers. This group of numbers starts
at 1 and continues: 1, 2, 3, 4, 5, and so on. Zero
is not in this group. There are no negative or frac-
tional numbers in the group of natural numbers.
The common mathematical symbol for the set of
all natural numbers is N.
Whole Numbers. This group has all of the natu-
ral numbers in it plus the number 0.
Unfortunately, not everyone accepts the above
denitions of natural and whole numbers. There
seems to be no general agreement about whether
to include 0 in the set of natural numbers.
Many mathematicians consider that, in Europe,
the sequence of natural numbers traditionally
started with 1 (0 was not even considered to be
a number by the Greeks). In the 19th century, set
theoreticians and other mathematicians started
the convention of including 0 in the set of natural
numbers.
Integers. This group has all the whole numbers
in it and their negatives. The common mathemati-
cal symbol for the set of all integers is Z, i.e., Z =
{…, −3, −2, −1, 0, 1, 2, 3, …}.
Rational Numbers. These are any numbers that
can be expressed as a ratio of two integers. The
common symbol for the set of all rational num-
bers is Q.
Rational numbers may be classied into
three types, based on how the decimals act. The
decimals either do not exist, e.g., 15, or, when
decimals do exist, they may terminate, as in 15.6,
or they may repeat with a pattern, as in 1.666...,
(which is 5/3).
Irrational Numbers. These are numbers that
cannot be expressed as an integer divided by an
integer. These numbers have decimals that never
terminate and never repeat with a pattern, e.g., PI
or √2.
Real Numbers. This group is made up of all the
rational and irrational numbers. The numbers that
are encountered when studying algebra are real
numbers. The common mathematical symbol for
the set of all real numbers is R.
Imaginary Numbers. These are all based on the
imaginary number i. This imaginary number is
equal to the square root of −1. Any real number
multiple of i is an imaginary number, e.g., i, 5i,
3.2i, −2.6i, etc.
Complex Numbers. A complex number is a
combination of a real number and an imaginary
number in the form a + bi. The real part is a, and
b is called the imaginary part. The common math-
ematical symbol for the set of all complex num-
bers is C.
For example, 2 + 3i, 3−5i, 7.3 + 0i, and 0 + 5i.
Consider the last two examples:
7.3 + 0i is the same as the real number 7.3.
Thus, all real numbers are complex numbers with
zero for the imaginary part.
Similarly, 0 + 5i is just the imaginary number
5i. Thus, all imaginary numbers are complex
numbers with zero for the real part.
Elementary number theory involves divisibility
among integers. Let a, b ∈ Z with a ≠ 0.The expres-
sion a|b, i.e., a divides b if ∃c ∈ Z: b = ac, i.e., there
is an integer c such that c times a equals b.
For example, 3|−12 is true, but 3|7 is false.
If a divides b, then we say that a is a factor of
b or a is a divisor of b, and b is a multiple of a.
b is even if and only if 2|b.
Let a, d ∈ Z with d > 1. Then a mod d denotes
that the remainder r from the division algorithm
with dividend a and divisor d, i.e., the remainder
when a is divided by d. We can compute (a mod
d) by: a − d * ⎣a/d⎦, where ⎣a/d⎦ represents the
oor of the real number.
Let Z
+
= {n ∈ Z | n > 0} and a, b ∈ Z, m ∈ Z
+
,
then a is congruent to b modulo m, written as a ≡
b (mod m), if and only if m | a−b.