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

Higher Nationals

Internal verification of assessment decisions – BTEC (RQF)

INTERNAL VERIFICATION – ASSESSMENT DECISIONS


Programme title BTEC Higher National Diploma in Computing

Assessor Miss Shyamali Internal Verifier

Unit(s) Unit 18 : Discrete Mathematics

Assignment title Discrete mathematics in software engineering concepts

Student’s name A. Jaan Sheriffdeen

List which Pass Merit Distinction


assessment
criteria the
Assessor has
awarded.
INTERNAL VERIFIER CHECKLIST
Do the assessment criteria
awarded match those shown in Y
the assignment brief? /
N

Is the Pass/Merit/Distinction grade


awarded justified by the
assessor’s comments on the student
work? Y/N

Has the work been Y


assessed accurately? /
N
Is the feedback to the student:
Give details:
• Constructive?
Y
• Linked to relevant
assessment criteria? /

• Identifying N
opportunities for
improved performance?

Unit 18:DM Jaan Sheriffdeen (NC38988) 1


• Agreeing actions? Y
/
N

Y
/
N

Y
/
N

Does the assessment decision Y


need amending? /
N
Assessor signature Date

Internal Verifier signature Date


Programme Leader
Date
signature (if required)

Confirm action completed


Remedial action taken
Give details:

Assessor signature Date


Internal
Date
Verifier
signature
Programme Leader
Date
signature (if
required)

Unit 18:DM Jaan Sheriffdeen (NC38988) 2


Higher Nationals - Summative Assignment Feedback Form
Student Name/ID A. Jaan Sheriffdeen (NC38988)

Unit Title Unit 18 : Discrete Mathematics

Assignment Number 1 Assessor


February 4, 2022 Date Received 1st
Submission Date
submission
Date Received 2nd
Re-submission Date
submission
Assessor Feedback:
LO1 Examine set theory and functions applicable to software engineering.
Pass, Merit & P1 P2 M1 D1
Distinction Descripts

LO2 Analyse mathematical structures of objects using graph theory.


Pass, Merit & P3 P4 M2 D2
Distinction Descripts

LO3 Investigate solutions to problem situations using the application of Boolean algebra.
Pass, Merit & P5 P6 M3 D3
Distinction Descripts

LO4 Explore applicable concepts within abstract algebra.


Pass, Merit & P7 P8 M4 D4
Distinction Descripts

Grade: Assessor Signature: Date:


Resubmission Feedback:

Grade: Assessor Signature: Date:

Internal Verifier’s Comments:

Signature & Date:

Unit 18:DM Jaan Sheriffdeen (NC38988) 3


Pearson
Higher Nationals in
Computing
Unit 18 : Discrete Mathematics

Unit 18:DM Jaan Sheriffdeen (NC38988) 4


General Guidelines

1. A Cover page or title page – You should always attach a title page to your
assignment. Use previous page as your cover sheet and make sure all the details
are accurately filled.
2. Attach this brief as the first section of your assignment.
3. All the assignments should be prepared using a word processing software.
4. All the assignments should be printed on A4 sized papers. Use single side
printing.
5. Allow 1” for top, bottom , right margins and 1.25” for the left margin of each
page.

Word Processing Rules

1. The font size should be 12 point, and should be in the style of Time New Roman.
2. Use 1.5 line spacing. Left justify all paragraphs.
3. Ensure that all the headings are consistent in terms of the font size and font style.
4. Use footer function in the word processor to insert Your Name, Subject,
Assignment No, and Page Number on each page. This is useful if individual
sheets become detached for any reason.
5. Use word processing application spell check and grammar check function to help
editing your assignment.

Important Points:

1. It is strictly prohibited to use textboxes to add texts in the assignments, except for
the compulsory information. eg: Figures, tables of comparison etc. Adding text
boxes in the body except for the before mentioned compulsory information will
result in rejection of your work.
2. Carefully check the hand in date and the instructions given in the assignment. Late
submissions will not be accepted.
3. Ensure that you give yourself enough time to complete the assignment by the due
date.
4. Excuses of any nature will not be accepted for failure to hand in the work on time.
5. You must take responsibility for managing your own time effectively.
6. If you are unable to hand in your assignment on time and have valid reasons such
as illness, you may apply (in writing) for an extension.
7. Failure to achieve at least PASS criteria will result in a REFERRAL grade .
8. Non-submission of work without valid reasons will lead to an automatic RE
FERRAL. You will then be asked to complete an alternative assignment.
9. If you use other people’s work or ideas in your assignment, reference them
properly using HARVARD referencing system to avoid plagiarism. You have to
provide both in-text citation and a reference list.

Unit 18:DM Jaan Sheriffdeen (NC38988) 5


10. If you are proven to be guilty of plagiarism or any academic misconduct, your
grade could be reduced to A REFERRAL or at worst you could be expelled from
the course
Student Declaration

I hereby, declare that I know what plagiarism entails, namely to use another’s work and to
present it as my own without attributing the sources in the correct way. I further
understand what it means to copy another’s work.

1. I know that plagiarism is a punishable offence because it constitutes theft.


2. I understand the plagiarism and copying policy of the Edexcel UK.
3. I know what the consequences will be if I plagiaries or copy another’s work in any
of the assignments for this program.
4. I declare therefore that all work presented by me for every aspects of my program,
will be my own, and where I have made use of another’s work, I will attribute the
source in the correct way.
5. I acknowledge that the attachment of this document signed or not, constitutes a
binding agreement between myself and Pearson, UK.
6. I understand that my assignment will not be considered as submitted if this
document is not attached to the attached.

Student’s Signature: Date: February 4, 2022


KANA013684@esoft.academy
(Provide E-mail ID) (Provide Submission Date)

Unit 18:DM Jaan Sheriffdeen (NC38988) 6


Feedback Form

Formative feedback: Assessor to Student


Add gantt chart and referances
Change the presentation order

Action Plan
Made the Gantt chart and inserted all the references
I set the presentation in the correct order

Summative feedback

Feedback: Student to Assessor

Assessor’s
shyamalikarunadasa@gmail.com Date
Signature

Student’s
KANA013684@esoft.academy Date February 4, 2022
Signature

Assignment Brief

Unit 18:DM Jaan Sheriffdeen (NC38988) 7


Student Name /ID Number A. Jaan Sheriffdeen (NC38988)

Unit Number and Title Unit 18 :Discrete Mathematics

Academic Year 2021/22

Unit Tutor Miss Shymali

Assignment Title Discrete mathematics in Computing

Issue Date October 11, 2021

Submission Date February 4, 2022

IV Name & Date

Submission Format:

This assignment should be submitted at the end of your lesson, on the week stated at the front of
this brief. The assignment can either be word-processed or completed in legible handwriting.

If the tasks are completed over multiple pages, ensure that your name and student number are
present on each sheet of paper.

Unit Learning Outcomes:

LO1 Examine set theory and functions applicable to software engineering.

LO2 Analyse mathematical structures of objects using graph theory.

LO3 Investigate solutions to problem situations using the application of Boolean algebra.

LO4 Explore applicable concepts within abstract algebra.

Assignment Brief and Guidance:

Activity 01
Part 1

1. Perform algebraic set operations in the following formulated mathematical


problems.

Unit 18:DM Jaan Sheriffdeen (NC38988) 8


i. Let A and B be two non-empty finite sets. If cardinalities of the sets A, B, and
A  B are 72, 28 and 13 respectively, find the cardinality of the set A  B .
ii. If n( A − B )=45, n( A  B )=110 and n( A  B )=15, then find n(B).
iii.If n(A)=33, n(B)=36 and n(C)=28, find n( A  B  C ).

Part 2

1. Write the multisets (bags) of prime factors of given numbers.


i. 160
ii. 120
iii. 250
2. Write the multiplicities of each element of multisets (bags) in Part 2-1(i,ii,iii)
separately.
3. Determine the cardinalities of each multiset (bag) in Part 2-1(i,ii,iii).

Part 3

1. Determine whether the following functions are invertible or not and if a function
( )
is invertible, then find the rule of the inverse f ( x ) using appropriate
−1

mathematical technique.
i. f :  →  + ii. f :  + →  +
f ( x) = x 2 f ( x) = 1
x
iii. f : + → + iv.  2 2

f : −  ,  → − 1, 1
f ( x) = x 2 f ( x) = sin x
Part 4 v. f : 0 ,   → − 2, 2
f ( x) = 2 cos x
1. Formulate corresponding proof principles to prove the following properties about
defined sets.
i. A = B  A  B and B  A .
ii. De Morgan’s Law by mathematical induction.
iii. Distributive Laws for three non-empty finite sets A, B, and C.

Unit 18:DM Jaan Sheriffdeen (NC38988) 9


Activity 02
Part 1

1. Model two contextualized problems using binary trees both quantitatively and
qualitatively.

Part 2

1. State the Dijkstra’s algorithm for a directed weighted graph with all non-
negative edge weights.
2. Use Dijkstra’s algorithm to find the shortest path spanning tree for the following
weighted directed graph with vertices A, B, C, D, and E given. Consider the
starting vertex as E.

Part 3

1. Assess whether the following undirected graphs have an Eulerian and/or a


Hamiltonian cycle.

i.

Unit 18:DM Jaan Sheriffdeen (NC38988) 10


ii.

iii.

Unit 18:DM Jaan Sheriffdeen (NC38988) 11


Part 4

Construct a proof of the five-color theorem for every planar graph.

Activity 03
Part 1

1. Diagram two real world binary problems in two different fields using
applications of Boolean Algebra.

Part 2

1. Produce truth tables and its corresponding Boolean equation for the following
scenarios.
i. If the driver is present and the driver has not buckled up and the ignition
switch is on, then the warning light should turn on.
ii. If it rains and you don't open your umbrella, then you will get wet.
2. Produce truth tables for given Boolean expressions.
i. 𝐴̄𝐵̄ 𝐶 + 𝐴𝐵̄ 𝐶̄ + 𝐴𝐵𝐶 + 𝐴̄𝐵𝐶̄
ii. (𝐴 + 𝐵̄ + 𝐶)(𝐴 + 𝐵 + 𝐶)(𝐴̄ + 𝐵 + 𝐶̄ )

Part 3

1. Simplify the following Boolean expressions using algebraic methods.


i. 𝐴(𝐴 + 𝐵) + 𝐵(𝐵 + 𝐶) + 𝐶(𝐶 + 𝐴)
ii. (𝐴 + 𝐵̄ )(𝐵 + 𝐶) + (𝐴 + 𝐵)(𝐶 + 𝐴̄)
iii.(𝐴 + 𝐵)(𝐴𝐶 + 𝐴𝐶̄ ) + 𝐴𝐵 + 𝐵
iv. 𝐴̄(𝐴 + 𝐵) + (𝐵 + 𝐴)(𝐴 + 𝐵̄ )
Part 4

1. Consider the K-Maps given below. For each K- Map


i. Write the appropriate standard form (SOP/POS) of Boolean expression.
ii. Design the circuit using AND, NOT and OR gates.
iii. Design the circuit only by using
• NAND gates if the standard form obtained in part (i) is SOP.
• NOR gates if the standard form obtained in pat (i) is POS.

(a)

AB/C 0 1
00 0 0
01 0 1

Unit 18:DM Jaan Sheriffdeen (NC38988) 12


11 0 1
10 1 0

(b)

AB/CD 00 01 11 10
00 1 0 0 1
01 0 1 0 1
11 1 1 1 0
10 1 1 1 1

(c)

AB/C 0 1

00 1 0

01 1 1

11 1 0

10 0 1

Activity 04
Part 1

1. Describe the distinguishing characteristics of different binary operations that are


performed on the same set.

Part 2

1. Determine the operation tables for group G with orders 1, 2, 3 and 4 using the
elements a, b, c, and e as the identity element in an appropriate way.
2.
i. State the relation between the order of a group and the number of binary
operations that can be defined on that set.
ii. How many binary operations can be defined on a set with 4 elements?
3.
i. State the Lagrange’s theorem of group theory.

Unit 18:DM Jaan Sheriffdeen (NC38988) 13


ii. For a subgroup H of a group G, prove the Lagrange’s theorem.
iii. Discuss whether a group H with order 6 can be a subgroup of a group with order
13 or not. Clearly state the reasons.

Part 3

1. Validate whether the set S =  − {−1} is a group under the binary operation
‘*’defined as a * b = a + b + ab for any two elements a, b  S .

Part 4

Prepare a presentation for ten minutes to explore an application of group theory relevant
to your course of study. (i.e. in Computer Sciences)

Unit 18:DM Jaan Sheriffdeen (NC38988) 14


Acknowledgement
I would like to express my special thanks of gratitude to my lecturer Miss. Shyamali. She
gave me a golden opportunity to do this assignment, who also helped me to complete my
assignment. I was able to learn new things and I have really grateful for that. Specially I
would like to thank my parents and friends who helped me to stay focused and helped me to
finalize my assignment.

THANKING YOU
A.J. Sheriffdeen

Unit 18:DM Jaan Sheriffdeen (NC38988) 15


Contents
Acknowledgement ............................................................................................................. 15
Activity 1 ........................................................................................................................... 21
Activity 1.1 ........................................................................................................................ 21
What’s a Set? ..................................................................................................................... 21
i. Let A and B be two non-empty finite sets. If cardinalities of the sets A, B, and
A  B are 72, 28 and 13 respectively, find the cardinality of the set A  B . .............. 21
ii. If n( A − B )=45, n( A  B )=110 and n( A  B )=15, then find n(B). ................... 21
iii. If n(A)=33, n(B)=36 and n(C)=28, find n( A  B  C ). ................................... 22
Activity 1.2 ........................................................................................................................ 24
1. Write the multisets (bags) of prime factors of given numbers................................ 24
2. Write the multiplicities of each element of multisets (bags) in Part 2-1(i,ii,iii)
separately. ...................................................................................................................... 26
3. Determine the cardinalities of each multiset (bag) in Part 2-1(i,ii,iii). ................... 26
Activity 1.3 ........................................................................................................................ 27
Determine whether the following functions are invertible or not and if a function is
invertible, then find the rule of the inverse f ( (x )) using appropriate mathematical
−1

technique. ....................................................................................................................... 27
Activity 1.4 ........................................................................................................................ 33
Formulate corresponding proof principles to prove the following properties about
defined sets..................................................................................................................... 33

I. A = B  A  B and B  A . ........................................................................ 33
II. De Morgan’s Law by mathematical induction. ............................................... 33
III. Distributive Laws for three non-empty finite sets A, B, and C. ...................... 36
Activity 2 ........................................................................................................................... 39
Activity 2.1 ........................................................................................................................ 39
Model two contextualized problems using binary trees both quantitatively and
qualitatively.................................................................................................................... 39
What’s a binary tree? ..................................................................................................... 39
Classification tree............................................................................................................... 39
Regression Binary Tree...................................................................................................... 40
Activity 2.2 ........................................................................................................................ 41
1. State the Dijkstra’s algorithm for a directed weighted graph with all non-negative
edge weights................................................................................................................... 41
Activity 2.2 ........................................................................................................................ 43

Unit 18:DM Jaan Sheriffdeen (NC38988) 16


2. Use Dijkstra’s algorithm to find the shortest path spanning tree for the following
weighted directed graph with vertices A, B, C, D, and E given. Consider the starting
vertex as E. ..................................................................................................................... 43
Activity 2.3 ........................................................................................................................ 44
Assess whether the following undirected graphs have an Eulerian and/or a Hamiltonian
cycle. .............................................................................................................................. 44
Eulerian Path and Circuit ........................................................................................... 44
Hamilton Path and Circuit ......................................................................................... 45
1.................................................................................................................................. 45
2.................................................................................................................................. 46
3.................................................................................................................................. 46
Activity 2.4 ........................................................................................................................ 47
Construct a proof of the five color theorem for every planar graph. ................. 47
Activity 3 ........................................................................................................................... 50
Activity 3.1 ........................................................................................................................ 50
Diagram two real world binary problems in two different fields using applications of
Boolean Algebra. ........................................................................................................... 50
Activity 3.2 ........................................................................................................................ 52
1. Produce truth tables and its corresponding Boolean equation for the following
scenarios. ........................................................................................................................ 52
I. If the driver is present and the driver has not buckled up and the ignition switch
is on, then the warning light should turn on. ............................................................. 52
II. If it rains and you don't open your umbrella, then you will get wet ............... 53
2. Produce truth tables for given Boolean expressions. .............................................. 55
Activity 3.3 ........................................................................................................................ 56
Simplify the following Boolean expressions using algebraic methods ......................... 56
.................................................................................................................................... 56
Consider the K-Maps given below. For each K- Map ................................................... 58
I. Write the appropriate standard form (SOP/POS) of Boolean expression. .......... 58
K-Maps .......................................................................................................................... 58
Sum Of Products (SOP) ................................................................................................. 59
Product Of Sums (POS) ................................................................................................. 59
Activity 4 ........................................................................................................................... 73
Activity 4.1 ........................................................................................................................ 73

Unit 18:DM Jaan Sheriffdeen (NC38988) 17


Describe the characteristics of different binary operations that are performed on the
same set. ......................................................................................................................... 73
Basic Binary Operations ................................................................................................ 73
Characteristics of binary operations that are performed on the same set ...................... 73
Activity 4.2 ........................................................................................................................ 74
1. Determine the operation tables for group G with orders 1, 2, 3 and 4 using the
elements a, b, c, and e as the identity element in an appropriate way. .......................... 74
Operation Table for Order 1 ...................................................................................... 75
Operation Table for Order 2 ...................................................................................... 75
Operation Table for Order 3 ...................................................................................... 75
Operation Table for Order 4 ...................................................................................... 76
2...................................................................................................................................... 77
I. State the relation between the order of a group and the number of binary
operations that can be defined on that set. ................................................................. 77
II. How many binary operations can be defined on a set with 4 elements? ......... 77
3...................................................................................................................................... 77
I. State the Lagrange’s theorem of group theory. ................................................... 77
Lagrange’s Theorem of Group Theory ...................................................................... 77
ii. For a subgroup H of a group G, prove the Lagrange’s theorem. ........................... 77
Proof of Lagrange’s Theorem ........................................................................................ 77
iv. Discuss whether a group H with order 6 can be a subgroup of a group with
order 13 or not. Clearly state the reasons. .................................................................. 78
Activity 4.3 ........................................................................................................................ 78
Validate whether the set S =  − {−1} is a group under the binary operation ‘*’defined
as a * b = a + b + ab for any two elements a, b  S . .................................................. 78
Activity 4.4 ........................................................................................................................ 80
Prepare a presentation for ten minutes to explore an application of group theory
relevant to your course of study. (i.e. in Computer Sciences) ....................................... 80
Gantt chart .......................................................................................................................... 86
Bibliography ...................................................................................................................... 87

Figure 1 Venn Diagram ..................................................................................................... 22


Figure 2 Multiset of 160 .................................................................................................... 24

Unit 18:DM Jaan Sheriffdeen (NC38988) 18


Figure 3 Multiset of 120 .................................................................................................... 25
Figure 4 Multiset of 250 .................................................................................................... 25
Figure 5 Classification Tree ............................................................................................... 40
Figure 6 Regression Binary Tree ....................................................................................... 41
Figure 7 Weighted Directed Graph .................................................................................... 43
Figure 8 Weighted directed graph...................................................................................... 44
Figure 9 Activity 2.3.1 ....................................................................................................... 45
Figure 10 Activity 2.3.2 ..................................................................................................... 46
Figure 11 Activity 2.3.3 ..................................................................................................... 46
Figure 12 Five Color theorem ............................................................................................ 47
Figure 13 Colorations 5 ..................................................................................................... 48
Figure 14 Case 1 ................................................................................................................ 48
Figure 15 Case 2 ................................................................................................................ 49
Figure 16 Logic Gate Circuit 1 .......................................................................................... 51
Figure 17 Logic Gate Circuit 2 .......................................................................................... 52
Figure 18 Logic Gate Circuit ............................................................................................. 53
Figure 19 Logic Gate Circuit ............................................................................................. 54
Figure 20 Truth Table ........................................................................................................ 55
Figure 21 Truth Table ........................................................................................................ 55
Figure 22 SOP .................................................................................................................... 59
Figure 23 POS .................................................................................................................... 60
Figure 24 SOP Logic Gate Circuit ..................................................................................... 60
Figure 25 POS Logic Gate Circuit ..................................................................................... 61
Figure 26 SOP (NAND) Logic Gate Circuit...................................................................... 61
Figure 27 POS (NOR) Logic Gate Circuit ......................................................................... 62
Figure 28 SOP .................................................................................................................... 62
Figure 29 POS .................................................................................................................... 63
Figure 30 SOP Logic Gate ................................................................................................. 64
Figure 31 POS Logic Gate ................................................................................................. 65
Figure 32 SOP turns NAND logic gate.............................................................................. 66
Figure 33 POS turns NOR logic gate ................................................................................. 67
Figure 34 SOP .................................................................................................................... 68
Figure 35 POS .................................................................................................................... 69
Figure 36 SOP logic gate ................................................................................................... 70
Figure 37 POS Logic Gate ................................................................................................. 71
Figure 38 SOP turns NAND logic gate.............................................................................. 71
Figure 39 POS turns NOR logic gate ................................................................................. 72
Figure 40 Presentation Slide (1) ........................................................................................ 80
Figure 41 Presentation Slide (2) ........................................................................................ 80
Figure 42 Presentation Slide (3) ........................................................................................ 81
Figure 43 Presentation Slide (4) ........................................................................................ 81
Figure 44 Presentation Slide (5) ........................................................................................ 82
Figure 45 Presentation Slide (6) ........................................................................................ 82
Figure 46 Presentation Slide (7) ........................................................................................ 83

Unit 18:DM Jaan Sheriffdeen (NC38988) 19


Figure 47 Presentation Slide (8) ........................................................................................ 83
Figure 48 Presentation Slide (9) ........................................................................................ 84
Figure 49 Presentation Slide (10) ...................................................................................... 84
Figure 50 Presentation Slide (11) ...................................................................................... 85
Figure 51 Presentation Slide (12) ...................................................................................... 85
Figure 52 Gantt Chart for Math Assignment ..................................................................... 86

Table 1 Shortest path table (for figure 6) ........................................................................... 43


Table 2 Shortest path table (for figure 7) ........................................................................... 44
Table 3 Eulerian vs Hamilton Circuits............................................................................... 45
Table 4 Truth Table 1 ........................................................................................................ 50
Table 5 Truth Table 2 ........................................................................................................ 52
Table 6 Truth Table ........................................................................................................... 53
Table 7 Truth Table ........................................................................................................... 54
Table 8 Basic Binary Operations ....................................................................................... 73
Table 9 Operation table for Order 1 ................................................................................... 75
Table 10 Operation Table for Order 2 ............................................................................... 75
Table 11 Operation table for Order 3 ................................................................................. 76
Table 12 Operation table for Order 4 ................................................................................. 76

Unit 18:DM Jaan Sheriffdeen (NC38988) 20


Activity 1

Activity 1.1

What’s a Set?
Sets are a collection of well-defined items or elements that do not vary from one entity to
the next. A capital letter is used to signify a set. A set's cardinal number is the number of
items in its finite set.

Some examples of Sets

• Set of positive integers


• Set of planets in the solar system
• Set of lowercase letters of the alphabet
(Byjus.com, 2021)

i. Let A and B be two non-empty finite sets. If cardinalities of the sets A, B, and
A  B are 72, 28 and 13 respectively, find the cardinality of the set A  B .

𝑛(𝐴) = 72
𝑛(𝐵) = 28 𝑛(𝐴 ∩ 𝐵) = 13
𝑛(𝐴 ∪ 𝐵) = x
𝑛(𝐴 ∪ 𝐵) = 𝑛(𝐴) + 𝑛(𝐵) − 𝑛(𝐴 ∩ 𝐵)
= 72 + 28 − 13
𝑛(𝐴 ∪ 𝐵) = 87

ii. If n( A − B )=45, n( A  B )=110 and n( A  B )=15, then find n(B).


𝑛(𝐴 − 𝐵) = 45
𝑛(𝐴 ∪ 𝐵 ) = 110
𝑛(𝐴 ∩ 𝐵 ) = 15
𝑛(𝐵) = x
𝑛(𝐴 − 𝐵) = 𝑛(𝐴) − 𝑛(𝐴 ∩ 𝐵 )
45 = 𝑛(𝐴) − 𝑛(𝐵) 1
𝑛(𝐴 ∪ 𝐵 ) = 𝑛(𝐴) + 𝑛(𝐵) − 𝑛(𝐴 ∩ 𝐵 )
110 = 𝑛(𝐴) + 𝑛(𝐵) – 15 2

Unit 18:DM Jaan Sheriffdeen (NC38988) 21


By 1 + 2,
45 + 110 = 𝑛(𝐴) − 𝑛(𝐵) + 𝑛(𝐴) + 𝑛(𝐵) − 15
155 = 2𝑛(𝐴) − 15
155 + 15 = 2𝑛(𝐴)
2𝑛(𝐴) = 170
∴ 𝑛(𝐴) = 85
By (1),
45 = 𝑛(𝐴) − 𝑛(𝐵)
45 = 85 − 𝑛(𝐵)
𝑛(𝐵) = 85 − 45
𝑛(𝐵) = 40

iii. If n(A)=33, n(B)=36 and n(C)=28, find n( A  B  C ).

Figure 1 Venn Diagram

𝑛(𝐴) = 33
𝑛(𝐵) = 36
𝑛(𝐶) = 28 𝑛(𝐴 ∩ 𝐵 ∩ 𝐶 ) = 5
𝑛(𝐴 ∪ 𝐵 ∪ 𝐶) = ?
𝑛(𝐴 ∪ 𝐵 ∪ 𝐶) = 𝑛(𝐴) + 𝑛(𝐵)+ 𝑛(𝐶)− 𝑛(𝐴 ∩ 𝐵 ) − 𝑛(𝐴 ∩ 𝐶 ) − 𝑛(𝐵 ∩ 𝐶 )

Unit 18:DM Jaan Sheriffdeen (NC38988) 22


+ 𝑛(𝐴 ∩ 𝐵 ∩ 𝐶 )
= 33+ 36 + 28 − 𝑛(𝐴 ∩ 𝐵 ) − 𝑛(𝐴 ∩ 𝐶 )− 𝑛(𝐵 ∩ 𝐶 )+ 5
= 102− 𝑛(𝐴 ∩ 𝐵 )− 𝑛(𝐴 ∩ 𝐶 ) − 𝑛(𝐵 ∩ 𝐶 ) 1
A→𝑎 + 𝑏 + 5 + 10 = 33
𝑎 + 𝑏 = 33 − 15
𝑎 + 𝑏 = 18 2
B→𝑎 + 𝑐 + 5 + 15 = 36
𝑎 + 𝑐 = 36 − 20
𝑎 + 𝑐 = 16 3
C→𝑏 + 𝑐 + 5 + 13 = 28
𝑏 + 𝑐 = 28 − 18
𝑏 + 𝑐 = 10 4

By 2 − 3,
𝑎 + 𝑏 − (𝑎 + 𝑐) = 18 − 16
𝑎+𝑏−𝑎−𝑐=2
𝑏−𝑐=2 5

By 4 + 5,
𝑏 + 𝑐 + 𝑏 − 𝑐 = 10 + 2
2𝑏 = 12
𝑏 =6 6

By 2,
𝑎 + 6 = 18
𝑎 = 18 − 6
𝑎 = 12 7

By 3,
12 + 𝑐 = 16
𝑐 = 16 − 12
𝑐=4 8

Unit 18:DM Jaan Sheriffdeen (NC38988) 23


By 1, 6, 7, 8,
𝑛(𝐴 ∪ 𝐵 ∪ 𝐶) = 102 − (𝑎 + 5) − (𝑏 + 5) − (𝑐 + 5)
= 102 − (12+ 5) − (6 + 5) − (4 + 5)
= 102 − (12+ 5) − (6 + 5) − (4 + 5)
= 102 − 17 − 11 − 9
𝑛(𝐴 ∪ 𝐵 ∪ 𝐶) = 65

Activity 1.2
1. Write the multisets (bags) of prime factors of given numbers.
A multiset is a generalization of the idea of a set in mathematics. It's a set of unsorted
numbers (or other items) in which each element x appears only a finite number of times.

The distinction between sets and multisets is how they deal with multiples: a set can only
have one instance of any number, whereas a multiset can have multiple instances of the
same number.

(Glen, 2017)

1. 160

160 [2,2,2,2,2,5]

Figure 2 Multiset of 160

Unit 18:DM Jaan Sheriffdeen (NC38988) 24


2. 120

120 = [3,2,2,2,5]

Figure 3 Multiset of 120

3. 250

250 = [2,5,5,5]

Figure 4 Multiset of 250

Unit 18:DM Jaan Sheriffdeen (NC38988) 25


2. Write the multiplicities of each element of multisets (bags) in Part 2-1(i,ii,iii)
separately.
Multiplicity means the number of times an element appears in a multiset.

1. 160 = [2,2,2,2,2,5]
µ (2) = 5
µ (5) = 1

2. 120 = [2,2,2,3,5]
µ (2) = 3
µ (3) = 1
µ (5) = 1

3. 250 = [2,5,5,5]
µ (2) = 1
µ (5) = 3

3. Determine the cardinalities of each multiset (bag) in Part 2-1(i,ii,iii).


A set's cardinality is a measure of the set's "number of items." The size of a set is defined
by its cardinality.

i. 𝑛 (160) = µ(2) + µ(5)


𝑛 (160) = 5 + 1
𝑛 (160) = 6

ii. 𝑛 (120) = µ(2) + µ(3)+ µ(5)


𝑛 (120) = 3 + 1 + 1
𝑛 (120) = 5

iii. 𝑛 (250) = µ(2) + µ(5)


𝑛 (250) = 1 + 3
𝑛 (250) = 4

Unit 18:DM Jaan Sheriffdeen (NC38988) 26


Activity 1.3
Determine whether the following functions are invertible or not and if a function is

invertible, then find the rule of the inverse f ( (x )) using appropriate mathematical
−1

technique.
1. 𝑓: ℜ → ℜ+

𝑓(𝑥) = 𝑥2

𝑓 is invertible if and only if 𝑓 is One to One correspondent between ℜ → ℜ+ (𝑓 is One to


One and onto) 1
Step 01,
Check whether 𝑓 is One to One:
Let, 𝑥1, 𝑥2 ∈ ℜ (Domain)

And, 𝑓(𝑥1),𝑓(𝑥2) ∈ ℜ = 𝑦1, 𝑦2 ∈ ℜ (Codomain)

𝑓(𝑥1) = 𝑓(𝑥2)

(𝑥12) = (𝑥22)

(𝑥12−𝑥22) = 0

(𝑥1 − 𝑥2) (𝑥1 + 𝑥2) = 0

(𝑥1 − 𝑥2) = 0 𝑂𝑅 (𝑥1 + 𝑥2) = 0

∴ 𝑥1 = 𝑥2 𝑂𝑅 𝑥1 = (−𝑥2)
𝑥1, 𝑥2, (−𝑥2) ∈ ℜ and 𝑥2 ≠ (−𝑥2)
Therefore, 𝑓 is not One to One 2
∴ By 1 and 2
𝑓 is not One to One correspondent among ℜ → ℜ+. Thus, 𝑓 is not invertible.

2. 𝑓: ℜ+ → ℜ+

𝟏
𝑓(𝑥) = 𝒙

Between ℜ+ and ℜ 1
Step 01,

Unit 18:DM Jaan Sheriffdeen (NC38988) 27


Check whether 𝑓 is One to One:
Let 𝑥1, 𝑥2 ∈ ℜ+ (Domain)
And 𝑓(𝑥1), 𝑓(𝑥2) ∈ ℜ+ = 𝑦1, 𝑦2 ∈ ℜ+ (Codomain)
𝑓(𝑥1) = 𝑓(𝑥2)
1 1
=
𝑥1 𝑥2
1 1
= =0
𝑥1 𝑥2

𝑥2 −𝑥1
= 0
𝑥1 𝑥2

𝑥2 − 𝑥1 = 0
𝑥2 = 𝑥1
∴ 𝑥2 = 𝑥1
Therefore, f is One to One 2

Step 02,
Check whether 𝑓 is Onto:
For every 𝑦 ∈ ℜ+(Codomain)
1
𝑦 ( )∈ R+(Domain)
𝑦
1
Such that 𝑓 (𝑦) = 𝑦
1
So, y is the image of (1(𝑦)
1
∴ x = (𝑦)

Therefore, 𝑓 is Onto 3
By 1, 2 and 3,
𝑓 is One to One and Onto correspondent between ℜ+ → ℜ+. Due to that, 𝑓 is invertible.

Step 03,
Inverse function of 𝑓:
1
f (x) = (𝑥)

Unit 18:DM Jaan Sheriffdeen (NC38988) 28


1
𝑦= ( )
𝑥

1
𝑥 = (𝑥)

1
∴ f −1(x) = (𝑥)

∴ Inverse of 𝑓:
f −1: R+ → R+
𝟏
f −1(x) = (𝒙)

3. 𝑓: ℜ+ → ℜ+

𝑓(𝑥) = 𝑥2

Between ℜ+ and ℜ 1

Step 01,
Check whether 𝑓 is One to One:
Let 𝑥1, 𝑥2 ∈ ℜ+ (Domain)
And 𝑓(𝑥1), 𝑓(𝑥2) ∈ ℜ+ = 𝑦1, 𝑦2 ∈ ℜ+ (Codomain)
𝑥21 = 𝑥22

𝑥21 − 𝑥22 = 0

(𝑥1 − 𝑥2 )(𝑥1 + 𝑥2 ) = 0

(𝑥1 − 𝑥2 ) = 0 𝑂𝑅 (𝑥1 + 𝑥2 ) = 0

(𝑥1 ) = (𝑥2 ) 𝑂𝑅 (𝑥1 ) = (−𝑥2 )

Since 𝑥2 ∈ R+, 𝑥2 ∉ R+
Therefore, (−𝑥2 ) ∈ Codomain
Therefore, f is one to one 2

Step 02,
Check whether f is onto:
For every y ∈ R+ (Codomain)

Unit 18:DM Jaan Sheriffdeen (NC38988) 29


1
𝑦2 ∈ R+ (Domain)
1
Such that 𝑓 (𝑦 2 ) = 𝑦
1
So, 𝑦 is the image of (𝑦2 )
1
∴ 𝑥 = (𝑦 2 )

Therefore, 𝑓 is Onto 3

By 1, 2 and 3,

𝑓 is One to One and Onto correspondent between R+ → R+. Due to that, f is invertible.

Step 03,

Inverse function of 𝑓:

𝑓(𝑥) = 𝑥 2

𝑦 = 𝑥2
1
𝑥 = 𝑦2
1
∴ 𝑓 −1 = 𝑦 2

∴ Inverse of 𝑓:

𝑓 −1 : R+ → R+
1
𝑓 −1 (𝑥) = 𝑥 2

𝝅 𝝅
4. 𝒇: [− , 𝟐 ] →[−𝟏, 𝟏] 1
𝟐

f(x) = sin x

f: [-π/2, π/2] → [-1, 1]

Step 01,
Check whether f(x) is 1-1 then,
Let, x1, x2 € [-π/2, π/2] (Domain)
Then f(x1), f(x2) € [-1, 1] (Range)

Unit 18:DM Jaan Sheriffdeen (NC38988) 30


Let f(x1) = f(x2)
Sin x1= Sin x2
x1 = x2
Therefore, f(x1) = f(x2) → x1 = x2 1
Therefore, f(x) is 1-1 2

Step 02,
Check whether f(x) is Onto
y = Sin x
y = Sin (Sin -1 y)
For all y € [-1,1], there should be at least one Sin (Sin -1
y) € [-π/2, π/2] present so that f
(Sin -1 y) = y
Therefore, f(x) is Onto 3

By 1, 2, 3,
f(x) is invertible.

Step 03,
Inverse function of f(x)
f(x) = Sin x
y = Sin x
Sin (Sin -1 y) = x
Sin (Sin -1 y) = f-1 (x)
f -1: [-1.1] → [-π/2, π/2]
f(x) = Sin x
f: [-π/2, π/2] → [-1,1]
5. 𝑓: [𝑜, 𝜋] → [−2,2]

𝑓(𝑥) = 2 cos𝑥

Between [0, 𝜋] and [−2,2] 1

Unit 18:DM Jaan Sheriffdeen (NC38988) 31


Step 01,
Check whether 𝑓 is One to One:
Let 𝑥1, 𝑥2 ∈ [0, 𝜋] (Domain)
And 𝑓(𝑥1), 𝑓(𝑥2) ∈ [−2,2] (Codomain)
𝑓(𝑥1) = 𝑓(𝑥2)
2𝑐𝑜𝑠𝑥1 = 2𝑐𝑜𝑠𝑥2
𝑐𝑜𝑠𝑥1= 𝑐𝑜𝑠𝑥2
(𝑥1) = (𝑥2)
Therefore, 𝑓 is One to One 2

Step 02,
Check whether 𝑓 is Onto:
For every 𝑦 ∈ [−2,2] (Codomain)
𝑦
𝑐𝑜𝑠 −1 ( 2) ∈ [0, 𝜋] (Domain)
𝑦
Such that 𝑓 𝑐𝑜𝑠 −1 ( 2 ) = 𝑦

𝑦
So, y is the image of 𝑐𝑜𝑠 −1 (2)
𝑦
∴ x = 𝑐𝑜𝑠 −1 ( 2)

Therefore, 𝑓 is Onto 3

By 1, 2 and 3,
𝑓 is One to One and Onto correspondent between [0, 𝜋] and [−2,2]. Due to that, 𝑓 is
invertible.

Step 03,
Inverse function of 𝑓:
𝑓 (𝑥) = 2𝑐𝑜𝑠𝑥
𝑦 = 2cosx
𝑦
𝑦
𝑐𝑜𝑠𝑥 =
2

Unit 18:DM Jaan Sheriffdeen (NC38988) 32


𝑦
𝑥 = 𝑐𝑜𝑠 −1 ( )
2
𝑦
∴ 𝑓 −1 (𝑥) = 𝑐𝑜𝑠−1 ( )
2

∴ Inverse of 𝑓:
𝑓 −1 : [−2,2] → [0, 𝜋]
𝑥
𝑓 −1 (𝑥) = 𝑐𝑜𝑠 −1 (2)

Activity 1.4
Formulate corresponding proof principles to prove the following properties about
defined sets.
I. A = B  A  B and B  A .
Two sets A and B are equal, if and only if A is a subset of B and B is a subset of A.

Assume that A=B. Afterwards assume x ∈A. So, x ∈B. since anytime that have an
equality, that can replace any instance of one side of the equality by the other side of the
equality wherever it appears in any statement. Therefore, can conclude that x ∈A implies
x ∈B. As it holds that "if x ∈A, then x ∈B", by definition, then obtain that A⊆B.
Likewise, it can verify that B⊆A. Therefore, both A⊆B and B⊆A. So, can conclude that
if A=B, then both A⊆B and B⊆A.

Now assume that A⊆B and B⊆A. By definition of ⊆ and since have that A⊆B, so, have
that "if x ∈A, then x ∈B". Similarly, we can conclude that "if x ∈B, then x ∈A." So, can
conclude that x ∈A if and only if x ∈B. Since that proved the antecedent of the axiom of
extensionality, can conclude the consequent that A=B.

Therefore, can conclude that, if A⊆B and B⊆A, then A=B. End of second part.

Since proved that "if A=B, then A⊆B and B⊆A" and "if A⊆B and B⊆A, then A=B" and
can infer that A=B if A⊆B and B⊆A.

II. De Morgan’s Law by mathematical induction.

Mathematical Induction:

(𝑨 ∪ 𝑩)𝑪 = 𝑨𝑪 ∩ 𝑩𝑪
Prove by induction on 𝑛 the following statement:

Unit 18:DM Jaan Sheriffdeen (NC38988) 33


𝑃(𝑛): For all sets 𝐴1, …......, 𝐴𝑛 have,
(∗) (̅𝐴1̅ ̅∪̅…̅∪̅
̅ ̅𝐴
̅ 𝑛̅ ̅) = 𝐴
̅ 1̅ ∩ … ∩ 𝐴̅𝑛̅ ̅
The key to the argument is two set version of De Morgan’s Law:
(∗∗) (̅𝐴∪ ̅̅ ) = 𝐴̅ ∩ 𝐵̅,
̅ 𝐵̅

Which holds for any sets 𝐴 and 𝐵.


Base case: For 𝑛 = 1, the left and right sides of (∗) are both equal to ̅𝐴̅1, so (∗) holds
trivially in this case. Hence 𝑃 (1) is true.
However. not absolutely essential, that can also easily verify the next case,
𝑛 = 2: In this case, the left and right sides of (∗) are (̅𝐴̅1̅∪̅𝐴̅2̅ ) and ̅𝐴̅1 ∩ 𝐴̅̅2̅, respectively,
so the identity is just the two-set version of De Morgan’s Law, i.e., (∗∗) with 𝐴 = 𝐴1 and
𝐵 = 𝐴2.

Induction step: Let 𝑘 ≥ 1, and assume 𝑃(𝑘) is true, i.e., moreover assume that (∗) holds
for 𝑛 = 𝑘 and any sets 𝐴1, ….…, 𝐴𝑘. To illustration that 𝑃 (𝑘 + 1) is true, i.e., that for any
sets 𝐴1, ……., 𝐴𝑘+1, (∗) holds.
Let 𝐴1, ……, 𝐴𝑘+1 be given sets. Then:
̅(̅𝐴1̅ ̅∪̅…̅̅∪̅̅𝐴̅𝑘̅ ̅+̅1̅) = (̅(̅𝐴̅1̅∪̅…̅∪̅̅𝐴̅𝑘̅ ̅)̅∪̅𝐴𝑘̅ ̅+̅1̅)
= ̅(̅𝐴̅1̅∪̅̅…̅̅∪̅𝐴̅
̅ 𝑘̅ ̅) ∩ ̅𝐴̅𝑘̅+̅1(by (∗∗) with 𝐴 = (𝐴1 ∪ … ∪ 𝐴𝑘) and 𝐵 = 𝐴𝑘+1)
= (̅𝐴̅1 ∩ … ∩ ̅𝐴̅𝑘̅) ∩ ̅𝐴̅𝑘̅+̅1̅ (by induction hypothesis applied to 𝐴1, ….…., 𝐴𝑘)
= ̅𝐴̅1 ∩ … ∩ ̅𝐴̅𝑘̅ ∩ ̅𝐴̅𝑘̅+̅1.
Therefore, (∗) holds for 𝑛 = 𝑘 + 1, and since the 𝐴1, ….…, 𝐴𝑘+1 were arbitrary sets, that
have obtained statement 𝑃 (𝑘 + 1). Hence, the proof of the induction, it follows that
𝑃(𝑛) is true for all 𝑛 ∈ ℤ+
Proof:
Let P = (𝐴 ∪ 𝐵) 𝐶and Q = 𝐴𝐶 ∩ 𝐵𝐶
Let x be an arbitrary element of P then 𝑥 ∈ 𝑃 ⇒ 𝑥 ∈ (𝐴 ∪ 𝐵)𝐶
⇒ 𝑥 ∉ (𝐴 ∪ 𝐵)
⇒ 𝑥 ∉ 𝐴 𝑎𝑛𝑑 𝑥 ∉ 𝐵
⇒ 𝑥 ∈ 𝐴𝐶 𝑎𝑛𝑑 𝑥 ∈ 𝐵𝐶
⇒ 𝑥 ∈ 𝐴𝐶 ∩ 𝐵𝐶
⇒𝑥∈𝑄
Therefore, 𝑃 ⊂ 𝑄→ (1)

Unit 18:DM Jaan Sheriffdeen (NC38988) 34


Again, let y be an arbitrary element of Q then 𝑦 ∈ 𝑄 ⇒ 𝑦 ∈ 𝐴𝐶 ∩ 𝐵𝐶
⇒ 𝑦 ∈ 𝐴𝑐 𝑎𝑛𝑑 𝑦 ∈ 𝐵𝐶
⇒ 𝑦 ∉ 𝐴 𝑎𝑛𝑑 𝑦 ∉ 𝐵
⇒ 𝑦 ∉ (𝐴 ∪ 𝐵)
⇒ 𝑦 ∈ (𝐴 ∪ 𝐵)𝐶
⇒𝑦∈𝑃
Therefore, 𝑄 ⊂ 𝑃→ (2)
By (1) and (2), 𝑃 = 𝑄
∴ (𝐴 ∪ 𝐵)𝐶 = 𝐴𝐶 ∩ 𝐵𝐶
Proof by Mathematical Induction:

(𝑨 ∩ 𝑩)𝑪 = 𝑨𝑪 ∪ 𝑩𝑪

Prove by induction on 𝑛 the following statement:


𝑃(𝑛): For all sets 𝐴1, ...…, 𝐴𝑛 have,
̅ ∩̅
(∗) (̅𝐴1̅ ̅∩̅…̅ ̅ ̅𝐴 ̅ 1̅ ∪ … ∪ 𝐴̅𝑛̅ ̅
̅ 𝑛̅ ̅) = 𝐴
The key to the argument is two set version of De Morgan’s Law:
̅ 𝐵̅
(∗∗) (̅𝐴∩ ̅ ) = 𝐴̅ ∪ 𝐵̅,
Which holds for any sets 𝐴 and 𝐵.
Base case: For 𝑛 = 1, the left and right sides of (∗) are both equal to ̅𝐴̅1, so (∗) holds
trivially in this case. Therefore, 𝑃 (1) is true.
However, not absolutely essential, that can also easily verify the next case,
𝑛 = 2: In this case, the left and right sides of (∗) are (̅𝐴̅1̅∩̅𝐴̅
̅ ̅2) and ̅𝐴̅1 ∪ 𝐴̅̅2̅, respectively,
so the identity is just the two set version of De Morgan’s Law, i.e., (∗∗) with 𝐴 = 𝐴1 and
𝐵 = 𝐴2.
Induction step: Let 𝑘 ≥ 1, and suppose 𝑃(𝑘) is true, i.e., suppose that (∗) holds for 𝑛 = 𝑘
and any sets 𝐴1, ……, 𝐴𝑘. To show that 𝑃 (𝑘 + 1) is true, i.e., that for any sets 𝐴1, ……,
𝐴𝑘+1, (∗) holds.
Let 𝐴1, …, 𝐴𝑘+1 be given sets. Then

̅(̅𝐴1̅ ̅∩̅…̅
̅ ̅∩̅̅𝐴̅𝑘̅ ̅+̅1̅) = (̅(̅𝐴̅1̅∩̅…̅∩̅
̅ ̅𝐴̅𝑘̅ ̅)̅∩̅𝐴𝑘̅ ̅+̅1̅)
= ̅(̅𝐴̅1̅∩̅…̅̅∩̅̅𝐴𝑘̅ ̅) ∪ 𝐴̅̅𝑘̅+̅1̅(by (∗∗) with 𝐴 = (𝐴1 ∩ …∩ 𝐴𝑘) and 𝐵 = 𝐴𝑘+1)
= (̅𝐴̅1 ∪ … ∪ ̅𝐴𝑘̅ ̅) ∪ ̅𝐴̅𝑘̅+̅1 (by induction hypothesis applied to 𝐴1, …. , 𝐴𝑘 )
= ̅𝐴̅1 ∪ … ∪ ̅𝐴̅𝑘̅ ∪ 𝐴̅̅𝑘̅+̅1.

Unit 18:DM Jaan Sheriffdeen (NC38988) 35


Therefore, (∗) holds for 𝑛 = 𝑘 + 1, and since the 𝐴1, ……, 𝐴𝑘+1 were arbitrary sets, that
have obtained statement 𝑃 (𝑘 + 1). Hence, the proof of the induction, it follows that
𝑃(𝑛) is true for all 𝑛 ∈ ℤ+
Evidence:
(𝑨 ∩ 𝑩)𝑪 = 𝑨𝑪 ∪ 𝑩𝑪
Let M = (𝐴 ∩ 𝐵)𝐶 and N = 𝐴𝐶 ∪ 𝐵𝐶
Let x be an arbitrary element of M then 𝑥 ∈ 𝑀 ⇒ 𝑥 ∈ (𝐴 ∩ 𝐵)𝐶
⇒ 𝑥 ∉ (𝐴 ∩ 𝐵)
⇒ 𝑥 ∉ 𝐴 𝑜𝑟 𝑥 ∉ 𝐵
⇒ 𝑥 ∈ 𝐴𝐶 𝑜𝑟 𝑥 ∈ 𝐵𝐶
⇒ 𝑥 ∈ 𝐴𝐶 ∪ 𝐵𝐶
⇒𝑥∈𝑁
Therefore, 𝑀 ⊂ 𝑁→ (1)
Again, let y be an arbitrary element of N then 𝑦 ∈ 𝑁 ⇒ 𝑦 ∈ 𝐴𝐶 ∪ 𝐵𝐶
⇒ 𝑦 ∈ 𝐴𝑐 𝑂𝑅 𝑦 ∈ 𝐵𝐶
⇒ 𝑦 ∉ 𝐴 𝑜𝑟 𝑦 ∉ 𝐵
⇒ 𝑦 ∉ (𝐴 ∩ 𝐵)
⇒ 𝑦 ∈ (𝐴 ∩ 𝐵)𝐶
⇒𝑦∈𝑀
Therefore, 𝑁 ⊂ 𝑀→ (2)
By (1) and (2), 𝑀 = 𝑁
∴ (𝐴 ∩ 𝐵)𝐶 = 𝐴𝐶 ∪ 𝐵𝐶

III. Distributive Laws for three non-empty finite sets A, B, and C.


𝑨 ∪ (𝑩∩ 𝑪) = (𝑨 ∪ 𝑩)∩ (𝑨 ∪ 𝑪)
This law states that taking the union of a set to the intersection of two other sets is the
similar as captivating the union of the original set and both the other two sets separately,
and then taking the intersection of the results.

Evidence:
𝐴 ∪ (𝐵 ∩ 𝐶) = (𝐴 ∪ 𝐵) ∩ (𝐴 ∪ 𝐶)
Let 𝑥 ∈ 𝐴 ∪ (𝐵 ∩ 𝐶).
If x ∈ 𝐴 ∪ (𝐵 ∩ 𝐶) then x is either in A or in (B and C).

Unit 18:DM Jaan Sheriffdeen (NC38988) 36


𝑥 ∈ 𝐴 𝑜𝑟 𝑥 ∈ (𝐵 𝑎𝑛𝑑 𝐶)
𝑥 ∈ 𝐴 𝑜𝑟 {𝑥 ∈ 𝐵 𝑎𝑛𝑑 𝑥 ∈ 𝐶)
{𝑥 ∈ 𝐴 𝑜𝑟 𝑥 ∈ 𝐵} 𝑎𝑛𝑑 {𝑥 ∈ 𝐴 𝑜𝑟 𝑥 ∈ 𝐶)
𝑥 ∈ (𝐴 𝑜𝑟 𝐵) 𝑎𝑛𝑑 𝑥 ∈ (𝐴 𝑜𝑟 𝐶)
𝑥 ∈ (𝐴 ∪ 𝐵) ∩ 𝑥 ∈ (𝐴 ∪ 𝐶)
𝑥 ∈ (𝐴 ∪ 𝐵) ∩ (𝐴 ∪ 𝐶)
𝑥 ∈ 𝐴 ∪ (𝐵 ∩ 𝐶) ⇒ 𝑥 ∈ (𝐴 ∪ 𝐵) ∩ (𝐴 ∪ 𝐶)
Thus,
𝐴 ∪ (𝐵 ∩ 𝐶) ⊂ (𝐴 ∪ 𝐵) ∩ (𝐴 ∪ 𝐶) 1
Let 𝑥 ∈ (𝐴 ∪ B) ∩ (𝐴 ∪ 𝐶).
If x ∈ (𝐴 ∪ B) ∩ (A ∪ C) then x is in (A or B) and x is in (A or C).

𝑥 ∈ (𝐴 𝑜𝑟 𝐵) 𝑎𝑛𝑑 𝑥 ∈ (𝐴 𝑜𝑟 𝐶)
{𝑥 ∈ 𝐴 𝑜𝑟 𝑥 ∈ 𝐵}𝑎𝑛𝑑 {𝑥 ∈ 𝐴 𝑜𝑟 𝑥 ∈ 𝐶}
𝑥 ∈ 𝐴 𝑜𝑟 {𝑥 ∈ 𝐵 𝑎𝑛𝑑 𝑥 ∈ 𝐶}

𝑥 ∈ 𝐴 𝑜𝑟 {𝑥 ∈ (𝐵 𝑎𝑛𝑑 𝐶)}
𝑥 ∈ 𝐴 ∪ {𝑥 ∈ (𝐵 ∩ 𝐶)}
𝑥 ∈ 𝐴 ∪ (𝐵 ∩ 𝐶)
𝑥 ∈ (𝐴 ∪ 𝐵) ∩ (𝐴 ∪ 𝐶) ⇒ 𝑥 ∈ 𝐴 ∪ (𝐵 ∩ 𝐶)

Thus,
(𝐴 ∪ 𝐵) ∩ (𝐴 ∪ 𝐶) ⊂ 𝐴 ∪ (𝐵 ∩ 𝐶) 2
By 1 and 2,
𝐴 ∪ (𝐵 ∩ 𝐶) = (𝐴 ∪ 𝐵) ∩ (𝐴 ∪ 𝐶)

𝑨 ∩ (𝑩∪ 𝑪) = (𝑨 ∩ 𝑩)∪ (𝑨 ∩ 𝑪)
This law states that taking the intersection of a set to the union of two other sets is the
similar as captivating the intersection of the original set and both the other two sets
separately, and then taking the union of the results.
Evidence:

Unit 18:DM Jaan Sheriffdeen (NC38988) 37


𝐴 ∩ (𝐵 ∪ 𝐶) = (𝐴 ∩ 𝐵) ∪ (𝐴 ∩ 𝐶)
Let 𝑥 ∈ 𝐴 ∩ (𝐵 ∪ 𝐶).
If x ∈ 𝐴 ∩ (𝐵 ∪ 𝐶) then 𝑥 ∈ 𝐴 𝑎𝑛𝑑 𝑥 ∈ (𝐵 𝑜𝑟 𝐶).

𝑥 ∈ 𝐴 𝑎𝑛𝑑 {𝑥 ∈ 𝐵 𝑜𝑟 𝑥 ∈ 𝐶}
{𝑥 ∈ 𝐴 𝑎𝑛𝑑 𝑥 ∈ 𝐵} 𝑜𝑟 {𝑥 ∈ 𝐴 𝑎𝑛𝑑 𝑥 ∈ 𝐶)
𝑥 ∈ (𝐴 ∩ 𝐵) 𝑜𝑟 𝑥 ∈ (𝐴 ∩ 𝐶)
𝑥 ∈ (𝐴 ∩ 𝐵) ∪ (𝐴 ∪ 𝐶)
𝑥 ∈ 𝐴 ∩ (𝐵 ∪ 𝐶) ⇒ 𝑥 ∈ (𝐴 ∩ 𝐵) ∪ (𝐴 ∩ 𝐶)

Thus,
𝐴 ∩ (𝐵 ∪ 𝐶) ⊂ (𝐴 ∩ 𝐵) ∪ (𝐴 ∩ 𝐶) 1
Let 𝑥 ∈ (𝐴 ∩ B) ∪ (𝐴 ∩ 𝐶).
If x ∈ (𝐴 ∩ B) ∪ (A ∩ C) then 𝑥 ∈ (𝐴 ∩ 𝐵) 𝑜𝑟 𝑥 ∈ (𝐴 ∩ 𝐶).
𝑥 ∈ (𝐴 𝑎𝑛𝑑 𝐵) 𝑜𝑟 (𝐴 𝑎𝑛𝑑 𝐶)
{𝑥 ∈ 𝐴 𝑎𝑛𝑑 𝑥 ∈ 𝐵} 𝑜𝑟 {𝑥 ∈ 𝐴 𝑎𝑛𝑑 𝑥 ∈ 𝐶}
𝑥 ∈ 𝐴 𝑎𝑛𝑑 {𝑥 ∈ 𝐵 𝑜𝑟 𝑥 ∈ 𝐶}
𝑥 ∈ 𝐴 𝑎𝑛𝑑 𝑥 ∈ (𝐵 𝑜𝑟 𝐶}
𝑥 ∈ 𝐴 ∩ (𝐵 ∪ 𝐶)
𝑥 ∈ (𝐴 ∩ 𝐵) ∪ (𝐴 ∩ 𝐶) ⇒ 𝑥 ∈ 𝐴 ∩ (𝐵 ∪ 𝐶)
Thus,
(𝐴 ∩ 𝐵) ∪ (𝐴 ∩ 𝐶) ⊂ 𝐴 ∩ (𝐵 ∪ 𝐶) 2
From 1 and 2,
𝐴 ∩ (𝐵 ∪ 𝐶) = (𝐴 ∩ 𝐵) ∪ (𝐴 ∩ 𝐶)

Unit 18:DM Jaan Sheriffdeen (NC38988) 38


Activity 2

Activity 2.1
Model two contextualized problems using binary trees both quantitatively and
qualitatively.

What’s a binary tree?


Decision tree algorithms are little more than if-else statements that can be used to
anticipate a result based on data when reduced to their most basic form. This method
employs a tree-like graph or model of decisions and their potential results, such as chance
event outcomes, resource costs, and utility. Furthermore, the primary objective of
decision trees is to achieve perfect classification with the lowest number of decisions
possible, and it's not always possible due to data inconsistencies. (Brid, 2018)

Given below are the two typrs of Decision trees

• Classification tree

• Regression tree

Classification tree
A classification tree is an algorithm with a fixed or categorical target variable. The
algorithm is then used to determine which "class" a target variable is most likely to
belong to.

Decision tree shown below presents main sectors of an online shopping shoe site
W1 = Shoe Shopping Site

W2 =Males Shoes

W3 =Women Shoes

O= {C1, C2} = {Joggers, Derby}

K = {C3, C4} = {High heels, Flats}

Unit 18:DM Jaan Sheriffdeen (NC38988) 39


W1

W3
W2

C2 C3 C4
C1

Figure 5 Classification Tree

Regression Binary Tree


A regression tree is a decision tree also know as binary recursive partitioning that can be
used to forecast continuous valued outputs rather than discrete outputs for the purpose of
regression. This is because it's an iterative procedure that divides data into partitions or
branches, then divides each partition into smaller groups as the method progresses up
each branch.

(Mehta, 2020)

Decision tree shown below presents the failure or success of Nike’s shoe when compared
to men and women shoe sectors.
Key
Male Shoe Product = MSP
Female Shoe Product = FSP
MSP has a 30% success rate and, also FSP has 60% success rate and there is a 18%
chance where both the products will be a success thus, there is 18% (Both), 18% + 12% +
42% chance of having 1 more product succeed and 28% chance of failure.

Unit 18:DM Jaan Sheriffdeen (NC38988) 40


MSP

Success Failure

FSP FSP
S 60%
F 40% F 40%
S 60%

28% 42% 12% 18%

Figure 6 Regression Binary Tree

Activity 2.2
1. State the Dijkstra’s algorithm for a directed weighted graph with all non-
negative edge weights.
Dijkstra's algorithm is one method for determining the shortest path from a beginning
node to a target node in a weighted network. The technique builds a tree of shortest paths
from the source vertex to every other point in the graph. On graphs with negative weights
or edges, Dijkstra's algorithm fails. Because it always relies on local optimal, this is
known as the "Greedy Algorithm." Maps, AI-based applications, and navigation systems
frequently employ this.

(brilliant.org, 2019)

The Algorithm

Initially 𝑎 is the only vertex in 𝑉. V is added to some other vertex at each step where the
shortest path from a has been identified. The array 𝐿 is initialized by setting 𝐿[𝑖]to the ∞.
To regulate which vertex should be added to V at every step, a principle is used when
choosing the vertex 𝑗 with the shortest distance recorded in 𝐿, in a way that 𝑗 is not visited
once. When 𝑉 is added to 𝐽 (V is a collection of vertices that have been visited.), for
each vertex, all entries of L should be modified by verifying. 𝑘 not in ∪ (∪ is set of
unvisited vertices), whether a path through 𝑗 and directly to 𝑘 is shorter than the
previously recorded one. If the latter quantity is lesser.

Unit 18:DM Jaan Sheriffdeen (NC38988) 41


𝐿(𝑘) must be substituted by [𝐿(𝑗)+ 𝑤 (𝑗, 𝑘)]. Here 𝑤 (𝑗, 𝑘) is weight of edge among 𝑗 and
𝑘, when the shortest distance, 𝐿(𝑘), is updated, the shortest path 𝑃(𝑘) must be updated.
𝑃(𝑘) is updated by a path of 𝑗 followed by 𝑘. Simply, if 𝐿(𝑘) > (𝐿(𝑗)+ 𝑤 (𝑗, 𝑘)) then
𝐿(𝑘) = 𝐿(𝑗)+ 𝑤 (𝑗, 𝑘) and 𝑃(𝑘) = 𝑃(𝑗) ∪ {𝑘}.
This technique is repeated until z is added by successively adding vertices to V. The
destination vertex is z in this case.

Dijkstra’s Algorithm

𝐺 = (𝐴, 𝐵), A is set of vertices and B is set of edges. 𝑈 is set of unvisited vertices and 𝑉
is set of visited vertices. 𝑤 (𝑖, 𝑗) denote weight of edge (𝑖, 𝑗) where 𝑤 (𝑖, 𝑗) = ∞ if (𝑖, 𝑗) ∉
𝐵. Let |𝐴| = 𝑛.
Between source 𝑎 and vertex 𝑖. 𝐿(𝑖) is the shortest distance. The shortest path is
represented by 𝑃(𝑖), which is a set of vertices.

Step 1:
for 𝑖 = 1 to 𝑛 do
𝐿(𝑖) = ∞, 𝐿(𝑎) = 0
𝑃(𝑖) = ∅
Step 2: 𝑉 = ∅ and 𝑈 = 𝐴
Step 3: Let 𝑎 be source vertex and 𝑧 be the destination vertex.
Step 4: While 𝑧 ∈ 𝑉
begin,
𝑘 = 𝑎 vertex in 𝑈 with 𝐿(𝑥) minimal.
𝑉 = 𝑉 ∪ {𝑘} for every 𝑗 ∈ 𝑈 if (𝐿(𝑗) > (𝐿(𝑘)) + 𝑤 (𝑘, 𝑗)) then
begin,
𝐿(𝑗) = 𝐿(𝑘) + 𝑤(𝑘,𝑗)
𝑃(𝑗) = 𝑃(𝑘) ∪ {𝑗}
end
end
Step 5: Stop

Unit 18:DM Jaan Sheriffdeen (NC38988) 42


Activity 2.2
2. Use Dijkstra’s algorithm to find the shortest path spanning tree for the
following weighted directed graph with vertices A, B, C, D, and E given. Consider the
starting vertex as E.

Figure 7 Weighted Directed Graph

A B C D

E 5(E, A) ∞ ∞ 3(E, D)

D 5(E, A) 7 (E, D, B) 9 (E, D, C) -

A - 7 (E, D, B) 9 (E, D, C) -

B - - 9 (E, D, C) -

Table 1 Shortest path table (for figure 6)

Unit 18:DM Jaan Sheriffdeen (NC38988) 43


Figure 8 Weighted directed graph

Source Vertex Patch Weight


E A (E, A) 5
E B (E, D, B) 7
E C (E, D, C) 9
E D (E, D) 3
Table 2 Shortest path table (for figure 7)

Activity 2.3
Assess whether the following undirected graphs have an Eulerian and/or a
Hamiltonian cycle.

Eulerian Path and Circuit


The Euler path is a path that allows us to visit each edge precisely once. The same
vertices can be used several times. The Euler Circuit is a sort of Euler path that is unique.
The Euler Circuit is formed when the starting vertex of an Euler path is also connected to
the path's ending vertex.

The given conditions must be present in order to discover the path and circuit.

Unit 18:DM Jaan Sheriffdeen (NC38988) 44


• There must be a connection between the graph's nodes.
• A Euler Path is formed when exactly two vertices have an odd degree.
• If all of the vertices in a graph have the even degree, the graph will include an
Euler circuit.

(Sam, 2018)

Hamilton Path and Circuit


• Hamilton Path is a rout that holds each vertex of a graph precisely once.

• Hamilton Circuit is a circuit that starts at any vertex and goes in every vertex only
once to come back to the same starting vertex.

(lumenlearning.com, 2012)

Eulerian Hamilton

All edges All vertices


Same edge cannot take twice Same vertex cannot take twice
An edge can be taken more than once. A vertex can be taken more than once.

Table 3 Eulerian vs Hamilton Circuits

1.

Figure 9 Activity 2.3.1

Unit 18:DM Jaan Sheriffdeen (NC38988) 45


𝑑(𝐷) = 3
𝑑(𝐸) = 1
This contains 2 odd degree vertices. This graph goes through the same vertex more than
once therefore, its Eulerian and not Hamilton.
2.

Figure 10 Activity 2.3.2

𝑑(𝐴) = 3
𝑑(𝐶) = 3
𝑑(𝐷) = 3
𝑑(𝐸) = 3
This contains 4 odd degree vertices. This graph goes through each vertex only once
therefore, its Hamilton and not Eulerian.
Ex:- {𝐴, 𝐵, 𝐶, 𝐷, 𝐸, 𝐴}, {𝐸, 𝐴, 𝐵,𝐶, 𝐷, 𝐸}

3.

Figure 11 Activity 2.3.3

𝑑(𝐵) = 3
𝑑(𝐸) = 3

Unit 18:DM Jaan Sheriffdeen (NC38988) 46


This contains 2 odd degree vertices. This graph goes through identical vertex multiple
time therefore, it’s Eulerian and not Hamilton.

Activity 2.4
Construct a proof of the five color theorem for every planar graph.
Let S(n) be the assertion that the vertices of a connected planar simple graph G may be
colored with 5 or less colors for a decent coloration of G.

Base Step: This is trivially true for 1≤n≤5. A graph with one vertex can easily be colored
with one color, while a graph with five vertices may easily be colored with five colors to
achieve a reasonable coloring.

Induction Step: Suppose S(k−1) is true for all k≥2. That is, for each linked planar simple
graph with k-1 vertices, we can color the vertices in G with 5 or less colors. We want to
double check that S(k) is right (that for all connected planar simple graphs on k vertices,
we can obtain a good color of the vertices in G with 5 or fewer colors still).

Figure 12 Five Color theorem

Unit 18:DM Jaan Sheriffdeen (NC38988) 47


Suppose that v has deg(v)=5. If this vertex is removed as well as the all edges intersected
by v, the resultant graph has a nice 5 colorations, according to our induction hypothesis.

Figure 13 Colorations 5
The vertex v is now reintroduced. It's worth noting that if vertex v has neighbors with
different vertex colors, a true 5-coloring is impossible then v would require a 6th color.

Given below are 2 examples, here we can demonstrate that v's neighbors cannot all be the
same color. In these cases, we'll choose the red and orange vertices at random without
sacrificing generality.

Case 1: We can exchange the red vertex for an orange vertex if there is no red-orange
alternating vertex path that starts at the red vertex and finishes at the orange vertex thus
the demonstration is concluded.

Figure 14 Case 1

Case 2: Look for a red-orange alternating vertex path that starts at the red vertex and ends
at the orange vertex between the yellow and green vertices. There can't be an alternating
Unit 18:DM Jaan Sheriffdeen (NC38988) 48
yellow-green vertex path that starts at yellow and finishes at green because the red-orange
path prevents it. As a result, the yellow vertex can be swapped out for a green vertex, and
the proof is once again complete.

Figure 15 Case 2

As a result, S(k-1) implies S (k). For n≥1, S(n) is true according to the principle of
mathematical induction.

Unit 18:DM Jaan Sheriffdeen (NC38988) 49


Activity 3

Activity 3.1
Diagram two real world binary problems in two different fields using applications of
Boolean Algebra.

1. To get access to the employee past payment sheets in prominent organization, the
fingerprint of the particular Employer, his/her Manager and the Operational
Manager’s finger prints are needed.

Input:

E → Fingerprint of the Employee

M → Fingerprint of the Manager

O → Fingerprint of the Operational Manager

Output:

A → Access to the Paysheets

Truth Table

E M O A
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1
Table 4 Truth Table 1

• ̅ 𝑂 + 𝐸𝑀𝑂̅ + 𝐸𝑀𝑂
𝐴 = 𝐸𝑀

Unit 18:DM Jaan Sheriffdeen (NC38988) 50


Figure 16 Logic Gate Circuit 1

2. In a local restaurant a machine is located to make Hot Milo drink. To make this
the necessary buttons needed to be pressed which are milo, sugar and hot water

Input:

M→ Milo button

S→ Sugar button

W→ Hot Water button

Output:

D→ Receives Hot Milo

Truth Table

M S W D
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0

Unit 18:DM Jaan Sheriffdeen (NC38988) 51


1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
Table 5 Truth Table 2

• D = MSW

Figure 17 Logic Gate Circuit 2

Activity 3.2
1. Produce truth tables and its corresponding Boolean equation for the following
scenarios.

I. If the driver is present and the driver has not buckled up and the ignition switch
is on, then the warning light should turn on.

𝐴 – Driver is present
𝐵 – Driver is all buckled up
𝐶 − Ignition switch is on
𝑋 − Warning light is turn on

Boolean Equation:
𝐴 and 𝐵̅ and 𝐶 = 𝑋
𝐴. 𝐵̅. 𝐶 = 𝑋

Unit 18:DM Jaan Sheriffdeen (NC38988) 52


𝐴𝐵̅𝐶 = 𝑋
Truth Table

𝑨 𝑩 𝑪 𝑩̅ 𝑨𝑩̅𝑪(𝑿)
0 0 0 1 0
0 0 1 1 0
0 1 0 0 0
0 1 1 0 0
1 0 0 1 0
1 0 1 1 1
1 1 0 0 0
1 1 1 0 0
Table 6 Truth Table

Figure 18 Logic Gate Circuit

II. If it rains and you don't open your umbrella, then you will get wet.

𝐴 − Raining
𝐵 − Open your umbrella
𝑋 − Get wet
𝐴 and 𝐵̅ = 𝑋
𝐴. 𝐵̅ = 𝑋
𝐴𝐵̅ = 𝑋

Unit 18:DM Jaan Sheriffdeen (NC38988) 53


Truth Table

𝑨 𝑩 𝑩̅ 𝑨𝑩̅(𝑿)

0 0 1 0
0 1 0 0
1 0 1 1
1 1 0 0
Table 7 Truth Table

Figure 19 Logic Gate Circuit

Unit 18:DM Jaan Sheriffdeen (NC38988) 54


2. Produce truth tables for given Boolean expressions.

1. 𝐴̅𝐵̅𝐶 + 𝐴𝐵̅𝐶̅ + 𝐴𝐵𝐶 + 𝐴̅𝐵𝐶 ̅

Figure 20 Truth Table

2. (𝐴 + 𝐵̅ + 𝐶)(𝐴 + 𝐵 + 𝐶)(𝐴̅ + 𝐵 + 𝐶̅)

Figure 21 Truth Table

Unit 18:DM Jaan Sheriffdeen (NC38988) 55


Activity 3.3
Simplify the following Boolean expressions using algebraic methods
.
Laws of Boolean Algebra
Commutative Law
• 𝐴+𝐵=𝐵+𝐴
• 𝐴𝐵 = 𝐵𝐴

Associative Law
• 𝐴 + (𝐵 + 𝐶) = (𝐴 + 𝐵) + 𝐶
• 𝐴(𝐵𝐶) = (𝐴𝐵)𝐶

Distributive Law
• 𝐴(𝐵 + 𝐶) = 𝐴𝐵 + 𝐴𝐶 Annulment Law
• 𝐴. 0 = 0
• 𝐴+1=1

Identity Law
• 𝐴+0=𝐴
• 𝐴. 1 = 𝐴

Idempotent Law
• 𝐴+𝐴=𝐴
• 𝐴. 𝐴 = 𝐴

Complement Law
• 𝐴. 𝐴̅ = 0
• 𝐴 + 𝐴̅ = 1

Double Negation Law


• 𝐴=𝐴

Unit 18:DM Jaan Sheriffdeen (NC38988) 56


de Morgan´s Theorem
• ̅𝐴̅+̅̅𝐵̅ = 𝐴̅. ̅𝐵
• ̅𝐴̅.𝐵
̅ ̅ = 𝐴̅ + ̅𝐵

Absorptive Law
• 𝐴 + (𝐴. B) = 𝐴
• 𝐴(𝐴 + 𝐵) = 𝐴

Redundancy Law
• 𝐴 + Ā𝐵 = 𝐴 + 𝐵
• 𝐴. (Ā + 𝐵) = 𝐴𝐵

Consensus Law
• (𝐴 + 𝐵). (𝐴̅ + 𝐶).(𝐵 + 𝐶) = (𝐴 + 𝐵).(𝐴̅ + 𝐶)
• 𝐴𝐵 + 𝐴̅𝐶 + 𝐵𝐶 = 𝐴𝐵 + 𝐴̅𝐶

1. 𝐴(𝐴+ 𝐵) + 𝐵(𝐵 + 𝐶) + 𝐶(𝐶 + 𝐴)


= 𝐴𝐴 + 𝐴𝐵 + 𝐵𝐵 + 𝐵𝐶 + 𝐶𝐶 + 𝐶𝐴
= (𝐴 + 𝐴𝐵) + (𝐵 + 𝐵𝐶)+ (𝐶 + 𝐶𝐴)
=𝐴+𝐵+𝐶

2. (𝐴 + 𝐵̅)(𝐵 + 𝐶) + (𝐴 + 𝐵)(𝐶 + 𝐴̅)


= 𝐴𝐵 + 𝐴𝐶 + 𝐵̅𝐵 + 𝐵̅𝐶 + 𝐴𝐶 + 𝐴𝐴̅ + 𝐵𝐶 + 𝐵𝐴̅
= 𝐴𝐵 + 𝐴𝐶 + 0 + 𝐵̅𝐶 + 𝐴𝐶 + 0 + 𝐵𝐶 + 𝐵𝐴̅
= 𝐴𝐵 + 𝐴𝐶 + 𝐴𝐶 + 𝐵̅𝐶 + 𝐵𝐶 + 𝐵𝐴̅
= (𝐴𝐵 + 𝐵𝐴̅ ) + (𝐴𝐶 + 𝐴𝐶) + (𝐵̅𝐶 + 𝐵𝐶)
= (𝐵𝐴 + 𝐵𝐴̅ ) + 𝐴𝐶 + (𝐶𝐵 + 𝐶𝐵̅)
= 𝐵(𝐴 + 𝐴̅) + 𝐴𝐶 + 𝐶(𝐵 + 𝐵̅)
= 𝐵(1) + 𝐴𝐶 + 𝐶(1)
= 𝐵 + 𝐴𝐶 + 𝐶
= 𝐵 + (𝐴𝐶 + 𝐶)
=𝐵+𝐶

Unit 18:DM Jaan Sheriffdeen (NC38988) 57


3. (𝐴 + 𝐵)(𝐴𝐶 + 𝐴𝐶̅)+ 𝐴𝐵 +𝐵
= (𝐴 + 𝐵)[𝐴(𝐶 + 𝐶̅)]+ (𝐴𝐵 + 𝐵)
= (𝐴 + 𝐵)[𝐴(1)]+ 𝐵
= (𝐴 + 𝐵)𝐴 + 𝐵
= 𝐴𝐴 + 𝐵𝐴 + 𝐵
= 𝐴 + (𝐴𝐵 + 𝐵)
=𝐴+𝐵

4. 𝐴̅(𝐴 + 𝐵) + (𝐵 + 𝐴)(𝐴 + 𝐵̅)


= 𝐴𝐴̅ + 𝐴̅𝐵 + 𝐵𝐴 + 𝐵𝐵̅ + 𝐴𝐴 + 𝐴𝐵̅
= 0 + 𝐴̅𝐵 + 𝐵𝐴 + 0 + 𝐴 + 𝐴𝐵̅
= (𝐴 + 𝐴̅𝐵) + (𝐵𝐴 + 𝐴𝐵̅)
= (𝐴 + 𝐵) + (𝐴 + 𝐴𝐵̅)
= (𝐴 + 𝐵) + 𝐴(𝐵 + 𝐵̅)
= (𝐴 + 𝐵) + 𝐴(1)
=𝐴+𝐵+𝐴
=𝐴+𝐴+𝐵
= 𝐴+𝐵
Activity 3.4

Consider the K-Maps given below. For each K- Map

I. Write the appropriate standard form (SOP/POS) of Boolean expression.


K-Maps
K-Maps are also known as Karnaugh Map and it can be used to simplify the Boolean
algebra expressions moreover, without utilizing any Boolean algebra theorems, we can
simply minimize Boolean expressions of 3, 4 variables utilizing K-map.

According on the needs of the problem, K-map can take two forms: Sum of Product
(SOP) and Product of Sum (POS). K-map is a table-like illustration that provides
additional data than the TRUTH TABLE. We start by filling the grid of the K-map with
0s and 1s, afterwards we solve it by forming groups

(www.geeksforgeeks.org, 2021)

Unit 18:DM Jaan Sheriffdeen (NC38988) 58


Sum Of Products (SOP)
Also known as Disjunctive Normal Form, its a Boolean expression in a specific format.
he terms sum-of-products comes from the expression's form: a sum (OR) of one or more
products (AND). This is a way (or form) for simplifying logic gate Boolean
expressions. SOP is a two-level circuit model with a flat structure (first level of AND
gates and second level of an OR gate).

(geeksforgeeks.org, 2021)

Product Of Sums (POS)


Also known as Conjunction Normal Form. A product of sums is a Boolean function that
appears as a product of numerous sum expressions (POS). It is created by multiplying the
total terms (AND operation). These total terms are also known as max-terms. These are
logical Boolean AND and OR, respectively, rather than numerical product and sum.

(Lithmee, 2018)

1. SOP

Figure 22 SOP

𝑋 = 𝐵𝐶 + 𝐴𝐵̅𝐶̅

Unit 18:DM Jaan Sheriffdeen (NC38988) 59


POS

Figure 23 POS

𝑋 = (𝐴 + 𝐶)(𝐵̅ + 𝐶)(𝐵 + 𝐶̅)

2. SOP→ 𝐵𝐶 + 𝐴𝐵̅𝐶̅

Figure 24 SOP Logic Gate Circuit


̅𝑪
𝑿 = 𝑩𝑪 + 𝑨𝑩 ̅

Unit 18:DM Jaan Sheriffdeen (NC38988) 60


POS→ (𝐴 + 𝐶)(𝐵̅ + 𝐶)(𝐵 + 𝐶̅)

Figure 25 POS Logic Gate Circuit

3. SOP→ 𝑁𝐴𝑁𝐷

Figure 26 SOP (NAND) Logic Gate Circuit

Unit 18:DM Jaan Sheriffdeen (NC38988) 61


POS→ 𝑁𝑂𝑅

Figure 27 POS (NOR) Logic Gate Circuit

1. SOP

Figure 28 SOP

𝑋 = 𝐶𝐷 + 𝐴𝐵̅ + 𝐴𝐶̅ + 𝐴̅𝐵𝐷 + 𝐵̅𝐶̅𝐷̅

Unit 18:DM Jaan Sheriffdeen (NC38988) 62


POS

Figure 29 POS

𝑋 = (𝐴 + 𝐶̅ + 𝐷)(𝐵̅ + 𝐶̅ + 𝐷)(𝐴 + 𝐵̅ + 𝐷)(𝐴 + 𝐵 + 𝐶 + 𝐷̅)

Unit 18:DM Jaan Sheriffdeen (NC38988) 63


SOP→ 𝐵̅ 𝐷
̅ + 𝐴𝐶̅ + 𝐴𝐷 + 𝐴̅𝐶 𝐷
̅ + 𝐵𝐶̅ 𝐷

Figure 30 SOP Logic Gate

Unit 18:DM Jaan Sheriffdeen (NC38988) 64


̅ )(𝐴 + 𝐶̅ + 𝐷
POS→ (𝐴 + 𝐵 + 𝐷 ̅ )(𝐴 + 𝐵̅ + 𝐶 + 𝐷)(𝐴̅ + 𝐵̅ + 𝐶̅ + 𝐷)

Figure 31 POS Logic Gate

Unit 18:DM Jaan Sheriffdeen (NC38988) 65


SOP→ 𝑁𝐴𝑁𝐷

Figure 32 SOP turns NAND logic gate

Unit 18:DM Jaan Sheriffdeen (NC38988) 66


POS→ 𝑁𝑂𝑅

Figure 33 POS turns NOR logic gate

Unit 18:DM Jaan Sheriffdeen (NC38988) 67


SOP

Figure 34 SOP

𝑋 = 𝐴̅𝐶̅ + 𝐵𝐶̅ + 𝐴̅𝐵 + 𝐴𝐵̅𝐶

Unit 18:DM Jaan Sheriffdeen (NC38988) 68


POS

Figure 35 POS

𝑋 = (𝐴 + 𝐵 + 𝐶̅)(𝐴̅ + 𝐵̅ + 𝐶̅)(𝐴̅ + 𝐵 + 𝐶)

Unit 18:DM Jaan Sheriffdeen (NC38988) 69


Figure 36 SOP logic gate

Unit 18:DM Jaan Sheriffdeen (NC38988) 70


Figure 37 POS Logic Gate

SOP →NAND

Figure 38 SOP turns NAND logic gate

Unit 18:DM Jaan Sheriffdeen (NC38988) 71


POS → NOR

Figure 39 POS turns NOR logic gate

Unit 18:DM Jaan Sheriffdeen (NC38988) 72


Activity 4

Activity 4.1
Describe the characteristics of different binary operations that are performed on the
same set.

A binary operation is a calculation that combines two elements to create a new element. A
binary operation on a set describes a calculation that involves two elements of the set to
create a new element of the set.
Basic Binary Operations

Operation Symbol Representation


Addition + 𝑎+𝑏
Subtraction − 𝑎−𝑏
Multiplication × 𝑎×𝑏
Division ÷ 𝑎÷𝑏
Table 8 Basic Binary Operations

Let 𝑆 be a non-empty set. A binary operation in the set 𝑆 is a function ∗ from 𝑆 × 𝑆 into 𝑆
∗∶𝑆×𝑆 → 𝑆
(Domain) (Codomain)
Let 𝑎, 𝑏 ∈ 𝑆,
Then a binary operation, ∗ between 𝑎 and 𝑏 can be written as 𝑎 ∗ 𝑏 such that 𝑎 ∗ 𝑏 ∈ 𝑆.
Characteristics of binary operations that are performed on the same set
• Associative Property
A binary operation ∗ on a set 𝑆 is said to be “Associative” or satisfy the “Associative
Property” if, for any elements 𝑎, 𝑏, 𝑐 in (𝑎, 𝑏, 𝑐, ∈ 𝑆),
(𝑎 ∗ 𝑏) ∗ 𝑐 = 𝑎 ∗ (𝑏 ∗ 𝑐)
• Commutative Property
A binary operation ∗ on a set is said to be “Commutative” or satisfy the “Commutative
Property “if, for any elements 𝑎, 𝑏 in (𝑎, 𝑏 ∈ 𝑆),
𝑎∗𝑏=𝑏∗𝑎
𝑎 + 𝑏 = 𝑏 + 𝑎 ← Commutative
𝑎 − 𝑏 ≠ 𝑏 − 𝑎 → Not Commutative

Unit 18:DM Jaan Sheriffdeen (NC38988) 73


• Identity Element Property
Consider a binary operation ∗ on a set S an element ′𝑒′ in 𝑆 (𝑒 ∈ 𝑆) is called an “Identity
Element” of an element ′𝑎′ in 𝑆 (𝑎 ∈ 𝑆), for ∗ if,
𝑎∗𝑒=𝑒∗𝑎=𝑎
𝑎 × 1 = 1 × 𝑎 = 𝑎 → 1 Multiplication Identity
𝑎 + 0 = 0 + 𝑎 = 𝑎 → 0 Additive Identity

• Inverse Element Property


Suppose a binary operation ∗ on a set 𝑆 has an Identity Element ′𝑒′. The inverse of an
element ′𝑎′ in 𝑆 (𝑎 ∈ 𝑆) is an element ′𝑏′ in 𝑆 (𝑏 ∈ 𝑆) such that,
𝑎∗𝑏=𝑏∗𝑎=𝑒
′𝑏′ can be denoted as "𝑎−1" (Inverse of ′𝑎′)
1 1
𝑎 × 𝑎 = 𝑎 × 𝑎 = 1 → Multiplicative Inverse
𝑎 𝑎

𝑎 + (−𝑎) = (−𝑎) + 𝑎 = 0 → Additive Inverse

Activity 4.2

1. Determine the operation tables for group G with orders 1, 2, 3 and 4 using the
elements a, b, c, and e as the identity element in an appropriate way.

A Group is a set (G, *), where G is set and * is a binary operation on G such that the
following properties satisfy.

• Closure Property
For all 𝑎, 𝑏 ∈ 𝐺, 𝑎 ∗ 𝑏 ∈ 𝐺

• Associative Property
For all 𝑎, 𝑏, 𝑐 ∈ 𝐺, 𝑎 ∗ (𝑏 ∗ 𝑐) = (𝑎 ∗ 𝑏) ∗ 𝑐

• Identity Property
There exists an element 𝑒 ∈ 𝐺 such that for all 𝑎 ∈ 𝐺, 𝑎 ∗ 𝑒 = 𝑒 ∗ 𝑎 = 𝑎

Unit 18:DM Jaan Sheriffdeen (NC38988) 74


• Inverse Property
For every 𝑎 ∈ 𝐺, there exists an element 𝑏 ∈ 𝐺, such that 𝑎 ∗ 𝑏 = 𝑏 ∗ 𝑎 = 𝑒
[𝑏 = 𝑎−1(Inverse of′𝑎′)]

Order of a Group is, No. of elements in that Group.


Operation Table for Order 1
𝐺 = {𝑒}

∗ 𝑒

𝑒 𝑒
Table 9 Operation table for Order 1
Operation Table for Order 2
𝐺 = {𝑒, 𝑎}

∗ 𝑒 𝑎

𝑒 𝑒 𝑎

𝑎 𝑎 𝑒
Table 10 Operation Table for Order 2

Operation Table for Order 3


𝐺 = {𝑒, 𝑎, 𝑏}

Unit 18:DM Jaan Sheriffdeen (NC38988) 75


∗ 𝑒 𝑎 𝑏

𝑒 𝑒 𝑎 𝑏

𝑎 𝑎 𝑏 𝑒

𝑏 𝑏 𝑒 𝑎

Table 11 Operation table for Order 3

Operation Table for Order 4


𝐺 = {𝑒, 𝑎, 𝑏, 𝑐}

∗ 𝑒 𝑎 𝑏 𝑐

𝑒 𝑒 𝑎 𝑏 𝑐

𝑎 𝑎 𝑒 𝑐 𝑏

𝑏 𝑏 𝑐 𝑒 𝑎

𝑐 𝑐 𝑏 𝑎 𝑒
Table 12 Operation table for Order 4

Unit 18:DM Jaan Sheriffdeen (NC38988) 76


2.
I. State the relation between the order of a group and the number of binary
operations that can be defined on that set.

Total number of operations on a set consisting ′𝑛′ elements (order is 𝑛), is given by
𝑛^(𝑛^2). (𝑛 is raised to 𝑛 square)

II. How many binary operations can be defined on a set with 4 elements?

Order = 4
Binary operations = 442
= 416
= 4,294,967,296
3.
I. State the Lagrange’s theorem of group theory.

Lagrange’s Theorem of Group Theory


“Let 𝐻 be a subgroup of a finite group G and then the order of 𝐻 divides the order of 𝐺”.

ii. For a subgroup H of a group G, prove the Lagrange’s theorem.

Proof of Lagrange’s Theorem

Assume 𝐻 has “𝑟” elements and there are “𝑠” right cossets, say,
𝐻𝑎1, 𝐻𝑎2, 𝐻𝑎3, …, 𝐻𝑎5

Therefore, by the theorem that, “If 𝐻 is a subgroup of a finite group 𝐺, then the right
cossets 𝐻𝑎 form a partition of 𝐺”, and by the declaration that “Any cosset 𝐻𝑎 have the
identical number of elements”, each cost that partition 𝐺 has 𝑟 elements. Therefore, 𝐺 has
“𝑟 × 𝑠” elements, therefore, the order of 𝐻 divides the order of 𝐺.

Unit 18:DM Jaan Sheriffdeen (NC38988) 77


iv. Discuss whether a group H with order 6 can be a subgroup of a group with order
13 or not. Clearly state the reasons.

Let 𝐻 be a subgroup of 𝐺. Then, by the Lagrange’s Theorem of group theory, order of the
group 𝐻 divides the order of 𝐺. Here, the order of group H is 6 and the order of given
group is 13. But, 13 isn’t divisible by 6.
Therefore, according to the Lagrange’s Theorem of Group Theory, a group 𝐻 with order
6 cannot be a subgroup of a group with order 13.

Activity 4.3
Validate whether the set S =  − {−1} is a group under the binary operation ‘*’defined

as a * b = a + b + ab for any two elements a, b  S .


𝑆 can be a Group under the binary operation “∗” defined as 𝑎 ∗ 𝑏 = 𝑎 + 𝑏 + 𝑎𝑏 for any
two elements 𝑎, 𝑏 ∈ 𝑆, if the following properties are satisfied.

𝑆1: Associative Property


For any 𝑎, 𝑏, 𝑐 ∈ 𝑆,
(𝑎 ∗ 𝑏) ∗ 𝑐 = 𝑎 ∗ (𝑏 ∗ 𝑐) 1

𝑆2: Identity Element Property


There exists an element “𝑒” in 𝑆 such that, for every 𝑎 ∈ 𝑆,
𝑎∗𝑒=𝑒∗𝑎=𝑎 2

𝑆3: Inverse Element Property


For each 𝑎 in 𝑆, there exists an element 𝑏 (inverse of 𝑎) in 𝑆 such that,
𝑎 ∗ 𝑏 = 𝑏 ∗ 𝑎 = 𝑒 (𝑏 = 𝑎−1) 3

𝑺𝟏: Associative Property


𝐿. 𝐻. 𝑆 = (𝑎 ∗ 𝑏) ∗ 𝑐
= (𝑎 + 𝑏 + 𝑎𝑏) ∗ 𝑐
= (𝑎 + 𝑏 + 𝑎𝑏) + 𝑐 + (𝑎 + 𝑏 + 𝑎𝑏)𝑐
= 𝑎 + 𝑏 + 𝑎𝑏 + 𝑐 + 𝑎𝑐 + 𝑏𝑐 + 𝑎𝑏𝑐

Unit 18:DM Jaan Sheriffdeen (NC38988) 78


= 𝑎 + 𝑏 + 𝑐 + 𝑎𝑏 + 𝑎𝑐 + 𝑏𝑐 + 𝑎𝑏𝑐 a
𝑅. 𝐻. 𝑆 = 𝑎 ∗ (𝑏 ∗ 𝑐)
= 𝑎 ∗ (𝑏 + 𝑐 + 𝑏𝑐)
= 𝑎 + (𝑏 + 𝑐 + 𝑏𝑐) + 𝑎(𝑏 + 𝑐 + 𝑏𝑐)
= 𝑎 + 𝑏 + 𝑐 + 𝑏𝑐 + 𝑎𝑏 + 𝑎𝑐 + 𝑎𝑏𝑐 b
a=b
Therefore, By 1,
Associative Property is satisfied.

𝑺𝟐: Identity Element Property


Let 𝑒 = 0,
𝑎∗𝑒=𝑎∗0
=𝑎+0+𝑎×0
=𝑎+0
=𝑎 a
𝑒∗𝑎=0∗𝑎
=0+𝑎+0×𝑎
=𝑎+0
=𝑎 (b
Therefore, By a, b
𝑎∗0=0∗𝑎=𝑎
Therefore, By 2,
Identity Element Property is satisfied.

𝑺𝟑: Inverse Element Property


Since 𝑒 = 0,
Let inverse of 𝑎 = (−𝑎)
𝑎 ∗ (−𝑎) = 𝑎 + (−𝑎) + 𝑎 × (−𝑎)
= 𝑎 − 𝑎 − 𝑎2
= −𝑎2 ≠ 0 a
Therefore, By a,
𝑎 ∗ (−𝑎) ≠ 0
Therefore, By 3,

Unit 18:DM Jaan Sheriffdeen (NC38988) 79


Identity Element Property is not satisfied
Therefore, the set 𝑆 is not a group under the given binary operation

Activity 4.4
Prepare a presentation for ten minutes to explore an application of group theory
relevant to your course of study. (i.e. in Computer Sciences)

Figure 40 Presentation Slide (1)

Figure 41 Presentation Slide (2)

Unit 18:DM Jaan Sheriffdeen (NC38988) 80


Figure 42 Presentation Slide (3)

Figure 43 Presentation Slide (4)

Unit 18:DM Jaan Sheriffdeen (NC38988) 81


Figure 44 Presentation Slide (5)

Figure 45 Presentation Slide (6)

Unit 18:DM Jaan Sheriffdeen (NC38988) 82


Figure 46 Presentation Slide (7)

Figure 47 Presentation Slide (8)

Unit 18:DM Jaan Sheriffdeen (NC38988) 83


Figure 48 Presentation Slide (9)

Figure 49 Presentation Slide (10)

Unit 18:DM Jaan Sheriffdeen (NC38988) 84


Figure 50 Presentation Slide (11)

Figure 51 Presentation Slide (12)

Unit 18:DM Jaan Sheriffdeen (NC38988) 85


Gantt chart

Completion of Math Assignment


29-10-21 08-11-21 18-11-21 28-11-21 08-12-21 18-12-21 28-12-21 07-01-22 17-01-22 27-01-22 06-02-22

Task 1

Task 2

Task 3

Task 4

Task 4 Task 3 Task 2 Task 1


Start Date 16-01-22 21-12-21 29-11-21 29-10-21
Days to complete 19 25 21 30

Figure 52 Gantt Chart for Math Assignment

Unit 18:DM Jaan Sheriffdeen (NC38988) 86


Bibliography
Brid, R. S., 2018. Introduction to Decision Trees. [Online]
Available at: https://medium.com/greyatom/decision-trees-a-simple-way-to-visualize-a-
decision-dc506a403aeb
[Accessed 21 Jan 2022].

brilliant.org, 2019. Brilisnt. [Online]


Available at: https://brilliant.org/wiki/dijkstras-short-path-finder/
[Accessed 15 Dec 2021].

Byjus.com, 2021. Byjus. [Online]


Available at: https://byjus.com/maths/sets/
[Accessed 12 Dec 2021].

codingame, 2021. www.codingame.com. [Online]


Available at: https://www.codingame.com/playgrounds/5844/machine-learning-with-java---
part-4-decision-tree
[Accessed 2021].

geeksforgeeks.org, 2021. GeeksforGeeks. [Online]


Available at: https://www.geeksforgeeks.org/difference-between-sop-and-pos-in-digital-
logic/
[Accessed 19 Jan 2022].

Glen, S., 2017. Statistics How To. [Online]


Available at: https://www.statisticshowto.com/multiset/
[Accessed 14 Dec 2021].

Lithmee, 2018. Pediaa. [Online]


Available at: https://pediaa.com/what-is-the-difference-between-sop-and-pos/
[Accessed 19 Jan 2022].

lumenlearning.com, 2012. Lumen. [Online]


Available at: https://courses.lumenlearning.com/math4liberalarts/chapter/introduction-euler-
paths/
[Accessed 21 Jan 2022].

Mehta, A., 2020. Digital Vidya. [Online]


Available at: https://www.digitalvidya.com/blog/classification-and-regression-trees/
[Accessed 15 Dec 2021].

Rouse, M., 2019. set. [Online]


Available at: https://searchsecurity.techtarget.com/definition/set
[Accessed 20 January 2020].

Unit 18:DM Jaan Sheriffdeen (NC38988) 87


Sam, S., 2018. Tutorialspoint. [Online]
Available at: https://www.tutorialspoint.com/Eulerian-Path-and-Circuit
[Accessed 17 Dec 2021].

www.geeksforgeeks.org, 2021. GeeksforGeeks. [Online]


Available at: https://www.geeksforgeeks.org/introduction-of-k-map-karnaugh-map/amp/
[Accessed 19 Jan 2022].

Unit 18:DM Jaan Sheriffdeen (NC38988) 88


Grading Criteria Achieved Feedback

LO1 : Examine set theory and functions applicable to software


engineering.

P1 Perform algebraic set operations in a formulated mathematical


problem.

P2 Determine the cardinality of a given bag (multiset).

M1 Determine the inverse of a function using appropriate


mathematical technique.

D1 Formulate corresponding proof principles to prove properties


about defined sets.
LO2 : Analyse mathematical structures of objects using graph
theory.

P3 Model contextualized problems using trees, both quantitatively


and qualitatively.
P4 Use Dijkstra’s algorithm to find a shortest path spanning tree in a
graph.

M2 Assess whether an Eulerian and Hamiltonian circuit exists in an


undirected graph.

D2 Construct a proof of the Five colour theorem.

Unit 18:DM Jaan Sheriffdeen (NC38988) 89


LO3 : Investigate solutions to problem situations using the
application of Boolean algebra.

P5 Diagram a binary problem in the application of Boolean Algebra.

P6 Produce a truth table and its corresponding Boolean equation


from an applicable scenario.

M3 Simplify a Boolean equation using algebraic methods.

D3 Design a complex system using logic gates.

LO4 : Explore applicable concepts within abstract algebra.

P7 Describe the distinguishing characteristics of different binary


operations that are performed on the same set.

P8 Determine the order of a group and the order of a subgroup in


given examples.

M4 Validate whether a given set with a binary operation is indeed a


group.

D4 Explore with the aide of a prepared presentation the application of


group theory relevant to your course of study

Unit 18:DM Jaan Sheriffdeen (NC38988) 90

You might also like