Professional Documents
Culture Documents
A-011814-1612368830998-72379-Lahiru Viraj - ME24716 - 799-1601899513739-Unit 18 - Discrete Mathematics
A-011814-1612368830998-72379-Lahiru Viraj - ME24716 - 799-1601899513739-Unit 18 - Discrete Mathematics
• Identifying opportunities Y/
for improved performance?
N
• Agreeing actions?
Y/
N
Y/
N
Give details:
Internal Verifier
Date
signature
Programme Leader
Date
signature (if required)
Higher Nationals – Summative Assignment Feedback Form
Student Name/ID N.G.G. Lahiru Viraj / ME24716
Unit Title Unit 18: Discrete Mathematics
Assignment Number 1 Assessor Ms. Shyamali Karunadasa
03/02/2021 Date Received 1st
Submission Date
submission
Date Received 2nd
Re-submission Date
submission
Assessor Feedback:
LO3 Investigate solutions to problem situations using the application of Boolean algebra.
Pass, Merit & Distinction P5 P6 M3 D3
Descripts
Resubmission Feedback:
P a g e 3 | 89
P a g e 4 | 89
Important Points:
1. Check carefully the hand in date and the instructions given with the assignment. Late submissions
will not be accepted.
2. Ensure that you give yourself enough time to complete the assignment by the due date.
3. Don’t leave things such as printing to the last minute – excuses of this nature will not be accepted
for failure to hand in the work on time.
4. You must take responsibility for managing your own time effectively.
5. 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.
6. Failure to achieve at least a PASS grade will result in a REFERRAL grade being given.
7. Non-submission of work without valid reasons will lead to an automatic REFERRAL. You will then
be asked to complete an alternative assignment.
8. Take great care that if you use other people’s work or ideas in your assignment, you properly
reference them, using the HARVARD referencing system, in you text and any bibliography,
otherwise you may be guilty of plagiarism.
9. If you are caught plagiarising you could have your grade reduced to A REFERRAL or at worst you
could be excluded from the course.
P a g e 5 | 89
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.
13349lahiru@gmail.com 03/02/2021
P a g e 6 | 89
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.
LO3 Investigate solutions to problem situations using the application of Boolean algebra.
P a g e 7 | 89
P a g e 8 | 89
Part 1
1. Perform algebraic set operations in the following formulated mathematical problems.
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.
Part 2
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 −1
)
f (x) using appropriate mathematical technique.
i. f: → + ii. f: + → +
f (x) = x2 f (x) = 1
x
iii. f: + → + iv. f:− , → −1,1
2 2
f (x) = x2 f (x) = sin x
v. f : 0 , → − 2, 2 f (x)
= 2 cos x
Part 4
1. Formulate corresponding proof principles to prove the following properties about defined sets.
i. A = B A B and B A.
P a g e 10 | 89
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.
ii.
iii.
Part 4
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
ii. ( + ̄ )( + ) + ( + )( + ̄)
iii. ( + )( + )̄ + +
iv. ̄( + ) + ( + )( + ̄ )
Part 4
(a)
AB/C 0 1
00 0 0
01 0 1
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.
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
1. Prepare a presentation for ten minutes to explore an application of group theory relevant to
your course of study. (i.e. in Computer Sciences)
P a g e 15 | 89
I would like to express my sincere gratitude to all those who have given me the opportunity to
finish this assignment.
Especially I would like to offer my special gratitude to our lecturer, Ms. Shyamali Karunadasa
whose contribution to stimulating suggestions and encouragement. Furthermore, I would also
extend my gratitude our co-coordinator Ms. Ishani Jayasuriya for providing us with all the
necessities without any hindrance.
I would further thank my beloved parents for their valuable and immeasurable dedication, which
lead this assignment to success. In addition, I would like to thank my dearest friends for supporting
me throughout this journey and all the people who helped me to conclude this assignment
successfully.
P a g e 16 | 89
• 18.01.2020 –
▪ The student has done the Assignment properly.
▪ Has to complete Activity 02 – Part 01 – Q1.
• 23.01.2021 –
▪ The student has done the Assignment properly.
▪ Has to do a change in Activity 04 – Part 04 – Q1.
• 26.01.2021 –
▪ The student has completed the Assignment properly.
Action Plan
• 18.01.2020 –
▪ Complete Activity 02 – Part 01 – Q1. – Has to provide the Examples.
• 23.01.2021 –
▪ Do the mentioned change in Activity 04 – Part 04 – Q1. – Include the Slide Numbers.
Summative feedback
I would like to express my heartiest gratitude towards my DM Module lecturer Ms. Shyamali
Karunadasa for her support and guidance provided all through the assignment completion.
P a g e 17 | 89
Acknowledgement .................................................................................................................. 16
Activity 01 ............................................................................................................................... 24
Part 1 ......................................................................................................................................... 24
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. ......................................... 24
II. If n (A − B) =45, n (A B) =110 and n (A B) =15, then find n(B). ....................... 24
Part 2 ......................................................................................................................................... 27
1. Write the multisets (bags) of prime factors of given numbers. .................................. 27
2. Write the multiplicities of each element of multisets (bags) in Part 2-1(i,ii,iii) separately.
............................................................................................................................................... 27
3. Determine the cardinalities of each multiset (bag) in Part 2-1(i, ii, iii). ........................... 28
Part 3 ......................................................................................................................................... 29
Determine whether the following functions are invertible or not and if a function is invertible,
then find the rule of the inverse (f (x)) −1 using appropriate mathematical technique. ....... 29
Part 4 ......................................................................................................................................... 35
1. Formulate corresponding proof principles ........................................................................ 35
Activity 02 ............................................................................................................................... 41
Part 1 ......................................................................................................................................... 41
Binary Tree ........................................................................................................................... 41
P a g e 18 | 89
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. 46
Part 3 ......................................................................................................................................... 48
1.Assess whether the following undirected graphs have an Eulerian and/or a Hamiltonian
cycle. ..................................................................................................................................... 48
Part 4 ......................................................................................................................................... 50
1. Construct a proof of the five-color theorem for every planar graph. ......................... 50
Activity 03 ............................................................................................................................... 52
Part 1 ......................................................................................................................................... 52
1. Diagram two real world binary problems in two different fields using applications of
Boolean Algebra. .................................................................................................................. 52
Part 2 ......................................................................................................................................... 55
1. Produce truth tables and its corresponding Boolean equation for the following scenarios.
............................................................................................................................................... 55
Part 3 ......................................................................................................................................... 58
1.Simplify the following Boolean expressions using algebraic methods. ............................ 58
Part 4 ......................................................................................................................................... 61
1.Consider the K-Maps given below. For each K- Map ....................................................... 61
a. ............................................................................................................................................ 63
b............................................................................................................................................. 64
c. ............................................................................................................................................ 66
Activity 04 ............................................................................................................................... 69
Part 1 ......................................................................................................................................... 69
P a g e 19 | 89
Part 2 ......................................................................................................................................... 71
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.................................................. 71
2............................................................................................................................................. 73
i. State the relation between the order of a group and the number of binary operations that can
be defined on that set. ........................................................................................................... 73
ii. How many binary operations can be defined on a set with 4 elements? .......................... 74
3............................................................................................................................................. 74
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. ............................................................................................... 75
Part 3 ......................................................................................................................................... 75
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 ................................................................ 75
Part 4 ......................................................................................................................................... 78
1. Prepare a presentation for ten minutes to explore an application of group theory
relevant to your course of study. (i.e., in Computer Sciences) ............................................. 78
References ............................................................................................................................... 85
Gantt Chart ............................................................................................................................ 86
P a g e 20 | 89
P a g e 22 | 89
P a g e 23 | 89
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
𝑛(𝐴 ∪ 𝐵) = ?
𝑛(𝐴 ∪ 𝐵) = 𝑛(𝐴) + 𝑛(𝐵) − 𝑛(𝐴 ∩ 𝐵)
= 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
𝑛(𝐵) = ?
𝑛(𝐴 − 𝐵) = 𝑛(𝐴) − 𝑛(𝐵)
45 = 𝑛(𝐴) − 𝑛(𝐵) -------------------- (1)
𝑛(𝐴 ∪ 𝐵 ) = 𝑛(𝐴) + 𝑛(𝐵) − 𝑛(𝐴 ∩ 𝐵 )
110 = 𝑛(𝐴) + 𝑛(𝐵) − 15------------- (2)
By (1) + (2),
45 + 110 = 𝑛(𝐴) − 𝑛(𝐵) + 𝑛(𝐴) + 𝑛(𝐵) − 15
155 = 2𝑛(𝐴) − 15
155 + 15 = 2𝑛(𝐴)
2𝑛(𝐴) = 170
P a g e 24 | 89
𝑛(𝐴) = 33
𝑛(𝐵) = 36
𝑛(𝐶) = 28 𝑛(𝐴 ∩ 𝐵 ∩ 𝐶 ) = 5
𝑛(𝐴 ∪ 𝐵 ∪ 𝐶) = ?
𝑛(𝐴 ∪ 𝐵 ∪ 𝐶) = 𝑛(𝐴) + 𝑛(𝐵)+ 𝑛(𝐶)− 𝑛(𝐴 ∩ 𝐵 ) − 𝑛(𝐴 ∩ 𝐶 ) − 𝑛(𝐵 ∩ 𝐶 )
+ 𝑛(𝐴 ∩ 𝐵 ∩ 𝐶 )
= 33+ 36 + 28 − 𝑛(𝐴 ∩ 𝐵 ) − 𝑛(𝐴 ∩ 𝐶 )− 𝑛(𝐵 ∩ 𝐶 )+ 5
= 102− 𝑛(𝐴 ∩ 𝐵 )− 𝑛(𝐴 ∩ 𝐶 ) − 𝑛(𝐵 ∩ 𝐶 )------------- (1)
A→𝑎 + 𝑏 + 5 + 10 = 33
𝑎+𝑏 = 33 − 15
𝑎+𝑏 = 18--------------------- (2)
B→𝑎 + 𝑐 + 5 + 15 = 36
P a g e 25 | 89
P a g e 26 | 89
A multi set in mathematics is a generalization of the concept of a set. It’s a collection of unordered
numbers, where every element x occurs a finite number of times.
I. 160
160 = 2*2*2*2*2*5
160 = [2, 2, 2, 2, 2, 5]
II. 120
120 = 2*2*2*3*5
120 = [2, 2, 2, 3, 5]
III. 250
250 = 2*5*5*5
250 = [2, 5, 5, 5]
2. Write the multiplicities of each element of multisets (bags) in Part 2-1(i,ii,iii) separately.
The number of times an element occurs in a multiset is called Multiplicity.
I. 160 = [2,2,2,2,2,5]
µ (2) = 5
µ (5) = 1
P a g e 27 | 89
3. Determine the cardinalities of each multiset (bag) in Part 2-1(i, ii, iii).
Cardinality of multiset is the summation of all the multiplicities of its elements.
P a g e 28 | 89
i. 𝑓: ℜ → ℜ+
𝑓(𝑥) = 𝑥2
𝑓(𝑥1) = 𝑓(𝑥2)
(𝑥12) = (𝑥22)
(𝑥12−𝑥22) = 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 between ℜ → ℜ+. Due to that, 𝑓 is not invertible.
P a g e 29 | 89
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 = (𝑦)
Step 03→
Inverse function of 𝑓:
1
f (x) = (𝑥)
1
𝑦 = (𝑥)
1
𝑥 = (𝑥 )
1
∴ f −1(x) = (𝑥)
∴ Inverse of 𝑓:
∴ Inverse of f :
f −1 : R+ → R+
1
f −1(x) = (𝑥)//
iii. 𝑓: ℜ+ → ℜ+
𝑓(𝑥) = 𝑥2
Step 01
Check whether 𝑓 is One to One:
Let 𝑥1, 𝑥2 ∈ ℜ+ (Domain)
And 𝑓(𝑥1),𝑓(𝑥2) ∈ ℜ+ = 𝑦1, 𝑦2 ∈ ℜ+ (Codomain)
𝑥21 = 𝑥22
𝑥21 − 𝑥22 = 0
P a g e 31 | 89
(𝑥1 − 𝑥2 ) = 0 𝑂𝑅 (𝑥1 + 𝑥2 ) = 0
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)
1
𝑦2 ∈ R+ (Domain)
1
Such that 𝑓 (𝑦 2 ) = 𝑦
1
So, 𝑦 is the image of (𝑦2 )
1
∴ 𝑥 = (𝑦 2 )
𝑓 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
P a g e 32 | 89
𝑓 −1 : R+ → R+
1
𝑓 −1 (𝑥) = 𝑥 2
𝜋 𝜋
Between [− , 2 ] and [−1,1] ---------------------- (1)
2
Step 01→
Check whether f(x) is 1-1 then,
Let x1, x2 € [-π/2, π/2] (Domain)
Then f(x1), f(x2) € [-1, 1] (Range)
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] such that f(Sin -1 y) = y
Therefore, f(x) is onto → --------------------------------------- (3)
By 1, 2, 3,
f(x) is invertible.
P a g e 33 | 89
v. 𝑓: [𝑜, 𝜋] → [−2,2]
𝑓(𝑥) = 2 cos𝑥
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)
P a g e 34 | 89
𝑦
So, y is the image of 𝑐𝑜𝑠 −1 (2)
𝑦
∴ x = 𝑐𝑜𝑠 −1 ( 2)
Step 03→
Inverse function of 𝑓:
𝑓 (𝑥) = 2𝑐𝑜𝑠𝑥
𝑦 = 2cosx
𝑦
𝑦
𝑐𝑜𝑠𝑥 =
2
𝑦
𝑥 = 𝑐𝑜𝑠 −1 ( 2)
𝑦
∴ 𝑓 −1 (𝑥) = 𝑐𝑜𝑠−1 ( )
2
∴ Inverse of 𝑓:
𝑓 −1 : [−2,2] → [0, 𝜋]
𝑥
𝑓 −1 (𝑥) = 𝑐𝑜𝑠 −1 (2)
Part 4
1. Formulate corresponding proof principles
A = B A B and B A
In the above theory A and B are equal, if A is a subset of B and B is a subset of A.
P a g e 35 | 89
2. De Morgan’s Law
“De Morgan's Laws describe how mathematical statements and concepts are related through their
opposites. In set theory, De Morgan's Laws relate the intersection and union of sets
through complements. In propositional logic, De Morgan's Laws relate conjunctions and
disjunctions of propositions through negation. De Morgan's Laws are also applicable in computer
engineering for developing logic gates.
Interestingly, regardless of whether De Morgan's Laws apply to sets, propositions, or logic gates,
the structure is always the same.
P a g e 36 | 89
(𝑨 ∩ 𝑩)𝑪 = 𝑨𝑪 ∪ 𝑩𝑪
P a g e 37 | 89
P a g e 40 | 89
The binary tree is a special data structure used for data storage purposes. The binary tree is used
to represent a nonlinear data structure (Roshanthi, 2020).
“Consider the usual setting of classification learning, but in our case the hypothesis language
involves qualitative constraints. Let there be N learning examples. Each example is described by
n + 1 continuous variables X1... Xn+1. The variable Xn+1 is called the class, and the others are
called attributes. Given the learning examples, our problem is to learn a hypothesis that separates
the areas of attribute space which share a common qualitative behaviour of the class variable. We
learn such hypotheses in the form of qualitative trees. A qualitative tree is a binary tree with
internal nodes called splits and qualitatively constrained functions in the leaves. The splits define
a partition of the state space into areas with common qualitative behaviour of the class variable.
A split consists of a split attribute and a split value. Qualitatively constrained functions
(abbreviated QCFs) in leaves define qualitative constraints on the class variable. Fig. 1 shows an
P a g e 41 | 89
P a g e 42 | 89
“A binary tree is a non-linear data structure in which each node has maximum of two child
nodes. The tree connections can be called as branches.
According to graph theory binary trees defined here are actually arborescence. A binary tree is
also known as old programming term bifurcating arborescence, before the modern computer
science terminology prevailed. Binary tree is also known as rooted binary tree because some
author uses this term to emphasize the fact that the tree is rooted, but as defined above, a binary
tree is always rooted. A binary tree is a special case of an ordered binary tree, where k is 2.
• Trees are used to represent data in hierarchical form.
• Binary tree is the one in which each node has maximum of two child- node.
• The order of binary tree is ‘2’.
• Binary tree does not allow duplicate values.
• While constructing a binary, if an element is less than the value of its parent node, it is
placed on the left side of it otherwise right side.
• A binary tree is shown for the element 40, 56, 35, 48, 22, 65, 28” (Shukla, 2017)
P a g e 43 | 89
P a g e 44 | 89
The Algorithm
Initially 𝑎 is the only vertex in 𝑉. At each step 𝑉 is added to another vertex for which the shortest
path from 𝑎 has been determined. The array 𝐿 is initialized by setting 𝐿[𝑖]to the ∞. To determine
which vertex is to be added to V at each step, a criteria is applied of choosing the vertex 𝑗 with the
smallest distance recorded in 𝐿, such that 𝑗 is not a visited one. When 𝑉 is added to 𝐽 (𝑉 is set of
visited vertices), the entries of L must be updated by checking, for every vertex 𝑘 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,
𝐿(𝑘) must be replaced by [𝐿(𝑗)+ 𝑤(𝑗, 𝑘)]. Here 𝑤(𝑗, 𝑘) is weight of edge between 𝑗 and 𝑘, when
the shortest distance, 𝐿(𝑘), is updated, the shortest path 𝑃(𝑘) must be updated.
𝑃(𝑘) is updated by a path of 𝑗 followed by 𝑘. In brief, if 𝐿(𝑘) > (𝐿(𝑗)+ 𝑤(𝑗, 𝑘)) then 𝐿(𝑘) =
𝐿(𝑗)+ 𝑤(𝑗, , 𝑘) and 𝑃(𝑘) = 𝑃(𝑗) ∪ {𝑘}.
This procedure is repeated by successively adding vertices to V until z is added. Here z is
destination vertex.
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. 𝑤(𝑖, 𝑗) represent weight of edge (𝑖, 𝑗) where 𝑤(𝑖, 𝑗) = ∞ if (𝑖, 𝑗) ∉ 𝐵. Let |𝐴| = 𝑛.
P a g e 45 | 89
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.
P a g e 46 | 89
A → C Weight = 3
A → B Weight = 5
A → C → D Weight = 7
A → C → E Weight = 9
P a g e 47 | 89
A graph will contain a Euler path if it contains at most two odd-degree vertices.
A graph will contain a Euler circuit if all the vertices have even degree.
Eulerian Hamilton
P a g e 48 | 89
𝑑(𝐷) = 3
𝑑(𝐸) = 1
This graph, has 2 odd degree vertices. This graph passes same vertex more than once.
Therefore, this is Eulerian. Not Hamilton.
2.
𝑑(𝐴) = 3
𝑑(𝐶) = 3
𝑑(𝐷) = 3
𝑑(𝐸) = 3
P a g e 49 | 89
3.
𝑑(𝐵) = 3
𝑑(𝐸) = 3
This graph has 2 odd degree vertices. This graph passes same vertex more than once.
Therefore, this is Eulerian. Not Hamilton.
Part 4
1. Construct a proof of the five-color theorem for every planar graph.
Prove Theorem
The proof is by induction on the number 𝑝 of vertices of 𝐺. If 𝑝 ≤ 5, then the theorem obviously
holds. Suppose 𝑝 > 5, and the theorem holds for graphs with less than 𝑝 vertices. By the
preceding problem, 𝐺 has a vertex 𝑣 such that deg (𝑣) ≤ 5. By induction, the subgraph 𝐺 − 𝑣
is 5-colorable. Assume one such coloring. If the vertices adjacent to 𝑣 use less than the five
colors, then simply paint 𝑣 with one of the remaining colors and obtain a 5-coloring of 𝐺. But,
still left with the case that 𝑣 is adjacent to five vertices which are painted different colors. Say
P a g e 50 | 89
Consider now the subgraph 𝐻 of 𝐺 generated by the vertices painted 𝑐1 and 𝑐3. Note 𝐻 includes
𝑣1 and 𝑣3. If 𝑣1 and 𝑣3 belong to different components of 𝐻, then the colors 𝑐1 and 𝑐3 can be
interchanged in the component containing 𝑣1 without destroying the coloring of 𝐺 − 𝑣. Then
𝑣1 and 𝑣3 are painted by 𝑐3, 𝑐1 can be chosen to paint 𝑣, and have a 5coloring of 𝐺. On the
other hand, suppose 𝑣1 and 𝑣3 are in the same component of 𝐻. Then there is a path 𝑃 from
𝑣1 to 𝑣3 whose vertices are painted either 𝑐1 or 𝑐3. The path 𝑃 together with the edges {𝑣, 𝑣1}
and {𝑣, 𝑣3} from a cycle 𝐶 which encloses either 𝑣2 or 𝑣4. Consider now the subgraph 𝐾
generated by the vertices painted 𝑐3 or 𝑐4. Since 𝐶 encloses 𝑣2 or 𝑣4, but not both, the vertices
𝑣2 and 𝑣4 belong to different components of 𝐾.
Thus, the colors 𝑐2 and 𝑐4 can be interchanged in the component containing 𝑣2 without
destroying the coloring of 𝐺 − 𝑣. Then 𝑣2 and 𝑣4 are painted by 𝑐4, and 𝑐2 can be chosen to
paint 𝑣 and obtain a 5-coloring of G. Thus, 𝐺 is 5-colorable and the theorem is proved.
P a g e 51 | 89
Truth Table
𝑨 𝑩 𝑪 𝑿
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 3 Truth Table 1
P a g e 52 | 89
Example: -
2) In a Nescafe machine at a local restaurant in order to make either tea, sugar and water button
should be pressed.
Input: -
𝐴 → Tea button
𝐵 → Sugar button
𝐶 → Water button
Output: -
𝑋 → Receive tea/coffee
P a g e 53 | 89
𝑋 = 𝐴𝐵𝐶
P a g e 54 | 89
Boolean Equation:
𝐴 and 𝐵̅ and 𝐶 = 𝑋
𝐴. 𝐵̅. 𝐶 = 𝑋
𝐴𝐵̅𝐶 = 𝑋
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 5 Truth Table
P a g e 55 | 89
If it rains and you don't open your umbrella, then you will get wet.
𝐴 − It is raining
𝐵 − You open your umbrella
𝑋 − You get wet
𝐴 and 𝐵̅ = 𝑋
𝐴. 𝐵̅ = 𝑋
𝐴𝐵̅ = 𝑋
Truth Table
𝑨 𝑩 𝑩̅ 𝑨𝑩̅(𝑿)
0 0 1 0
0 1 0 0
1 0 1 1
1 1 0 0
Table 6 Truth Table
P a g e 56 | 89
P a g e 57 | 89
Commutative Law
𝐴+𝐵=𝐵+𝐴
𝐴𝐵 = 𝐵𝐴
Associative Law
𝐴 + (𝐵 + 𝐶) = (𝐴 + 𝐵) + 𝐶
𝐴(𝐵𝐶) = (𝐴𝐵)𝐶
Distributive Law
𝐴(𝐵 + 𝐶) = 𝐴𝐵 + 𝐴𝐶 Annulment Law
𝐴. 0 = 0
𝐴+1=1
Identity Law 𝐴 + 0 = 𝐴
𝐴. 1 = 𝐴
Idempotent Law
𝐴+𝐴=𝐴
𝐴. 𝐴 = 𝐴
Complement Law
𝐴. 𝐴̅ = 0
𝐴 + 𝐴̅ = 1
P a g e 58 | 89
Consensus Law
(𝐴 + 𝐵). (𝐴̅ + 𝐶).(𝐵 + 𝐶) = (𝐴 + 𝐵).(𝐴̅ + 𝐶)
𝐴𝐵 + 𝐴̅𝐶 + 𝐵𝐶 = 𝐴𝐵 + 𝐴̅𝐶
P a g e 59 | 89
P a g e 60 | 89
Sum-of-products (SOP)
The sum-of-products (SOP) form is a method (or form) of simplifying the Boolean expressions
of logic gates. In this SOP form of Boolean function representation, the variables are operated by
AND (product) to form a product term and all these product terms are ORed (summed or added)
together to get the final function.
P a g e 61 | 89
P a g e 62 | 89
SOP = 𝐵𝐶 + 𝐴𝐵̅ 𝐶̅
II.
b.
P a g e 64 | 89
II.
III. Below logic circuit has designed with NOR gates, since the standard form of above Boolean
expression belongs to POS form.
P a g e 65 | 89
c.
P a g e 66 | 89
II.
P a g e 67 | 89
P a g e 68 | 89
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.
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 𝑎 ∗ 𝑏 ∈ 𝑆.
P a g e 69 | 89
• 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
P a g e 70 | 89
∗ 𝑒
𝑒 𝑒
Table 8 Operation Table for Order 1
P a g e 71 | 89
𝐺 = {𝑒, 𝑎}
∗ 𝑒 𝑎
𝑒 𝑒 𝑎
𝑎 𝑎 𝑒
𝐺 = {𝑒, 𝑎, 𝑏}
∗ 𝑒 𝑎 𝑏
𝑒 𝑒 𝑎 𝑏
𝑎 𝑎 𝑏 𝑒
𝑏 𝑏 𝑒 𝑎
P a g e 72 | 89
𝐺 = {𝑒, 𝑎, 𝑏, 𝑐}
∗ 𝑒 𝑎 𝑏 𝑐
𝑒 𝑒 𝑎 𝑏 𝑐
𝑎 𝑎 𝑒 𝑐 𝑏
𝑏 𝑏 𝑐 𝑒 𝑎
𝑐 𝑐 𝑏 𝑎 𝑒
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)
Ex:- Order = 4
2
= 44 = 416
P a g e 73 | 89
= 416
= 4,294,967,296
3.
i. State the Lagrange’s theorem of group theory.
“Lemma: Let H be a subgroup of G. Let r, s ∈ G. Then Hr = Hs if and only if rs−1 ∈ H.
Otherwise Hr, Hs have no element in common. Similarly, rH = sH if and only if s−1r ∈ H,
otherwise rH, sH have no element in common.
Proof: If rs−1 = h ∈ H, then H = Hh = (Hr)s−1. Multiplying both sides on the right
by ss gives Hr = Hs. Conversely, if Hr = Hs, then since r ∈ Hr (because 1 ∈ H ) we
have r=h′s for some h′ ∈ H. Multiplying on the right by s−1 shows that rs−1 ∈ H.
Now suppose Hr, Hs have some element in common, that is h1r=h2s for some h1, h2 ∈ H.
This implies rs−1 = h1-1h2 ∈ H, thus Hr = Hs by above.
Lagrange’s Theorem: If H is a subgroup of G, then |G|=n|H| for some positive integer n.
This is called the index of H in G. Furthermore, there exist g1,..., gn such that G =
Hr1∪...∪Hrn and similarly with the left-hand cosets relative to H” (Lynn, n.d.).
P a g e 74 | 89
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 .
𝑆 can be a Group under the binary operation “∗” defined as 𝑎 ∗ 𝑏 = 𝑎 + 𝑏 + 𝑎𝑏 for any two
elements 𝑎, 𝑏 ∈ 𝑆, if the following properties are satisfied.
P a g e 75 | 89
P a g e 76 | 89
P a g e 77 | 89
I’m Lahiru Viraj. The presentation is based on Application of Group Theory for my HND
Computing Discrete Mathematics module.
P a g e 78 | 89
P a g e 81 | 89
P a g e 82 | 89
By using Group theory we can construct variants of the Diffie–Hellman key agreement protocol.
P a g e 83 | 89
P a g e 84 | 89
P a g e 85 | 89
P a g e 86 | 89
P a g e 87 | 89
P a g e 88 | 89
P a g e 89 | 89