CS 284a Lecture Wednesday, 26 November, 1997

Slides:



Advertisements
Similar presentations
Method If an nxn matrix A has an LU-factorization, then the solution of AX = b can be determined by a Forward substitution followed by a Back substitution.
Advertisements

LU Factorization.
1 CS 162 Introduction to Computer Science Chapter 7 Matrix Manipulation Herbert G. Mayer, PSU Status 9/21/2014.
CS 284a, 11 November 97 Copyright (c) , John Thornley1 CS 284a Lecture Tuesday, 11 November 1997.
Linear Systems LU Factorization CSE 541 Roger Crawfis.
B.Macukow 1 Lecture 12 Neural Networks. B.Macukow 2 Neural Networks for Matrix Algebra Problems.
Triangular Linear Equations Lecture #5 EEE 574 Dr. Dan Tylavsky.
Chapter 8 Numerical Technique 大葉大學 資訊工程系 黃鈴玲 Linear Algebra.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Parallel Programming in C with MPI and OpenMP Michael J. Quinn.
LU Factorization LU-factorization Matrix factorization Forward substitution Back substitution.
Chapter 9.1 = LU Decomposition MATH 264 Linear Algebra.
Lecture 11 - LU Decomposition
CS 284a, 18 November 1997 Copyright (c) , John Thornley1 CS 284a Lecture Tuesday, 18 November, 1997.
Sparse Triangular Matrix Equations Lecture #6 EEE 574 Dr. Dan Tylavsky.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 17 Solution of Systems of Equations.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 10 LU Decomposition and Matrix.
CS Oct 2006 Chap 6. Functions General form; type Name ( parameters ) { … return value ; }
CS 284a, 4 November 1997 Copyright (c) , John Thornley1 CS 284a Lecture Tuesday, 4 November, 1997.
CS 584. Dense Matrix Algorithms There are two types of Matrices Dense (Full) Sparse We will consider matrices that are Dense Square.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Parallel Programming in C with MPI and OpenMP Michael J. Quinn.
1 Systems of Linear Equations (Optional) Special Matrices.
1 Friday, November 03, 2006 “The greatest obstacle to discovery is not ignorance, but the illusion of knowledge.” -D. Boorstin.
CS 284a, 14 October 1997 Copyright (c) , John Thornley1 CS 284a Lecture Tuesday, 14 October, 1997.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 18 LU Decomposition and Matrix Inversion.
Scientific Computing Linear Systems – LU Factorization.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Linear Systems Gaussian Elimination CSE 541 Roger Crawfis.
Using LU Decomposition to Optimize the modconcen.m Routine Matt Tornowske April 1, 2002.
MATH 250 Linear Equations and Matrices
CS 584 l Assignment. Systems of Linear Equations l A linear equation in n variables has the form l A set of linear equations is called a system. l A solution.
Chapter 3 Solution of Algebraic Equations 1 ChE 401: Computational Techniques for Chemical Engineers Fall 2009/2010 DRAFT SLIDES.
Lecture 8 Matrix Inverse and LU Decomposition
CS 284a, 29 October 1997 Copyright (c) , John Thornley1 CS 284a Lecture Tuesday, 29 October, 1997.
Lecture 10 - Nonlinear gradient techniques and LU Decomposition CVEN 302 June 24, 2002.
ECE 530 – Analysis Techniques for Large-Scale Electrical Systems Prof. Hao Zhu Dept. of Electrical and Computer Engineering University of Illinois at Urbana-Champaign.
11/5/2016CS150 Introduction to Computer Science 1 Announcements  Assignment 6 due on Wednesday, December 3, 2003  Final Exam on Tuesday, December 9,
Introduction to Parallel Programming Language notation: message passing 5 parallel algorithms of increasing complexity: –Matrix multiplication –Successive.
Linear Systems Dinesh A.
Programming Massively Parallel Graphics Multiprocessors using CUDA Final Project Amirhassan Asgari Kamiabad
3/1/ LU Decomposition Computer Engineering Majors Authors: Autar Kaw Transforming.
Gaoal of Chapter 2 To develop direct or iterative methods to solve linear systems Useful Words upper/lower triangular; back/forward substitution; coefficient;
2 2.5 © 2016 Pearson Education, Ltd. Matrix Algebra MATRIX FACTORIZATIONS.
Unit #1 Linear Systems Fall Dr. Jehad Al Dallal.
CS 284a, 21 October 1997 Copyright (c) , John Thornley1 CS 284a Lecture Tuesday, 21 October, 1997.
Autar Kaw Benjamin Rigsby Transforming Numerical Methods Education for STEM Undergraduates.
Sinwook Lee Digital Media Lab. HYU.  Linear Equations  To gain the appropriate solution, 1..n of equations are necessary.  The num of equations < n.
Numerical Methods.  LU Decomposition is another method to solve a set of simultaneous linear equations  For most non-singular matrix [A] that one could.
Numerical Computation Lecture 6: Linear Systems – part II United International College.
LU Decomposition ● In Gauss elimination; Forward elimination Backward substitution Major computational effort Low computational effort can be used for.
Parallel Image Processing: Active Contour Algorithm
Parallel Direct Methods for Sparse Linear Systems
Chapter 8 Numerical Technique
Simultaneous Linear Equations
Spring Dr. Jehad Al Dallal
Linear Equations.
Abstract Data Types Sparse Matrices CSCI 240
Introduction to Parallel Programming
Chapter 10 and Matrix Inversion LU Decomposition
RECORD. RECORD Gaussian Elimination: derived system back-substitution.
Introduction to Matrices
CSCE569 Parallel Computing
Numerical Computation and Optimization
Numerical Analysis Lecture10.
Major: All Engineering Majors Authors: Autar Kaw
General Form of Equation of a Straight Line.
Matrix Addition, C = A + B Add corresponding elements of each matrix to form elements of result matrix. Given elements of A as ai,j and elements of B as.
LU Decomposition.
Lecture 8 Matrix Inverse and LU Decomposition
Matrices and Linear Equations
Ax = b Methods for Solution of the System of Equations (ReCap):
Presentation transcript:

CS 284a Lecture Wednesday, 26 November, 1997 CS 284a, 26 November 1997 Copyright (c) 1997-98, John Thornley

Final Homework: Skyline Matrix Problem LU factorization of special kind of sparse matrix. Without pivoting. Part of the “Salishan Problems”. Need to avoid storage/computation of zero elements. CS 284a, 26 November 1997 Copyright (c) 1997-98, John Thornley

Copyright (c) 1997-98, John Thornley A Skyline Matrix 1 2 3 4 5 6 7 7 8 4 0  lower[i]  i for k in 0 .. lower[i] - 1 : A[i][k] == 0 for k in lower[i] .. i : A[i][k] != 0 0  upper[j]  j for k in 0 .. upper[j] - 1 : A[k][j] == 0 for k in upper[j] .. j : A[k][j] != 0 for i in 0 .. n - 1 : for j in 0 .. n - 1 : 1 3 5 3 2 8 1 2 2 7 3 2 4 7 4 1 4 8 5 8 4 5 7 6 3 7 5 1 6 9 1 8 9 4 7 4 6 2 8 A lower[0 .. 7] = {0, 1, 1, 1, 3, 1, 2, 4} upper[0 .. 7] = {0, 1, 2, 0, 4, 2, 0, 7} CS 284a, 26 November 1997 Copyright (c) 1997-98, John Thornley

Skyline Matrix Representation 7 1 1 3 2 8 2 1 3 2 4 3 8 5 2 7 4 8 4 5 5 7 6 3 7 5 2 4 8 5 6 9 1 8 9 6 4 3 7 1 4 1 9 7 4 6 2 7 8 L U CS 284a, 26 November 1997 Copyright (c) 1997-98, John Thornley

Skyline Matrix Type Definition typedef struct { int n; int *lower, *upper; float **L, **U; } skyline_matrix; CS 284a, 26 November 1997 Copyright (c) 1997-98, John Thornley

Skyline Matrix Problem Declaration (Sequential) void solve(skyline_matrix A, float b[], float x[]); /* Given A and B, compute x such that Ax = b. */ CS 284a, 26 November 1997 Copyright (c) 1997-98, John Thornley

Solving Ax = b Using LU Factorization Goal: Solve Ax = b for x. Step 1: Solve A = LU for L and U. Step 2: Solve Ly = b for y (by forward substitution). Step 3: Solve Ux = y for x (by back substitution). CS 284a, 26 November 1997 Copyright (c) 1997-98, John Thornley

Copyright (c) 1997-98, John Thornley LU Factorization Factorize A into unit lower-triangular and general upper-triangular factors: for 0  i < n, 0  j < i : LU[i][j] = (A[i][j] - LU[i][0..j-1]*LU[0..j-1][j])/LU[j][j] for 0  i < n, i  j < n : LU[i][j] = A[i][j] - LU[i][0..i-1]*LU[0..i-1][j] 6 3 5 9 4 7 8 3 4 1 6 3 5 9 4 7 8 3 4 18 13 18 23 9 22 28 11 9 3 1 4 3 -4 -3 1 4 2 -3 42 37 45 52 23 50 71 37 20 7 4 1 -2 5 7 -3 -1 8 4 24 4 2 81 68 15 23 58 54 4 -2 6 1 7 4 7 5 2 8 18 37 32 65 43 82 91 58 67 3 7 2 8 1 6 4 1 3 4 12 26 31 11 18 81 70 24 40 2 5 -3 4 5 1 5 6 9 7 36 30 25 56 94 11 25 62 18 6 3 7 -3 7 -4 1 4 3 -1 18 29 38 29 5 78 80 2 24 3 5 -4 6 2 -2 3 1 6 4 42 37 37 86 41 50 94 64 39 7 4 5 2 -3 2 2 -4 1 3 A L U CS 284a, 26 November 1997 Copyright (c) 1997-98, John Thornley

Multithreaded LU Factorization of Skyline Matrix LU is same shape as A. Therefore, write LU over A as usual. Could use barriers, but this limits concurrency. Blocking and counters should perform better. CS 284a, 26 November 1997 Copyright (c) 1997-98, John Thornley