Discrete Math
Discrete Math
AND
MATRIX STRUCTURE
GROUP 4 PRESENTATION
LIST STRUCTURE
WHAT IS LIST STRUCTURE?
A list structure, also known as a linear data structure, is a way of organizing and storing data elements
sequentially. It is a collection of elements where each element contains a value and a reference (or link)
to the next element in the sequence. Lists are flexible and allow for dynamic resizing, making them
useful in various programming scenarios.
ARRAY LIST
SINGLY LINKED LIST
A singly linked list is a way to organize data
where each element, called a node, contains
both the actual data and a reference to the
next node in the list. It's like a chain of
connected nodes, allowing for efficient Node 1 Node 2 Node 3
insertion and deletion, but slower access to +-------+ +-------+ +-------+
specific elements compared to an array. | Data 1| --> | Data 2| --> | Data 3| --> NULL
+-------+ +-------+ +-------+
The structure of a singly linked list consists of
nodes connected in a linear manner. Each
node contains two main parts: the data or
value it holds and a reference or pointer to the
next node in the list. The last node in the list
points to NULL or nothing, indicating the end
of the list.
OPERATIONS OF SINGLY LINKED LIST
Array Lists provide efficient random access, dynamic resizing, and efficient
traversal. However, they have drawbacks such as costly insertions and
deletions, fixed capacity, and potentially inefficient removals. The choice to use
an ArrayList depends on the specific requirements of the application,
considering the trade-offs between efficient element access and modification
operations.
LINKED LIST ARRAY LIST
MATRIX STRUCTURE
200
The organization and representation of
X= 030
mathematical objects and operations 001
using matrices. Matrices are rectangular
arrays of numbers or symbols arranged in
rows and columns.. Row
2 0 0
Different Type of Matrix
-Square matrix Column 0 3 0
- Diagonal matrix 0 0 1
- Identity matrix
- Symmetric matrix
- Sparse matrix
X 3,1 = 0
OPERATION ON MATRIX STRUCTURE
Addition and Subtraction: In matrix addition and subtraction, matrices of the same size
are combined by adding or subtracting their corresponding elements. The resulting
matrix has the same dimensions as the original matrices.
ADDITION SUBTRACTION
1 2 3 5
3 4 2 4
+ -
5 6 1 2
7 8 3 1
= =
6 8 2 3
10 12 -1 3
OPERATION ON MATRIX STRUCTURE
Multiplication:
MULTIPLICATION
=
1 6
6 16
OPERATION ON MATRIX STRUCTURE
=
OPERATION ON MATRIX STRUCTURE
1 2
1 2
1*4= 4
3 4 A=
3 4 2*3= 6
4-6=2
SIMPLIFY
4 -2 4/2 -2/2 2 -1
1
A= =
2 -3 1 -3/2 1/2 -3/2 1/2
TYPES OF MATRIX STRUCTURE
SQUARE MATRIX
A square matrix is a type of matrix where the number of rows is equal to the number of columns. In other
words, a square matrix has the same number of rows as it has columns. The dimensions of a square matrix
are typically denoted as n x n, where n represents the number of rows (which is also equal to the number of
columns).
4
1 2 3 4
1 2 5 6 7 8
4
9 10 11 12
3 4
13 14 15 16
In this example, Matrix A is a 3x3 square matrix because it has 3 rows and 3 columns. Each
element in the matrix is identified by its row and column position. Square matrices are
commonly used in various mathematical operations, such as matrix multiplication, finding
determinants, and calculating matrix inverses.
TYPES OF MATRIX STRUCTURE
DIAGONAL MATRIX
A diagonal matrix is a special type of square matrix in which all the elements outside the
main diagonal (the diagonal from the top left to the bottom right) are zero. The main
diagonal elements can be any non-zero values. In other words, a diagonal matrix is a
matrix where the elements are non-zero only on the main diagonal, and all other elements
are zero.
4
1 0 0
0 6 0
4 0 0 1
1
NOTE: A diagonal matrix must be a square matrix, meaning it has an equal number of rows
and columns.
TYPES OF MATRIX STRUCTURE
IDENTITY MATRIX
An identity matrix is a special type of square matrix in which all the elements on the main
diagonal (from the top left to the bottom right) are equal to 1, and all the elements outside
the main diagonal are zero. The identity matrix is typically denoted by the symbol "I" or
"Iₙ," where "n" represents the dimensions of the matrix.
1 0 0
4 0 1 0
0 0 1
0 0 0
NOTE: In this example, all the elements on the main diagonal (1, 1, 1) are equal to 1, and
all other elements are zero.
TYPES OF MATRIX STRUCTURE
SYMMETRIC MATRIX
A symmetric matrix is a special type of matrix that exhibits symmetry with respect to its
main diagonal.
3 1 4
1 5 2
4 2 6
In this matrix, a12 = 1 and a21 = 1, a13 = 4 and a31 = 4, a23 = 2 and a32 = 2, and so on. The
elements below the main diagonal are mirror images of the elements above the main
diagonal.
TYPES OF MATRIX STRUCTURE
SPARSE MATRIX
A sparse matrix is a matrix that contains a large number of zero elements compared to the
total number of elements. In other words, most of the entries in a sparse matrix are zero.
0 0 9 5 0
0 0 0 0 0
0 0 6 0 0
4 0 0 0 0
0 0 0 0 1
Sparse matrices are often encountered in various fields such as scientific computing, data
analysis, and graph algorithms. Due to their significant number of zero elements, sparse
matrices can be represented and processed more efficiently using specialized techniques
that take advantage of their sparsity, as compared to dense matrices.
ABOUT OUR BUSINESS
The future is before us and dynamic. Everything we do will affect it.
THANK YOU