Sie sind auf Seite 1von 64

Discrete Mathematics

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
S,DILAKSON
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


accurately? Y/N

Is the feedback to the student:

Give details:

• Constructive? Y/N

Y/N
• Linked to relevant assessment
criteria?

• Identifying opportunities for


improved performance? Y/N

Y/N
• Agreeing actions?
Does the assessment decision need
amending? Y/N

1
Discrete Mathematics

Assessor signature Date

Internal Verifier signature Date


Programme Leader signature (if
required) Date

2
Confirm action completed
Remedial action taken

Give details:

Assessor signature Date


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

3
S.DILAKSON | 15077
Higher Nationals - Summative Assignment Feedback Form
Student Name/ID S,DILAKSON 15077

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.

4
S.DILAKSON | 15077
Pearson
Higher Nationals in Computing
Unit 18: Discrete Mathematics

5
S.DILAKSON | 15077
General Guidelines

1. A Cover page or title page – You should always attach a title page to your assignment. Use
previous page as your cover sheet and make sure all the details are accurately filled.

2. Attach this brief as the first section of your assignment.

3. All the assignments should be prepared using a word processing software.

4. All the assignments should be printed on A4 sized papers. Use single side printing.

5. Allow 1” for top, bottom, right margins and 1.25” for the left margin of each page.

Word Processing Rules

1. The font size should be 12 point, and should be in the style of Time New Roman.

2. Use 1.5-line spacing. Left justify all paragraphs.

3. Ensure that all the headings are consistent in terms of the font size and font style.

4. Use footer function in the word processor to insert Your Name, Subject, Assignment No,
and Page Number on each page. This is useful if individual sheets become detached for any
reason.

5. Use word processing application spell check and grammar check function to help editing
your assignment.

Important Points:

1. Carefully check the hand in date and the instructions given in 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. Excuses of any 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 PASS criteria will result in a REFERRAL grade.

7. Non-submission of work without valid reasons will lead to an automatic RE FERRAL. You will
then be asked to complete an alternative assignment.

8. 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.

6
S.DILAKSON | 15077
9. 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

7
S.DILAKSON | 15077
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 aspect 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.

Dilakson7@gmail.com
Student’s Signature Date:
(Provide E-mail ID) (Provide Submission Date)

8
S.DILAKSON | 15077
Assignment Brief
Student Name /ID Number S.DILAKSON 15077
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 the module, 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 page.

Unit Learning Outcomes:


LO1 Examine set theory and functions applicable to software engineering

LO2 Analyze 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.

9
S.DILAKSON | 15077
Contents
Activity 01..............................................................................................................................................4
Part 01...............................................................................................................................................4
Part 02...............................................................................................................................................6
Part 03...............................................................................................................................................6
Part 04.............................................................................................................................................12
Activity 02............................................................................................................................................14
Part 01.............................................................................................................................................14
Part 02.............................................................................................................................................17
Part 03.............................................................................................................................................19
Part 04.............................................................................................................................................21
Activity 03............................................................................................................................................27
Part 01.............................................................................................................................................27
Part 02.............................................................................................................................................29
Part 03.............................................................................................................................................31
Part 04.............................................................................................................................................33
Activity 04............................................................................................................................................38
Part 01.............................................................................................................................................38
Part 02.............................................................................................................................................43
Part 03.............................................................................................................................................46
References...........................................................................................................................................54

10
S.DILAKSON | 15077
Figure 1 Venn diagram...........................................................................................................................5
Figure 2De Morgan's Law....................................................................................................................13
Figure 3 Binary Tree.............................................................................................................................15
Figure 4 Full Binary tree.......................................................................................................................16
Figure 5 Complete Binary Tree.............................................................................................................17
Figure 6 Dijkstra's table........................................................................................................................18
Figure 7 Shortest Path.........................................................................................................................19
Figure 8 01...........................................................................................................................................20
Figure 9 02...........................................................................................................................................20
Figure 10 03.........................................................................................................................................21
Figure 11 5C 01....................................................................................................................................22
Figure 12 5C 02....................................................................................................................................23
Figure 13 5C 03....................................................................................................................................23
Figure 14 5C 04....................................................................................................................................24
Figure 15 5C 05....................................................................................................................................24
Figure 16 5C 06....................................................................................................................................25
Figure 17 Graph Theory.......................................................................................................................26
Figure 18 EX01.....................................................................................................................................28
Figure 19 Truth table...........................................................................................................................29
Figure 20 Formula Simplified...............................................................................................................29
Figure 21 Circuit...................................................................................................................................30
Figure 22 NAND circuit........................................................................................................................34
Figure 23 (A+C). (B ̅+C). (B+C)..............................................................................................................35
Figure 24 (B + C+D ̅). (A+B ̅+C+D). (A ̅+B+C). (A + ̅ B+D ) ̅ .........................................................................36
Figure 25 BD + A ̅C + CD ̅ + AB + A ̅ (B) ̅D ̅..............................................................................................36
Figure 26 (B + C+D ̅). (A+B ̅+C+D). (A ̅+B+C). (A + ̅ B+D ) ̅ .........................................................................37
Figure 27 A ̅C + ̅ BC + ̅ A ̅B + AB C ̅ \............................................................................................................38
Figure 28 C ̅+A+B). (C + ̅ A ̅+B ) ̅ . (A ̅+B+C)...............................................................................................38
Figure 29 Binary Operation..................................................................................................................39
Figure 30 1.Operation table.................................................................................................................44
Figure 32 S01.......................................................................................................................................49
Figure 31 S02.......................................................................................................................................49
Figure 34 S03.......................................................................................................................................49
Figure 33 S04.......................................................................................................................................49
Figure 35 S05.......................................................................................................................................50
Figure 36 S06.......................................................................................................................................50
Figure 37 S07.......................................................................................................................................51
Figure 38 S08.......................................................................................................................................52
Figure 39 S09.......................................................................................................................................52
Figure 40 S10.......................................................................................................................................52
Figure 41 S11.......................................................................................................................................53
Figure 42 S12.......................................................................................................................................54

11
S.DILAKSON | 15077
Table 1Process.....................................................................................................................................10
Table 2 Boolean equalization = X.Y.R....................................................................................................31
Table 3 (X ᴧ ~ Y) → Z............................................................................................................................32
Table 4 Boolean Expression.................................................................................................................32
Table 5 Boolean Expression 2..............................................................................................................33
Table 6 NAND.......................................................................................................................................35
Table 7 Truth table...............................................................................................................................36
Table 11Truth table..............................................................................................................................38

12
S.DILAKSON | 15077
Activity 01

Part 01
1. A∪B ?

2. n( B) ?

3. n ( A ∪ B ∪ C )=?

Figure 1 Venn diagram

n ( A )=33

n ( B )=36

n ( C ) =28

13
S.DILAKSON | 15077
n ( A ∪ B ∪ C )=n ( A ) +n ( B ) +n ( C )−n ( A ∩B )−n ( A ∩C )−n ( B∩ C )

n ( A )=10+ a+5+b=33

15 + a + b = 33

a + b = 18  01

15+a+5+ c=36

20+ a+ c =36

a + c = 16  02

13+5+b+ c=28

b + c= 28 – 18

b + c = 10  03

a + b = 18  01

a + c = 16  02

b + c = 10  03

01 – 02  b – c = 2  04

04 + 03  2b = 12

b=6

03  c = 4

02  a = 12

n ( A ∪ B ∪ C )=33+36+28−17−11−9

14
S.DILAKSON | 15077
= 60

Part 02
1. Multiple prime factors

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

2. Cardinalities of each multiset

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

Part 03
1. Determine whether the following functions are invertible or not. If it is invertible,

then find the rule of the inverse ( f −1 ( x ) )

i. f : ℜ→ℜ+ ii . f : ℜ+ → ℜ+
2 1
f ( x )=x f ( x )=
x
iii . f : ℜ+ → ℜ+
2
iv . f:[ −π π
,
2 2 ]→ [−1, 1 ]
15
S.DILAKSON | 15077 f ( x )=x f ( x )=sin x
v. f : [ 0 , π ] →[ −2,2 ]
f ( x )=2 cos x
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,}

2
I. f (x )=x

f ( x ) = 2x

f (-3) = 2*(-3) = (-6) → f 2 * (-6) = (-12)

f (-2) = 2*(-2) = (-4) → f 2 * (-4) = (-8)

f (-1) = 2*(-1) = (-2) → f 2 * (-2) = (-4)

f (0) = 2*(0) = (0) → f 2 * (0) = (0)

f (1) = 2*(1) = (2) → f 2 * (2) = (4)

f (2) = 2*(2) = (4) → f 2 * (4) = (8)

f (3) = 2*(3) = (6) → f 2 * (6) = (12)

1
f ( x )=
II. x

16
S.DILAKSON | 15077
1
f (1 )= =1
1

1
f ( 2)=
2

1 1
f ( )= =2
2 1
2

1
f (3 )=
3

1 1
f ( )= =3
3 1
3

X1, X2 be two different numbers from domain

1
f ( x 1)=
x1  01
1
f ( x 2)=
x2  02
01 – 02 
f ( x 1 )=f ( x 2 )
1 1
=
x1 x2
X1 = X2
1-1 function
1
f ( x )=
x
f ( x )= y
Y= 1/x
X=1/y
X→y→x
Y= 1/x (inverse function)

f −1 ( x ) = 1
x

2
III. f (x )=x

x X2 2
Function( f (x )=x )

17
S.DILAKSON | 15077
1 1 2
f (1)=1 =1
2 4 2
f (2)=2 = 4
4 16 f (4 )=42 = 16
5 25 2
f (5)=5 = 25
25 625 2
f (25)=25 = 625
0.1 0.01 2
f (0.1)=(0 .1) =0 .01
0.0 0.000 2
f (0.01 )=(0.01) =(0.0001 )
1 1
Table 1Process

X1, X2 be two different numbers from domain

f (x 1)=x 2
1 →①
f ( x 2)=x 2
2 →②
①=②
X12= X22
Take the square root
X1 = X2
Then 1 – 1 function
Inverse exit.
2
1
f (x )= () x
f ( x )= y
y = x2
Take the square root
√ y=√ x 2
√ y=x
x=y&y=x

√ x= y (Inverse)

f −1 ( x ) = √ x

I.

18
S.DILAKSON | 15077
f (x )=sin x

f: [− π 2 , π 2 ]→ [−1,1 ]
Sin (-x) = - Sin (x)

−π −π π
f( )=sin( ) ( )
2 2 = - sin 2 = (-1)

π π
f ( )=sin ( )
2 2 =1

−π −π
f( )=sin( )
3 3

(
√π ) =−(
√3 )
= -sin 3 2

π π
f ( )=sin ( )
3 3

(√ ) =( √ )
π 3
=sin 3 2

Sin 0 = 0 onto function

X1, x2 be two different numbers

f (x1) = sin (x1)  01


f (x2) = sin (x2)  02

01 = 02 

Sin (x1) = sin (x2) [−π 2 , π 2 ]


f (x) = sin (x)
y = f (x)
y = sin (x)

19
S.DILAKSON | 15077
Sin -1(y) = x
X→y&y→x

y = sin -1(x)

−1
f ( x ) = sin -1(x1)

20
S.DILAKSON | 15077
iv. f ( x ) = 2cosx

f ( x 1 ) = 2cos(x1)  01
f ( x 2 ) = 2cosx(x2)  02

01 = 02 
X1 = X2
So 1 – 1 function

Y = 2Cosx
y
cos−1
2( )
=x

−1 x
Y = cos
2 ()
x
cos ( )
−1
f-1 (x) =
2

5
f (x )= (x −32)
2. 9
5
f (98.6) = (98.6 – 32)
9
97 0
C

f (x) = y
5
y = (x – 32)
9
9y
+ 32 = x
5
y→ x ,x → y
9x
Y= + 32
5
9x
f-1 (x) = + 32
5

Part 04
1. A=b ↔ A ⊆ B∧B ⊆ A
Definition: Two sets are equal if they contain the same elements. I.e., sets A and B are equal if

∀x[x ∈ A ↔ x ∈ B].

Notation: A = B.

Recall: Sets are unordered and we do not distinguish between repeated elements. So: {1, 1, 1} =
{1}, and {a, b, c} = {b, a, c}.

Definition: A set A is a subset of set B, denoted A ⊆ B, if every element x of A is also an element


of B. That is, A ⊆ B if ∀x(x ∈ A → x ∈ B).

Example: Z ⊆ R. {1, 2} ⊆ {1, 2, 3, 4}

Notation: If set A is not a subset of B, we write A⊆ B.

Example: {1, 2} 6⊆ {1, 3}

2. De Morgan’s Law by the mathematical induction

Figure 2De Morgan's Law

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

For any three finite sets A, B and C;


(i) A U (B ∩ C) = (A U B) ∩ (A U C)

(ii) A ∩ (B U C) = (A ∩ B) U (A ∩ C)

Thus, union and intersection are distributive over intersection and union respectively.

If x is in A union (B intersect C) then x is either in A or in (B and C). Therefore, we have to


consider two cases:

 If x is in A, then x is also in (A union B) as well as in (A union C). Therefore, x is in


(A union B) intersect (A union C).

 If x is in (B and C), then x is in (A union B) because x is in B, and x is also in


(A union C), because x is in C. Hence, again x is in (A union B) intersect (A union C).
This proves that

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

To finish the proof, we have to prove the reverse inequality. So, take x in (A union B) intersect
(A union C). Then x is in (A or B) as well as in (A or C).

 If x is in A, then x is also in A union (B intersect C).

 If x is in B, then it must also be in C. Hence, x is in B intersect C, and therefore it is


in A union (B intersect C). That shows that

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

Activity 02
Part 01

What is Binary tree?

A binary tree is made of nodes, where each node contains a "left" reference, a "right" reference,
and a data element. The topmost node in the tree is called the root.

Every node (excluding a root) in a tree is connected by a directed edge from exactly one other
node. This node is called a parent. On the other hand, each node can be connected to arbitrary
number of nodes, called children. Nodes with no children are called leaves, or external nodes.
Nodes which are not leaves are called internal nodes. Nodes with the same parent are called
siblings.

[ CITATION ada18 \l 1033 ]

Figure 3 Binary Tree

Application of Binary tree


Binary trees are used to represent a nonlinear data structure. There are various forms of Binary
trees. Binary trees play a vital role in a software application. One of the most important
applications of the Binary tree is in the searching algorithm.

A general tree is defined as a nonempty finite set T of elements called nodes such that:

 The tree contains the root element

 The remaining elements of the tree form an ordered collection of zeros and more disjoint
trees T1, T2, T3, T4 …. Tn which are called subtrees.

Examples for binary tees

 A full binary tree which is also called as proper binary tree or 2-tree is a tree in which all
the node other than the leaves has exact two children.

Figure 4 Full Binary tree


 A complete binary tree is a binary tree in which at every level, except possibly the last,
has to be filled and all nodes are as far left as possible.

Figure 5 Complete Binary Tree

 A binary tree can be converted into an extended binary tree by adding new nodes to its
leaf nodes and to the nodes that have only one child. These new nodes are added in such a way
that all the nodes in the resultant tree have either zero or two children. It is also called 2 - tree.

 The threaded Binary tree is the tree which is represented using pointers the empty
subtrees are set to NULL, i.e. 'left' pointer of the node whose left child is empty subtree is
normally set to NULL. These large numbers of pointer sets are used in different ways.
Part 02
1. The Dijkstra’s Algorithm

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.

Dijkstra’s algorithm, published in 1959 and named after its creator Dutch computer scientist
“Edger Dijkstra’s”, can be applied on a weighted graph. The graph can either be directed or
undirected. One stipulation to using the algorithm is that the graph needs to have a nonnegative
weight on every edge.

 Create a set sptSet that keeps track of vertices included in shortest path tree.

Example: whose minimum distance from source is calculated and finalized. Initially, this
set is empty.
 Assign a distance value to all vertices in the input graph. Initialize all distance values as
INFINITE. Assign distance value as 0 for the source vertex so that it is picked first.

 While sptSet doesn’t include all vertices

i. Pick a vertex u which is not there in sptSet and has minimum distance value.

ii. Include u to sptSet.

iii. Update distance value of all adjacent vertices of u. To update the distance values, iterate
through all adjacent vertices. For every adjacent vertex v, if sum of distance value of u
and weight of edge u-v, is less than the distance value of v, then update the distance value
of v.
Figure 6 Dijkstra's table

2. Shortest path

Figure 7 Shortest Path

A to B = 5 units
A to C = 3 units
A to D = 7units
A to E = 7 units.
Part 03

Hamilton

Figure 8 01

a. This is not Eulerian: “E” vertices cannot cover because there is only one edge to
visit “E”.
b. But this have Hamilton circuit.
A → B → D →C → E

Hamilton
Figure 9 02
a. This is not Eulerian: Because one edge is need to require for complete the rout.
b. But this have Hamilton circuit.
A → B →C → D → E

Hamilton
Figure 10 03

a. This is not Eulerian: Because one edge is need to require for complete the rout.
b. But this have Hamilton circuit.
A → B →C → E → D
Part 04

1. The five color theorem

Proof by contradiction.

Let G be the smallest planar graph (in terms of number of vertices) that cannot be colored with
five colors.

Let v be a vertex in G that has the maximum degree. We know that deg(v) < 6 (from the
corollary to Euler’s formula).

Case #1: deg(v) ≤ 4. G-v can be colored with five colors.

There are at most 4 colors that have been used on the neighbors of v. There is at least one color
then available for v.

So G can be colored with five colors, a contradiction.

Figure 11 5C 01
Case #2: deg(v) = 5. G-v can be colored with 5 colors.

If two of the neighbors of v are colored with the same color, then there is a color available for v.

So we may assume that all the vertices that are adjacent to v are colored with colors 1, 2, 3, 4, 5
in the clockwise order.

Consider all the vertices being colored with colors 1 and 3 (and all the edges among them).

Figure 12 5C 02

If this subgraph G is disconnected and v1 and v3 are in different components, then we can switch
the colors 1 and 3 in the component with v1.

Figure 13 5C 03
This will still be a 5-coloring of G-v. Furthermore, v1 is colored with color 3 in this new 5-
coloring and v3 is still colored with color 3. Color 1 would be available for v, a contradiction.

Therefore v1 and v3 must be in the same component in that subgraph, i.e. there is a path from
v1 to v3 such that every vertex on this path is colored with either color 1 or color 3.

Figure 14 5C 04

Now, consider all the vertices being colored with colors 2 and 4 (and all the edges among
them). If v2 and v4 don't lie of the same connected component then we can interchange the
colors in the chain starting at v2 and use leftover color for v.

Figure 15 5C 05
If they do lie on the same connected component then there is a path from v 2 to v4 such that every
vertex on that path has either color 2 or color 4.

Figure 16 5C 06

This means that there must be two edges that cross each other. This contradicts the planarity of
the graph and hence concludes the proof.

[ CITATION ath18 \l 1033 ]

2. Graph theory.
A path finding algorithm for transit network is proposed to handle the special characteristics of
transit networks such as city emergency handling and drive guiding system, in where the optimal
paths have to be found. As the traffic condition among a city changes from time to time and there
are usually a huge amounts of requests occur at any moment, it needs to quickly find the best
path. Therefore, the efficiency of the algorithm is very important. The algorithm takes into
account the overall level of services and service schedule on a route to determine the shortest
path and transfer points. There are several methods for pathfinding: In Dijkstra’s algorithm the
input of the algorithm consists of a weighted directed graph G and a source vertexes in Graph.
Let‘s denote the set of all vertices in the graph G vs V. Each edge of the graph is an ordered pair
of vertices (u, v) representing a connection from vertex u to vertex v. The set of all edges is
denoted E. Weights of edges are given by a weight function w: E → [0, ∞]; therefore w (u, v) is
the non‐negative cost of moving from vertex u to vertex v. The cost of an edge can be thought of
as the distance between those two vertices. The cost of a path between two vertices is the sum of
costs of the edges in that path. For a given pair of vertices s and t in V, the algorithm finds the
path from s to t with lowest cost (i.e. the shortest path). It can also be used for finding costs of
shortest paths from a single vertex s to all other vertices in the graph
[ CITATION Boo18 \l 1033 ]

An ordered pair of sets G = (V, E) where V is a nonempty finite set and E consisting of 2‐element
subsets of elements of V is called a graph. It is denoted by G = (V, E). V is called vertex and edge
set respectively. The elements in V and E are called vertices and edges respectively. If elements
of E are ordered pairs, then G is called a directed graph or digraph. The vertices between which
an edge exists are called endpoints of the edge. An edge whose endpoints are the same is called a
loop. A graph without loops is called a simple graph. 2.1 Dijkstra’s algorithm for a given source
vertex (node) in the graph, the algorithm finds the path with lowest cost (i.e. the shortest path)
between that vertex and every other vertex. It can also be used for finding the shortest cost path
from one vertex to a destination vertex by stopping the algorithm is determined by the shortest
path to the destination node. For example, if the vertices of the graph represent the city and are
the costs of running paths edge distances between pairs of cities connected directly to the road,
Dijkstra’s algorithm can be used to find the shortest route between one city and all other cities.
As a result, the shortest path algorithm is widely used routing protocols in a network, in
particular the IS‐IS and Open Shortest Path First. (Neumann, 2014) Short characteristic of
Dijkstra’s algorithm [2].  The input of the algorithm consists of a weighted directed graph G
and a source vertex s in G  Denote V as the set of all vertices in the graph G.  Each edge of the
graph is an ordered pair of vertices (u, v)  This representing a connection from vertex u to
vertex v  The set of all edges is denoted E  Weights of edges are given by a weight function w:
E → [0, ∞)  Therefore w(u, v) is the cost of moving directly from vertex u to vertex v  The
cost of an edge can be thought of as (a generalization of) the distance between those two vertices
 The cost of a path between two vertices is the sum of costs of the edges in that path  For a
given pair of vertices s and t in V, the algorithm finds the path from s to t with lowest cost (i.e.
the shortest path)  It can also be used for finding costs of shortest paths from a single vertex s to
all other vertices in the graph.

Figure 17 Graph Theory


3. Incompatible Chemical storing
Activity 03

Part 01
Exapmle 01

Figure 18 EX01

An example model with the corresponding Boolean rules, truth table and model simulation
results.
[A] The example model consists of 3 nodes with one activation edge and one partial inhibition
edge. The weights of both edges are expressed as selection probability next to (i) the arrow.
[B] Two representative Boolean rules were assigned with the corresponding selection
probabilities (c j) to represent the example model in PBN format.
[C] The truth table of the example model demonstrates the state values according to different
inputs. Once both inputs (N1 and N2) are active, the output (N3) has a probability of being ON at
0.6 and of being OFF at 0.4 according to the selection probability of Boolean rules.
[D] Three separated Monte-Carlo simulations were performed on an instantaneously random
PBN of the example model in the state values of N3 are shown on the y-axis as a function of
time. The mean of the N3 state values over 20 time steps is given on the upper right corner of
each run. doi:10.1371/journal.pone.0098001.g001
Example 02
Coffee, Tea, or Milk?
Here is a machine to dispense coffee, tea, and milk. Design the machine so that it has a button
(input line) for each choice and so that a customer can have at most one of the three choices.
Diagram the circuit to insure that the “at most one” condition is met.
Solution
Step 1
Specify the input and output variables and the two states of each.
Input
c = coffee button (1 = pushed, 0 = not pushed)
t = tea button (1 = pushed, 0 = not pushed)
m = milk button (1 = pushed, 0 = not pushed)
Output x = choice verifier (1 = acceptable input–deliver the choice selected; 0 = unacceptable
input–light an error light)
Step 2
Construct the truth table giving the output desired for each input. X is 1 when exactly one of c, t,
and m is 1.

Figure 19 Truth table

Step 3 Write a Boolean expression with a term for each 1 output row of the table.
ct'm' + c'tm' + c't'm
Step 4 Try to simplify the formula.

Figure 20 Formula Simplified

The map shows that the expression cannot be simplified.


Step 5 Draw the circuit

Figure 21 Circuit

Part 02
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.''
X: - The driver is present
Y: -The driver has buckled up
Z: - The ignition switch is on
R: - The warning light should turn ON

Xᴧ YᴧZ=R

Boolean equalization = X.Y.R

X Y Z Yᴧ Xᴧ
X X Y
ᴧZ=R
T T T F F F
T T F F F F
T F T T T T
T F F T T F
F T T F F F
F T F F F F
F F T T F F
F F F T F F
Table 2 Boolean equalization = X.Y.R

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

X: - It rains
Y: - you open your umbrella
Z: - you will get wet
(X ᴧ Y) → Z

X Y Z Xᴧ Xᴧ
Y Y
Y →Z

T T T F F T
T T F F F T
T F T T T T
T F F T T F
F T T F F T
F T F F F T
F F T T F T
F F F T F T
Table 3 (X ᴧ ~ Y) → Z

2. Produce truth tables for given Boolean expressions.

i. Ā B̄ C +A B̄ C̄+ ABC + Ā B C̄
A B C Ā B̄ C̄ Ā B̄ C A B̄ C̄ ABC Ā B C̄ Ā B̄ C +A B̄ C̄+ ABC + Ā B C̄
0 0 0 1 1 1 1 1 0 1 0
0 0 1 1 1 0 1 1 1 1 1
0 1 0 1 0 1 1 1 1 1 1
0 1 1 1 0 0 1 0 1 1 0
1 0 0 0 1 1 1 1 1 1 1
1 0 1 0 1 0 1 1 1 0 0
1 1 0 0 0 1 0 1 1 1 0
1 1 1 0 0 0 1 1 1 1 1
Table 4 Boolean Expression

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


A B C Ā B̄ C̄ ( A+ B̄+C) ( A + B+C ) ( Ā +B+ C̄ ) ( A + B̄+C )( A +B+C )( Ā +B+ C̄ )
0 0 0 1 1 1 1 0 1 0
0 0 1 1 1 0 1 1 1 1
0 1 0 1 0 1 0 1 1 0
0 1 1 1 0 0 1 1 1 1
1 0 0 0 1 1 1 1 1 1
1 0 1 0 1 0 1 1 0 0
1 1 0 0 0 1 1 1 1 1
1 1 1 0 0 0 1 1 1 1
Table 5 Boolean Expression 2

Part 03

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

1. A ( A+B)+B( B+C)+C(C+A )
¿ AA + AB+ BB+ BC +CC +CA( Distributive Law)
¿ A + AB+ B+ BC+C +CA(Idempotent Law )
¿ A + B ( A +1 )+ C ( B +1 )+ CA( Distributive Law )
¿ B+ C+ A ( 1+C ) ( Annulment Law)

¿ A + B+C( Annulment Law )

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

¿ AB+ AC + BB+ BC + AC + AA +BC + B A( Distributive Law)


¿ AB+ AC + 0+ BC + AC + 0+ BC + B A (Complement Law)
¿ AB+ AC+C ( B+ B ) + B A (Distributive Law)
¿ B ( A+ A )+ AC + C(Complement Law∧Distributive Law)
¿ B+ C ( A +1 ) (Complement Law )
¿ B+ C( Annulment Law)

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


¿ AAC + AA C+ BAC + BA C+ AB+ B( Distributive Law)
¿ A ( C+ C ) +BA ( C + C )+ ( A+ 1 ) B(Distributive Law)
¿ A + BA + B( Distributive Law)
¿ A + AB+ B+ AB(Idempotent Law)
¿ A ( 1+ B )+ B ( 1+ A ) ( Annulment Law)
¿ A + B(Complement Law )
4. Ā ( A+B )+(B+ A )( A+ B̄ )
¿ A A + AB+ BA+ B B+ AA+ A B(Distributive Law)
¿ AB+ AB+ A+ A B(Idempotent Law )
¿ ( A + A ) B+ A ( 1+ B ) (Complement Law)
¿ B+ A (Complement Law )
Part 04
4. K – Map

ⅰ. Using given K-Maps / in this answers;

 F is the result of the function.


 (for part ⅲ ) I selected SOP form output and for all circuits I used NAND gates.
(a)

C 0 1
AB
00 0 0
01 0 1
11 0 1
10 1 `0
Table 6 NAND

ⅰ. According to above k-map;


SOP form (red marked) – BC + A B́ Ć
A B C

B +C
POS form (Blue marked) – )
( A+C).( B́+C) . ¿
Figure 22 NAND circuit
A B C

Figure 23 (A+C). (B +
̅ C). (B+C)
Table
AB7 Truth 00
table 01 11 10
CD
00 1 0 1 0
01 0 1 1 0
11 1 1 1 0
ⅰ. 10 1 1 1 1 According to above k-map;
SOP form (blue marked) –
BD + Á C+C D́+ AB+ Á B́ D́
POS form (black marked) – ( B+C+ D́).( A + B́+C+ D).( Á+ B+C) .( Á+ B+ D́)

A B C D

Figure 24 (B + C+D ) ̅ . (A+B +


̅ C+D). (A ̅+B+C). (A +
̅ B+D ) ̅
ⅱ. SOP form; F = BD + Á C+ C D́+ AB+ Á B́ D́

A B C

Figure 25 BD + A C
̅ + CD ̅ + AB + A ̅ (B) D
̅ ̅

POS form; = ( B+C+ D́) .( A + B́+C+ D).( Á+ B+C) .( Á+ B+ D́)

A B C D

Figure 26 (B + C+D ) ̅ . (A+B +


̅ C+D). (A ̅+B+C). (A +
̅ B+D ) ̅
ⅲ.

C 0 1
AB
00 1 0

01 1 1

11 1 0

10 0 1
Table 8Truth table

ⅰ. According to above;
SOP form (blue marked) = Á Ć+ B Ć+ Á B+ A B́ C
POS form (Black marked) = Ć + A + B ¿ .( Ć+ Á+ B́).( Á+ B+C)
¿

ⅰ. SOP form; F = Á Ć+ B Ć+ Á B+ A B́ C \

A B C D

Figure 27 A ̅C +
̅ BC +
̅ A ̅B + AB ̅C\
ⅱ. POS form; F = Ć + A + B ¿ .( Ć+ Á+ B́).( Á+ B+C)
¿

A B C

Figure 28 C +
̅ A+B). (C +
̅ A ̅+B ) ̅ . (A ̅+B+C)

Activity 04

Part 01
1 Different binary operations
Binary Operation
Just as we get a number when two numbers are either added or subtracted or multiplied or are
divided. The binary operations associate any two elements of a set. The resultant of the two are in
the same set. Binary operations on a set are calculations that combine two elements of the set (called
operands) to produce another element of the same 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.

Figure 29 Binary Operation

Addition, subtraction, multiplication, division, exponential is some of the binary operations.

Properties of Binary Operation

 Closure property: An operation * on a non-empty set A has closure property, if a ∈ A, b ∈


A ⇒ a * b ∈ A.

 Additions are the binary operations on each of the sets of Natural numbers (N), Integer
(Z), Rational numbers (Q), Real Numbers(R), Complex number(C).

The additions on the set of all irrational numbers are not the binary operations.
 Multiplication is a binary operation on each of the sets of Natural numbers (N), Integer
(Z), Rational numbers (Q), Real Numbers(R), Complex number(C).

Multiplication on the set of all irrational numbers is not a binary operation.

 Subtraction is a binary operation on each of the sets of Integer (Z), Rational numbers (Q),
Real Numbers(R), Complex number(C).

Subtraction is not a binary operation on the set of Natural numbers (N).

 A division is not a binary operation on the set of Natural numbers (N), integer (Z),
Rational numbers (Q), Real Numbers(R), Complex number(C).

 Exponential operation (x, y) → xy is a binary operation on the set of Natural numbers (N)
and not on the set of Integers (Z).
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.

 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 top18 \l 1033 ]

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

i. Multiplication and Division on se of Natural numbers

As Properties of Binary Operation, Multiplication is a binary operation on each of the


sets of Natural numbers (N), Integer (Z), Rational numbers (Q), Real Numbers(R),
Complex number(C).

A division is not a binary operation on the set of Natural numbers (N), integer (Z),
Rational numbers (Q), Real Numbers(R), Complex number(C).

Let a, b ∈ N

Case 1: Binary operation * = Multiplication (x)

:- N x N → N given by (a, b) → (a x b) ∈ N (as 3 * 2


= 2 * 3)

= Multiplication is a binary operation on Natural numbers ( N ).

Let a, b ∈ N

Case 2: Binary operation * = Division (➗)

:- N x N → N given by (a, b) → (a / b) ∉ N (as 5 / 3


∉ N )
= Division is not a binary operation on Natural numbers ( N ).

ii. Subtraction and Addition on Set of Natural numbers

As Properties of Binary Operation Subtraction is not a binary operation on the set of


Natural numbers (N).

Additions are the binary operations on each of the sets of Natural numbers (N), Integer
(Z), Rational numbers (Q), Real Numbers(R), Complex number(C).
Let a, b ∈ N

Case 1: Binary operation * = Subtraction (-)

:- N x N → N given by (a, b) → (a - b) ∉ N (as 5 – 3


∈ N but 3 – 5 ∉ N )

= Subtraction is not a binary operation on Natural numbers ( N ).

Let a, b ∈ N

Case 2: Binary operation * = Addition (+)

:- N x N → N given by (a, b) → (a + b) ∈ N (as 3 + 2


= 2 + 3)

= Addition is a binary operation on Natural numbers ( N ).

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

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).

Let x, y ∈ N
Case 1: Binary operation * on Natural numbers ( N )

:- N x N → N given by ( x , y ) → (x, y)→x y


∈ N
(as 32 ∈ N and 23 ∈ N )

= Exponential operation: ( x , y ) → x y
on Set of Natural numbers ( N ) is a
binary operation.

Let x, y ∈ Z

Case 1: Binary operation * on Integers ( Z )

:- Z x Z → Z given by ( x , y ) → (x, y)→x y


∈ Z
(as -32 ∈ Z but 2-3 ∉ Z )

= Exponential operation: ( x , y ) → x y
on Set of Integers ( Z ) is not a binary
operation.

Part 02
1. Operation table
Figure 30 1.Operation table

2.

I. State the Lagrange’s theorem of group theory.

Lagrange's theorem, states the order of a subgroup H of group G divides the order of G.
[ CITATION dog18 \l 1033 ]
II. For a subgroup H of a group G, prove the Lagrange’s theorem.

Before proving Lagrange’s Theorem, we state and prove three lemmas.

 Lemma: If H is a finite subgroup of a group G and H contains n elements then any right
cosset of H contains n elements.

Proof: For any element x of G, Hx = {h • x | h is in H} defines a right coset of H. By the


cancellation law each h in H will give a different product when multiplied on the left onto x.
Thus each element of H will create a corresponding unique element of Hx. Thus Hx will have the
same number of elements as H.
 Lemma: Two right cossets of a subgroup H of a group G are either identical or disjoint.

Proof: Suppose Hx and Hy have an element in common. Then for some elements h1 and h2 of H

h1 • x = h2 • y

This implies that x = h1-1 • h2 • y. Since H is closed this means there is some element h3 (which
equals h1-1 • h2) of H such that x = h3 • y. This means that every element of Hx can be written as
an element of Hy by the correspondence

h • x = (h • h3) • y

For every h in H. We have shown that if Hx and Hy have a single element in common then every
element of Hx is in Hy. By a symmetrical argument it follows that every element of Hyis
in Hx and therefore the "two" cossets must be the same cosset.

Since every element g of G is in some cosset (namely it's in Hg since e, the identity element is
in H) the elements of G can be distributed among H and its right cossets without duplication.
If k is the number of right cossets and n is the number of elements in each cosset then |G| = kn.

Alternate Proof: In the last chapter we showed that a • b-1 being an element of H was equivalent
to a & b being in the same right cosset of H. We can use this Idea establish Lagrange's Theorem.

Define a relation on G with a ~ b if and only if a • b-1 is in H. Lemma: The relation a ~ b is an


equivalence relation.

Proof: We need to establish the three properties of an equivalence relation -- reflexive,


symmetrical and transitive.

(1) Reflexive: Since a • a-1 = e and e is in H it follows that for any a in G

a~a

(2) Symmetrical: If a ~ b then a • b-1 is in H. Then the inverse of a • b-1 is in H. But the inverse
of a • b-1 is b • a-1 so

b~a

(3) Transitive: If a ~ b and b ~ c then both a • b-1 and b • c-1 are in H.

Therefore their product (a • b-1) • (b • c-1) is in H. But the product is simply a • c-1. Thus

a~c

And we have shown that the relation is an equivalence relation.


It remains to show that the (disjoint) equivalence classes each have as many elements as H.

 Lemma: The number of elements in each equivalence class is the same as the number of
elements in H.

Proof: For any a in G the elements of the equivalence class containing a are exactly the solutions
of the equation

a • x-1 = h

Where h is any element of H. By the cancellation law each member h of H will give a different
solution. Thus the equivalence classes have the same number of elements as H.

One of the imediate results of Lagrange's Theorem is that a group with a prime number of
members has no nontrivial subgroups. (Why?)

Definition: if H is a subgroup of G then the number of left cossets of H is called the index
of Hin G and is symbolized by (G:H). From our development of Lagrange's theorem we know
that

|G| = |H| (G:H)

Converse of Lagrange's Theorem One of the most interesting questions in group theory deals
with considering the converse of Lagrange's theorem. That is if a number n divides the order of
group G does that mean that G must have a subgroup of order n? The answer is no in general but
the special cases where it does work out are many and interesting. They are dealt with in detail in
the Sylow Theorems which we will treat later. As a tidbit we look at the following

Theorem: If the order of a group G is divisible by 2 then G has a subgroup of two elements.

Proof: The proof is left as an exercise for the student. [Hint: If an element other than the identity
of a group is its own inverse then that element together with the identity forms a subgroup of two
elements (Prove!). The identity is its own inverse. If we remove the identity from a group of even
order must at least one of the remaining elements be its own inverse?]

[ CITATION dog181 \l 1033 ]

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.

No.

According to the theory, that subgroup order divides group order. But 6 does not divide 13, So a
group of order 13 cannot have a subgroup of order 6. Subgroups can only have order 1 or 13
(trivial subgroups) as 13 is a prime.
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 .

For Check whether the set S=R−{−1 } is a group under the binary operation ‘*’defined
as a∗b=a+b+ ab for any two elements a , b ∈ S ; 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 a , b ∈ R−{−1 } .
There for the set S=R−{−1 } is a group under the binary operation ‘*’defined as
a∗b=a+b+ ab for any two elements a , b ∈ S .

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

The order of a finite group G is the number of elements in G , denoted by ∣G ∣ .


According to this statement Order of the group shows that how many operations on the set.

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

Assume that A is the set and n (A) = 4


A = {e1, e2, e3, e4}

A binary operation on A is a function defined from A * A to A.

n (A * A) = 42 = 16 → a

n (A) = 4 →b

∵ Number of binary operations in A;

= ba

= 416 = 4,294,967,296

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


Behind the Rubik’s cube, it has a group theory concept. Let’s talk about what kind of groups in
the Rubik’s cube.

a) Left to Right or opposite; it have 9 parts in one raw but at one time all of 9 parts
circular as a one part and it can circular 4 ways. There for in this session there is only
4 elements in Left to right or opposite group.
b) Up down; as below describe even have 9 parts, there are only 4 elements in this
group.
c) Upside Left to Right or Right to Left; in this also there are only 4 elements in this
group also.

But in this a) can separately circular but cannot do with b) and c). Then for find the
number of operations; we have to find one group operation and it need to multiple by
3 an again by 3.

Assume that A is the set and n (A) = 4

A binary operation on A is a function defined from A * A to A.

n (A * A) = 42 = 16 → a

n (A) = 4 →b

∵ Number of binary operations in A;

= ba

= 416 = 4,294,967,296

Then number of operations are: 4,294,967,296 * 3 * 3 = 38,654,705,664

Part 04
Figure 32 S01

Figure 31 S02
Figure 34 S03

Figure 33 S04
Figure 35 S05

Figure 36 S06
Figure 37 S07

Figure 38 S08
Figure 39 S09

Figure 40 S10
Figure 41 S11

Figure 42 S12
References
adamchik, 2018. cs.cmu. [Online]
Available at: https://www.cs.cmu.edu/~adamchik/15-121/lectures/Trees/trees.html
[Accessed 2019].

athens, 2018. cgm.cs.mcgill. [Online]


Available at: http://cgm.cs.mcgill.ca/~athens/cs507/Projects/2003/MatthewWahab/5color.html
[Accessed 2019].

Boominathan, n.d. [Online]


Available at: file:///C:/Users/Dilakshon/Downloads/Routing%20Planning%20As%20An%20Application
%20Of%20Graph%20Theory%20with%20Fuzzy%20Logic.pdf
[Accessed 2019 2018].

dogschool, 2018. dogschool.tripod. [Online]


Available at: http://dogschool.tripod.com/lagrange.html
[Accessed 2019].

dogschool, 2018. dogschool.tripod. [Online]


Available at: http://dogschool.tripod.com/lagrange.html
[Accessed 2019].

toppr, 2018. toppr. [Online]


Available at: https://www.toppr.com/guides/maths/relations-and-functions/binary-operations/
[Accessed 2019].

Das könnte Ihnen auch gefallen