You are on page 1of 62

Higher Nationals

Internal verification of assessment decisions – BTEC (RQF)


INTERNAL VERIFICATION – ASSESSMENT DECISIONS
Programme title BTEC Higher National Diploma in Computing

Assessor Internal Verifier


Unit 18 : Discrete Mathematics
Unit(s)
Discrete mathematics in software engineering concepts
Assignment title
Dewmi Sandunika Heenatigala
Student’s name
List which assessment Pass Merit Distinction
criteria the Assessor has
awarded.
INTERNAL VERIFIER CHECKLIST
Do the assessment criteria awarded match
those shown in the assignment brief? Y/N

Is the Pass/Merit/Distinction grade awarded


justified by the assessor’s comments on the Y/N
student work?
Has the work been assessed
Y/N
accurately?
Is the feedback to the student:
Give details:

• Constructive?
Y/N
• Linked to relevant assessment
criteria? Y/N

• Identifying opportunities for


improved performance?
Y/N

• Agreeing actions? Y/N

Does the assessment decision need


Y/N
amending?
Assessor signature Date

Internal Verifier signature Date


Programme Leader signature (if
Date
required)

1
Dewmi Sandunika Heenatigala LE05456
Confirm action completed
Remedial action taken

Give details:

Assessor signature Date

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

2
Dewmi Sandunika Heenatigala LE05456
Higher Nationals - Summative Assignment Feedback Form
Student Name/ID Dewmi Sandunika Heeantigala/LE05456

Unit Title Unit 18 : Discrete Mathematics

Assignment Number 1 Assessor


Date Received 1st
Submission Date
submission
Date Received 2nd
Re-submission Date
submission
Assessor Feedback:

LO1 Examine set theory and functions applicable to software engineering .

Pass, Merit & Distinction P1 P2 M1 D1


Descripts
LO2 Analyse mathematical structures of objects using graph theory.

Pass, Merit & Distinction P3 P4 M2 D2


Descripts

LO3 Investigate solutions to problem situations using the application of Boolean algebra.
Pass, Merit & Distinction P5 P6 M3 D3
Descripts
LO4 Explore applicable concepts within abstract algebra.

Pass, Merit & Distinction P7 P8 M4 D4


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.

3
Dewmi Sandunika Heenatigala LE05456
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 be sure to fill the details correctly.
2. This entire brief should be attached in first before you start answering.
3. All the assignments should prepare using word processing software.
4. All the assignments should print in A4 sized paper, and make sure to only use one side printing.
5. Allow 1” margin on each side of the paper. But on the left side you will need to leave room for binging.

Word Processing Rules


1. Use a font type that will make easy for your examiner to read. The font size should be 12 point, and should
be in the style of Times New Roman.
2. Use 1.5 line word-processing. Left justify all paragraphs.
3. Ensure that all headings are consistent in terms of size and font style.
4. Use footer function on 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 edit your assignment.

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.

4
Dewmi Sandunika Heenatigala LE05456
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.

5
Dewmi Sandunika Heenatigala LE05456
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 Edexcel UK.
6. I understand that my assignment will not be considered as submitted if this document is not attached to the
attached.

123dewmi.sandunika@gmail.com

Student’s Signature: Date:27.12.2020


(Provide E-mail ID) (Provide Submission Date)

6
Dewmi Sandunika Heenatigala LE05456
Assignment Brief
Student Name /ID Number

Unit Number and Title Unit 18 :Discrete Mathematics

Academic Year

Unit Tutor

Assignment Title Discrete mathematics in Computing

Issue Date

Submission Date

IV Name & Date

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

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

Unit Learning Outcomes:


LO1 Examine set theory and functions applicable to software engineering

LO2 Analyse mathematical structures of objects using graph theory

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

LO4 Explore applicable concepts within abstract algebra.

Assignment Brief and Guidance:

7
Dewmi Sandunika Heenatigala LE05456
Activity 01
Part 1
1. 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 .

2. If n( A−B )=45, n( A∪B )=110 and n( A∩B )=15, then find n(B).

3. If n(A)=33, n(B)=36 and n(C)=28, find n( A∪B∪C ).

Part 2
1. Write the multisets of prime factors of given numbers.
I. 160
II. 120
III. 250
2. Write the multiplicities of each element of multisets in part 2(1-I,ii,iii) separately.
3. Find the cardinalities of each multiset in part 2-1.

Part 3
1. Determine whether the following functions are invertible or not. If it is invertible, then find the rule of
the inverse ( f ( x ))
−1

i. f : ℜ→ℜ+ ii . f : ℜ+ → ℜ+
1
f ( x )=x 2 f ( x )=
x
iii . f : ℜ+ → ℜ+ iv . f : [ −π π
,
2 2 ]
→ [ −1 ,1 ]

f ( x )=x 2 f ( x )=sin x
v . f : [ 0 , π ] → [ −2 , 2 ]
f ( x )=2 cos x
5
f (x )= (x−32)
2. Function 9 converts Fahrenheit temperatures into Celsius. What is the function for
opposite conversion?

8
Dewmi Sandunika Heenatigala LE05456
Part 4
1. Formulate corresponding proof principles to prove the following properties about defined sets.
A=B ⇔ A ⊆ B and B⊆ A
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. Discuss using two examples on 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. Find the shortest path spanning tree for the weighted directed graph with vertices A, B, C, D, and E
given using Dijkstra’s algorithm.

Part 3
1. Check whether the following graphs have an Eulerian and/or Hamiltonian circuit.

I.

9
Dewmi Sandunika Heenatigala LE05456
II.

III.

Part 4

1. Construct a proof for the five color theorem for every planar graph.
2. Discuss how efficiently Graph Theory can be used in a route planning project for a vacation trip from
Colombo to Trincomalee by considering most of the practical situations (such as millage of the vehicle,
etc.) as much as you can. Essentially consider the two fold,
- Routes with shortest distance(Quick route travelling by own vehicle)
- Route with the lowest cost
3. Determine the minimum number of separate racks needed to store the chemicals given in the table (1 st
column) by considering their incompatibility using graph coloring technique. Clearly state you steps and

10
Dewmi Sandunika Heenatigala LE05456
graphs used.

Chemical Incompatible with

Ammonia Mercury, chlorine, calcium hypochlorite,


(anhydrous) iodine, bromine, hydrofluoric acid (anhydrous)

Chlorine Ammonia, acetylene, butadiene, butane, methane, propane


, hydrogen, sodium carbide, benzene,
finely divided metals, turpentine

Iodine Acetylene, ammonia (aqueous or anhydrous), hydrogen

Silver Acetylene, oxalic acid, tartaric acid, ammonium compounds,


pulmonic acid

Iodine Acetylene, ammonia (aqueous or anhydrous), hydrogen

Mercury Acetylene, pulmonic acid, ammonia

Fluorine All other chemicals

Activity 03

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

Part 2
1. Develop 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. Ā B̄ C +A B̄ C̄+ ABC + Ā B C̄
ii. ( A + B̄+C )( A +B +C )( Ā +B+ C̄ )
Part 3
2. Find the simplest form of given Boolean expressions using algebraic methods.
i. A ( A+B)+B( B+C)+C(C+A )
ii. ( A + B̄)( B+C )+( A+B )(C + Ā )
iii. ( A +B)( AC+ A C̄ )+AB+B
iv. Ā ( A+B )+(B+ A )( A+ B̄ )

11
Dewmi Sandunika Heenatigala LE05456
Part 4
1. Consider the K-Maps given. For each K- Map
i. Write the appropriate standard form (SOP/POS) of Boolean expression.
ii. Draw the circuit using AND, NOT and OR gates.
iii. Draw the circuit only by using
i. NAND gates if the standard form obtained in part (i) is SOP.
ii. NOR gates if the standard form obtained in pat (i) is POS.

(a)

AB/C 0 1

00 0 0

01 0 1

11 0 1

10 1 0

(b)

AB/ 00 01 11 10
CD

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

12
Dewmi Sandunika Heenatigala LE05456
13
Dewmi Sandunika Heenatigala LE05456
Activity 04

Part 1
1. Describe the characteristics of different binary operations that are performed on the same set.
2. Justify whether the given operations on relevant sets are binary operations or not.
i. Multiplication and Division on se of Natural numbers
ii. Subtraction and Addition on Set of Natural numbers
y
iii. Exponential operation: ( x , y )→ x on Set of Natural numbers and set of Integers

Part 2
1. Build up 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 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. Check 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 .
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. Discuss the group theory concept behind the Rubik’s cube.
Part 4
1. Prepare a presentation for ten minutes that explains an application of group theory in computer
sciences.

14
Dewmi Sandunika Heenatigala LE05456
Acknowledgement

15
Dewmi Sandunika Heenatigala LE05456
Assignment Feedback

Formative Feedback: Assessor to Student

Action Plan

Summative feedback

Feedback: Student to Assessor

shyamali.karunadasa@esoft.l
Assessor k Date
signature

Student Date
signature

16
Dewmi Sandunika Heenatigala LE05456
Contents
Activity 01...........................................................................................................................................18

Part 01.............................................................................................................................................18

1. 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 ................................................18

2. If n( A - B )=45, n( A  B )=110 and n( A  B )=15, then find n(B)..................................18

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

Part 02.............................................................................................................................................19

1. Write the multisets of prime factors of given numbers........................................................19

2. Write the multiplicities of each element of multisets in part 2(1-I, ii, iii) separately............20

3. Find the cardinalities of each multiset in part 2-1................................................................20

Part 03.............................................................................................................................................21

1. Determine whether the following functions are invertible or not. If it is invertible, then find

the rule of the inverse ( f ( x )) .................................................................................................21


−1

5
f (x )= (x−32)
2. Function 9 converts Fahrenheit temperatures into Celsius. What is the
function for opposite conversion?................................................................................................27

Activity 02...........................................................................................................................................27

Part 01.............................................................................................................................................27

1. Discuss using two examples on binary trees both quantitatively and qualitatively..............27

Part 02.............................................................................................................................................29

1. State the Dijkstra’s algorithm for a directed weighted graph with all non-negative edge
weights.........................................................................................................................................29

2. Find the shortest path spanning tree for the weighted directed graph with vertices A, B, C,
D, and E given using Dijkstra’s algorithm...................................................................................30

Part 03.............................................................................................................................................31

Activity 03...........................................................................................................................................33

Part 01.............................................................................................................................................33

17
Dewmi Sandunika Heenatigala LE05456
1. Discuss two real world binary problems in two different fields using applications of
Boolean Algebra..........................................................................................................................33

Part 02.............................................................................................................................................34

1. Develop truth tables and its corresponding Boolean equation for the following scenarios ''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.''....................................................................................................34

2. Produce truth tables for given Boolean expressions.............................................................35

Part 03.............................................................................................................................................36

1. Find the simplest form of given Boolean expressions using algebraic methods...................37

Part 04.............................................................................................................................................38

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

Activity 04...........................................................................................................................................42

Part 01.............................................................................................................................................42

1. Describe the characteristics of different binary operations that are performed on the same set
42

2. Justify whether the given operations on relevant sets are binary operations or not..............43

Part 02.............................................................................................................................................45

1. Build up 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.................................................................45

2...................................................................................................................................................47

Part 03.............................................................................................................................................48

1. Check 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 ...................................................................48

2...................................................................................................................................................49

References...........................................................................................................................................54

List of Figures
Figure 1 Venn Diagram.......................................................................................................................20
Figure 2 f(x) = sin (x)..........................................................................................................................26

18
Dewmi Sandunika Heenatigala LE05456
Figure 3 f (x) = 2cosx..........................................................................................................................28
Figure 4 Quantitative Binary Tree.......................................................................................................30
Figure 5 Qualitative Binary tree...........................................................................................................31
Figure 6 Dijkstra Algorithm.................................................................................................................32
Figure 7 Shortest Path..........................................................................................................................32
Figure 8 Shortest Path..........................................................................................................................33
Figure 9 Part 03 Question....................................................................................................................33
Figure 10 Question 02..........................................................................................................................34
Figure 11 Question 03..........................................................................................................................34
Figure 12 Laws of Boolean Algebra....................................................................................................39
Figure 13 Using AND, NOT & OR Gates...........................................................................................41
Figure 14 Using NAND.......................................................................................................................41
Figure 15 using AND, NOT and OR gates..........................................................................................42
Figure 16 Using NAND.......................................................................................................................42
Figure 17 Using AND, NOT and OR gates..........................................................................................43
Figure 18 Using NAND.......................................................................................................................44
Figure 19 Nested Group Gi..................................................................................................................53

List of Tables

Table 1 Path Diagram..........................................................................................................................34


Table 2 Truth Table.............................................................................................................................36
Table 3 Truth Table.............................................................................................................................37
Table 4 Boolean Truth Table...............................................................................................................38
Table 5 Boolean Truth Table...............................................................................................................38
Table 6 truth table for given Boolean expressions...............................................................................39
Table 7 truth table for given Boolean expressions...............................................................................39
Table 8 Order 1 – e..............................................................................................................................49
Table 9 Order 2 – a,e...........................................................................................................................49
Table 10 Order 3 – a,b,e......................................................................................................................49
Table 11 Order 4 – a,b,c,e....................................................................................................................50
Table 15 group G0 into group G1........................................................................................................54
Table 16 Group G1 into group G2.......................................................................................................55
Table 17 group G2 into group G3........................................................................................................55
Table 18 group G3 into group G4........................................................................................................56

19
Dewmi Sandunika Heenatigala LE05456
Table 19 Final Stage............................................................................................................................56

20
Dewmi Sandunika Heenatigala LE05456
Activity 01

Part 01

1. 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
= 87

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

(1)

𝑛(𝐴 - 𝐵) = 𝑛(𝐴) - 𝑛(𝐴 ∩𝐵)


45 = (𝐴) - 𝑛(A ∩𝐵)
(2)
𝑛(𝐴 ∪ 𝐵) = 𝑛(𝐴) + 𝑛(𝐵) - 𝑛(𝐴 ∩ 𝐵)
125 = 𝑛 (𝐴) + 𝑛 (𝐵)

(2) – (1)
125 - 45 = 𝑛 (𝐴) + 𝑛 (𝐵) – ( (𝐴) – n(A ∩ B) )
80 = (𝐵) + 15
65 = 𝑛 (𝐵)

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

Figure 1 Venn Diagram


Source: (Assignment Brief)

21
Dewmi Sandunika Heenatigala LE05456
10 + 5 + a + b = 33→ A
a+b = 18→ 1

15 + 5 + a + c = 36→ B
a+c = 16→ 2

13 + 5 + b + c = 28→ C
b+c = 10→ 3

2–3
a + c - ( b + c ) = 16 – 10
a–b =6→4

1+4
a + b + ( a – b ) = 18 + 6
a = 12

By 1
12 + b = 18
b=6

By 2
12 + c = 16
C = 16 – 12
C=4

n(A⋃B⋃C) = 10 + 12 + 5 + 6 + 15 + 4 + 13
= 65

Part 02

1. Write the multisets of prime factors of given numbers.

160 =2×2×2×2×2×5
= [ 2, 2, 2, 2, 2, 5 ]

120 =2×2×2×3×5

22
Dewmi Sandunika Heenatigala LE05456
= [ 2, 2, 2, 3, 5 ]

250 =2×5×5×5
= [ 2, 5, 5, 5]

2. Write the multiplicities of each element of multisets in part 2(1-I, ii, iii) separately.

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

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

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

3. Find the cardinalities of each multiset in part 2-1

n (160) = µ (2) + µ (5)


=5+1
=6

n (120) = µ (2) + µ (3) + µ (5)


=3+1+1
=5

n (250) = µ (2) + µ (5)


= 1+3
=4

Part 03

23
Dewmi Sandunika Heenatigala LE05456
1. Determine whether the following functions are invertible or not. If it is invertible, then find the rule of

the inverse ( f ( x ))
−1

01. 𝑓: ℜ → ℜ+
𝑓(𝑥) = 𝑥2

If f is invertible, the f should be 1-1 and onto

Step 01

Check weather f is 1-1

+¿ ¿
𝑥1, 𝑥2 Є | R
+¿ ¿
𝑓 ( x 1) , 𝑓 ( x 2) Є | R

𝑓 ( x 1) = 𝑓 ( x 2)
2 2
𝑓 ( x 1) = 𝑓 ( x 2)
2 2
𝑓 ( x 1) − 𝑓 ( x 2) = 0

( x 1 - x 2)( x 1 - x 2) = 0

( x 1 - x 2) = 0 or ( x 1 - x 2) = 0
x 1 = x 2 or x 1 =(− x 2)
Therefore,
f is not 1-1 and f is not invertible

02. 𝑓 ∶ ℜ+ ℜ+
𝑓(x) = 1⁄𝑥

If f is invertible, the f should be 1-1 and onto

Step 01
Check weather f is 1-1
+¿ ¿
𝑥1, 𝑥2 Є | R

𝑓 ( x 1) , 𝑓 ( x 2) Є |𝑅+

𝑓 ( x 1) = 𝑓 ( x 2)

1/ x 1 = 1/ x 2
x2 = x1
x2 - x1 = 0

24
Dewmi Sandunika Heenatigala LE05456
So, x 2 = x 1

𝑓 ( x 1) = 𝑓 ( x 2) →𝑥2 = 𝑥1

If 𝑓 ( x 1) = 𝑓 ( x 2) , then x 2 = x 1
So, f(x) is a 1-1 A

Step 02
Check weather f is onto
F(x) = 1⁄𝑥
Y = 1⁄𝑥
1
Y= 1
y
∀ y ∈ ℜ+ (Range), ∃ y1 ∈ ℜ+ (Domain)
Such that f (1/y) = y
f is onto
f is invertible

Step 03
F(x) = 1⁄𝑥
Y = 1⁄𝑥
1⁄𝑦 = 1⁄𝑥 * 1
x = 1⁄𝑦
𝑓−1 (𝑥) = 1⁄𝑥 ∶ 𝑓−1 (𝑥) ∶ ℜ+ → ℜ+

03. 𝑓 ∶ ℜ+ ℜ+
𝑓 (𝑥) = 𝑥2

If f is invertible, the f should be 1-1 and onto

Step 01
Check weather f is 1-1
𝑥1, 𝑥2 Є |𝑅+
𝑓 ( x 1) , 𝑓 ( x 2) Є |𝑅+
𝑓 ( x 1) = 𝑓 ( x 2)
2 2
x 1) = x 2)
x 21) - x 22) = 0
( x 1) - x 2)) ( x 1) + x 2)) = 0

25
Dewmi Sandunika Heenatigala LE05456
( x 1) - x 2)) = 0 or ( x 1) + x 2)) = 0
x 1) = x 2) Or x 1) = (- x 2))
Since x 2) ∈ ℜ+, (- x 2 )ℜ+
Therefore, (- x 2 ) ∈ codomain
Therefore, 𝑓 is 1- 1

Step 02
Check weather f is onto
f (x)  x 2
y  x2
∀ y ∈ ℜ+ (Range), ∃ y 1 /2∈ ℜ+ (Domain) such that f ( y 1 /2)  y
f is onto
So,
f is invertible

Step 03
(𝑥) = x 2
𝑦 = x2
1 /2 2 1 /2
y = (x )
𝑥 = y 1 /2
𝑓-1 (𝑥) = x 1/ 2∶ 𝑓-1 (𝑥) ∶ ℜ+ → ℜ+

04. 𝑓 ∶ ℜ+ ℜ+
𝑓 (𝑥) = 𝑥2

If f is invertible, the f should be 1-1 and onto

Step 01
Check weather f is 1-1
𝑥1, 𝑥2 Є |𝑅+
𝑓 ( x 1) , 𝑓 ( x 2) Є |𝑅+
𝑓 ( x 1) = 𝑓 ( x 2)
2 2
x 1) = x 2)
2 2
x 1) - x 2) = 0
( x 1) - x 2)) ( x 1) + x 2)) = 0

26
Dewmi Sandunika Heenatigala LE05456
( x 1) - x 2)) = 0 or ( x 1) + x 2)) = 0
x 1) = x 2) Or x 1) = (- x 2))
Since x 2) ∈ ℜ+, (- x 2 )ℜ+
Therefore, (- x 2 ) ∈ codomain
Therefore, 𝑓 is 1- 1

Step 02
Check weather f is onto
f (x)  x 2
y  x2
∀ y ∈ ℜ+ (Range), ∃ y 1 /2∈ ℜ+ (Domain) such that f ( y 1 /2)  y
f is onto
So,
f is invertible

Step 03
(𝑥) = x 2
𝑦 = x2
1 /2 2 1 /2
y = (x )
𝑥 = y 1 /2
𝑓-1 (𝑥) = x 1/ 2∶ 𝑓-1 (𝑥) ∶ ℜ+ → ℜ+

04.

π π
f:[- , : ]
2 2
f (x) = sin x

27
Dewmi Sandunika Heenatigala LE05456
Figure 2 f(x) = sin (x)
Source: (Author Created)

Step 01

Check weather f is 1-1


π π
x 1 , x 2 ∈ [- , ]
2 2
f ( x 1) = f ( x 2 ) ∈ [−1,1]

sin x 1 = sin x 2
x1 = x2
𝑖𝑒. f ( x 1) = f ( x 2) → x 1 = x 2
So, 𝑓 𝑖𝑠 1 – 1

Step 02

Check weather f is onto


π π
∀ y ∈ [−1,1] , ∃ 𝑆𝑖𝑛-1 (y) ∈ [- , ]
2 2
𝑦 = sin 𝑥
−1
sin y =x
y = sin(sin −1 y )
Such that f (sin −1 y ) = y
So, 𝑓 is onto
Since 𝑓 is 1-1 and onto, 𝑓 is invertible

Step 03

28
Dewmi Sandunika Heenatigala LE05456
(𝑥) = sin 𝑥
𝑦 = sin 𝑥
−1 −1 −1
sin y = x → f (𝑥) = sin x
π π
f
−1
(𝑥) = [-1, 1] → [- , ]
2 2

05.
𝑓: [0, 𝜋] →[-2, 2]
𝑓 (𝑥) = 2 cos 𝑥

Figure 3 f (x) = 2cosx


Source:(Author Created)

Step 01

If f is invertible, the f should be 1-1 and onto


Check weather f is 1-1
𝑥1, 𝑥2 Є [0, 𝜋]
𝑓 ( x 1) , 𝑓 ( x 2) Є [−2, 2]

𝑓 ( x 1) = 𝑓 ( x 2)

2𝑐𝑜𝑠 x 1 = 2 cos x 2
x1 = x2
f ( x 1) = f ( x 2 ) → x 1 = x 2

29
Dewmi Sandunika Heenatigala LE05456
So, f is 1 – 1

Step 02

Check weather f is onto


f (x) = 2𝑐𝑜𝑠 x
𝑦 = 2𝑐𝑜𝑠 x
y
= 𝑐𝑜𝑠 x
2
y
cos−1 ( ) = x
2
−1 y −1 y
∀ y ∈ [−2,2] , ∃ cos ( ) ∈ [0, 𝜋] such that f (cos ( )¿ = y
2 2
So, f is onto
Since f is 1-1 and onto, f is invertible.

Step 03

f (x) = 2cos x
y = 2cos x
y
= 𝑐𝑜𝑠 x
2
−1 y
cos ( ) = x
2

−1 x
f
−1
(𝑥) = cos ( )
2
f −1 (𝑥) = [-2, 2]  [0, 𝜋]

5
f (x )= (x−32)
2. Function 9 converts Fahrenheit temperatures into Celsius. What is the function for
opposite conversion?

𝐹 (𝑥) = 5 ⁄ 9 (𝑥 − 32)
𝑌 = 5 ⁄ 9 (𝑥 − 32)
9y ⁄ 5 = 𝑥 − 32

30
Dewmi Sandunika Heenatigala LE05456
𝑥 =9 y ⁄ 5 + 32
Inverse function of f
−¿¿
f (𝑦) = (9 y ⁄ 5 ) + 32

Therefore, opposite conversion is


f −¿¿ (𝑦) = (9 y ⁄ 5 ) + 32

Activity 02

Part 01

1. Discuss using two examples on binary trees both quantitatively and qualitatively

A binary tree is a method of placing and locating files (called records or keys) in a database, especially when all the
data is known to be in random access memory (RAM). The algorithm finds data by repeatedly dividing the number of
ultimately accessible records in half until only one remains.

In a tree, records are stored in locations called leaves. This name derives from the fact that records always exist at end
points; there is nothing beyond them. Branch points are called nodes. The order of a tree is the number of branches
(called children) per node. In a binary tree, there are always two children per node, so the order is 2. The number of
leaves in a binary tree is always a power of 2. The number of access operations required to reach the desired record is
called the depth of the tree. (Margaret, 2019)

Quantitative

31
Dewmi Sandunika Heenatigala LE05456
Figure 4 Quantitative Binary Tree
Source: (Author Created)

And this Quantitative Binary Tree is mainly base on the Bank And this mainly divided in to two categories, it means
Male staff and Female staff.. And there are two age categories represent in this employees, and the age categories are
equal or above 30 and less than 30 and also this tree Considering height and weight.

Qualitative

32
Dewmi Sandunika Heenatigala LE05456
Figure 5 Qualitative Binary tree
Source: (Author Created)
The goal of the above qualitative binary tree is to identify the HND and Degree. This sector divided into After A/L
and After O/L. And it’s separated by Pass and Fail.

Part 02

1. State the Dijkstra’s algorithm for a directed weighted graph with all non-negative edge weights.

Dijkstra's algorithm solves the shortest-path problem for any weighted, directed graph with non-negative weights. It
can handle graphs consisting of cycles, but negative weights will cause this algorithm to produce incorrect results.
Consequently, we assume that w(e) ≥ 0 for all e ∈ E here.

The pseudocode in Algorithm 4.12 shows Dijkstra's algorithm. The algorithm maintains a priority queue minQ that is
used to store the unprocessed vertices with their shortest-path estimates est(v) as key values. (sciencedirect.com,
2018)

33
Dewmi Sandunika Heenatigala LE05456
Figure 6 Dijkstra Algorithm
Source: (https://d2vlcm61l7u1fs.cloudfront.net/media%2F769%2F7690acb6-5bf6-447f-9e7c-
dd36733df974%2FphpmoKJr3.png, 2019)

2. Find the shortest path spanning tree for the weighted directed graph with vertices A, B, C, D, and E
given using Dijkstra’s algorithm.

Figure 7 Shortest Path


Source: (Assignment)

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

34
Dewmi Sandunika Heenatigala LE05456
B - - 9 (E,D,C) -
Table 1 Path Diagram
Source: (Author Created)

Figure 8 Shortest Path


Source: (Author Created)

Part 03

Figure 9 Part 03 Question


Source: (Assignment)

Check it is Eulerian graph or not.


 It is not an Eulerian graph it doesn’t cover all the edges of the point.

Check it is Hamiltonian graph


 It’s not a Hamiltonian because the same vertices appear twice

35
Dewmi Sandunika Heenatigala LE05456
Figure 10 Question 02
Source: (Assignment)

Check it is Eulerian graph or not.


 It is not an Eulerian graph it doesn’t cover all the edges of the point.

Check it is Hamiltonian graph


 It is a Hamilton graph , Because the vertices appear twice ( H = { A, B, C, D, E, A}

Figure 11 Question 03
Source: (Assignment)

Check it is Eulerian graph or not.


 This graph is not Eulerian because B and E vertices have odd degree.

Check it is Hamiltonian graph


 It is not Hamiltonian because the vertices appear twice

36
Dewmi Sandunika Heenatigala LE05456
Activity 03

Part 01

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

Boolean Algebra is used to analyze and simplify the digital (logic) circuits. It uses only the binary numbers i.e. 0 and
1. It is also called as Binary Algebra or logical Algebra. Boolean algebra was invented by George Boole in 1854.

Consider a tin drink vending machine to dispense Coca cola and Pepsi. each choice and so that a customer can have at
most one of the 2 choices

Solution
Step 01
Specify the input and output variables and the two states of each.
Input C = Coca cola button (1 = pressed, 0 = not pressed)
P = Pepsi button (1 = pressed, 0 = not pressed)
Output D = choice verifier (1 = acceptable input – deliver the choice selected; 0 = unacceptable
input– Displays a message “Select Coca cola or Pepsi”)

Step 02
Construct the truth table

C P D
1 1 0
1 0 1
0 1 1
0 0 0
Table 2 Truth Table
Source: (Author Created)

The output is CP’ + C’P

37
Dewmi Sandunika Heenatigala LE05456
Considering a Television in home. The remote controller of TV has button user can choose one of them. (On and Off)

Step 01
Specify the input and output variables and the two states of each.
Input O = Switch ON button (1 = pushed, 0 = not pushed)
Input S = Switch OFF button (1 = pushed, 0 = not pushed)
Output R = choice verifier (1 = acceptable input– Either ON/OFF; 0 = unacceptable input–
Blink Sensor light)
Step 02
Construct the truth table

O S R
1 1 0
1 0 1
0 1 1
0 0 0
Table 3 Truth Table
Source: (Author Created)
The output is OS’ + O’S

Part 02

1. Develop truth tables and its corresponding Boolean equation for the following scenarios ''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.''

A: If the driver is present

B: The driver has buckled up

C: The ignition switch is on

D: The warning light should turn on


ABC = X

38
Dewmi Sandunika Heenatigala LE05456
A B C B ABC = X
1 1 1 0 0
1 1 0 0 0
1 0 1 1 1
1 0 0 1 0
0 1 1 0 0
0 1 0 0 0
0 0 1 1 0
0 0 0 1 0
Table 4 Boolean Truth Table
Source: (Author Created)

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

A: If it Rains
B: Open your Umbrella
X: You get wet

AB =X

A B B A B= X

1 1 0 0
1 0 1 1
0 1 1 0
0 0 0 0
Table 5 Boolean Truth Table
Source: (Author Created)

2. Produce truth tables for given Boolean expressions

Ā B̄ C +A B̄ C̄+ ABC+ Ā B C̄

39
Dewmi Sandunika Heenatigala LE05456
A B C A B C AB A ABC AB A BC + A B C + ABC + A B
C BC C C
0 0 0 1 1 1 0 0 0 0 0
0 0 1 1 1 0 1 0 0 0 1
0 1 0 1 0 1 0 0 0 1 1
0 1 1 1 0 0 0 0 0 0 0
1 0 0 0 1 1 0 1 1 0 1
1 0 1 0 1 0 0 0 0 0 0
1 1 0 0 0 1 0 0 0 0 0
1 1 1 0 0 0 0 0 0 0 1
Table 6 truth table for given Boolean expressions
Source: (Author Created)

( A + B̄+C )( A +B +C )( Ā +B+ C̄ )

A B C A B C A+ B+¿ C A+B+C A+ B + ( A+ B+¿ C)( A + B +C)


C ( A+ B + C )
0 0 0 1 1 1 0 0 0 0
0 0 1 1 1 0 1 0 0 1
0 1 0 1 0 1 0 0 0 1
0 1 1 1 0 0 0 0 0 0
1 0 0 0 1 1 0 1 1 1
1 0 1 0 1 0 0 0 0 0
1 1 0 0 0 1 0 0 0 0
1 1 1 0 0 0 0 0 0 1
Table 7 truth table for given Boolean expressions
Source: (Author Created)

Part 03

40
Dewmi Sandunika Heenatigala LE05456
Figure 12 Laws of Boolean Algebra
Source: (http://4.bp.blogspot.com/-uKI0W87tFDA/Up20mDeQjSI/AAAAAAAAABw/TXf5hEE9-fg/s1600/
boolean+law.gif,2019)

1. Find the simplest form of given Boolean expressions using algebraic methods.

A ( A+B)+B( B+C)+C(C+A )

= AA + AB + BB + BC + CC + CA (Rule 03)
= (A+AB) + (B+BC) + (C+CA) (Rule 11)
= A + B + C (Rule 14)

( A + B̄)( B+C )+( A+B )(C + Ā )

= AB + AC + BB + BC + AC + A A + BC + B A (Rule 03)
= AB + AC + 0 + BC + AC + 0 + BC + B A (Rule 12)
= (AB + B A ) + (AC + AC) + ( BC + BC) (Rule 1,5)
= B (A + A ) + AC + (B + B) (Rule 03)
= B + (AC + C) (Rule 08)
= B + C (Rule 14)

( A + B)( AC+ A C̄ )+AB+B

= (𝐴 + 𝐵) (𝐴 (𝐶 + C )) + 𝐵 (Rule 09)
= (𝐴 + 𝐵) 𝐴 + 𝐵 (Rule 03)
= 𝐴𝐴 + 𝐵𝐴 + 𝐵 (Rule 11)

41
Dewmi Sandunika Heenatigala LE05456
= 𝐴 + 𝐵 (Rule 15)

Ā ( A+B )+(B+ A )( A+ B̄ )

=𝐴̅𝐴 + 𝐴̅𝐵 + (𝐵 + 𝐴)(𝐴 + B) (Rule 3)


= 𝐴̅𝐴 + 𝐴̅𝐵 + (𝐴 + 𝐵)(𝐴 + B) (Rule 1)
= 0 + 𝐴̅𝐵 + (𝐴 + 𝐵)(𝐴 + B) (Rule 13)
= 0 + 𝐴̅𝐵 + 𝐴 + 𝐵 B (Rule 17)
= 0 + 𝐴̅𝐵 + 𝐴 + 0 (Rule 13)
= 𝐴̅𝐵 + (Rule 5)
= 𝐴 + 𝐵 (Rule 16)

Part 04

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

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


Draw the circuit using AND, NOT and OR gates.

Draw the circuit only by using

 NAND gates if the standard form obtained in part (i) is SOP.


 NOR gates if the standard form obtained in pat (i) is POS.

a)

AB/C 0 1

00 0 0

01 0 1

11 0 1

10 1 0

SOP form of Boolean Expressions


SOP-Boolean Equation
X = AB C + BC

42
Dewmi Sandunika Heenatigala LE05456
Draw the circuit using AND, NOT and OR gates.

Figure 13 Using AND, NOT & OR Gates


Source: (Author Created)

Draw the circuit using NAND

Figure 14 Using NAND


Source: (Author Created)

b)
AB/ 00 01 11 10
CD

00 1 0 0 1

43
Dewmi Sandunika Heenatigala LE05456
01 0 1 0 1

11 1 1 1 0

10 1 1 1 1

(POS) Boolean equation

X= (A + B + C + D) (A + B + D ) (A + C + D ) ( A + B + C + D)

Draw the Circuit using AND, NOT and OR gates

Figure 15 using AND, NOT and OR gates


Source: (Author Created)

Draw the circuit using NAND

44
Dewmi Sandunika Heenatigala LE05456
Figure 16 Using NAND
Source: (Author Created)
c)

AB/C 0 1

00 1 0

01 1 1

11 1 0

10 0 1

POS - Boolean equation


X = ABC + A BC + A BC

Draw the Circuit using AND, NOT and OR gates

45
Dewmi Sandunika Heenatigala LE05456
Figure 17 Using AND, NOT and OR gates
Source: (Author Created)

Draw the circuit using NAND

Figure 18 Using NAND


Source: (Author Created)

Activity 04

46
Dewmi Sandunika Heenatigala LE05456
Part 01

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

Let ∗ or ∘ be a binary operation


∗ or ∘  +, -, ×, ÷

Bi =2
Operands : a , b
Operations: + , - , × , ÷

Association Properties
Consider a non-empty set A and a binary operation * on A. Then the operation * on A is associative, if for every a, b,
c, ∈ A, we have (a * b) * c = a* (b*c)

 (a + b) + c = a + (b + c)
 (a - b) – c ≠ a - (b - c)
 (a × b) × c = a × (b × c)
 (a ÷ b) ÷ c ≠ a ÷ (b ÷ c)
Commutative Properties
Consider a non-empty set A and a binary operation * on A. Then the operation * on A is associative, if for every a, b,
∈ A, we have a * b = b * a.

 a+b=b+a = 2+3 = 3+2


 a - b ≠ b-a = 2-3 ≠ 3-2
 a×b=b×a = 2×3 = 3×2
 a÷b≠b÷a = 2÷3 ≠ 2÷3

Identity Elements Properties


Consider a non-empty set A, and a binary operation * on A. Then the operation * has an identity property if there
exists an element e in A such that a * e (right identity) = e * a (left identity) = a ∀ a ∈ A.

 a + 0 = 0 + a = a → 0 –Additive identity
 a × 1 = 1 × a = a → 1 – Multiplicative identity

Invers Element Property

47
Dewmi Sandunika Heenatigala LE05456
Consider a non-empty set A, and a binary operation * on A. Then the operation is the inverse property, if for each a
∈A, there exists an element b in A such that a * b (right inverse) = b * a (left inverse) = e, where b is called an inverse
of a.

 a + -a = (-a) + a = 0 → -a – Additive Inverse


 a × 1/a = 1/a × a = 1 → 1/a – Multiplicative Inverse

Distributive Property
Consider a non-empty set A, and a binary operation * on A. Then the operation * distributes over ∘, if for every a, b, c
∈A, we have

 a * (b + c) = (a * b) + (a * c) [left distributive]
 (b + c) * a = (b * a) + (c * a) [right distributive]

2. Justify whether the given operations on relevant sets are binary operations or not.

Multiplication

Closure :

 𝑝×𝑞∈ℕ

Associative :

 (𝑝 × 𝑞) × 𝑟 = 𝑝 × (𝑞 × 𝑟)

Identity :

 𝑝×𝑠=𝑠×𝑝=𝑠=1

Inverse :

 𝑝 × p−1 ≠ ℕ

Conclusion: Multiplication is not a binary operation on Natural Number.

Division

Let a, b, ∈ lN for all 𝑎÷𝑏∉𝑙𝑁


ex: 1,2 ∈ lN

48
Dewmi Sandunika Heenatigala LE05456
1÷2= ½ ∈ 𝑙𝑁
Conclusion: Division is not a binary operation on Natural Numbers

Subtraction and Addition on Set of Natural numbers

Subtraction

Closure :

 𝑝 − 𝑞 ≠ ℕ, let 𝑝 = 2 𝑎𝑛𝑑 𝑞 = 3

subtraction is not a binary operation

Addition

Closure :

 𝑝+𝑞∈ℕ

Associative :

 (𝑝 + 𝑞) + 𝑟 = 𝑝 + (𝑞 + 𝑟) ∈ ℕ

Identity :

 𝑝+𝑠=𝑠+𝑝=𝑝
 𝑠 = 0; 𝑝 + 0 = 0 + 𝑝 = 𝑝
 0∉ℕ

Addition is not a binary operation in natural numbers.

y
Exponential operation: ( x , y )→ x on Set of Natural numbers and set of Integers
Natural Numbers

Closure :
y
 x ∈𝑁

Associative :
 xy ≠ yx

49
Dewmi Sandunika Heenatigala LE05456
e.g.
5 2
 2 ≠5

Exponential is not a binary operation in natural numbers.

Set of integers
Closure

xy ∉ ℤ
e.g. :
−1
6 is not an element of integers

Conclusion: Exponential operations not or binary operation or Natural Numbers.

Part 02

1. Build up 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.

Order 1 – e

* e

e e

Table 8 Order 1 – e
Source: (Author created)

Order 2 – a,e

* a e

50
Dewmi Sandunika Heenatigala LE05456
a a e

e e a

Table 9 Order 2 – a,e


Source: (Author created)

Order 3 – a,b,e

* a b e

a a b e

b b e a

c e a b

Table 10 Order 3 – a,b,e


Source: (Author created)

Order 4 – a,b,c,e

* a b c e

a a b c e

b b e a c

c c a e b

e e c b a

Table 11 Order 4 – a,b,c,e


Source: (Author created)

2.

State the Lagrange’s theorem of group theory.

Let ‘S’ be a sub group of a finite group ‘G’, then the order ‘S’ divides the order of ‘G’

51
Dewmi Sandunika Heenatigala LE05456
Lagrange's Theorem simply states that the number of elements in any subgroup of a finite group must divide evenly
into the number of elements in the group. Note that the {A, B} subgroup of the Atayun-HOOT! group has 2 elements
while the Atayun-HOOT! group has 4 members. Also we can recall that the subgroups of S3, the permutation group
on 3 objects, that we found cosets of in the previous chapter had either 2 or 3 elements -- 2 and 3 divide evenly into 6.
(Arfur, 1999)

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

Proof - Suppose H has r elements and there are S right cosets as H a , H a ,, H a , ….. H a ,
1 2 3 s

Theorem- Let H be a sub-group of a finite group G, then the right cosets Ha form a partition of G.

Statement- Any coset H a have the same number of elements From the above theorem and statement each coset that
partition G has r elements. So, G has r s elements so, the order of H divides the order of G.

Right coset- Consider a countable subgroup H with elements H a and an element x not in H, then H ax for a=1, 2, 3…
Constitute the eight coset of the subgroup H with respect to x.

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

Lagrange’s theorem is the group possibly will be able to divide by a subgroup, but 13 cannot be divided by 6.
Therefore, according to the Lagrange’s Theorem of group theory, a H group with order 6 cannot be a subgroup of a
group with order 13.

Part 03

1. Check 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 .
𝑆 = ℝ\{−1}
𝑎 ∗ 𝑏 = 𝑎 + 𝑏 + 𝑎𝑏 ; 𝑎, 𝑏 ∈ 𝑆

Closure
Let a, b ∈ G.

52
Dewmi Sandunika Heenatigala LE05456
a ∗ b = b · a, and b · a ∈ G because (G, ·) is a group and therefore satisfies closure.

Associative
Let a, b and c ∈ G. Then,
(a ∗ b) ∗ c = a ∗ (b * c), let (a ∗ b) = x
=(a * b) + c + (a * b)c
= a + b + ab + c + (a + b + ab)c
= a + b + ab + c + ac + bc + abc
a ∗ (b ∗ c) = a + y + ay ; let (b ∗ c) = y
= a + (b * c) + a + (b * c)
= a + (b + c + bc) + a (b + c + bc)
= a + b + c +bc + ab + ac + abc
LHS = RHS

Identity
Let e be the identity for (S, ·). Then for a ∈ S, a ∗ e = e · a = a
When e=0;
a * 0 = a + 0 +a * 0
=a
e is also an identity for (S, ∗).

Inverse
a * a−1= e → a−1* a = e
−1
a = -a/(1+a)
a * a−1= 0
a + a−1+ a.a-1 = 0

a + a−1 (1 + a) = 0
−1
a (1 + a) = -a
−1
a = -a/(1+a)
Considering,
−1
a (1+a) = -a

a−1= -a/(1+a) where a ≠-1


Since, (-1) ∉ S, Inverse property is satisfied
Conclusion: Therefore, 𝑆 = 𝐼𝑅 − {−1} Under the binary operation 𝑎 ∗ 𝑏 = 𝑎 + 𝑏 + 𝑎𝑏 is a group.

53
Dewmi Sandunika Heenatigala LE05456
2.

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

𝑛 ∧ (𝑛 ∧ 2) ⟶ Total number of operation on a set consulting ‘n’ elements (order is n), is given by
2
𝑛 ∧ (𝑛 ∧ 2). n(n ) (n raised to the n square).
2 2

n
(n )
= 3(3 ) = 3(9) = (No. of binary operation)

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

n ; order = 4
Binary operations = 4 4 ²= 4 16

Discuss the group theory concept behind the Rubik’s cube.

Thistlethwaite's algorithm was invented in 1981 by Morwen Thistletwaite, a British professor of mathematics. This
algorithm is based on a mathematical theory, called group theory and on extensive computer searches, which studies
the algebraic structures known as groups. The concept of a group is central to algebra theory and is a powerful formal
method for analyzing abstract and physical systems, and has a high importance in solving the Rubik's cube related to
mathematics problems. (Heit, 2015)

Definition " A group G consists of a set of objects and a binary operator,


*, on those objects satisfying the following four conditions
The operation * is closed, so for any group elements h and g in G, h * g is also in G.

 The operation * is associative, so for any elements f, g, and h, (f * g)* h = f * (g * h).


 There is an identity element e ∈ G such that e * g = g * e = g.
 Every element in G has an inverse g -1 relative to the operation *such that g * g -1 = g -1 * g = e. (Nail El-
Sourani, Sascha Hauke, and Markus Borschbach, 2015)

Thistlethwaite's algorithms divides the problem Divides to four sub problems by using the following four nested
groups Gi:

54
Dewmi Sandunika Heenatigala LE05456
The functional principle of this algorithm is to start with a cube in Gi, and then move some target cubies to their
expected positions by using only moves from nested groups Gi. And repeat this until the Rubik's cube is entirely
solved, meaning that it arrives in G4.

G0 = <L, R, B, U, D>
G1 = < L, R, F, B, U2, D2>
G2 = < L, R, F2, B2, U2, D2>
G3 = < L2, R2, F2, B2, U2, D2, G4= <l>
Thislewaits algorithm is based on a table that shows a transition sequence for each element in the current coset space
Gi+1 Gi to the next one I = I+1.
Dentition "Given a Group G and a subgroup H < G , a coset of H is the set of Hg = hg : h ∈ H ; thus, H < G partitions
G into cosets. The set of all cosets is written h>G. (Nail El-Sourani, 2015)

In general, the Thistlethwaite's algorithms divides the problem into four independent sub problems by using the
following four nested groups Gi: The functional principle of this algorithm is to start with a cube in Gi, and then move
some target cubies to their expected positions by using only moves from nested groups Gi. And repeat this until the
Rubik's cube is entirely solved, meaning that it arrives in G4. In general, every stage of the

Figure 19 Nested Group Gi


Source: (Author Created)

Thislewaits algorithm is based on a table that shows a transition sequence for each element in the current coset space
Gi+1 Gi to the next one I = I+1.
Dentition "Given a Group G and a subgroup H < G , a coset of H is the set of Hg = hg : h ∈ H ; thus, H < G partitions
G into cosets. The set of all cosets is written h>G.
The coset spaces describe the reduced form of the cube, which exact results in the following; the total number of
reachable states is reduced by using moves from some subgroups. In other words, this means that the number of
permitted moves decreases each time the program moves to a new group/stage. Further explanation is described down

55
Dewmi Sandunika Heenatigala LE05456
below where exact orders for each group are calculated. (Nail El-Sourani, Sascha Hauke, and Markus Borschbach,
2015)

Getting from group G0 into group G1


GO represents all the states in the Rubik's cube. This is the number of states reachable from any given state.

Group Positions

G0 4:33 * 1019

Table 12 group G0 into group G1


Source: (Author Created)

In the first stage, all the edge-orientations are fixed. By above Definition, an edge is correctly oriented if the piece can
be brought back to its original position without making use of U and D turns. The edges in the Up or Down-face will
flip the edge orientation on every Up and Down turns.

Getting from group G1 into group G2


The first coset space G1 ∠ G0 contains all the cube states. In this state, all edge-orientations are fixed. This stage has
a factor of 211 that corresponds to the fact that the edges are fixed in this stage.
Group Positions Factor

G1 2.11 ∗ 1016 211 = 2048

Table 13 Group G1 into group G2


Source: (Author Created)

This results that quarter turns of both F and B are now prohibited. The process of transferring the cube from G1 to G2
can be divided in two parts. The rst part is to put the middle edges in the middle layer. Second, the corners are
correctly oriented.

Getting from group G2 into group G3

56
Dewmi Sandunika Heenatigala LE05456
In the second coset space G2∠G1, all the edges arc fixed. The 90 degrees turns of UP and Down faces are prohibited
in this stage. The second stage has a factor that corresponds to the fact that all the corners are correctly oriented and
puts the middle edges in the middle layer.

Group Positions Factor

G2 1.95 ∗ 1010 1,082565

Table 14 group G2 into group G3


Source: (Author Created)
In this stage, the corners are fixed into their natural orbits and quarter turns of both F and B faces are not allowed
anymore. This makes sure that the corner orientation and the middle edges remain fixed. (Morwen B. Thistlethwaite,,
2015)
The third stage puts the corner into their G3- orbits and places all the edge pieces in their correct position, and also
fixes the permutation of the corner and edges. G3- orbits means that the set of positions that are reached by the corner
cubies by only using moves from G3.

Getting form group G3 into group G4


In the third coset space G3∠ G2, using moves from G3 can solve the cube.

Group Positions Factor

G3 6.63 ∗ 105 29400

Table 15 group G3 into group G4


Source: (Author Developed)

In the nal stage, the cube can be solved by using only double moves. This makes sure that the edges and the corners
stays in their slices. In this stage, the remaining edges and corners will be restored to the correct position, until the
cube is entirely solved.
Final Stage

The final stage G4 represents the solved state. This means that there are possible states in group G3 that needs to be
xed, until it can transfer to the solved state. In other words, this means that the permutations of each edge slice and
edge corner are solved in this stage.

57
Dewmi Sandunika Heenatigala LE05456
Group Positions

G4 1

Table 16 Final Stage


Source :(Author Developed)

Finally, the Thitslewaites algorithm is relatively easy to implement. This algorithm has been used worldwide,
especially in Tomas Rokicki's cube programming contest. The main task of this contest is to write a short program that
solves the Rubik's cube. By using the Thitslewaites algorithm combined
with computer searches, the program can quickly give very short solutions. However, these solutions might not be
optimal and may require more moves than other efficient algorithms, such as the kociemba's algorithm. (Joren Heit,
2011)

References
Arfur, D., 1999. dogschool.tripod. [Online]
Available at: http://dogschool.tripod.com/lagrange.html
[Accessed 15 August 2020].

58
Dewmi Sandunika Heenatigala LE05456
Heit, J., 2015. mike.verdone. [Online]
Available at: https://mike.verdone.ca/media/rubiks.pdf
[Accessed 22 August 2020].
Joren Heit, 2011. Building and Solving Rubik's cube in Mathworks. [Online]
Available at: http://joren.ralphdesign.nl/
[Accessed 25 August 2020].
Margaret, R., 2019. techtarget. [Online]
Available at: https://searchsqlserver.techtarget.com/definition/binary-tree#:~:text=A%20binary%20tree%20is
%20a,random%20access%20memory%20(RAM).&text=This%20name%20derives%20from%20the,Branch
%20points%20are%20called%20nodes.
[Accessed 01 August 2020].
Morwen B. Thistlethwaite,, 2015. Thistlethwaite's 52-move algorithm.. [Online]
Available at: http://www.jaapsch.net/puzzles/thistle.htm
[Accessed 25 August 2020].
Nail El-Sourani, Sascha Hauke, and Markus Borschbach, 2015. genetic-programming. [Online]
Available at: http://www.genetic-programming.org/hc2010/7
[Accessed 23 August 2020].
Nail El-Sourani, S. H. a. M. B., 2015. genetic-programming. [Online]
Available at: http://www.genetic-programming.org/hc2010/7
[Accessed 20 August 2020].
sciencedirect.com, 2018. sciencedirect.com. [Online]
Available at: https://www.sciencedirect.com/topics/computer-science/dijkstra-algorithms
[Accessed 02 August 2020].

59
Dewmi Sandunika Heenatigala LE05456
Activity Parts Time Frame
July August September

W W W W W W W W W W W W
1 2 3 4 1 2 3 4 1 2 3 4
1 01

02

03

2 01

02

03

3 01

02

03

04

4 01

02

03

60
Dewmi Sandunika Heenatigala LE05456
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 Eularian and Hamiltonian circuit exists in an


undirected graph.

D2 Construct a proof of the Five colour theorem.

LO3 Investigate solutions to problem situations using the


application of Boolean algebra.

61
Dewmi Sandunika Heenatigala LE05456
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 Prepare a presentation that explains an application of group theory
relevant to your course of study.

62
Dewmi Sandunika Heenatigala LE05456

You might also like