Uploaded by karthees2002

discrete-mathematics-reworded-2021

advertisement
lOMoARcPSD|29125957
A.A.Lahiru Shamika-HND COM - Unit 18 - Discrete
Mathematics Reworded 2021
HND in Computing (ESOFT Metro Campus)
Studocu is not sponsored or endorsed by any college or university
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Higher Nationals
Internal verification of assessment decisions – BTEC (RQF)
INTERNAL VERIFICATION – ASSESSMENT DECISIONS
BTEC Higher National Diploma in Computing
Programme title
Assessor
Internal Verifier
Unit 18 : Discrete Mathematics
Unit(s)
Discrete mathematics in software engineering concepts
Assignment title
A.A.Lahiru Shamika / KUR00064943
Student’s name
List which assessment
Pass
Merit
criteria the Assessor
has awarded.
INTERNAL VERIFIER CHECKLIST
Do the assessment criteria awarded
match those shown in the
Y/N
assignment brief?
Is the Pass/Merit/Distinction grade
awarded justified by the assessor’s
Y/N
comments on the student work?
Has the work been assessed
Y/N
accurately?
Is the feedback to the student:
Give details:
• Constructive?
Y/
• Linked to relevant assessment
N
Y/
criteria?
N
• Identifying opportunities
for improved performance?
Y/
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
Distinction
lOMoARcPSD|29125957
N
Y/
• Agreeing actions?
N
Does the assessment decision need
Y/N
amending?
Assessor signature
Date
Internal Verifier signature
Programme Leader signature
Date
(if required)
Date
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Confirm action completed
Remedial action taken
Give details:
Internal
Verifier
Programme Leader
Date
signature (if
Date
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Higher Nationals - Summative Assignment Feedback Form
Student Name/ID
A.A.Lahiru Shamika / KUR00064943
Unit Title
Unit 18 : Discrete Mathematics
Assignment Number
1
Assessor
Date Received
Submission Date
1st submission
Date Received 2nd
Re-submission Date
A.A.L.S.Amarasinghe
submission
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
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:
* Please note that grade decisions are provisional. They are only confirmed once internal
and external moderation has taken place and grades decisions have been agreed at the
assessment board.
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Pearson
Higher Nationals in
Computing
Unit 18 : Discrete Mathematics
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.
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
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 .
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
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.
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.
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
6. I understand that my assignment will not be considered as submitted if this document
is not attached to the attached.
lahirushamika12@gmail.com
2022/07/27
Student’s Signature:
Date:
(Provide E-mail ID)
A.A.L.S.Amarasinghe
(Provide Submission Date)
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Feedback Form
Formative feedback: Assessor to Student
Action Plan
Summative feedback
Feedback: Student to Assessor
Assessor’s
Signature
A.A.L.S.Amarasinghe
Date
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Student’s
lahirushamika12@gmail.co
Signature
m
Date
27/07/2022
Assignment Brief
Student Name /ID Number
A.A.Lahiru Shamika / KUR00064943
Unit Number and Title
Unit 18 :Discrete Mathematics
Academic Year
2021/22
Unit Tutor
Discrete mathematics in Computing
Assignment Title
Issue Date
Submission Date
27/07/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
LO4
Investigate solutions to problem situations using the application of Boolean algebra.
Explore applicable concepts within abstract algebra.
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Assignment Brief and Guidance:
Activity 01
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 are 72, 28 and 13
respectively, find the cardinality of the set.
ii.
If n()=45, n()=110 and n()=15, then find n(B).
iii.If n(A)=33, n(B)=36 and n(C)=28, find n().
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 using appropriate mathematical technique.
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Part 4
1.
Formulate corresponding proof principles to prove the following properties about defined sets.
i. .
ii. De Morgan’s Law by mathematical induction.
iii. Distributive Laws for three non-empty finite sets A, B, and C.
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.
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Part 3
1. Assess whether the following undirected graphs have an Eulerian and/or a Hamiltonian cycle.
i.
ii.
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
iii.
Part 4
1. Construct a proof of the five color theorem for every planar graph.
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
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.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
(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
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
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.
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 is a group under the binary operation ‘*’defined as for any two elements.
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)
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Acknowledgement
I would like to make this a moment to thank our dearest lecturer Mr Tharanga who gave his
fullest support in teaching this subject to us and also I would like to thank my family and
friends who gave me their fullest support in completing this assignment.
A.A.L.S.Amarasinghe.
Esoft Metro Campus
Kurunegala
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Contents
Acknowledgement................................................................................................................21
List of figures.......................................................................................................................22
List of tables.........................................................................................................................23
Activity 01....................................................................................................25
Part 1....................................................................................................................................25
Part 2....................................................................................................................................27
Part 3....................................................................................................................................29
Part 4....................................................................................................................................34
Activity 02....................................................................................................38
Part 1....................................................................................................................................38
Activity 02....................................................................................................38
Part 1....................................................................................................................................38
Part 2....................................................................................................................................42
Part 4....................................................................................................................................45
Activity 03....................................................................................................50
Part 1....................................................................................................................................50
Part 2....................................................................................................................................52
Part 3....................................................................................................................................54
Part 4....................................................................................................................................57
Activity 04....................................................................................................62
Part 1....................................................................................................................................62
Part 2....................................................................................................................................63
Part 3....................................................................................................................................67
Part 4....................................................................................................................................67
Bibliography..................................................................................................72
List of figures
Figure 1.....................................................................................................................................37
Figure 2.....................................................................................................................................38
Figure 3.....................................................................................................................................38
Figure 4.....................................................................................................................................41
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Figure 5.....................................................................................................................................41
Figure 6.....................................................................................................................................42
Figure 7.....................................................................................................................................44
Figure 8.....................................................................................................................................46
Figure 9.....................................................................................................................................47
Figure 10...................................................................................................................................47
Figure 11...................................................................................................................................49
Figure 12...................................................................................................................................49
Figure 13...................................................................................................................................50
Figure 14...................................................................................................................................50
Figure 15...................................................................................................................................51
Figure 16...................................................................................................................................51
Figure 17...................................................................................................................................62
Figure 18...................................................................................................................................62
Figure 19...................................................................................................................................63
Figure 20...................................................................................................................................63
Figure 21...................................................................................................................................64
Figure 22...................................................................................................................................71
Figure 23...................................................................................................................................72
Figure 24...................................................................................................................................72
Figure 25...................................................................................................................................73
Figure 26...................................................................................................................................73
Figure 27...................................................................................................................................74
Figure 28...................................................................................................................................75
Figure 29...................................................................................................................................76
List of tables
Table 1......................................................................................................................................31
Table 2......................................................................................................................................54
Table 3......................................................................................................................................55
Table 4......................................................................................................................................56
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Table 5......................................................................................................................................56
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Activity 01
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 are 72, 28
and 13 respectively, find the cardinality of the set.
P(A) = 72
P(B) = 28
P() =13
()=P(A)+P(B) - P()
=72 + 28 – 13
=87
II. If n()=45, n()=110 and n()=15, then find n(B).
P()= P()=P(A) - P()= 45
P()=110
P()= 15
P(A)= P() = 45
P(A)= 60
P(A)= 45 + P()
P(A)= 45 + 15= 60
P()=P(A)+P(B) - P()
110= 60 + P(B) – 15
110= 60 – 15 + P(B)
110 – 45 = P(B)
P(B) = 65
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
II. If n(A)=33, n(B)=36 and n(C)=28, find n().
P()= ?
P(A)= 33
P(B)= 36
P(C)= 28
P()=P(A)+ P(B)+ P(C) - P() - P()-P()
P(A)= 10+ a + 5+b = 33
15+a+b = 33
a + b = 18
1
15+a+5+c = 36
20+ a+ c =36
a + c = 16
2
13+ 5+b+c = 28
b + c= 28 – 18
b + c = 10
3
a + b = 18
1
b + c= 160
2
b + c = 16
3
1+3
a + b – b-c = 8
a - c =8
4
2+4
2a = 24
a= 12
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
b=6
c=4
P()
= 33+ 36+28- 17-11-9
= 97 – 37
= 60
Part 2
I. Write the multisets (bags) of prime factors of given numbers.
i.
160 = {2, 2, 2, 2, 2, 5}
ii.
120 = {2, 2, 2, 2, 3, 5}
iii.
250 = {2, 5, 5, 5}
II. Write the multiplicities of each element of multisets (bags) in Part 2-1(i,ii,iii) separately.
i.
160={2, 2, 2, 2, 2, 5}
Multiplicity of 2 = 5
Multiplicity of 5 = 1
ii.
120={2, 2, 2, 2, 3, 5}
Multiplicity of 2 = 3
Multiplicity of 3 = 1
Multiplicity of 5 = 5=1
iii.
250={2, 5, 5, 5}
Multiplicity of 2 = 2
Multiplicity of 5 = 3
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
III. Determine the cardinalities of each multisets (bag) in Part 2-1(i,ii,iii).
i.
Cardinality of multi set = 5 + 1 = 6
ii.
Cardinality of multi set = 3 + 1 +1 = 5
iii.
Cardinality of multi set = 2 + 3 = 5
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Part 3
I. Determine whether the following functions are invertible or not and if a function is
invertible, then find the rule of the inverse using appropriate mathematical technique.
N = {1,2,3,4,5,}
Z = {…. -3, -2, -1,0,1,2,3,4, 5….}
Z+ = {1,2,3,4, 5….}
Z- = {…. -3, -2, -1,}
I.
f(x) = 2x
f (-3) = 2*(-3) = (-6) →f2 * (-6) = (-12)
f (-2) = 2*(-2) = (-4) →f2 * (-4) = (-8)
f (-1) = 2*(-1) = (-2) →f2 * (-2) = (-4)
f (0) = 2*(0) = (0) →f2 * (0) = (0)
f (1) = 2*(1) = (2) →f2 * (2) = (4)
f (2) = 2*(2) = (4) →f2 * (4) = (8)
f (3) = 2*(3) = (6) →f2 * (6) = (12)
II.
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
X1, x2 be two different numbers from domain
→①
→②
①-②
F(x1) = f(x2)
x1=x2
1-1 function
F(x) = y
Y= 1/x
X=1/y
X→y→x
Y= 1/x (inverse function)
=
x
1
2
4
5
25
X2
1
4
16
25
625
A.A.L.S.Amarasinghe
Function()
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
0.1
0.0
0.01
0.000
1
Table 1
1
X1, x2 be two different numbers from domain
→①
→②
①=②
X12= X22
Take the square root
x1 = +x2
x1 = x2
then 1 – 1 function
inverse exit.
f(x) = y
y = x2
Take the square root
x=y&y=x
(inverse)
=
III.
= - sin =(-1)
A.A.L.S.Amarasinghe
=sin = 1
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
sin (-x) = - sin (x)
= -sin
=sin
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Sin 0 = 0 onto function
X1, x2 be two different numbers
f (x1) = sin (x1) →①
f (x2) = sin (x2) →②
①=②
sin (x1) = sin (x2)
f (x) = sin (x)
y = f (x)
y = sin (x)
sin -1(y) = x
x→y&y→x
y = sin -1(x)
= sin -1(x)
IV.
= - sin =(-1)
=sin = 1
sin (-x) = - sin (x)
= -sin
=sin
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Sin 0 = 0 onto function
X1, x2 be two different numbers
f (x1) = sin (x1) →①
f (x2) = sin (x2) →②
①=②
sin (x1) = sin (x2)
f (x) = sin (x)
y = f (x)
y = sin (x)
sin -1(y) = x
x→y&y→x
y = sin -1(x)
= sin -1(x)
Part 4
I. Formulate corresponding proof principles to prove the following properties about defined sets.
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
.
If , it must be (maximum; A<B or minimum ; A=B);
B
A
But for become both of above condition, it must be A=B;
Then it will be;
It proof that
De Morgan’s Law by mathematical induction.
De Morgan’s Law is
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Let P = (A U B)' and Q = A' ∩ B'
Let x be an arbitrary element of P then x ∈ P ⇒ x ∈ (A U B)'
⇒ x ∉ (A U B)
⇒ x ∉ A and x ∉ B
⇒ x ∈ A' and x ∈ B'
⇒ x ∈ A' ∩ B'
⇒x∈Q
Therefore, P ⊂ Q …………….. (i)
Again, let y be an arbitrary element of Q then y ∈ Q ⇒ y ∈ A' ∩ B'
⇒ y ∈ A' and y ∈ B'
⇒ y ∉ A and y ∉ B
⇒ y ∉ (A U B)
⇒ y ∈ (A U B)'
⇒y∈P
Therefore, Q ⊂ P …………….. (ii)
Now combine (i) and (ii) we get; P = Q i.e. (A U B)' = A' ∩ B'
Distributive Laws for three non-empty finite sets A, B, and C.
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Figure 1
Distributive Laws for three non-empty finite sets A, B, and C
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Figure 2
Activity 02
Part 1
Figure 3
Activity 02
Part 1
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
I. Model two contextualized problems using binary trees both quantitatively and qualitatively.
A binary tree is a tree data structure in which each node can have up to two child nodes, which form
the tree's branches. The left and right nodes are the names given to the two offspring. Child nodes may
include references to their parents, whereas parent nodes may contain references to their children.
We broaden the definition of linked data structures to include nodes with multiple self-referenced fields. A
binary tree is made up of nodes, each of which has a "left" and "right" reference as well as a data element.
The root refers to the tree's topmost node.
More tree terminology:
1.
The depth of a node is the number of edges from the root to the node.
2.
The height of a node is the number of edges from the node to the deepest leaf.
3.
The height of a tree is a height of the root.
4.
A full binary tree is a binary tree in which each node has exactly zero or two children.
5.
A complete binary tree is a binary tree, which is completely filled, with the possible exception of the
bottom level, which is filled from left to right.
A complete binary tree is very special tree, it provides the best possible ratio between the number of nodes
and the height. The height h of a complete binary tree with N nodes is at most O(log N). We can easily
prove this by counting nodes on each level, starting with the root, assuming that each level has the
maximum number of nodes:
Advantages of trees
Trees are so useful and frequently used, because they have some very serious advantages:
1.
Trees reflect structural relationships in the data
2.
Trees are used to represent hierarchies
3.
Trees provide an efficient insertion and searching
4.
Trees are very flexible data, allowing to move sub trees around with minimum effort
Binary Search Trees
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
We consider a particular kind of a binary tree called a Binary Search Tree (BST). The basic idea behind this
data structure is to have such a storing repository that provides the efficient way of data sorting, searching
and retrieving.
A BST is a binary tree where nodes are ordered in the following way:
1.
each node contains one key (also known as data)
2.
the keys in the left sub tree are less than the key in its parent node, in short L < P;
3.
the keys in the right sub tree are greater the key in its parent node, in short P < R;
4.
Duplicate keys are not allowed.
In the following tree all nodes in the left sub tree of 10 have keys < 10 while all nodes in the right sub tree
> 10. Because both the left and right sub trees of a BST are again search trees; the above definition is
recursively applied to all internal nodes: [ CITATION bin21 \l 1033 ]
Implementation
We implement a binary search tree using a private inner class BSTNode. In order to support the binary
search tree property, we require that data stored in each node is Comparable:
Figure 4
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Binary Trees quantitatively and qualitatively;
Quantitatively mean we can use tree data structure for valuable examples. Let’s focus on following
situation.
For example;
There is a school with two classes and need to know about number of girls and boys on these classes.
Figure 5
Qualitatively mean we can use tree data structure for quality measurement examples. Let’s focus on
following situation.
For example;
A recursive partitioning tree showing survival of passengers on the Titanic ("sibsp" is the number of
spouses or siblings aboard). The figures under the leaves show the probability of survival and the
percentage of observations in the leaf.
[ CITATION Bin21 \l 1033 ]
Figure 6
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Part 2
I. 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 routes from the source vertex to every other
point in the graph.
Dijkstra's method, named after its developer, Dutch computer scientist "Edsger Dijkstra," was released in
1959 and may be used on a weighted graph. There are two types of graphs: directed and undirected. One
requirement for utilizing the technique is that every edge in the graph has a nonnegative weight.
1. Make a set called sptSet to keep track of the vertices in the shortest path tree.
2. For instance, whose minimal distance from the source has been determined and finalized. This
collection is initially empty.
3.
Assign a distance value to each of the input graph's vertices. All distance values should be set to
INFINITE. Assign the source vertex a distance value of 0 to ensure that it is chosen first.
4. sptSet does not contain all vertices.
5. Choose a vertex u that is not in sptSet and has the smallest distance value.
6. Add u to the sptSet.
7. Update the distance between all of u's neighboring vertices. Iterate over all neighboring vertices to
update the distance values. If the total of the distance value of u and the weight of edge u-v is less
than the distance value of v for each neighboring vertex v, then update the distance value of v.
[ CITATION Dij211 \l 1033 ]
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
II. 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
A to B = 5 units
A to C = 3 units
A to D = 7units
A to E = 7 units.
First Strat from E.
Then;
A – B = 5.
A– D = 3.
Select D.
Then;
D – B = 2.
D – B = 6.
Select B.
Then;
B– E = 4.
Select E.
End is C.
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Shortest path is A – D – B – E – C.
Part 3
I. Assess whether the following undirected graphs have an Eulerian and/or Hamiltonian cycle.
i.
Figure 8
This is not Eulerian: “E” vertices cannot cover because there is only one edge to visit “E”.
But this has Hamilton circuit.
ii.
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Figure 9
This is not Eulerian: Because one edge is needed to complete the route
So, this has Hamilton circuit.
iii.
Figure 10
This is not Eulerian: Because one edge is needed to complete the route.
So this has Hamilton circuit.
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Part 4
1. Construct a proof of the five color theorem for every planar graph.
The five color theorem is a graph theory conclusion that states that given a plane divided into regions, such
as a political map of a state's counties, the areas may be colored using no more than five colors, with no
two neighboring parts receiving the same color.
Contradiction serves as proof.
Let G be the smallest planar structure (in terms of vertices) that can't be colored with more than five colors.
Let v be the vertex in G with the highest degree. The corollary to Euler's formula tells us that deg(v) = 6.
1.Case #1: deg(v) ≤ 4. G-v can be colored with five colors.
G-v may be colored with five different colors in case #1: deg(v) = 4.
The neighbors of v have been painted in a maximum of four colors. Then v. is available in at least one
color.
As a result, G may be colored in five different ways, which is a contradiction.
Figure 11
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Deg(v) = 5 in case #2. G-v can be colored in five different ways.
There is a color accessible for v if two of its neighbors are colored with the same color. As a result, we may
suppose that all vertices next to v are colored in clockwise sequence with colors 1,2,3,4,5. Assume that
colors 1 and 3 are used to color all of the vertices (and all the edges among them).
Figure 12
We can flip the colors 1 and 3 in the component with v1 if this subgraph G is unconnected and v1 and v3
are in separate components.
Figure 13
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
G-v will still be colored in five colors. Furthermore, in this new 5-coloring, v1 is colored with color 3 and
v3 is still colored with color 3. Color 1 would be accessible for v, which is incongruent. As a result, v1 and
v3 must be in the same component in that sub graph, i.e. there must be a path from v1 to v3 that is colored
with either color 1 or color 3.
Figure 14
Assume that all of the vertices are colored in colors 2 and 4. (and all the edges among them). If v2 and v4
are not linked components, we can swap the colors in the chain starting at v2 and utilize the leftover color
for v.
Figure 15
If they are on the same linked component, a path exists from v2 to v4 along which every vertex has either
color 2 or color 4.
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Figure 16
This implies that there must be two intersecting edges. This violates the graph's planarity, bringing the
evidence to a close.[ CITATION pro21 \l 1033 ]
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Activity 03
Part 1
I. Diagram two real world binary problems in two different fields using applications of Boolean algebra.
A sequence of logic gates are coupled together to turn on and off each part of a calculator's display.
Consider only the lower right-hand section. If we're showing the numerals 0 (binary 00), 1 (01), 3 (11), 4
(100), 5 (101), 6 (110), 7 (111), 8 (1000), and 9 (1000), we'll need to turn this segment on (1001)
But not if the number 2 is displayed (10). By wiring up three OR gates and one NOT gate like this, you can
make the segment turn on and off appropriately for the digits 1–10.
If you enter the binary number patterns into the four inputs on the left, each section will turn on and off
appropriately.
Representing numbers in binary;
Computers and calculators have been created using a variety of switching devices that can be in one of two
positions over the previous century or more.
It just contains “one (1)” or “zero (0)” in it. As a result, computers and calculators employ binary code to
store and process numbers, which requires only two symbols (0 and 1) to represent any number.
So in binary code, the number 18 is written 10010,
Which means; (1 × 16) + (0 × 8) + (0 × 4) + (1 × 2) + (1 × 0)
=16+2
=18
Using logic gates with binary
Someone wants to do the sum 3 + 2 = 5.
A calculator solves a problem like this by converting the two integers to binary, resulting in 101 (5 in
binary = 1 4 + 0 2 + 1 1) by adding 11 (which is 3 in binary = 1 2 + 1 1) and 10 (2 in binary = 1 2 + 0 1).
So, how does the calculator calculate the total? It employs logic gates to compare the active switch pattern
and generate a new switch pattern in its place.
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
A logic gate is a basic electrical circuit that compares two numbers and generates a third number based on
the original numbers' values.
There are 4 very common types of logic gates.
1. OR
2. AND
3. NOT
4. XOR
An OR gate has two inputs and it produces an output of 1 if either of the inputs is 1; it produces a zero
otherwise.
An AND gate also has two inputs, but it produces an output of 1 only if both inputs are 1.
A NOT gate has a single input and reverses it to make an output. So if feed it a zero, it produces a 1.
An XOR gate gives the same output as an OR gate, but switches off if both its inputs are one.
[ CITATION rea21 \l 1033 ]
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Part 2
I. 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.
P: - The driver is present
Q: -The driver has buckled up
R: - The ignition switch is on
S: - The warning light should turn ON
Pᴧ QᴧR=S
Boolean equalization = P.Ǭ.R
P
Q
R
Q
T
T
T
T
T
F
T
F
F
T
F
T
F
F
F
F
Table 2
T
F
T
F
T
F
T
F
F
F
T
T
F
F
T
T
Pᴧ Q
F
F
T
T
F
F
F
F
Pᴧ QᴧR=S
F
F
T
F
F
F
F
F
ii. If it rains and you don't open your umbrella, then you will get wet.
P: - It rains
Q: - you open your umbrella
R: - you will get wet
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
(P ᴧ Q) → R
P
Q
R
Q
T
T
T
T
T
F
T
F
F
T
F
T
F
F
F
F
Table 3
T
F
T
F
T
F
T
F
F
F
T
T
F
F
T
T
A.A.L.S.Amarasinghe
Pᴧ Q
F
F
T
T
F
F
F
F
Pᴧ Q→R
T
T
T
F
T
T
T
T
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
II.
Produce truth tables for given Boolean expressions.
I.
A B
0 0
0 0
0 1
0 1
1 0
1 0
1 1
1 1
Table 4
C
0
1
0
1
0
1
0
1
1
1
1
1
0
0
0
0
1
1
0
0
1
1
0
0
1
0
1
0
1
0
10
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
1
0
1
0
0
1
II.
A
0
0
0
0
1
1
1
1
B
0
0
1
1
0
0
1
1
C
0
1
0
1
0
1
0
1
1
1
1
1
0
0
0
0
1
1
0
0
1
1
0
0
1
0
1
0
1
0
11
0
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
0
1
1
0
1
1
following Boolean expressions using algebraic methods.
I.
= AA + AB + BB + BC + CC + CA
= A + AB + B + BC +C + CA
Table 5
= A + B (A + 1) + C (B + 1) + CA
= B + C + A (1 + C)
=A+B+C
II.
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
Part 3
I. Simplify the
lOMoARcPSD|29125957
= AB + AC + B`B + B`C + AC + A`A + BC + BA`
= AB + AC + 0 + B`C + AC + 0 + BC + BA`
= AB + AC + C (B` + B) + BA`
= B (A + A`) + AC + C
= B + C (A + 1)
=B+C
III.
=AAC + AAC` + BAC + BAC` + AB + B
= A (C + C`) + BA (C + C`) + (A +1) B
= A + BA + B
= A + AB + B + AB
= A (1 + B) + B (1 + A)
=A+B
IV.
= AA` + A`B + BA + BB` + AA + AB`
= A`B + AB + A + AB`
= (A` + A) B + A (1 + B`)
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
= B+A
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Part 4
I. Consider the K-Maps given below. For each K- Map
I.
Write the appropriate standard form (SOP/POS) of Boolean expression.
The sum-of-products (SOP) form is a technique (or form) for reducing logic gates' Boolean statements. The
variables are ANDed (summed or added) together in this SOP form of Boolean function representation to
produce a product term, and all of these product terms are ORed (summed or added) together to make the
final function.
Part a) is for the left K-map, Part b) is for the right K-map.
AB/C
0
00
0
01
AB/C
1
00
0
01
1
11
10
0
11
D
00
0
1
10
0
1
10
01
1
0
01
0
1
11
1
1
1
0
10
1
1
1
1
SOP=A′BC+ABC+AB′C′
POS=(A'B'+C')(A'B'+C)(A'B+C')(AB+C')(AB'+C)POS=(A′B′+C′)(A′B′+C)(A′B+C′)(AB+C′)(AB′+C)
(A'B'+C')=(A'+C')(B'+C')=(A'+C'+B')(A'+C'+B)\times(A′B′+C′)=(A′+C′)(B′+C′)=(A′+C′+B′)(A′+C′+B)×
\times (B'+C'+A')(B'+C'+A)=(A'+C'+B')(A'+C'+B))(B'+C'+A)×(B′+C′+A′)(B′+C′+A)=(A′+C′+B′)(A′+C′
+B))(B′+C′+A)
(A'B'+C)=(A'+C)(B'+C)=(A'+C+B)(A'+C+B')\times(A′B′+C)=(A′+C)(B′+C)=(A′+C+B)(A′+C+B′)×
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
\times(B'+C+A)(B'+C+A')=(A'+C+B)(A'+C+B')(B'+C+A)×(B′+C+A)(B′+C+A′)=(A′+C+B)(A′+C+B′)(B′
+C+A)
(A'B+C')=(A'+C')(B+C')=(A'+C'+B)(A'+C'+B')\times(A′B+C′)=(A′+C′)(B+C′)=(A′+C′+B)(A′+C′+B′)×
\times(B+C'+A)(B+C'+A')=(A'+C'+B)(A'+C'+B')(B+C'+A)×(B+C′+A)(B+C′+A′)=(A′+C′+B)(A′+C′+B′)
(B+C′+A)
(AB+C')=(A+C')(B+C')=(A+C'+B)(A+C'+B')\times(AB+C′)=(A+C′)(B+C′)=(A+C′+B)(A+C′+B′)×
\times(B+C'+A)(B+C'+A')=(A+C'+B)(A+C'+B')(B+C'+A')×(B+C′+A)(B+C′+A′)=(A+C′+B)(A+C′+B′)
(B+C′+A′)
(AB'+C)=(A+C)(B'+C)=(A+C+B)(A+C+B')\times(AB′+C)=(A+C)(B′+C)=(A+C+B)(A+C+B′)×
\times(B'+C+A)(B'+C+A')=(A+C+B')(A+C+B')(B'+C+A')×(B′+C+A)(B′+C+A′)=(A+C+B′)(A+C+B′)(B′
+C+A′)
Standard form:
POS=(A'+C'+B')(A'+C'+B))(B'+C'+A)(A'+C+B)(A'+C+B')\timesPOS=(A′+C′+B′)(A′+C′+B))(B′+C′+A)
(A′+C+B)(A′+C+B′)×
\times(B'+C+A)(B+C'+A)×(B′+C+A)(B+C′+A)
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
II.
Design the circuit using AND, NOT and OR gates.
Figure 17
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.
OR gate using NAND gate:
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Figure 18
AND gate using NAND gate:
Figure 19
THEN;
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Figure 20
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
B)
i.
SOP=A′B′C′D′+A′B′CD′+A′BC′D+A′BCD′+ABC′D′+
+ABC'D+ABCD+AB'C'D'+AB'C'D+AB'CD+AB'CD'+ABC′D+ABCD+AB′C′D′+AB′C′D+AB′CD+AB
′CD′
POS=(A'B'+C'D)(A'B'+CD)(A'B+C'D')(A'B+CD)(AB+CD')POS=(A′B′+C′D)(A′B′+CD)(A′B+C′D′)(A
′B+CD)(AB+CD′)
II.
Figure 21
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Activity 04
Part 1
I. Describe the distinguishing characteristics of different binary operations that are performed on the same
set.
Just like when two numbers are combined, subtracted, multiplied, or divided, we obtain a number. Any two
members of a set can be linked using binary operations. The resultant of the two is in the same set as the
resultant of the two. Calculations that combine two items of a set (called operands) to generate another
element of the same set are known as binary operations on a set.
The binary operations * on a non-empty set A are functions from A × A to A. The binary operation, *: A ×
A → A. It is an operation of two elements of the set whose domains and co-domain are in the same set.
Addition, subtraction, multiplication, division, exponential is some of the binary operations.
Types of Binary Operations
Commutative
A binary operation * on a set A is commutative if a * b = b * a, for all (a, b) ∈ A (non-empty set). Let
addition be the operating binary operation for a = 8 and b = 9, a + b = 17 = b + a.
Associative
The associative property of binary operations hold if, for a non-empty set A, we can write (a * b) *c = a*(b
* c). Suppose N be the set of natural numbers and multiplication be the binary operation. Let a = 4, b = 5 c
= 6. We can write (a × b) × c = 120 = a × (b × c).
Distributive
Let * and o be two binary operations defined on a non-empty set A. The binary operations are distributive
if a*(b o c) = (a * b) o (a * c) or (b o c)*a = (b * a) o (c * a). Consider * to be multiplication and o be
subtraction. And a = 2, b = 5, c = 4. Then, a*(b o c) = a × (b − c) = 2 × (5 − 4) = 2. And (a * b) o (a * c)
= (a × b) − (a × c) = (2 × 5) − (2 × 4) = 10 − 6 = 2.
Identity
If A be the non-empty set and * be the binary operation on A. An element e is the identity element of a
∈ A, if a * e = a = e * a. If the binary operation is addition (+), e = 0 and for * is multiplication (×), e = 1.
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957

Inverse
If a binary operation * on a set A which satisfies a * b = b * a = e, for all a, b ∈ A. a-1 is invertible if for a
* b = b * a= e, a-1 = b. 1 is invertible when * is multiplication.
[ CITATION dis21 \l 1033 ]
Part 2
I.
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.
Multiplication is a binary operation on each of the sets of Natural numbers (N), Integer numbers (Z),
Rational numbers (Q), Real Numbers (R), and Complex numbers (C) (C). On the set of Natural numbers
(N), integers (Z), Rational numbers (Q), Real Numbers (R), and Complex numbers (C), division is not a
binary operation (C). As Binary Operation Properties On the set of Natural numbers, subtraction is not a
binary operation (N). The binary operations on each of the sets of Natural numbers (N), Integers (Z),
Rational numbers (Q), Real Numbers (R), and Complex numbers (C) are known as additions (C).
As Properties of Binary Operation Exponential operation (x, y) → xy is a binary operation on the set of
Natural numbers (N) and not on the set of Integers (Z).
II.
State the relation between the order of a group and the number of binary operations that can be
defined on that set.
Because the set has n items and binary operations (i.e., two operations) may be performed on each
of them in relation, the total number of possible combinations is n.
2n.2n−1...22.2=21+2+...n=22n(n−1) .
III.
How many binary operations can be defined on a set with 4 elements?
The formula is 2^{n(n-1)/2}2n(n−1)/2 where n is number of elements
Therefore binary operations can be defined on a set with 4 elements
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
= 2^{4(4-1)/2} = 2^6 = 64=24(4−1)/2=26=64
iv. State the Lagrange’s theorem of group theory.
Lagrange's theorem is a statement in group theory that may be thought of as an extension of Euler's
theorem's number theoretical result. It's a crucial lemma in group theory for proving more complex
conclusions.
V. For a subgroup H of a group G, prove the Lagrange’s theorem.
If G is a finite group and H is a subgroup of G, then ∣H∣ divides ∣G∣.
As an immediate corollary, we get that if G is a finite group and g ∈G, then o(g) divides ∣G∣. In
particular, ∣G∣=e for all g ∈G.
ii.
Before proving Lagrange’s Theorem, state and prove three lemmas.
Lemma 1. If G is a group with subgroup H, then there is a one to one correspondence between H and any
coset of H.
Proof. Let C be a left coset of H in G. Then there is a g ∈ G such that C = g ∗ H. 1 Define f : H → C by
f(x) = g ∗ x.
f is one to one.
If x1 6= x2, then as G has cancellation, g ∗ x1 6= g ∗ x2. Hence, f(x1) 6= f(x2).
f is onto.
If y ∈ C, then since C = g ∗ H, there is an h ∈ H such that y = g ∗ h. It follows that f(h) = y and as y was
arbitrary, f is onto.
This completes the proof of Lemma 1.
Lemma 2. If G is a group with subgroup H, then the left coset relation, g1 ∼ g2 if and only if g1 ∗ H = g2
∗ H is an equivalence relation.
Proof. The essence of this proof is that ∼ is an equivalence relation because it is defined in terms of set
equality and equality for sets is an equivalence relation. The details are below.
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
• ∼ is reflexive. Let g ∈ G be given. Then, g ∗H = {g ∗h : h ∈ H} and as this set is well defined, g ∗H =
g ∗H.
1We use “∗” to represent the binary operation in G.
• ∼ is symmetric.
Let g1, g2 ∈ G with g1 ∼ g2. Then by the definition of ∼, g1 ∗H = g2 ∗H. That is, {g1 ∗h : h ∈ H} =
{g2 ∗ h : h ∈ H} and as set equality is symmetric, {g2 ∗ h : h ∈ H} = {g1 ∗ h : h ∈ H}. Hence, g2 ∼ g1
and as g1 and g2 were arbitrary, ∼ is symmetric.
• ∼ is transitive.
Let g1, g2, g3 ∈ G with g1 ∼ g2 and g2 ∼ g3. Then, g1 ∗ H = {g1 ∗ h : h ∈ H} = {g2 ∗ h : h ∈ H} =
g2 ∗ H
And
g2 ∗ H = {g2 ∗ h : h ∈ H} = {g3 ∗ h : h ∈ H} = g3 ∗ H.
As set equality is transitive, it follows that
g1 ∗ H = {g1 ∗ h : h ∈ H} = {g3 ∗ h : h ∈ H} = g3 ∗ H, or g1 ∗ H = g3 ∗ H. That is, g1 ∼ g3, and as
g1, g2, g3 ∈ G are arbitrary, ∼ is transitive.
This complete the proof of the lemma.
Lemma 3. Let S be a set and ∼ be an equivalence relation on S. If A and B are two equivalence classes
with A ∩ B 6= ∅, then A = B.
Proof. To prove the lemma, we show that A ⊂ B and B ⊂ A. As A and B are arbitrarily labeled, it suffices
to show the former.
Let a ∈ A. As A ∩ B 6= ∅, there is a c ∈ A ∩ B. As A is an equivalence class of ∼ and both a and a c are
in A, it follows that a ∼ c. But as a ∼ c, c ∈ B and B is an equivalence class of ∼, it follows that a ∈ B.
Armed with these three lemmas we proceed to the main result.
Theorem 1. [Lagrange’s Theorem] If G is a finite group of order n and H is a subgroup of G of order k,
then k|n and n k is the number of distinct cosets of H in G.
Proof. Let ∼ be the left coset equivalence relation defined in Lemma 2. It follows from Lemma 2 that ∼ is
an equivalence relation and by Lemma 3 any two distinct cosets of ∼ are disjoint. Hence, we can write
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
G = (g1 ∗ H) ∪ (g2 ∗ H) ∪ · · · ∪ (g` ∗ H)
Where the gi ∗ H, i = 1, 2, . . . , ` are the disjoint left cosets of H guaranteed by Lemma 3.
By Lemma 1, the cardinality of each of these cosets is the same as the order of H, and so
This completes the proof.
VI. Discuss whether a group H with order 6 can be a subgroup of a group with order 13 or not. Clearly
state the reasons.
Group H with order 6 can be a subgroup of a group with order 13 or not; however, as 6 does not divide 13,
a group with order 13 elements cannot have a subgroup of 6 members. Because only this number has
divisors of 13, it might have subgroups with 13 components.
Part 3
I. Validate whether the set is a group under the binary operation ‘*’defined asfor any two elements.
For Check whether the set is a group under the binary operation ‘*’defined as for any two elements ;
need to think about group axioms.
Assume that a * b = (-1) for this a = 1 and b = -1 or a = -1 and b = 1.
If a = 1 and b = -1;
LHS = -1 and RHS = -1
But .
There for the set is a group under the binary operation ‘*’defined as for any two elements.
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
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)
Figure 22
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Figure 23
Figure 24
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Figure 25
Figure 26
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Figure 27
Figure 28
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Figure 29
Bibliography
binary trees . (2021). Retrieved from https://www.geeksforgeeks.org/binary-tree-data-structure/
Binary Trees quantitatively and qualitatively. (2021). Retrieved from https://www.javatpoint.com/discretemathematics-binary-trees
Dijkstra’s algorithm . (2021). Retrieved from https://www.geeksforgeeks.org/dijkstras-shortest-pathalgorithm-greedy-algo-7/
distinguishing
characteristics
of
different
binary
operations
.
(2021).
Retrieved
from
https://www.toppr.com/guides/maths/relations-and-functions/binary-operations/
proof
of
the
five
color
theorem
.
(2021).
Retrieved
from
http://cgm.cs.mcgill.ca/~athens/cs507/Projects/2003/MatthewWahab/5color.html#:~:text=5%2Dcolor
%20theorem%20%E2%80%93%20Every%20planar,that%20has%20the%20maximum%20degree.
real world binary problems in two different fields using applications of Boolean algebra. . (2021).
Retrieved
from
https://oneclass.com/homework-help/mathematics/6552407-the-question-is-attached-
below.en.html
w3schools. (2019). w3schools. Retrieved from w3schools: https://www.w3schools.in/data-structurestutorial/binary-trees/
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
www.cs.cmu.edu.
(2018).
www.cs.cmu.edu.
Retrieved
from
www.cs.cmu.edu:
https://www.cs.cmu.edu/~adamchik/15-121/lectures/Trees/trees.html
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
Grading Rubric
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.
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
D2 Construct a proof of the Five colour theorem.
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
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
group theory relevant to your course of study
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
lOMoARcPSD|29125957
A.A.L.S.Amarasinghe
Discrete Mathema琀椀cs
ESOFT Metro Campus
Downloaded by Karthees Sarma Vlog (karthees2002@gmail.com)
Download