Episode 2: Mathematical Preliminaries
Episode 2: Mathematical Preliminaries
Mathematical preliminaries
• Sets
• Sequences
• Functions
• Relations
• Strings
0
2.1
Sets
Set --- any collection of distinct objects.
• E={2,4,6,8,…}, or
Describing a set: • E={x | x is a positive integer divisible by 2}, or
• E={x | x=2k for some positive integer k}, etc.
Generalizes to S1...Sn
2.3
Functions
Function (often also called an operation) f from set A to set B --- assignment of a
unique element f(a)B to each aA
A B
the range of f
the domain of f f 1
a
2
b
3
c 4
f: A B the type of f
N --- natural numbers: {0,1,2,…} R --- rational numbers: {0/1, 5/1, 1/3, 8/5, etc.}
If x,y always take values from N, what are the types of f, g, h?
f: N N g: N R h: NN N
2.4
Relations
(3,1)
(1,3) (6,20)
(12,32) ... (4,4)
< (100,39)
...
NN
2.5
Predicates; characteristic functions
In the literature, the words “predicate” and “relation” are usually used
as synonyms. This is OK: after all, every n-ary relation on A can as
well be thought of as a unary relation (predicate) on An.
Alphabet --- a finite set of objects called the symbols of the alphabet.
{a,…,z,0,...,9,!,?,$,>,#,...} --- Keyboard alphabet.
{0,...,9} --- Decimal alphabet. Its elements are called decimal digits.
{0,1} --- Binary alphabet. Its elements are called bits (binary digits).
You are expected to have some basic knowledge and experience with:
• Graphs
• Theory of computation
• Logic