Chapter 2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 45

ECOM 2311- Discrete Mathematics

Chapter # 2 : Basic Structures: Sets, Functions, Sequences,

Sums, and Matrices

Fall, 2013/2014

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 1 / 45


Outline

1 Sets

2 Set Operations

3 Functions

4 Sequences and Summations

5 Matrices

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 2 / 45


Sets
Introduction

Set
is an unordered collection of objects, called elements or members of the
set. A set is said to contain its elements. We write a ∈ A to denote that
a is an element of the set A. The notation a 6∈ A denotes that a is not an
element of the set A.

It is common for sets to be denoted using uppercase letters.


Lowercase letters are usually used to denote elements of sets.
The set V of all vowels in the English alphabet can be written as
[roster method] V = {a, e, i, o, u}.
The set of positive integers less than 100 can be denoted by
{1, 2, 3, · · · , 99}.
”· · · ” is called ellipses which used for brevity when the general
pattern of the elements is obvious.
ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 3 / 45
Sets
Introduction

Equal sets
Two sets are equal if and only if they have the same elements. Therefore,
if A and B are sets, then A and B are equal if and only if
∀x(x ∈ A ↔ x ∈ B). We write A = B if A and B are equal sets.

The sets {1, 3, 5} and {3, 5, 1} are equal, because they have the
same elements.
The order in which the elements of a set are listed does not matter.
{1, 3, 3, 3, 5, 5, 5, 5} is the same as the set {1, 3, 5} because they
have the same elements.
It does not matter if an element of a set is listed more than once.
Empty set or null set: the set that has no elements and is denoted
by ∅ or by {} [but not {∅}].

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 4 / 45


Sets
Set builder

By using the set builder, the set can be described by stating the
property they must have to be members.
The set of all odd positive integers can be written as
O = {x|x is an odd positive integer less than 10} or
O = {x ∈ Z + |x is odd and x < 10}.
Famous sets: N: natural numbers, Z: integers, Z+ : positive
integers, Q: rational numbers, R: real numbers, R+ : positive real
numbers and C: complex numbers.

Subset
The set A is a subset of B if and only if every element of A is also an
element of B, i.e ∀x(x ∈ A → x ∈ B). We use the notation A ⊆ B to
indicate that A is a subset of the set B.

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 5 / 45


Sets
Subsets

Proper subset
written as A ⊂ B and it read as ”A is a proper subset of B”. It used to
emphasize that a set A is a subset of the set B but that A 6= B, i.e.
∀x(x ∈ A → x ∈ B) ∧ ∃x(x ∈ B ∧ x 6∈ A)

A = B → (A ⊆ B) ∧ (B ⊆ A)
(A ⊆ B) ∧ (B ⊆ C ) → A ⊆ C [SEE VENN DIAGRAM]

EX. Find an equal set with the following set


B = {x|x is a subset of the set {a, b}}.
Ans. A = {∅, {a}, {b}, {a, b}}, Note that {a} ∈ A but a 6∈ A.
ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 6 / 45
Sets
Cardinality of the Set

Let S be a set. If there are exactly n distinct elements in S where n is a


nonnegative integer, we say that S is a finite set and that n is the
cardinality of S. The cardinality of S is denoted by |S|.
Examples:
A is the set of odd positive integers less than 10 ⇒ |A| = 5 .
S is the set of the English Alphapet ⇒ |S| = 26.
D = ∅ ⇒ |D| = 0.
The set of positive integers ⇒ Infinite set.

The power set of S is the set of all subsets of the set S and is denoted by
P(S) or 2S , i.e. P(S) = {B|B ⊆ S}

P({0, 1, 2}) = {∅, {0}, {1}, {2}, {0, 1}, {0, 2}, {1, 2}, {0, 1, 2}} .
P(∅) = {∅}
P({∅}) = {∅, {∅}}
ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 7 / 45
Sets
Cartesian Products

The ordered n-tuple (a1 , a2 , · · · , an ) is the ordered collection that has a1


as its first element, a2 as its second element, . . . , and an as its nth
element.

Two ordered n-tuples are equal if and only if each corresponding


pair of their elements is equal. In other words,
(a1 , a2 , · · · , an ) = (b1 , b2 , · · · , bn ) if and only if ai = bi , for
i = 1, 2, · · · , n.
Ordered 2-tuples are called ordered pairs. The ordered pairs (a, b)
and (c, d) are equal if and only if a = c and b = d.
Note that (a, b) and (b, a) are not equal unless a = b.

Let A and B be sets. The Cartesian (direct) product of A and B, denoted


by A × B, is the set of all ordered pairs (a, b), where a ∈ A and b ∈ B.
Hence, A × B = {(a, b)|a ∈ A ∧ b ∈ B}.

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 8 / 45


Sets
Cartesian Products

EX.A = {1, 2} , B = {a, b, c}


A × B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)}.
B × A = {(a, 1), (a, 2), (b, 1), (b, 2), (c, 1), (c, 2)}.
A × B 6= B × A unless A = B.
EX.A = {0, 1} , B = {1, 2} and C = {0, 1, 2}
A × B × C = {(0, 1, 0), (0, 1, 1), (0, 1, 2), (0, 2, 0), (0, 2, 1), (0, 2, 2),
(1, 1, 0), (1, 1, 1), (1, 1, 2), (1, 2, 0), (1, 2, 1), (1, 2, 2)}.
(A × B) × C 6= A × B × C .
The notation A2 is used to denote A × A
and similarly A3 = A × A × A.
The truth set of the predicate P is the set of elements x in the domain
D for which P(x) is true. The truth set of P(x) is denoted by
{x ∈ D|P(x)}.

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 9 / 45


Set Operations
Introduction

Let A and B be sets. The union of the sets A and B, denoted by A ∪ B,


is the set that contains those elements that are either in A or in B, or in
both, i.e. A ∪ B = {x|x ∈ A ∨ x ∈ B}.

Let A and B be sets. The intersection of the sets A and B, denoted by


A ∩ B, is the set that contains those elements in both A and B, i.e.
A ∩ B = {x|x ∈ A ∧ x ∈ B}.

Two sets are called disjoint if their intersection is the empty set.

Let A and B be sets. The difference of A and B, denoted by A − B, is


the set containing those elements that are in A but not in B, i.e.
A − B = {x|x ∈ A ∧ x 6∈ B}.. The difference of A and B is also called the
complement of B with respect to A and sometimes is denote by A \ B

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 10 / 45


Set Operations
Introduction

Let U be the universal set. The complement of the set A, denoted by Ā,
is the complement of A with respect to U. Therefore, the complement of
the set A is U − A, i.e. Ā = {x ∈ U|x 6∈ A}.

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 11 / 45


Set Operations
Introduction

EX. A = {1, 3, 5} and B = {1, 2, 3}


A ∪ B = {1, 2, 3, 5}
A ∩ B = {1, 3}
A − B = {5}
B − A = {2}

The union of a collection of sets [generalized union] is the set that


contains those elements that are Smembers of at least one set in the
collection. A1 ∪ A2 ∪ · · · ∪ An = ni=1 Ai

The intersection of a collection of sets [generalized intersection] is the set


that contains those elements thatTare members of all the sets in the
collection. A1 ∩ A2 ∩ · · · ∩ An = ni=1 Ai

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 12 / 45


Set Operations
Set Identities

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 13 / 45


Set Operations
Set Identities

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 14 / 45


Set Operations
Set Identities

Ex. By using the builder notation, prove that A ∩ B = Ā ∪ B̄

Exercise: prove that A ∪ B = Ā ∩ B̄

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 15 / 45


Functions
Introduction

Function Definition
Let A and B be nonempty sets. A function f from A to B is an
assignment of exactly one element of B to each element of A. We write
f (a) = b if b is the unique element of B assigned by the function f to the
element a of A. If f is a function from A to B, we write f : A → B.
Functions are sometimes also called mappings or transformations.
If f is a function from A to B, we say that A is the domain of f and B is
the codomain of f. If f (a) = b, we say that b is the image of a and a is a
preimage of b. The range, or image, of f is the set of all images of
elements of A. Also, if f is a function from A to B, we say that f maps A
to B.
Check if the following relations of the sets A = {a, b, c},
B = {1, 2, 3} are functions or not :

f = {(a, 1), (b, 2), (c, 1)} g = {(a, 1), (b, 2)} ×
h = {(a, 1), (b, 2), (c, 1), (a, 2)} ×
ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 16 / 45
Functions
Introduction

EX. What are the domain, codomain, and range of the function that
maps the set A = {a, b, c} to the set B = {1, 2, 3} according to the
relation f = {(a, 1), (b, 2), (c, 1)}.
Domain: {a, b, c}.
Codomain: {1, 2, 3}.
Range: {1, 2}
EX. What are the domain, codomain and range of f : Z → Z which
assign the square of an integer to this integer. i.e. f (x) = x 2
Domain: Z (all integers)
Codomain: Z (all integers)
Range: the set of all integers that are perfect squares, namely,
{0, 1, 4, 9, · · · }.
EX. Express the range of the function that maps the set A to B using
the set builder notation.
range of f ={b ∈ B|f (a) = b for some a ∈ A}
ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 17 / 45
Functions
Introduction

Let f1 and f2 be functions from A to R. Then f1 + f2 and f1 f2 are also


functions from A to R defined for all x ∈ A by
(f1 + f2 )(x) = f1 (x) + f2 (x),
(f1 f2 )(x) = f1 (x)f2 (x).
EX. Let f1 and f2 be functions from R to R such that f1 (x) = x 2 and
f2 (x) = x − x 2 . What are the functions f1 + f2 and f1 f2 ?
(f1 + f2 )(x) = f1 (x) + f2 (x) = x 2 + (x − x 2 ) = x and
(f1 f2 )(x) = x 2 (x − x 2 ) = x 3 − x 4 .
Let f be a function from A to B and let S be a subset of A. The image of
S under the function f is the subset of B that consists of the images of
the elements of S. We denote the image of S by f (S), so
f (S) = {t|∃s ∈ S(t = f (s))} or {f (s)|s ∈ S}.
EX. Let A = {a, b, c, d, e} and B = {1, 2, 3, 4} with f (a) = 2, f (b) = 1,
f (c) = 4, f (d) = 1, and f (e) = 1. The image of the subset
S = {b, c, d} is the set f (S) = {1, 4}.

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 18 / 45


Functions
One-to-One and Onto Functions

A function f is said to be one-to-one, or injective, if and only if


f (a) = f (b) implies that a = b for all a and b in the domain of f. i.e. the
function never assigns the same value to two different domain elements.
∀a∀b(f (a) = f (b) → a = b)

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 19 / 45


Functions
One-to-One and Onto Functions

A function f from A to B is called onto, or surjective, if and only if for


every element b ∈ B there is an element a ∈ A with f (a) = b. i.e, the
range and the codomain are equal.
∀y ∃x(f (x) = y ).

The function f is a one-to-one correspondence, or bijective, if it is


both one-to-one and onto.
Ex. State whether the following functions are one-to-one, onto or
bijective:
**(1) f from {a, b, c, d} to {1, 2, 3, 4, 5} with f (a) = 4, f (b) = 5, f (c)
= 1, and f (d) = 3
One-to One and not onto as 2 has no preimage.
**(2) f (x) = x 2 from the set of integers to the set of integers
not one to one as f (1) = f (−1) = 1 for example and not onto as there is
no integer x with x 2 = −1, for instance.
ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 20 / 45
Functions
One-to-One and Onto Functions

**(3) f (x) = x + 1 from the set of real numbers to itself


The function f (x) = x + 1 is a one-to-one function. To demonstrate this,
note that x + 1 6= y + 1 when x 6= y . Additionally, this function is onto,
because for every integer y there is an integer x such that f (x) = y. To
see this, note that f (x) = y if and only if x + 1 = y, which holds if and
only if x = y - 1. The function is bijective as its one-to-one and onto.

**(4) f is the function from {a, b, c, d} to {1, 2, 3} defined by f (a) = 3,


f (b) = 2, f (c) = 1, and f (d) = 3.
not one to one but onto.

**(5) f is the function from {a, b, c, d} to {1, 2, 3, 4} with f (a) = 4, f


(b) = 2, f (c) = 1, and f (d) = 3.
one to one and onto ⇒ bijective.

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 21 / 45


Functions
One-to-One and Onto Functions

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 22 / 45


Functions
Inverse Functions and Compositions of Functions

Let f be a one-to-one correspondence from the set A to the set B. The


inverse function of f is the function that assigns to an element b ∈ B the
unique element a in A such that f (a) = b. The inverse function of f is
denoted by f −1 . Hence, f −1 (b) = a when f (a) = b.

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 23 / 45


Functions
Inverse Functions and Compositions of Functions

Ex. State whether the following functions are invertible or not:


**(1) f is the function from {a, b, c} to {1, 2, 3} such that f (a) = 2, f
(b) = 3, and f (c) = 1.
The function f is invertible because it is a one-to-one correspondence.
The inverse function f −1 reverses the correspondence given by f , so
f −1 (1) = c, f −1 (2) = a, and f −1 (3) = b.

**(2) Let f : Z → Z be such that f (x) = x + 1.


The function f has an inverse because it is a one-to-one correspondence.
To reverse the correspondence, suppose that y is the image of x, so that
y = x + 1. Then x = y - 1 ⇒ f −1 (y ) = y − 1.

**(3) Let f be the function from R to R with f (x) = x 2 .


f is not invertible as it not bijective.

** Exercise: Let f be the function from R+ to R+ with f (x) = x 2 .


4x
** Exercise: (i) f (x) = log2 (x + 1) (ii) f (x) = (2x−1) .
ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 24 / 45
Functions
Inverse Functions and Compositions of Functions

Let g be a function from the set A to the set B and let f be a function
from the set B to the set C. The composition of the functions f and g,
denoted for all a ∈ A by f ◦ g , is defined by (f ◦ g )(a) = f (g (a)).
To find (f ◦ g )(a) we first apply the function g to a to obtain g(a)
and then we apply the function f to the result g(a) to obtain
(f ◦ g )(a) = f (g (a)).
The composition f ◦ g cannot be defined unless the range of g is a
subset of the domain of f.

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 25 / 45


Functions
Inverse Functions and Compositions of Functions

EX. 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 and g, and what is the composition of g and f ?
The composition f ◦ g is defined by
(f ◦ g )(a) = f (g (a)) = f (b) = 2, (f ◦ g )(b) = f (g (b)) = f (c) = 1, and
(f ◦ g )(c) = f (g (c)) = f (a) = 3.
g ◦ f is not defined, because the range of f is not a subset of the domain
of g.
EX. 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 ?
(f ◦ g )(x) = f (g (x)) = f (3x + 2) = 2(3x + 2) + 3 = 6x + 7.
(g ◦ f )(x) = g (f (x)) = g (2x + 3) = 3(2x + 3) + 2 = 6x + 11.
Note that f ◦ g 6= g ◦ f

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 26 / 45


Functions
Inverse Functions and Compositions of Functions

Let A be a set. The identity function on A is the function ιA : A → A,


where ιA (x) = x for all x ∈ A. In other words, the identity function ιA is
the function that assigns each element to itself. The function ιA is
one-to-one and onto, so it is a bijection.

When the composition of a function and its inverse is formed, in


either order, an identity function is obtained.
suppose that f is a one-to-one correspondence from the set A to the
set B. Then the inverse function f −1 exists and is a one-to-one
correspondence from B to A.
f −1 (b) = a when f (a) = b, and f (a) = b when f −1 (b) = a.
(f −1 ◦ f )(a) = f −1 (f (a)) = f −1 (b) = a ⇒ f −1 ◦ f = ιA
(f ◦ f −1 )(b) = f (f −1 (b)) = f (a) = b ⇒ f ◦ f −1 = ιB

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 27 / 45


Functions
Some Important Functions

The floor function assigns to the real number x the largest integer that
is less than or equal to x. The value of the floor function at x is denoted
by bxc. The ceiling function assigns to the real number x the smallest
integer that is greater than or equal to x. The value of the ceiling
function at x is denoted by dxe.

b 12 c = 0, d 12 e = 1, b −1 −1
2 c = −1, d 2 e = 0
Note that dx + y e =
6 dxe + dy e

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 28 / 45


Functions
Some Important Functions

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 29 / 45


Functions
Cardinality of Sets

The sets A and B have the same cardinality if and only if there is a
one-to-one correspondence from A to B. When A and B have the same
cardinality, we write |A| = |B|.

If there is a one-to-one function from A to B, the cardinality of A is less


than or the same as the cardinality of B and we write |A| ≤ |B|.

SCHRÖDER-BERNSTEIN THEOREM
if there are one-to-one functions f from A to B and g from B to A, then
there is a one-to-one correspondence between A and B.

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 30 / 45


Sequences and Summations
Sequences

Sequence
A sequence is a function from a subset of the set of integers (usually
either the set {0, 1, 2, . . .} or the set {1, 2, 3, . . .}) to a set S. We
use the notation an to denote the image of the integer n. We call an a
term of the sequence.

Consider the sequence {an }, where an = n1 .


The list of terms of this sequence starts with: {1, 12 , 13 , 14 , · · · }

Geometric progression
A geometric progression is a sequence of the form
a, ar , ar 2 , · · · , ar n , · · ·
where the initial term a and the common ratio r are real numbers.

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 31 / 45


Sequences and Summations
Sequences

Arithmetic progression
An arithmetic progression is a sequence of the form
a, a + d, a + 2d, · · · , a + nd, · · ·
where the initial term a and the common difference d are real numbers.
List the first five terms of the sequences
{bn } with bn = (−1)n ⇒ the terms are: 1, −1, 1, −1, · · · . Its a
geometric progression with initial term 1 and common ratio -1.
{sn } with sn = −1 + 4n ⇒ the terms are: −1, 3, 7, 11, · · · . Its an
arithmetic progression with initial term -1 and common difference 4.
Recurrence Relation
A recurrence relation for the sequence {an } is an equation that expresses
an in terms of one or more of the previous terms of the sequence,
namely, a0 , a1 , ..., an−1 , for all integers n with n ≥ n0 , where n0 is a
nonnegative integer. A sequence is called a solution of a recurrence
relation if its terms satisfy the recurrence relation.
ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 32 / 45
Sequences and Summations
Recurrence Relations

Let an be a sequence that satisfies the recurrence relation an = an−1 + 3


for n = 1, 2, 3, · · · and suppose that a0 = 2. What are a1 , a2 , and a3 ?
We see from the recurrence relation that a1 = a0 + 3 = 2 + 3 = 5.
It then follows that a2 = 5 + 3 = 8 and a3 = 8 + 3 = 11.
a0 = 2 is called the initial condition.

Fibonacci sequence
The Fibonacci sequence, f0 , f1 , f2 , · · · is defined by the initial conditions
f0 = 0, f1 = 1, and the recurrence relation
fn = fn−1 + fn−2 for n = 2, 3, 4, · · ·

The Fibonacci numbers: f2 = f1 + f0 = 1 + 0 = 1, similarly


f3 = 2, f4 = 3, f5 = 5 and f6 = 8.
It is an important sequence for many applications and we will study
it in depth later.

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 33 / 45


Sequences and Summations
Recurrence Relations

Find formulae for the sequences with the following first five terms: (a) 1,
1/2, 1/4, 1/8, 1/16 (b) 1, 3, 5, 7, 9
(a) an = 1/2n is a possible match (b) an = 2n + 1 is a possible match.
How can we produce the terms of a sequence if the first 10 terms are 1,
2, 2, 3, 3, 3, 4, 4, 4, 4?
The integer 1 appears once, the integer 2 appears twice, the integer
3 appears three times, and the integer 4 appears four times. A
reasonable rule for generating this sequence is that the integer n
appears exactly n times.
How can we produce the terms of a sequence if the first 10 terms are 1,
3, 4, 7, 11, 18, 29, 47, 76, 123?
Starting with the third term, each term is the sum of the two
previous terms. That is, 4 = 3 + 1, 7 = 4 + 3, 11 = 7 + 4, and so on.
We can guess that the sequence is determined by the recurrence
relation Ln = Ln−1 + Ln−2 with initial conditions L1 = 1 and L2 = 3.
ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 34 / 45
Sequences and Summations
Summations

Pn
The summation notation i=m ai used to refer to the sum of
am + am+1 + · · · + an .

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 35 / 45


Matrices
Matrix Arithmetic

Matrix
A matrix is a rectangular array of numbers. A matrix with m rows and n
columns is called an m × n matrix. A matrix with the same number of
rows as columns is called square. Two matrices are equal if they have the
same number of rows and the same number of columns and the
corresponding entries in every position are equal.

The sum of two matrices of the same size is obtained by adding


elements in the corresponding positions.

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 36 / 45


Matrices
Matrix Arithmetic

Let A be an m × k matrix and B be a k × n matrix. The product


of A and B, denoted by AB, is the m × n matrix with its (i,j)th
entry equal to the sum of the products of the corresponding
elements from the ith row of A and the jth column of B.

Matrix multiplication is not commutative. That is, if A and B are


two matrices, it is not necessarily true that AB and BA are the
same.
ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 37 / 45
Matrices
Matrix Arithmetic

The Identity Matrix of order n is n×n matrix where the main


diagonal is all 1 and every other element is 0.

The transpose of A, denoted by At , is obtained by interchanging the


rows and columns of A.

A square matrix A is called symmetric if A = At .


a matrix is symmetric if and only if it is square and it is symmetric
with respect to its main diagonal.
ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 38 / 45
Matrices
ZeroOne Matrices

Zero-one matrices
It is a matrix with entries that are 0 or 1. They represent discrete
structures using Boolean arithmetic.
The Boolean arithmetic is based on the Boolean operations ∧ and ∨,
which operate on pairs of bits, defined by

Let A = [aij ] and B = [bij ] be m × n zero-one matrices.


The join of A and B (A ∨ B) is the zero-one matrix with (i,j)th entry
aij ∨ bij .
The meet of A and B (A ∧ B) is the zero-one matrix with (i,j)th entry
aij ∧ bij .
ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 39 / 45
Matrices
ZeroOne Matrices

Example: Find the join and meet of the zero-one matrices:

The join of A and B is:

The meet of A and B is:

Now we will define the Boolean Product of two matrices.

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 40 / 45


Matrices
ZeroOne Matrices

Example: Find the join and meet of the zero-one matrices:

The join of A and B is:

The meet of A and B is:

Now we will define the Boolean Product of two matrices.

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 41 / 45


Matrices
ZeroOne Matrices

Boolean product
Let A = [aij ] be an m×k zero-one matrix and B = [bij ] be a k×n
zero-one matrix. Then the Boolean product of A and B, denoted by
A B, is the m×n matrix with (i, j)th entry cij where
cij = (ai1 ∧ b1j ) ∨ (ai2 ∧ b2j ) ∨ · · · ∨ (aik ∧ bkj ).

Example: Find the Boolean product of A and B, where:

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 42 / 45


Matrices
ZeroOne Matrices

ECOM 2311- Discrete Mathematics - Ch.2 Dr. Musbah Shaat 43 / 45


Homework due to 22nd of Oct.
From the text book, Section 1.7, page 91
Questions: Q2,Q64, Q14, Q16, Q22, Q26 and Q42.
From the text book, Section 1.8, page 108
Questions: Q4,Q8, Q22 and Q30.
From the text book, Section 2.1, page 125
Questions: Q2[part a], Q10, Q18, Q24, and Q32[part d].
From the text book, Section 2.2, page 136
Questions: Q4, Q6, Q10, Q14, Q32, and Q34.
From the text book, Section 2.3, page 152
Questions: Q2, Q10, Q11, and Q12.
End of Chapter # 2

You might also like