Professional Documents
Culture Documents
Maths - A.J. Sheriffdeen DM (NC38988)
Maths - A.J. Sheriffdeen DM (NC38988)
• Identifying N
opportunities for
improved performance?
Y
/
N
Y
/
N
LO3 Investigate solutions to problem situations using the application of Boolean algebra.
Pass, Merit & P5 P6 M3 D3
Distinction Descripts
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.
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.
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.
Action Plan
Made the Gantt chart and inserted all the references
I set the presentation in the correct order
Summative feedback
Assessor’s
shyamalikarunadasa@gmail.com Date
Signature
Student’s
KANA013684@esoft.academy Date February 4, 2022
Signature
Assignment Brief
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.
Activity 01
Part 1
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 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.
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
i.
iii.
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
(a)
AB/C 0 1
00 0 0
01 0 1
(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
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.
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)
THANKING YOU
A.J. Sheriffdeen
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
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.
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
𝑛(𝐴) = 33
𝑛(𝐵) = 36
𝑛(𝐶) = 28 𝑛(𝐴 ∩ 𝐵 ∩ 𝐶 ) = 5
𝑛(𝐴 ∪ 𝐵 ∪ 𝐶) = ?
𝑛(𝐴 ∪ 𝐵 ∪ 𝐶) = 𝑛(𝐴) + 𝑛(𝐵)+ 𝑛(𝐶)− 𝑛(𝐴 ∩ 𝐵 ) − 𝑛(𝐴 ∩ 𝐶 ) − 𝑛(𝐵 ∩ 𝐶 )
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
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]
120 = [3,2,2,2,5]
3. 250
250 = [2,5,5,5]
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
invertible, then find the rule of the inverse f ( (x )) using appropriate mathematical
−1
technique.
1. 𝑓: ℜ → ℜ+
𝑓(𝑥) = 𝑥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 among ℜ → ℜ+. Thus, 𝑓 is not invertible.
2. 𝑓: ℜ+ → ℜ+
𝟏
𝑓(𝑥) = 𝒙
Between ℜ+ and ℜ 1
Step 01,
𝑥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) = (𝑥)
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
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)
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
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] 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𝑥
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
∴ 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.
Mathematical Induction:
(𝑨 ∪ 𝑩)𝑪 = 𝑨𝑪 ∩ 𝑩𝑪
Prove by induction on 𝑛 the following statement:
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)
(𝑨 ∩ 𝑩)𝑪 = 𝑨𝑪 ∪ 𝑩𝑪
̅(̅𝐴1̅ ̅∩̅…̅
̅ ̅∩̅̅𝐴̅𝑘̅ ̅+̅1̅) = (̅(̅𝐴̅1̅∩̅…̅∩̅
̅ ̅𝐴̅𝑘̅ ̅)̅∩̅𝐴𝑘̅ ̅+̅1̅)
= ̅(̅𝐴̅1̅∩̅…̅̅∩̅̅𝐴𝑘̅ ̅) ∪ 𝐴̅̅𝑘̅+̅1̅(by (∗∗) with 𝐴 = (𝐴1 ∩ …∩ 𝐴𝑘) and 𝐵 = 𝐴𝑘+1)
= (̅𝐴̅1 ∪ … ∪ ̅𝐴𝑘̅ ̅) ∪ ̅𝐴̅𝑘̅+̅1 (by induction hypothesis applied to 𝐴1, …. , 𝐴𝑘 )
= ̅𝐴̅1 ∪ … ∪ ̅𝐴̅𝑘̅ ∪ 𝐴̅̅𝑘̅+̅1.
Evidence:
𝐴 ∪ (𝐵 ∩ 𝐶) = (𝐴 ∪ 𝐵) ∩ (𝐴 ∪ 𝐶)
Let 𝑥 ∈ 𝐴 ∪ (𝐵 ∩ 𝐶).
If x ∈ 𝐴 ∪ (𝐵 ∩ 𝐶) then x is either in A or in (B and 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:
𝑥 ∈ 𝐴 𝑎𝑛𝑑 {𝑥 ∈ 𝐵 𝑜𝑟 𝑥 ∈ 𝐶}
{𝑥 ∈ 𝐴 𝑎𝑛𝑑 𝑥 ∈ 𝐵} 𝑜𝑟 {𝑥 ∈ 𝐴 𝑎𝑛𝑑 𝑥 ∈ 𝐶)
𝑥 ∈ (𝐴 ∩ 𝐵) 𝑜𝑟 𝑥 ∈ (𝐴 ∩ 𝐶)
𝑥 ∈ (𝐴 ∩ 𝐵) ∪ (𝐴 ∪ 𝐶)
𝑥 ∈ 𝐴 ∩ (𝐵 ∪ 𝐶) ⇒ 𝑥 ∈ (𝐴 ∩ 𝐵) ∪ (𝐴 ∩ 𝐶)
Thus,
𝐴 ∩ (𝐵 ∪ 𝐶) ⊂ (𝐴 ∩ 𝐵) ∪ (𝐴 ∩ 𝐶) 1
Let 𝑥 ∈ (𝐴 ∩ B) ∪ (𝐴 ∩ 𝐶).
If x ∈ (𝐴 ∩ B) ∪ (A ∩ C) then 𝑥 ∈ (𝐴 ∩ 𝐵) 𝑜𝑟 𝑥 ∈ (𝐴 ∩ 𝐶).
𝑥 ∈ (𝐴 𝑎𝑛𝑑 𝐵) 𝑜𝑟 (𝐴 𝑎𝑛𝑑 𝐶)
{𝑥 ∈ 𝐴 𝑎𝑛𝑑 𝑥 ∈ 𝐵} 𝑜𝑟 {𝑥 ∈ 𝐴 𝑎𝑛𝑑 𝑥 ∈ 𝐶}
𝑥 ∈ 𝐴 𝑎𝑛𝑑 {𝑥 ∈ 𝐵 𝑜𝑟 𝑥 ∈ 𝐶}
𝑥 ∈ 𝐴 𝑎𝑛𝑑 𝑥 ∈ (𝐵 𝑜𝑟 𝐶}
𝑥 ∈ 𝐴 ∩ (𝐵 ∪ 𝐶)
𝑥 ∈ (𝐴 ∩ 𝐵) ∪ (𝐴 ∩ 𝐶) ⇒ 𝑥 ∈ 𝐴 ∩ (𝐵 ∪ 𝐶)
Thus,
(𝐴 ∩ 𝐵) ∪ (𝐴 ∩ 𝐶) ⊂ 𝐴 ∩ (𝐵 ∪ 𝐶) 2
From 1 and 2,
𝐴 ∩ (𝐵 ∪ 𝐶) = (𝐴 ∩ 𝐵) ∪ (𝐴 ∩ 𝐶)
Activity 2.1
Model two contextualized problems using binary trees both quantitatively and
qualitatively.
• 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
W3
W2
C2 C3 C4
C1
(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.
Success Failure
FSP FSP
S 60%
F 40% F 40%
S 60%
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.
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
A B C D
E 5(E, A) ∞ ∞ 3(E, D)
A - 7 (E, D, B) 9 (E, D, C) -
B - - 9 (E, D, C) -
Activity 2.3
Assess whether the following undirected graphs have an Eulerian and/or a
Hamiltonian cycle.
The given conditions must be present in order to discover the path and circuit.
(Sam, 2018)
• 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
1.
𝑑(𝐴) = 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.
𝑑(𝐵) = 3
𝑑(𝐸) = 3
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 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.
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:
Output:
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
• ̅ 𝑂 + 𝐸𝑀𝑂̅ + 𝐸𝑀𝑂
𝐴 = 𝐸𝑀
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
Output:
Truth Table
M S W D
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
• D = MSW
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 𝐶 = 𝑋
𝐴. 𝐵̅. 𝐶 = 𝑋
𝑨 𝑩 𝑪 𝑩̅ 𝑨𝑩̅𝑪(𝑿)
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
II. If it rains and you don't open your umbrella, then you will get wet.
𝐴 − Raining
𝐵 − Open your umbrella
𝑋 − Get wet
𝐴 and 𝐵̅ = 𝑋
𝐴. 𝐵̅ = 𝑋
𝐴𝐵̅ = 𝑋
𝑨 𝑩 𝑩̅ 𝑨𝑩̅(𝑿)
0 0 1 0
0 1 0 0
1 0 1 1
1 1 0 0
Table 7 Truth Table
Associative Law
• 𝐴 + (𝐵 + 𝐶) = (𝐴 + 𝐵) + 𝐶
• 𝐴(𝐵𝐶) = (𝐴𝐵)𝐶
Distributive Law
• 𝐴(𝐵 + 𝐶) = 𝐴𝐵 + 𝐴𝐶 Annulment Law
• 𝐴. 0 = 0
• 𝐴+1=1
Identity Law
• 𝐴+0=𝐴
• 𝐴. 1 = 𝐴
Idempotent Law
• 𝐴+𝐴=𝐴
• 𝐴. 𝐴 = 𝐴
Complement Law
• 𝐴. 𝐴̅ = 0
• 𝐴 + 𝐴̅ = 1
Absorptive Law
• 𝐴 + (𝐴. B) = 𝐴
• 𝐴(𝐴 + 𝐵) = 𝐴
Redundancy Law
• 𝐴 + Ā𝐵 = 𝐴 + 𝐵
• 𝐴. (Ā + 𝐵) = 𝐴𝐵
Consensus Law
• (𝐴 + 𝐵). (𝐴̅ + 𝐶).(𝐵 + 𝐶) = (𝐴 + 𝐵).(𝐴̅ + 𝐶)
• 𝐴𝐵 + 𝐴̅𝐶 + 𝐵𝐶 = 𝐴𝐵 + 𝐴̅𝐶
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)
(geeksforgeeks.org, 2021)
(Lithmee, 2018)
1. SOP
Figure 22 SOP
𝑋 = 𝐵𝐶 + 𝐴𝐵̅𝐶̅
Figure 23 POS
2. SOP→ 𝐵𝐶 + 𝐴𝐵̅𝐶̅
3. SOP→ 𝑁𝐴𝑁𝐷
1. SOP
Figure 28 SOP
Figure 29 POS
Figure 34 SOP
Figure 35 POS
𝑋 = (𝐴 + 𝐵 + 𝐶̅)(𝐴̅ + 𝐵̅ + 𝐶̅)(𝐴̅ + 𝐵 + 𝐶)
SOP →NAND
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
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
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 𝑎 ∈ 𝐺, 𝑎 ∗ 𝑒 = 𝑒 ∗ 𝑎 = 𝑎
∗ 𝑒
𝑒 𝑒
Table 9 Operation table for Order 1
Operation Table for Order 2
𝐺 = {𝑒, 𝑎}
∗ 𝑒 𝑎
𝑒 𝑒 𝑎
𝑎 𝑎 𝑒
Table 10 Operation Table for Order 2
𝑒 𝑒 𝑎 𝑏
𝑎 𝑎 𝑏 𝑒
𝑏 𝑏 𝑒 𝑎
∗ 𝑒 𝑎 𝑏 𝑐
𝑒 𝑒 𝑎 𝑏 𝑐
𝑎 𝑎 𝑒 𝑐 𝑏
𝑏 𝑏 𝑐 𝑒 𝑎
𝑐 𝑐 𝑏 𝑎 𝑒
Table 12 Operation table for Order 4
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.
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 𝐺.
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
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)
Task 1
Task 2
Task 3
Task 4