You are on page 1of 16

# 1

MATHEMATICAL FOUNDATION

This chapter introduces mathematical concepts necessary to understand this book. Because the index lists important key words, readers can refer to the words whenever necessary.

1.1

SET

A set is a collection of objects. An object in the set is an element of the set. Usually, sets are denoted by upper case letters A, B, etc., and elements are denoted by the lower case letters a, b, etc. If a is an element of A, then "a belongs to the set A," and denoted by a E A. If a is not an element of A, then a A. A set is a finite set if the number of elements is finite, else it is an infinite set. The set without any element is an empty set, denoted by <p. <p is a finite set. IAI denotes the number of elements in a finite set A. Two methods exist to describing sets: 1) The enumeration method explicitly lists all the elements enclosed by {and}. 2) The general expression and its condition method uses {general expression I condition}.

Example 1.1
1. The prime numbers between 1 and 12 constitute a set with five elements. By the enumeration method, it is represented as {2,3,5,7,1l}. 2. A set of natural numbers is represented as {x I x is natural numb~r} or {1,2,3, ... }.

T. Sasao, Switching Theory for Logic Synthesis Kluwer Academic Publishers 1999

CHAPTER 1

Subset
If every element in a set A is also an element of a set B, then A is a subset of B, and denoted by A ~ B. In this case, B contains A. If A ~ B does not hold, then A g; B. An empty set is a subset of an arbitrary set. The set that consists of all the elements in the discussion is the universal set, which denoted by the symbol U. All the sets in the discussion are subsets of U. Let A and B be sets. If A ~ B and B ~ A hold, then A and B are the equal sets, and we denote it by A B. If A ~ B and A", B, then A is a proper subset of B, and we denote it by A c B. For any set A, A ~ A holds.

Example 1.2

2. Let A

1. Let A be a set of men, and B be a set of human, then A C B. {O, I} and B {O, 1,0,1}, then A B. In other words, sets are the same even if the elements appears more than once. Also, sets are the same even if the order of the elements are different.

Power Set
The set of subsets of A is the power set of A, denoted by P(A). Especially, ifJ E P(A) and A E P(A). Example 1.3 Let A= {0,1}. Then, P(A)

## Union, Intersection, Complement

Let A and B be sets. The set of elements that belong to A or B or both is the union of A and B, denoted by AU B. The set of elements that belong to both A and B is the intersection of A and B, and denoted by An B. The set of elements in the universal set U, but not the elements in A, is the complement of A, and it is denoted by A or AC. By using symbols, these sets are represented as follows:
AU B

## {x I x E A or x E B}; An B {x I x E A and x E B}; A = {x I x ~ A and x E U}.

= =

Mathematical Foundation

Especially, U = <p and (jj = U. A and B are disjoint if they have no common element, i.e., if An B = <p. Example 1.4 Let U={O,1,2,3}, A={1,2}, and B={2,3}. Then, AUB={1,2,3}, An B={2}, A={O,3}.

Properties of Sets
Let A, B, and C be sets. Then, the following equations hold: (1) (2) (3) (4) (5) (6) Idempotent laws: A U A = A, A n A = A; Commutative laws: AU B = B U A, An B = B n A; Associative laws: AU(BUC) = (AUB)UC, An(BnC) = (AnB)nC; Absorption laws: A U (A n B) = A, A n (A U B) = A; Distributive laws: AU (B n C) = (A U B) n (A U C), An (B U C) = (A n B) U (A n C); Involution law: (A) = A; AU A = U, An A = <p; AU <p = A, An U = A; AU U = U, An <p = <p; De Morgan's laws: ""'(A"""'-U-=B""') = An B, (A n B) = AU B.

## (7) (8) (9)

(10)

Because of the associative law, the representations AUBUC or AnBnC, etc., have no ambiguity. However, a representation such as AuBnC is not permitted, since (A U B) n C =f. AU (B n C), and the results depend on the placement of parentheses. Let A and B be finite sets, then IA UBI = IAI + IBI- IA n BI

Venn's Diagram
Venn's diagram is a graphical representation of sets. The universal set is represented by the rectangle. Sets A, B, etc., are represented by interiors of the closed domains, such as circles. In a Venn's diagram, the sets AUB, AnB, and A are represented as the shaded parts of Fig. 1.1.

CHAPTER

: .: : : : -:- .: : -: : .: - S
A B

.:::::::::::::::,'::::::::.

(]I)::"
A B
::::::.

:::::::D':::::' . . .: ": : : :
........ :::.. :::::::::::::::
::::: '::::.

## ::::::;:;:;;;;;;;:;;:::;:!:;::;::;:!:;:::;:;;;;:;:::::::::: ....... ...

:::::::::;::::.::

:;:;:;;;:::....

...:.::;:;;:;::;

Figure 1.1

A.

1.2

RELATION

## Pair and n-tuple

A tuple (a, b) of two elements arranged in a fixed order is a pair or an ordered pair. In general, a tuple of n elements at, a2 ... ,an, that considers the order (al' a2,., an) is an n-tuple. Two n-tuples (at, a2, ... , an) and (bt, b2, .. , bn ) are equal if and only if ai = bi for all i.

Direct Product
Let A and B be sets, and a and b be elements of A and B, respectively. The set that consists of all the ordered pair of (a, b) is the direct product or the Cartesian product of A and B, and is denoted by A x B, i.e.,

A x B

= {(a, b) I a E A, bE B}.

If A or B is a null set, then A x B is also a null set. When A = B, A x A is abbreviated by A2. For n sets {At, A 2, ... , An}, the direct product Al x A2 X . X An is defined as follows:

Example 1.5
1. Let A={O,I} and B={0,1,2}. Then, A x B = {(O, 0), (0,1), (0,2), (1, 0), (1, 1), (1, 2)}. 2. Let R be a set of points in a straight line. Then, R2 denotes a set of points in a (two-dimensional) plane, and R3 denotes a set of points in a (three-dimensional) cube.

Mathematical Foundation

Relation
Let A and B be sets. Subset R of direct product A x B is a binary relation from A to B. That is, if R ~ A x B, ai E A, bj E B, and (ai,b j ) E R, then "ai and bj are in the relation R," or "relation R holds." If (ai, bj) ~ R, then "relation R does not hold." If (ai, bj ) E R, then we write aiRbj. A binary relation from A to A is a binary relation on the set A. A subset of a direct product of n sets Al x A2 X X An is called an n-ary relation. Let R be a relation from A to B. The set where the order of the elements are interchanged in the ordered pair R is an inverse relation of R, and is denoted by R- I . In other words, R- I = {(bj, ai) I (ai, bj ) E R}. Example 1.6
1. Let A={stone, scissors, paper }. In a toss, let the relation "0: wins over (3" be denoted by R = {(0:,(3) I 0:,(3 E A}. Then, we have R={(stone,

scissors),(scissors, paper),(paper, stone)}. The inverse relation is R- I = {(scissors, stone),(paper, scissors),(stone, paper)}. It is "0: lose to (3." 2. Let B = {a, 1,2, 3}. If the relation "0: is equal to or less than (3" is denoted by ":s," then ":S"={(0,0),(0,1 ),(0,2),(0,3),(1,1 ),(1,2),(1,3),(2,2),(2,3), (3,3)). If the inverse relation is denoted by the symbol ":2:," then ":2:"= {(0,0),(1,O),(2,0),(3,0),(1,1),(2,1),(3,1),(2,2),(3,2),(3,3)}. It is "0: is equal to or greater than (3."

1.3

EQUIVALENCE CLASS

Equivalence Relation
Let R be a binary relation on a set A. For all elements a, b, and c in A, if the following three conditions hold, then R is an equivalence relation on A. (1) Reflective law: aRa. (2) Symmetric law: If aRb, then bRa. (3) Transitive law: If aRb and bRc, then aRc. When R is an equivalence relation and aRb, we say "a and b are equivalent in the relation R."

CHAPTER

Example 1.7 1. The relation "equal" (=) in the mathematics is an equivalence relation. 2. Relations such as "have the same family name," "are the same sex," "are the same age," and "graduated from the same school" are equivalence relations.

Equivalence Class
Let R be an equivalence relation on the set A. Then, we can partition the set A into some blocks, such that the equivalent elements in R belong to the same block: [a] = {x I aRx,x E A}. The set [a] is the equivalence class of the set A that contains a in relation R. In this case, a is a representative of the equivalence class [a]. A set A can be partitioned into equivalence classes by the equivalence relation R. Also, each equivalence class does not have common part with another class. Moreover, an arbitrary element of A is an element of exactly one equivalence class. The set of all the equivalence classes of the equivalence relation R on A is a quotient set of A with respect to R, which is denoted by AIR. The number of equivalence classes is the rank of the relation

R.

Logic Notation
The following logic symbols are used to represent conditions concisely. In a sentence where the meaning is clear, if we can decide whether the sentence is true or false objectively, then the sentence is a proposition. Let P and Q be propositions. "If P holds, then Q holds" is denoted by P => Q. Also, "P is true if and only if Q is true" (P iff Q) is denoted by P {:} Q. When P => Q, the proposition P is called a sufficient condition of the proposition Q. Moreover, the proposition Q is a necessary condition of the proposition P. When P {:} Q, the proposition P is a necessary and sufficient condition of the proposition Q. Even if P => Q holds, Q => P does not necessarily hold. Q => P is called a converse of P => Q. To prove P => Q is equivalent to prove the contraposition Q => P. Example 1.8 Let Z be the set of integers. The relation (==) "For n, m E Z, n == m {:} (m - n) is a multiple of k" is an equivalence relation, where the multiple contains O. When n == m, "n and m are equivalent modulo k."

Mathematical Foundation

## And, the rank of Z / == is two.

Example 1.9 Let Z be the set of integers. If the binary relation", on Z x Z is defined by (a, b) '" (c, d) > a + b = c + d then, '" is an equivalence relation.

Partition
Let A be a set, and let AI, A 2 , , and An be subsets of A. If Al UA2 U . UAn A, and Ai n Aj = cp, for all i,j (i =/:: j), then A is said to be partitioned into At, A 2 , , and An. When an equivalence relation R is defined on A, A is partitioned into the equivalence classes by the relation R. Conversely, for an arbitrary partition of A, we can define an equivalence relation R of A as follows: ai E [a] and aj E [a] iff aiRaj. When A is partitioned into At, A 2 , , and An, the elements of A can be represented as shown in Fig. 1.2. Example 1.10 Let A be the set of people who are less than or equal to 100 years old. If the relation "same age" is denoted by R, then R is an equivalence relation. In this case, A is partitioned into Ao, AI' ... ' AlOO, where Ai denotes the set of people who are i years old.

Refinement
Let RI and R2 be two equivalence relations on the set A. For arbitrary elements x and y in A, if xRly => XR2Y holds, then RI is a refinement of R 2 , and denoted by RI
~

R2

Example 1.11 Let A = {011, 100, 110, 111}. Let Ro be the relation that "all the corresponding bits are the same," RI be the relation that "right two bits are the same," and R2 be the relation that "the rightmost bits are the same." In this case, we have

CHAPTER

## Figure 1.3 Figure 1.2

Partition.

An example of refinement.

Ro Rl R2

= {(011, 011), (100, 100), (110, 110), (111, 111)}, = {(011, 011), (011, 111), (100,100), (110, 110), (111,011), (111, 111)},

## = {(OIl, OIl), (011,111),(100, 100),(110,110),(100, 110),(11 0,100),

1.4

FUNCTION

Function
Let A and B be sets, and I be a binary relation from A to B. For each element a in A, if there exists unique element bin B such that alb, then I is a function from A to B, or I is a mapping from A to B, and denoted by I : A ---+ B. A is a domain of I. If an element a; of A corresponds to an element bi of B, then we denote it by I(a;) = bj . In this case, bi is the value of function I with respect to a;. b = I(a) E B is an image of a E A. The whole image of the domain is a range, and is denoted by I(A). In this case, I(A) ~ B. A function is a special case of a relation. We can define a relation Rf from the function I as follows: For the function I: A
---+

B, I(a;)

= bi

## iff (a;, bj) E Rf.

Let 1-1 denote the inverse relation of the function I : A ---+ B. Then, 1-1 is, in general, not a function. Let b = I(c). Then, 1-1 (b) is, in general, a subset of A. I-l(b) is an inverse image of b.

Mathematical Foundation

Example 1.12 Let Z be the set of integers. '(x) = x 2 is a function from Z to Z. In this case, , = { ... ,( -2,4), (-1,1), (0, 0), (1, 1), (2, 4), ... }. Although f is a function, the inverse relation is not a function. Specifically, for some y, there exist two x such that y = I(x). Moreover, there is no x such that f(x) = 3. A rule f that assigns an element of B to each element of the direct product Al x A2 X x An is an n-variable function. We denote 1 by 1 : Al x A2 X x An --+ B. If an n-tuple (at, a2, ... , an) (ai E Ai, i = 1,2, ... , n) corresponds to b E B, then we denote it by 1(aI, a2, ... , an) = b. Let 1 be a function from X to Y. If A ~ X, then 1(1 A) represents the function where the domain of 1 is A. It is called a restriction of 1 to A. Example 1.13 Let Al = {O, I}, A2 = {O, 1, 2}, Aa = {O, 1,2, 3}, and B = {O, 1,2,3, 4}. In this case, the number of functions 1 : Al X A2 X Aa --+ B is 524 That is, for each element in the set of 2 x 3 x 4=24 elements, there are five ways to choose an element in B.

Operation
A function from the set A to A is often called as a unary operation of A. An example of a unary operation is denoted by the symbol -. In this case, iii = aj denotes that the element ai correspond the element aj. A two-variable function from A x A to A is often called as a binary operation of A. In a binary operation, the correspondence of ak to (ai, aj) is denoted by ai*aj = ak. Example 1.14 Let B={O,I}. Let - be a unary operation, and 1\, V, and EEl be binary operations on B as follows: For arbitrary elements a and bin B, = al\b = aVb = aEElb = =
ii

## I-a a b a+b-ab a + b - 2ab. a + b (mod 2)

In this case, the symbols +, -, . denote ordinary addition, subtraction, and multiplication, respectively. Table 1.1 shows the functions represented by -, 1\, V, and EEl. In Chapter 14, when the complexity of logic networks is analyzed, the following notation is used. Let the function g(x) be defined for all positive numbers x,

10

CHAPTER

Table 1.1

Various operations.

a b
0 0 1 1 0 1 0 1

i.i

a /\ b aVb aEBb
0 0 0 1 0 1 1 1 0 1 1 0

1 1 0 0

and let g(x) ;::: O. Suppose that a function I(x) is defined for a set S of positive numbers.

I(x) I(x)

= O(g(x)) = o(g(x))
"-J

"' ..... 00

I~~;jl < M.

"'ES

g(x)

=0

I(x)

g(x)

lim I(x) = 1
"' ..... 00

"'ES

g(x)

## Usually, S is a set of natural numbers. Example 1.15

1. Let I(x) 2. Let I(x) 3. Let I(x)

= ao + aIx I + a2x2 + ... + akxk. Then, I(x) = O(xk). = xk, (k is an arbitrary number). Then, I(x) = 0(2"'). = x3 - x, and g(x) = x3 + x. Then I(x) '" g(x).

1.5

ORDERED SET

Ordered Relation
Let R be a binary relation on a set A. If any elements a, b, c in A satisfy the following three conditions: (1) Reflective law: aRa (2) Anti-symmetric law: If aRb and bRa, then a = b (3) Transitive law: If aRb and bRc, then aRc

Mathematical Foundation

11

then R is an ordered relation or is a partial order relation. Especially, if R is a partial order relation, and if (4) For all a, b E A, aRb or bRa then, R is a total order relation. An ordered relation R is usually represented by a :::; R b instead of aRb. Example 1.16 1. Let P={ {O},{l },{O,l}}, and A and B be elements of P. Let A ~ B denote the relation "A is contained by B," then ~ is a partial order relation. There is no relation ~ between {O} and {I}. 2. Let Z be the set of integers. If a :::; b denotes the relation "a is less than or equal to b," then:::; is a total order relation.

Ordered Set
Let :::;R be an ordered relation defined on a set A. A pair of A and :::;R, (A, :::;R), is an ordered set. Especially if :::;R is a partial order relation, then (A, :::;R) is a partially ordered set. If:::;R is a total order relation, then (A, :::;R) is a totally ordered set. Example 1.17 1. Let P(A) be the power set on a set A. Then, (P(A),~) is a partially ordered set. 2. Let Z be a set of the integers. Then, (Z,:::;) is a totally ordered set.

Hasse Diagram
Let A be a finite set, and :::;R be an ordered relation on A. Let a, b be two elements in A such that a :::;R b and a #- b. If there is no element c such that a :::;R c, c :::;R b, where c is different from a and b, then b covers a. When b covers a, the diagram which is obtained by writing b above a, and by connecting b and a by a straight line is the Hasse diagram.

12

CHAPTER

I R
1
a

(1,1)

(0.1).0(1.0)
(0,0) (c)

(a)

(b)

Figure 1.4

## Examples of Hasse diagrams.

Example 1.18 Fig. 1.4 shows examples of a Hasse diagram. In a Hasse diagram, we can reach from b to a downward by tracing the connected lines, iff a ~R b. Example 1.19 In Fig. 1.4(a), 1 is the maximum element, and a is the minimum element. In Fig. 1.4(c), (1,1) is the maximum element, and (0,0) is the minimum element. In Fig. 1.4(b), there is no maximum element nor minimum element .

## Maximal Element, Minimal Element

Let (A, ~R) be an ordered set, and let ao be an element of A. If there is no element a in A such that ao ~R a, and ao I: a, then ao is a maximal element of A. If there is no element a in A such that a ~R ao, and ao I: a, then ao is a minimal element of A. The maximal element and the minimal element may not exist. However, in a finite set, they always exist. Sometimes, there are more than one maximal and/or minimal elements.

Example 1.20 In Fig. 1.4(a), 1 is the maximal element, and a is the minimal element. In Fig. 1.4(b), a and b are maximal elements, while e and fare minimal elements. In Fig. 1.4(c), (1,1) is the maximal element, and (0,0) is the minimal element.

## Maximum Element, Minimum Element

Let (A, ~R) be an ordered set, and let ao be an element of A. For each element a in A, if a ~R ao, then ao is the maximum element of A. For each element a in A, if ao ~R a, then ao is the minimum element of A. The maximum element or the minimum element may not exist.

Mathematical Foundation

13

## Least Upper Bound, Greatest Lower Bound

Let (A, ~R) be an ordered set, and let B ~ A. The element a in A is an upper bound of B, if b ~R a holds for each element b in B. The element a in A is a lower bound of B, if a ~R b holds for each element bin B. If there is the minimum element in the set of the upper bounds of B, then it is the least upper bound of B. If there is the maximum element in the set of the lower bounds of B, then it is the greatest lower bound of B. Especially, for two elements a and b, if the least upper bound and the greatest lower bound of {a, b} exist, then they are denoted by a V b and a . b, respectively. Example 1.21 In Fig. 1.4(b), there is no least upper bound of {a, b}. However, the greatest lower bound of {a, b} is a . b c. Also, the least upper bound of {e, f} is e V f = d. However, there is no greatest lower bound of {e, f}.

Bibliographical Notes
For more detailed discussion, see textbooks on discrete mathematics [228, 229, 319], textbooks on computational complexity [135, 376], and textbooks on graph theory .

14

MATHEMATICAL FOUNDATIONS

Exercises
1.1 Let N be a set of natural numbers, and let D(n) = {m 1m E N, m is a divisor of n}. Then what is the set A = {n IID(n)1 = 2, n EN}? 1.2 Let A, B, and C be sets. Prove that AU (B holds.

n C)

= (A U B)

n (A U C)

1.3 Let A, B, and C be sets. Does each of the following holds? If it holds, then prove it, otherwise show a counterexample.

## (1) (2) (3) (4)

AU B = AU C ~ B = C. An B = An C ~ B = C. A EB B = A EB C ~ B = C, where A EB B (AnB)U(AnC)=An(BnC).

= (A n B) U (A n B).

## 1.4 Let A, B, and C be finite sets. Prove the following:

(1) IAU BI = IAI + IBI-IAn BI. (2) IAUBUCI = IAI + IBI + ICI-IAnBI-IAnCi-IBnCl + IAnBnCl

1.5 Let A, B, C ~ S. Let lSI = 60, IAI = 30, IBI = 28, ICI = 14, IAnBI = 11, IA n CI = 4, IB n CI = 3, and IA n B n CI = 2. Then obtain the value of

IAUBuCI

1.6 A survey of the hobbies for n people shows the following: a people like music; b people like paintings; c people like sports; d people like both music and paintings; e people like both paintings and sports; and f people like both sports and music. Then, how many people like music, painting and sports? Assume that each person has at least one hobby.
1. 7 Let A and B be subsets of U. Show that

## IA n BI = lUI - IAI - IBI + IA n BI

1.8 Let A and B be sets, and let the numbers of elements in A and B be N A and N B, respectively. How many binary relations are there from A to B? 1.9 Let L be the set of all lines in a plane, and let II, 12 E L. Is each of the following relation "", equivalence relation? (a) II "" 12 {::} II is parallel to 12. (b) II "" 12 {::} h is perpendicular to 12 ,

Exercises

15

1.10 Show that", in Example 1.9 is an equivalence relation. 1.11 (M) Consider the equivalence relations on A many equivalence relations are there?

= {al,a2,a3,a4}.

How

1.12 (M) Let Rand S be equivalence relations on set A. Is each of the following an equivalence relation? If it is an equivalence relation, then prove it, otherwise show a counterexample. (I)RUS, (2) RnS. 1.13 Let X be a set consisting of d elements, and let Y be a set consisting of r elements. How many functions are there from X to Y? 1.14 Let Pi = {a,I, ... ,Pi -I}(i = I, ... ,n), R = {a,I, ... ,r -I}, Pi ~ 1, and r ~ 1. Enumerate the number of mappings: PI x P2 X X Pn - R. 1.15 How many unary operations on L tions on L = {a, 1,2, 3}?

= {a, 1, 2}?

## How many unary opera-

1.16 Let i be a positive integer. Let A(i) be the set of positive integers which are divisor of i. When a is a divisor of b, we define the binary relation 5,R by a 5,R b. Then, show that (A(I2a), 5,R) is an ordered set. Also draw the Hasse diagram. 1.17 Let B = {a, I}, and let a = (al,a2,a3) and b = (b l ,b2,ba) be two elements in B x B x B = Ba. Let a 5, b iff al 5, bl, a2 5, b2, and aa 5, ba . Show that (B3, 5,) is an ordered set, and draw the Hasse diagram. 1.18 Draw the Hasse diagram of B5. 1.19 Let N = {I, 2, ... , 1O}. The binary relation <. on N is defined as n <. m, where "n < m, and nand m have common divisor other than 1." Show the Hasse diagram of (N, <. ). 1.20 Obtain all possible partitions of T

= {a, 1, 2}.

1.21 Let R = {(a, a), (b,b), (a, c), (c,a),(c,b)} be a binary relation on S = {a, b, c}. Does R satisfy each of the following? If not, show a counterexample.

16

1 MATHEMATICAL FOUNDATIONS

Figure 1.5

(a) reflective, (b) symmetric, (c) antisymmetric, (d) transitive, (e) partial order relation, (f) equivalence relation, (g) function. 1.22 Prove or disprove the following: (a) x\$.yVz <:} (x\$.yorx\$.z). (b) x \$. y . Z <:} (x \$. y and x \$. z). 1.23 Let n be an arbitrary non-negative integer. Prove that n 3 multiple of 3.

+ 2n

is a

1.24 In Fig. 1.5, obtain the upper bound, lower bound, least upper bound, and greatest lower bound of {d, e,

n.

1.25 Let N be a set of natural numbers containing O. Let F be the set of all the functions from N to N. For functions I, 9 E F, if I(n) = g(n) holds excepts for the finite number of points in N, then we denote it by I'" g. Prove that '" is an equivalence relation.