Sparse Matrices sparse … many elements are zero dense … few elements are zero.

Slides:



Advertisements
Similar presentations
Using Matrices in Real Life
Advertisements

Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Chapter 1 The Study of Body Function Image PowerPoint
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
UNITED NATIONS Shipment Details Report – January 2006.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
0 - 0.
2 pt 3 pt 4 pt 5 pt 1 pt 2 pt 3 pt 4 pt 5 pt 1 pt 2 pt 3 pt 4 pt 5 pt 1 pt 2 pt 3 pt 4 pt 5 pt 1 pt 2 pt 3 pt 4 pt 5 pt 1 pt ShapesPatterns Counting Number.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Addition Facts
Year 6 mental test 5 second questions
Year 6 mental test 10 second questions
4.4.1 Generalised Row Echelon Form
Points, Vectors, Lines, Spheres and Matrices
Around the World AdditionSubtraction MultiplicationDivision AdditionSubtraction MultiplicationDivision.
C1 Sequences and series. Write down the first 4 terms of the sequence u n+1 =u n +6, u 1 =6 6, 12, 18, 24.
Copyright © Cengage Learning. All rights reserved.
PP Test Review Sections 6-1 to 6-6
Data Structures ADT List
ABC Technology Project
Hash Tables Dr. Li Jiang School of Computer Science,
VOORBLAD.
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
Lets play bingo!!. Calculate: MEAN Calculate: MEDIAN
Discrete Mathematics 3. MATRICES, RELATIONS, AND FUNCTIONS Lecture 5 Dr.-Ing. Erwin Sitompul
Sets Sets © 2005 Richard A. Medeiros next Patterns.
6.4 Best Approximation; Least Squares
Chapter 5 Test Review Sections 5-1 through 5-4.
GG Consulting, LLC I-SUITE. Source: TEA SHARS Frequently asked questions 2.
Addition 1’s to 20.
Model and Relationships 6 M 1 M M M M M M M M M M M M M M M M
25 seconds left…...
Subtraction: Adding UP
Equal or Not. Equal or Not
1 hi at no doifpi me be go we of at be do go hi if me no of pi we Inorder Traversal Inorder traversal. n Visit the left subtree. n Visit the node. n Visit.
Week 1.
TRIANGULAR MATRICES A square matrix in which all the entries above the main diagonal are zero is called lower triangular, and a square matrix in which.
We will resume in: 25 Minutes.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Essential Cell Biology
PSSA Preparation.
Immunobiology: The Immune System in Health & Disease Sixth Edition
Energy Generation in Mitochondria and Chlorplasts
Multilinear Algebra for Analyzing Data with Multiple Linkages
EXAMPLE 4 Multiply matrices Multiply 2 –3 –1 8. SOLUTION The matrices are both 2 2, so their product is defined. Use the following steps to find.
Matrices CSE, POSTECH.
Arrays.
Arrays. 1D Array Representation In C 1-dimensional array x = [a, b, c, d] map into contiguous memory locations Memory abcd start location(x[i]) = start.
Solving Linear Systems (Numerical Recipes, Chap 2)
Chapter 2 Matrices Definition of a matrix.
Matrix table of values
Arrays and Matrices 황승원 Fall 2010 CSE, POSTECH. 2 2 Any real-life matrix you know?
SNU IDB Lab. Ch8. Arrays and Matrices © copyright 2006 SNU IDB Lab.
Data Structure Sang Yong Han Chung-Ang University Spring
Sparse Matrices Matrix  table of values. Sparse Matrices Matrix  table of values Row 2 Column 4 4 x 5 matrix.
2.5 – Determinants and Multiplicative Inverses of Matrices.
Matrices. Variety of engineering problems lead to the need to solve systems of linear equations matrixcolumn vectors.
Data Structure Sang Yong Han
Reminder: Array Representation In C++
بردارها و ماتريس ها ساختمان داده ها
Reminder: Array Representation In C++
Determinant of a Matrix
Reminder: Array Representation In C++
Presentation transcript:

Sparse Matrices sparse … many elements are zero dense … few elements are zero

Example Of Sparse Matrices 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 an element.

Unstructured Sparse Matrices Airline flight matrix. airports are numbered 1 through n flight(i,j) = list of nonstop flights from airport i to airport j n = 1000 (say) n x n array of list references => 4 million bytes total number of flights = 20,000 (say) need at most 20,000 list references => at most 80,000 bytes

Unstructured Sparse Matrices 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

Web Page Matrix n = 2 billion (and growing by 1 million a day) n x n array of ints => 16 * bytes (16 * 10 9 GB) each page links to 10 (say) other pages on average on average there are 10 nonzero entries per row space needed for nonzero elements is approximately 20 billion x 4 bytes = 80 billion bytes (80 GB)

Representation Of Unstructured Sparse Matrices Single linear list in row-major order. scan the nonzero elements of the sparse matrix in row- major order each nonzero element is represented by a triple (row, column, value) the list of triples may be an array list or a linked list (chain)

Single Linear List Example list = row column value

Array Linear List Representation row list = column value element row column value

Chain Representation Node structure. rowcol nextvalue

Single Chain row list = column value null firstNode 2

One Linear List Per Row row1 = [(3, 3), (5,4)] row2 = [(3,5), (4,7)] row3 = [] row4 = [(2,2), (3,6)]

Array Of Row Chains Node structure. next valuecol

Array Of Row Chains row[] 33 null

Orthogonal List Representation Both row and column lists. Node structure. rowcol nextdown value

Row Lists null n n n

Column Lists n n n

Orthogonal Lists null row[] nn n nn n

Variations May use circular lists instead of chains.

Approximate Memory Requirements 500 x 500 matrix with 1994 nonzero elements 2D array 500 x 500 x 4 = 1million bytes Single Array List 3 x 1994 x 4 = 23,928 bytes One Chain Per Row x 4 = 25,928

Runtime Performance 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

Performance Matrix Addition. 500 x 500 matrices with 1994 and 999 nonzero elements 2D array 880 ms Single Array List 18 ms One Chain Per Row 29 ms