0% found this document useful (0 votes)
457 views11 pages

Discrete Mathematics: CBMA2103

1) The document discusses relations and provides examples to determine if a relation R1 is an equivalence relation, partial order, or neither. It uses ordered pairs, arrow diagrams, matrices, and truth tables. 2) It also covers counting techniques to solve problems involving combinations and permutations. Examples include counting the number of offices in a building, shirt combinations, and routes between cities. 3) The techniques discussed include using matrices to represent relations and determine if they are reflexive, symmetric, and transitive to check for equivalence relations. Truth tables are also used to evaluate statements.

Uploaded by

hamizona
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
457 views11 pages

Discrete Mathematics: CBMA2103

1) The document discusses relations and provides examples to determine if a relation R1 is an equivalence relation, partial order, or neither. It uses ordered pairs, arrow diagrams, matrices, and truth tables. 2) It also covers counting techniques to solve problems involving combinations and permutations. Examples include counting the number of offices in a building, shirt combinations, and routes between cities. 3) The techniques discussed include using matrices to represent relations and determine if they are reflexive, symmetric, and transitive to check for equivalence relations. Truth tables are also used to evaluate statements.

Uploaded by

hamizona
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

CBMA2103 – DISCRETE MATHEMATICS

Page
Table of Contents ……………… 1

1.0 Question 1 ……………… 2

1.1 Answer for Question 1 ……………… 3

2.0 Question 2 ……………… 7

2.1 Answer for Question 2 ......................... 8

3.0 Appendixes ………………. 11

3.1 References ………………..11

Page 1 of 11
1.0 QUESTION 1

Relation R1 is defined below:

R1 = {(p,q) | p-q is even}; R1 on set M = {1,2,3,4};


Ordering of M: 1,2,3,4

a) Write the relation R1 as a set of ordered pairs. Draw the arrow diagram and
determine whether R1 are functions or not. Explain your answer.

b) Hence, determine whether the relation R1 is an equivalence relation or partial order


(or neither both).

c) Describe how can the digraph of the relation R1 be used to determine whether R1 is
an equivalence relation. Your answer should include the digraph and detail
description.

d) Determine the matrix of the relation R1 (relative to the given orderings). Now,
reorder R1 as 3,2,1,4, thus determine the new matrix obtained.

e) Another technique to test for reflexive, symmetric and transitivity is by using the
matrix of relation. Analyze matrix of the relation R1 to determine whether R1 is
an equivalence relation.

Another property of relation is irreflexive which is defined as follow:

A relation R on set N is irreflexive if for every x ∈ X, (x,x) ∉ R. That is, R is


irreflexive if no element in N is related to itself.

f) Determine whether R1 is irreflexive.


g) Explain the difference between irreflexive and reflexive.

Page 11 of 11
1.1 Answer for Question 1:
a) R1 =set of ordered pairs. R1 = {(p-q) | p-q is even}

R1 = { (1,1), (1,3), (2,2), (2,4), (3,1), (3,3), (4,2), (4,4) }

1 1
2 2
3 3
4 4

p R1 q

R1 is not a function since one element of domain can associate with only one element
of co-domain in a function. The above diagram shows each elements in p have 2
pointing point in set q. So R1 is only a relation and not a function.

b) R1 is reflexive because {(1, 1), (2, 2), (3, 3). (4, 4)}.
R1 is symmetric because {(1,3),(3,1),(2,4),(4,2)}.
R1 is transitive because {(3,1),(1,3),(3,3),(2,4),(4,2), (2,2), (4,4)}.

Thus, R1 is equivalence relation on set M = {1,2,3,4}

c) R1 = { (1,1), (1,3), (2,2), (2,4), (3,1), (3,3), (4,2), (4,4) }

Digraph relation for R1:

1 2

4 3

R1 is reflexive because {(1,1),(2,2),(4,4)}.


R1 is symmetric because {(1,3),(3,1),(2,4),(4,2)}.
R1 is transitive because {(3,1),(1,3),(3,3),(2,4),(4,2), (2,2), (4,4)}.

Thus, R1 is equivalence relation because R1 is reflexive, symmetric and transitive.

Page 11 of 11
d) R1 = { (1,1), (1,3), (2,2), (2,4), (3,1), (3,3), (4,2), (4,4) }

X = {1,2,3,4}
Y = {1,2,3,4}

Relative to ordering 1,2,3,4 to 1,2,3,4

1 2 3 4

1 1 0 1 0

2 0 1 0 1
R1 =
3 1 0 1 0

4 0 1 0 1

Reorder R1 as 3,2,1,4 and the new matrix obtained is :

R1 = { (1,1), (1,3), (2,2), (2,4), (3,1), (3,3), (4,2), (4,4) }

3 2 1 4

3 1 0 1 0

Reorder R1= 2 0 1 0 1

1 1 0 1 0

4 0 1 0 1

e) R1 = { (1,1), (1,3), (2,2), (2,4), (3,1), (3,3), (4,2), (4,4) }

1 2 3 4

1 1 0 1 0

2 0 1 0 1
R1 =
3 1 0 1 0

4 0 1 0 1 reflexive concept.

Page 11 of 11
Relation R1 is reflexive because matrix R1 has 1’s on the main diagonal at the right.
(1,1),(2,2),(3,3),(4,4).

Checking for transitivity: Suppose that A1 and A2 are matric represent relation R1 and
R2 respectively. The product of these two matrices is A1A2. If we replace each non zero
entry in A1A2 by 1, we will get a matrix that represents the composition of the two
relations R2 o R1.
The relation of R is transitive if and only if whenever entry i,j in A² is non zero, also
entry i,j in A is nonzero.

Look at the example below:


R1 x R1 = R²

1 2 3 4

1 1 0 1 0

2 0 1 0 1
R1 =
3 1 0 1 0

4 0 1 0 1

1 2 3 4 1 2 3 4

1 1 0 1 0 1 1 0 1 0

2 0 1 0 1 X 2 0 1 0 1
R²=
3 1 0 1 0 3 1 0 1 0

4 0 1 0 1 4 0 1 0 1

1 2 3 4

1 2 0 2 0

2 0 2 0 2
R² =
3 2 0 2 0

4 0 2 0 2

Page 11 of 11
Whenever entry i, j in R² is nonzero, entry i, j in R1 is also nonzero. Therefore, the
above matrix is transitive.

Checking for symmetric:


The above matrix is symmetric if and only if for all i and j, the ijth entry of R1 is equal
to the jith entry of R1. Symmetric matric is equal to its transpose. Look at the example
below:

The transpose of the matrix

1 2 3

4 5 6

is the matrix

1 4
2 5
3 6

Therefore, the matrix

1 0 1 0

0 1 0 1
R1 = is symmetric.
1 0 1 0

0 1 0 1

Thus, R1 is equivalence relation because R1 is reflexive, transitive and symmetric.

f) R1 on set M = { 1,2,3,4 } is reflexive because for each elements p ∈ M and (p,p) ∈ R1.

So R1 is not irreflexive.

Page 11 of 11
g) It is irreflexive if there exists x that (x, x) is not a member of set N. Meanwhile,
reflexive means in any given element, that element has the given relation to itself. For
example we called reflexive if x = x for all x, whereas the relation of being 'less than'
is not, since it is not true that x < x for any x. Reflexive also has a loop at every
vertex (if we refer to its digraph).

2.0 QUESTION 2

1. Consider the following statement:

W: If Ali has old story books, then he will donate the books to his school.

a) Write each statement in terms of p and q. Then, re-write the statement into
logical notation.

b) Find the negation, converse and contrapositive of the above statement, W in


symbolic form.

c) Using the answer in 1(a), determine the truth table of the propositions in
statement W.

d) Is the statement W a tautology, contradiction or neither both? Discuss your


answer.

h) Contruct a truth table for: ( p → q ) ∨ (r ∧ s )

2. a) Use the suitable counting technique to solve the following problems. Discuss
and show the steps on how you the answer.

i. An office building contains 28 floors and has 39 offices on each floor. How
many offices are there in the building?
ii. A shirt of the ABC brand comes in 12 colors, has a male version and a
female version and comes in three sizes for each male and female. How
many different types of this shirt are made?
iii. How many different three-letter initials with none of the letters repeated can
people have?
iv. Assume that there are five major auto routes from the city X to Y and seven
auto routes from the city Y to Z. How many major routes are there from X
to Z via Y.

i) Describe the counting techniques that you have chosen to solve 2(a)(i) – (iv).
Why did you choose this technique and in what situation is it appropriate to be
used. Discuss other TWO (2) counting techniques that you know.

Page 11 of 11
2.1 Answer for Question 2:
Number 1:

p: Ali has old story books


q: Ali will donate his old story books to his school.

Notation:
→ is implication
~ is negation

a) p → q

b) W in symbolic form:
negation: ~ (p → q)
converse: q → p
contrapositive: ~ q → ~ p

c)
p q p→q
T T T
T F F
F T T
F F T

d) The statement is neither a tautology nor a contradiction. A tautology would have all
True values for the p→q column, and a contradiction would have all False values for
the p→column. The statement has T F T T as the values in the last column, so it can't
be either.

Page 11 of 11
e)
p q r s ( p → q) ∨ (r ∧ s)
T T T T T
T T T F T
T T F T T
T T F F T
T F T T F
T F T F F
T F F T T
T F F F F
F T T T T
F T T F T
F T F T T
F T F F T
F F T T T
F F T F T
F F F T T
F F F F T

Number 2:

a)
i. 28*39 = 1,092 offices.

ii. 12 colors * 2 genders * 3 sizes = 72 different types, considering any difference in


color, gender, or size to constitute a different type.

iii. There are 26 letters in the alphabet. The first initial can be any of them, but because
we are not allowing repeated letters, the second initial must be one of the other 25, and
the third must be one of the 24 not yet chosen. So there are 26 * 25 * 24 = 15,600
possible sets of initials with none of the letters repeated.

iv. Combine any of the 5 routes from X to Y with any of the 7 from Y to Z to get: 5 * 7
= 35 total routes.

b) We are using simple multiplication for (i)

Also multiplied for (ii) and (iv), but the situation is a little different; these are
combinations of independent alternatives.

(iii) It was an example of a permutations calculation: order matters, but the alternatives
are drawn from a single set and no choice can be repeated. (In the case of initials, that's
an artificial and unreasonable restriction, but it was stated and we followed it.)

Page 11 of 11
Other counting techniques:

i) [number of possibilities] ^ [number of choices made] is useful in cases where there is


one set of possibilities, but no restriction on repeating a selection. The actual
calculation of possible sets of three initials, without the rule against repeating a letter,
would use this: 26^3 = 17,576

Combinations: used in cases where the possibilities are drawn from a single set, and no
choice can be repeated, but where order doesn't count.

ii) Powers of 2: used in cases where any of a set of possibilities can be either included
or excluded, and the total included can range from none at all to the entire set.

Example: There are 7 committee members and each of them either shows up for the
meeting or doesn't. How many different possible compositions of the meeting are
there?

Answer: 2^7 = 128 (includes the one where nobody shows up).

Page 11 of 11
3.0 Appendixes
3.1 References
• Zin, A.M. et al. (2009). CBMA2103 Discrete Mathematics. Kuala Lumpur:
Unitem.
• Bradley, J (1987). Introduction to Discrete Mathematics. Massachussets:
Addison-Wesley Publishing Company Inc.
• Portal Discrete Mathematics (”n.d.“). [Online]. Available:
http://en.wikipedia.org/wiki/Portal:Discrete_mathematics [2009, Nov,13].

Page 11 of 11

You might also like