S.Y. B. Tech.
Academic Year 2022_23 Semester: III
Fundamentals of Data Structures
LABORATORY WRITE UP
Experiment Number: 02
TITLE: Sparse Matrix Operations
PROBLEM STATEMENT:
Write a C program for sparse matrix realization and operations on it- Simple Transpose, Fast
Transpose.
OBJECTIVE:
1. To Study the concept of sparse matrix, how it is stored and displayed.
2. To understand the implementation of sparse matrix operations – Simple Transpose, Fast
Transpose.
THEORY: //To be written by Students
// Write theory by elaborating below points
● Sparse Matrix
● Need for conversion of Sparse Matrices to its Compact Form
● Advantage of fast transpose over simple transpose
IMPLEMENTATION:
● PLATFORM:
o 64-bit Open source Linux or its derivatives.
o Open Source C Programming tool like gcc/Eclipse Editor.
● PSEUDO CODE: //To be Written by Students
Write pseudo code for input matrix to compact form, Simple Transpose and Fast
Transpose.
● TIME COMPLEXITY: //To be Written by Students
Find out the time complexity of Simple Transpose and Fast Transpose.
● CONCLUSION:
Thus, implemented sparse matrix Operations assignment. This System is able to
perform different operations on sparse matrices such as simple and fast transpose and
their time complexities.
● FAQs //To be Written by Students
a. What is a sparse matrix? List the applications?
b. Represent sparse matrices with suitable data structures? Explain with an example
simple and fast transpose?
c. Find out the addition of two sparse matrices in triplet form and also find Simple
and Fast transpose?
M1 =
4 5 6
0 3 5
1 3 8
1 4 45
2 3 4
3 2 45
4 1 2
M2 =
4 5 6
0 3 7
0 4 6
1 4 4
2 1 8
3 2 45
4 4 21
● PRACTICE ASSIGNMENTS
i. Write a program to perform sparse matrix operations – addition and
multiplications.