














Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The concept of sparse matrices, their structured and unstructured forms, and various methods for representing and storing them. Structured sparse matrices include diagonal, tridiagonal, and lower triangular matrices. Unstructured sparse matrices, such as airline flight and web page matrices, require more complex storage solutions due to their irregular structure. The single linear list, array linear list, chain representation, and orthogonal list representation of unstructured sparse matrices.
Typology: Study notes
1 / 22
This page cannot be seen from the preview
Don't miss anything!















sparse … many elements are zero dense
… few elements are zero
diagonal tridiagonal lower triangular (?) These are structured sparse matrices. May be mapped into a 1D array so that a
mapping function can be used to locate anelement.
Web page matrix.
web pages are numbered 1 through n web(i,j) = number of links from page i to page j
Web analysis.
authority page … page that has many links to it hub page … links to many authority pages
n = 2 billion (and growing by 1 million a day)
n x n array of ints => 16 * 10
18
bytes (16 * 10
9
each page links to 10 (say) other pages onaverage
on average there are 10 nonzero entries per row
space needed for nonzero elements isapproximately 20 billion x 4 bytes = 80 billionbytes (80 GB)
list =row
column 3 5 3 4 2 3value
Array Linear List Representation
row
list =
column 3 5 3 4 2 3 value
element
row
column
value
Single Chain
row
list
column
value
1
3
3
1
5
4
2 5
2 7
4 2
4 6
3
4
3
null
firstNode
2
row1 = [(3, 3), (5,4)] row2 = [(3,5), (4,7)] row3 = [] row4 = [(2,2), (3,6)]
Array Of Row Chains
row[]
3
3
null
4
5
5
3
null
7
4
2
2
null
6
3
null
Orthogonal List Representation
Both row and column lists. Node structure.
row
col next
down
value
Column Lists
1
3
3
1
5
4
2
3
5
2
4
7
4
2
2
4
3
6
n
n
n
Orthogonal Lists
null
row[]
1
3
3
1
5
4
2
3
5
2
4
7
4
2
2
4
3
6
n
n
n
n
n
n
500 x 500 matrix with 2000 nonzero elements 2D array
500 x 500 x 4 = 1million bytes
Single Array List 3 x 2000 x 4 = 24,000 bytes One Chain Per Row 24,000 + 500 x 4 = 26,
Matrix Transpose 500 x 500 matrix with 1994 nonzero elements 2D array
210 ms
Single Array List
6 ms
One Chain Per Row
12 ms