Professional Documents
Culture Documents
Mathematical Foundations of Computer Science Lecture Outline
Mathematical Foundations of Computer Science Lecture Outline
Mathematical Foundations of Computer Science Lecture Outline
Lecture Outline
December 6, 2018
Functions
Let A and B be sets. A function from A to B is a relation, f , from A to B such that for all
a ∈ A there is exactly one b ∈ B such that (a, b) ∈ f . If (a, b) ∈ f , then we write b = f (a).
A function from A to B is also called a mapping from A to B and we write it as f : A → B.
The set A is called the domain of f and the set B the codomain. If a ∈ A then the element
b = f (a) is called the image of a under f . The range of f , denoted by Ran(f ) is the set
Two functions are equal if they have the same domain, have the same codomain, and
map each element of the domain to the same element in the codomain.
Example. Let A and B be finite sets of size a and b, respectively. How many functions
are there from A to B?
Solution. The procedure of forming a function is as follows: in Step i choose the image
of the ith element in A. There are a steps and there are b ways to perform each step. Thus
the total number of ways to create a function from A to B is ba .
Let f : A → B be a function.
• f2 (x) = x2 from the set of non-negative real numbers to the set of non-negative real
numbers.
Solution.
injective : f2 , f3 , f4
surjective : f2 , f3 , f4
bijective : f2 , f3 , f4
Example. Let g be the function from the set {a, b, c} to itself such that g(a) = b, g(b) = c,
and g(c) = a. Let f be the function from the set {a, b, c} to the set {1, 2, 3} such that
f (a) = 3, f (b) = 2, and f (c) = 1. What is the composition of f with g and what is the
composition of g with f ?
Example. Let f and g be the functions from the set of integers to the set of integers
defined by f (x) = 2x + 3 and g(x) = 3x + 2. What is the composition of f and g? What
is the composition of g and f ?
k k
n
21−(2) < 1, then R(k, k) > n. In particular, R(k, k) > b2 2 c, for k ≥ 3.
Example. If k
Solution. Consider a complete graph G in which each edge is colored red or blue with a
probability of 1/2. Let S be a any subset of k vertices and E(S) be the set of edges with
both endpoints in S.
k
Pr[edges in E(S) are monochromatic] = 2 · 2−(2)
Since there are nk subsets of size k, the probability that some subset of size k is monochro-
matic is at most
n −(k) n 1−(k)
2 2 2 = 2 2 (1)
k k
Since the last expression is less than 1 (given as a condition in the problem statement), there
is a 2-coloring of edges of a complete graph on n vertices in which there is no monochromatic
clique of size k. Thus R(k, k) > n.
If n = b2k/2 c then
2
! k
n 1−(k) nk 1− k(k−1) 2k /2 21+ 2
k2 k
2 2 ≤ ·2 2 ≤ 21− 2 + 2 =
k k! k! k!
Note that the last expression is less than 1, if k ≥ 3.
It can be shown that R(k, k) < 4k . These are the best known bounds on the size of R(k, k),
so a lot of progress is yet to be made. What is known is that R(2, 2) = 2, R(3, 3) = 6, and
R(4, 4) = 18. The values of R(k, k) are not known for k ≥ 5.
A fundamental question in graph coloring is: what is the relation between χ(G) and the
size of the largest clique? We state without proof that simply bounding the size of the
largest clique does not allow us to bound χ(G).
4 Lecture Outline December 6, 2018
Example. For any k ≥ 1, there exist triangle-free graphs (size of the largest clique is at
most 2) with chromatic number greater than k.
The girth of a graph G, g(G), is the length of the smallest cycle in G. In triangle-free
graphs, g(G) > 3. In 1954 B. Descartes constructively showed that triangle-free graphs can
have high chromatic number, but this construction was complicated and contained many
short cycles. In 1959, Paul Erdős used the probabilistic method to prove the existence of
graphs with arbitrarily high girth and chromatic number.
Example (Erdős 1959) For every g, k > 0, there exists a graph G with χ(G) ≥ k and
g(G) ≥ g.