Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

PROGRAM TITLE: ASSIGNMENT 1- Set theory and functions- Graph theory

UNIT TITLE: Unit 18: Discrete Maths


ASSIGNMENT NUMBER: 1
ASSIGNMENT NAME: Discrete Maths
SUBMISSION DATE: 08/02/2024
DATE RECEIVED: 08/02/2024
TUTORIAL LECTURER: Luu Thi Huong Giang
WORD COUNT: 3792

STUDENT NAME: Tạ Hải Anh


STUDENT ID: BKC13165
MOBILE NUMBER: 0867876627
Summative Feedback:

Internal verification:
Contents
1. Set theory and functions. ...........................................................................................................................5
I. Set theory ...............................................................................................................................................5
1.Definition of sets, basic concepts .......................................................................................................5
2. Operations in sets ..............................................................................................................................5
3. The force of gathering .......................................................................................................................5
4. Theorems of sets................................................................................................................................6
5. Definition of multiset, characteristics, notation, and cardinality of multiset. ....................................6
II. Function theory .....................................................................................................................................6
1. function definition .............................................................................................................................6
2. Definition of single light, double light, full light. .............................................................................6
3. Inverse function. ................................................................................................................................6
2. Graph theory ..............................................................................................................................................6
II. Graph theory. ............................................................................................................................................6
1. Graph definition. ...................................................................................................................................6
2. Types of graphs, how to classify and represent graphs on computers. .................................................6
3. Define binary tree characteristics. .........................................................................................................6
4. Defines the spanning tree of the graph. .................................................................................................7
5. Euler line, Hamilton cycle, 2 isomorphic graphs. .................................................................................7
5.1. Euler's 1-line. ..................................................................................................................................7
5.2. Hamiltonian cycle...........................................................................................................................7
5.3. Two isomorphic graphs. .................................................................................................................7
6. Algorithms: find Dijkstra's shortest path, find Prim's smallest spanning tree. ......................................7
6.1. Dijkstra's algorithm. .......................................................................................................................7
6.2. Prim's smallest frame tree...............................................................................................................8
3. Examine set theory and functions applicable to software engineering .....................................................8
4. Analyse mathematical structures of objects using graph theory ...............................................................8
1. Set theory and functions.
I. Set theory
1.Definition of sets, basic concepts
- A set is a collection of objects, called elements, in which the order is not important and an
object cannot appear twice in the same set
- Example 1.1
Explicit definitions of sets, that is, where each element is listed, are:
A = {a, b, c}
B = {3, 4, 6, 7, 8, 9}
C = {Linda, Raka, Sue, Joe, Nigel, Mary}
a ∈ A means ‘a is an element of A’ or ‘a belongs to A’; therefore in the above examples:
3∈B
Linda ∈ C
- A set is a collection of objects, called elements, in which the order is not important and an
object cannot appear twice in the same set
- The universal set is the set of all objects we are interested in and will depend on the
problem under consideration. It is represented by E.
The empty set (or null set) is the set with no elements. It is represented by ∅ or { }.
- Sets can be represented diagrammatically – generally as circular shapes. The universal set
is represented as a rectangle. These are called Venn diagrams
- Sets can be represented diagrammatically – generally as circular shapes. The universal set
is represented as a rectangle. These are called Venn diagrams
2. Operations in sets
3. The force of gathering
The cardinality of a set is a concept in mathematics expressed by the number of elements in
that set. This is also known as "cardinality" (usually denoted |A|) and is often used to
measure the size or number of elements of a set.
For example, if A is a set of natural numbers from 1 to 5, then the cardinality of A (denoted
|A|) will be 5, because there are 5 elements in that set.
4. Theorems of sets.

5. Definition of multiset, characteristics, notation, and cardinality of multiset.


- Multiset is a concept in mathematics, especially in set theory, which is similar to a regular
set but can contain more than one copy of each element. This means that an element can
appear multiple times in a multi-set, as opposed to a regular set where each element appears
only once.
- Characteristics of multiple sets include:
+ Duplicate elements: Elements in a multi-set can appear multiple times.
+ Order is not important: The order of elements is not important in the multiset.
+ This means that {1, 2, 3} and {3, 2, 1} are considered the same multiset.
II. Function theory

1. function definition
- A function is a rule or law that determines the relationship between elements of two
different sets such that each element of the first set is uniquely mapped to an element of the
second set. two. Simply put, a function is a rule that assigns each of its (independent) input
values to a corresponding (dependent) output value.
2. Definition of single light, double light, full light.
3. Inverse function.

2. Graph theory

II. Graph theory.


1. Graph definition.
- Definition: A graph is understood as a set of two finite sets: a set of vertices and a set of
edges connecting these vertices together.
- Notation: graph is G (Graph), set of vertices is V (vertex), set of edges is E (edge).
2. Types of graphs, how to classify and represent graphs on computers.
- How to classify:
+ Classify by set of vertices and edges
Finite graph: When both V and E are finite sets
Infinite graph: When V or E is an infinite set
3. Define binary tree characteristics.
4. Defines the spanning tree of the graph.
- Definition: Let the graph G = (V, E) be a connected undirected graph. A subgraph G' of G
is called a spanning tree (or spanning tree) of G if:
+ G' is a tree
+ G' contains all vertices of the tree
5. Euler line, Hamilton cycle, 2 isomorphic graphs.
5.1. Euler's 1-line.
- Concept: Given an undirected graph G = (V, E) with n vertices, m edges. The Euler line in
G is a sequence containing all m edges of the graph and has the form P1, e1, P2, e2, ..., Pm, em,
Pm+1 such that edge ei is the edge connecting two vertices Pi and Pi + 1.
-If P1 = Pm+1, we call it a closed Euler line
- If P1 ≠ Pm+1 we call it an open Euler line
5.2. Hamiltonian cycle.
- Concept: Given graph G = (V, E). A cycle C is called a Hamilton cycle if it passes through
all vertices of the graph.
+ If there exists a path H with the above properties, then H is called a Hamilton path.
+ The problem of finding Hamiltonian cycles in graphs was raised by British mathematician
Hamilton in 1858.

5.3. Two isomorphic graphs.


- Definition: two graphs G1 = (V1, E1) and G2 = (V2, E2) are said to be isomorphic to each
other if there exists a bijection f : V1 → V2 such that f preserves the adjacency relationship
between pairs of vertices, i.e.: (u, v)  E1  (f(u), f(v))  E2.
+ Then: f is called an isomorphism.
- Two isomorphic simple graphs will have a one-to-one correspondence between the vertices
of the two graphs preserving the adjacency relationship.
- Comment:
6. Algorithms: find Dijkstra's shortest path, find Prim's smallest spanning tree.

6.1. Dijkstra's algorithm.


- Dijkstra is an algorithm used to find the shortest path from a vertex to all other vertices in a
graph with non-negative weights. This algorithm was developed by mathematician and
computer scientist Edsger W. Dijkstra.
6.2. Prim's smallest frame tree.
- Definition: The smallest spanning tree in a connected, weighted graph is a spanning tree
with the smallest total weight on its edges.

3. Examine set theory and functions applicable to software engineering


Part 1:
1. Let A and B be two non-empty finite sets. If cardinality of the sets A, B, and A ∩ B are
86, 43 and 11 respectively, find the cardinality of the set A ∪ B.
- Set |A| is the number of elements in the set A, |B| is the number of elements in set B, and |A
∩ B| is the number of common elements of A and B. Use the formula for the total number of
elements of the union of two sets:

4. Analyse mathematical structures of objects using graph theory


Part 5: Discuss using two examples on binary trees both quantitatively and qualitatively.

You might also like