# What is the relation between Sparsity and Density of a matrix?

+1 vote
What is the relation between Sparsity and Density of a matrix?

(a) Sparsity = 1 – Density

(b) Sparsity = 1 + Density

(c) Sparsity = Density*Total number of elements

(d) Sparsity = Density/Total number of elements

The query is from Arrays Types topic in division Arrays Types of Data Structures & Algorithms I

This question was posed to me in an international level competition.

## 1 Answer

+1 vote
by (506k points)
selected by

Best answer
Correct choice is (a) Sparsity = 1 – Density

The best explanation: Sparsity of a matrix is equal to 1 minus Density of the matrix. The Sparsity of matrix is defined as the total number of Zero Valued elements divided total number of elements.

+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+2 votes
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer