Math 304 (Spring 2010) - Lecture 2
|
|
- Paul Shepherd
- 5 years ago
- Views:
Transcription
1 Math 304 (Spring 010) - Lecture Emre Mengi Department of Mathematics Koç University emengi@ku.edu.tr Lecture - Floating Point Operation Count p.1/10
2 Efficiency of an algorithm is determined by the total # of,,, required. Lecture - Floating Point Operation Count p./10
3 Efficiency of an algorithm is determined by the total # of,,, required. Crudeness in floating point operation (flop) count Lecture - Floating Point Operation Count p./10
4 Efficiency of an algorithm is determined by the total # of,,, required. Crudeness in floating point operation (flop) count Time required for data transfers is ignored. Lecture - Floating Point Operation Count p./10
5 Efficiency of an algorithm is determined by the total # of,,, required. Crudeness in floating point operation (flop) count Time required for data transfers is ignored. All of the operations,,, are considered of same computational difficulty. In reality, are more expensive. Lecture - Floating Point Operation Count p./10
6 Inner (or dot) product : Let f : R n R be defined as where a = [ f(x) = a 1 x 1 + a x +...a n x n = a T x ] T [ ] T a 1... a n R n and x = x 1... x n R n. Lecture - Floating Point Operation Count p.3/10
7 Inner (or dot) product : Let f : R n R be defined as where a = [ f(x) = a 1 x 1 + a x +...a n x n = a T x ] T [ ] T a 1... a n R n and x = x 1... x n R n. Pseudocode to compute f(x) f 0 for j = 1, n do f f + a j x j }{{} flops Return f Lecture - Floating Point Operation Count p.3/10
8 Inner (or dot) product : Let f : R n R be defined as f(x) = a 1 x 1 + a x +...a n x n = a T x where a = [ a 1... a n ] T R n and x = [ x 1... x n ] T R n. Pseudocode to compute f(x) f 0 for j = 1, n do f f + a j x j }{{} flops Return f Total flop count : flops per iteration for j = 1,...,n Total # of flops = n j=1 = n Lecture - Floating Point Operation Count p.3/10
9 Matrix-vector product : Let g : R n R m be defined as g(x) = Ax = x 1 A 1 + x A + + x n A n [ ] T where A = A 1... A n is an m n real matrix with [ ] T A 1,...,A n R m and x = x 1... x n R n. Lecture - Floating Point Operation Count p.4/10
10 Matrix-vector product : Let g : R n R m be defined as g(x) = Ax = x 1 A 1 + x A + + x n A n [ ] T where A = A 1... A n is an m n real matrix with [ ] T A 1,...,A n R m and x = x 1... x n R n. e.g = = Lecture - Floating Point Operation Count p.4/10
11 Pseudocode to compute g(x) = Ax Given an m n real matrix A and x R n. g 0 (where g R n ) for j = 1, n do g g + x j A j }{{} m flops Return g Lecture - Floating Point Operation Count p.5/10
12 Pseudocode to compute g(x) = Ax Given an m n real matrix A and x R n. g 0 (where g R n ) for j = 1, n do g g + x j A j }{{} m flops Return g Above g + x j A j requires m addition and m multiplication for each j. Lecture - Floating Point Operation Count p.5/10
13 Pseudocode to compute g(x) = Ax Given an m n real matrix A and x R n. g 0 (where g R n ) for j = 1, n do g g + x j A j }{{} m flops Return g Above g + x j A j requires m addition and m multiplication for each j. Total flop count : m flops per iteration for j = 1,...,n Total # of flops = n j=1 m = mn Lecture - Floating Point Operation Count p.5/10
14 Inner product view of the matrix-vector product g(x) = Ax. g(x) = 6 4 Ā 1 x Ā x. Ā m x = 6 4 a 11 x 1 + a 1 x + + a 1n x n a 1 x 1 + a x + + a nn x n. a m1 x 1 + a m x + + a mn x n where A = 6 4 Ā 1 Ā. Ā m and Ā 1,...,Ā m are the rows of A and a ij is the entry of A at the ith row and jth column. Lecture - Floating Point Operation Count p.6/10
15 Inner product view of the matrix-vector product g(x) = Ax. g(x) = 6 4 Ā 1 x Ā x. Ā m x = 6 4 a 11 x 1 + a 1 x + + a 1n x n a 1 x 1 + a x + + a nn x n. a m1 x 1 + a m x + + a mn x n where A = 6 4 Ā 1 Ā. Ā m and Ā 1,...,Ā m are the rows of A and a ij is the entry of A at the ith row and jth column. e.g = 6 4 ()() + (1)( ) + ( )(1) (1)() + (0)( ) + ( 1)(1) (3)() + ( 1)( ) + ()(1) = Lecture - Floating Point Operation Count p.6/10
16 Pseudocode to compute g(x) = Ax exploiting the inner-product view Given an m n real matrix A and x R n. g 0 (where g R n ) for i = 1, m do for j = 1, n do g i g i + a ij x j }{{} flops Return g Lecture - Floating Point Operation Count p.7/10
17 Pseudocode to compute g(x) = Ax exploiting the inner-product view Given an m n real matrix A and x R n. g 0 (where g R n ) for i = 1, m do for j = 1, n do g i g i + a ij x j }{{} flops Return g Total flop count : flops per iteration for each j = 1,...,n and i = 1,...,m Total # of flops = m n i=1 j=1 = m i=1 n = mn Lecture - Floating Point Operation Count p.7/10
18 Matrix-matrix product : Given an n p matrix A and a p m matrix X. The product B = AX is an n m matrix and defined as b ij = Ā i X j = p a ik x kj k=1 where Āi is the ith row of A, X j is the jth column of X and b ij, a ij, x ij denote the (i, j)-entry of B, A and X,respectively. Lecture - Floating Point Operation Count p.8/10
19 Matrix-matrix product : Given an n p matrix A and a p m matrix X. The product B = AX is an n m matrix and defined as b ij = Ā i X j = p a ik x kj k=1 where Āi is the ith row of A, X j is the jth column of X and b ij, a ij, x ij denote the (i, j)-entry of B, A and X,respectively. e.g = 4 ( 1) + 1(1) (1) + 1( ) 1( 1) + 0(1) 1(1) + 0( ) 3 5 = Lecture - Floating Point Operation Count p.8/10
20 Pseudocode to compute the product B = AX Given n p and p m matrices A and X. B 0 for i = 1, n do for j = 1, m do for k = 1, p do b ij b ij + a ik x kj }{{} flops Return g Lecture - Floating Point Operation Count p.9/10
21 Pseudocode to compute the product B = AX Given n p and p m matrices A and X. B 0 for i = 1, n do for j = 1, m do for k = 1, p do b ij b ij + a ik x kj }{{} flops Return g Total flop count : flops per iteration for each k = 1,...,p, j = 1,...,m and i = 1,...,n Total # of flops = P n i=1 P m j=1 P p k=1 = nmp Lecture - Floating Point Operation Count p.9/10
22 Big-O notation Floating Point Operation Count Lecture - Floating Point Operation Count p.10/10
23 Big-O notation Floating Point Operation Count The inner product a T x requires n = O(n) flops (linear # of flops). Lecture - Floating Point Operation Count p.10/10
24 Big-O notation Floating Point Operation Count The inner product a T x requires n = O(n) flops (linear # of flops). The matrix-vector product Ax for a square matrix A (with m = n) requires n = O(n ) flops (quadratic # of flops). Lecture - Floating Point Operation Count p.10/10
25 Big-O notation Floating Point Operation Count The inner product a T x requires n = O(n) flops (linear # of flops). The matrix-vector product Ax for a square matrix A (with m = n) requires n = O(n ) flops (quadratic # of flops). The matrix-matrix product AX for square n n matrices A and X (with m = n = p) requires n 3 = O(n 3 ) flops (cubic # of flops). Lecture - Floating Point Operation Count p.10/10
26 Big-O notation Floating Point Operation Count The inner product a T x requires n = O(n) flops (linear # of flops). The matrix-vector product Ax for a square matrix A (with m = n) requires n = O(n ) flops (quadratic # of flops). The matrix-matrix product AX for square n n matrices A and X (with m = n = p) requires n 3 = O(n 3 ) flops (cubic # of flops). The notation g(n) = O(f(n)) means asymptotically f(n) scaled up to a constant grows at least as fast as g(n), i.e. g(n) = O(f(n)) if there exists an n 0 and c such that g(n) cf(n) for all n n 0 Lecture - Floating Point Operation Count p.10/10
27 Big-O notation Floating Point Operation Count The inner product a T x requires n = O(n) flops (linear # of flops). The matrix-vector product Ax for a square matrix A (with m = n) requires n = O(n ) flops (quadratic # of flops). The matrix-matrix product AX for square n n matrices A and X (with m = n = p) requires n 3 = O(n 3 ) flops (cubic # of flops). The notation g(n) = O(f(n)) means asymptotically f(n) scaled up to a constant grows at least as fast as g(n), i.e. g(n) = O(f(n)) if there exists an n 0 and c such that g(n) cf(n) for all n n 0 Examples: n = O(n) as well as n = O(n ) and n = O(n 3 ) Lecture - Floating Point Operation Count p.10/10
28 Big-O notation Floating Point Operation Count The inner product a T x requires n = O(n) flops (linear # of flops). The matrix-vector product Ax for a square matrix A (with m = n) requires n = O(n ) flops (quadratic # of flops). The matrix-matrix product AX for square n n matrices A and X (with m = n = p) requires n 3 = O(n 3 ) flops (cubic # of flops). The notation g(n) = O(f(n)) means asymptotically f(n) scaled up to a constant grows at least as fast as g(n), i.e. g(n) = O(f(n)) if there exists an n 0 and c such that g(n) cf(n) for all n n 0 Examples: n = O(n) as well as n = O(n ) and n = O(n 3 ) n = O(n ) as well as n = O(n 3 ), but n is not O(n). Lecture - Floating Point Operation Count p.10/10
MATH 3511 Lecture 1. Solving Linear Systems 1
MATH 3511 Lecture 1 Solving Linear Systems 1 Dmitriy Leykekhman Spring 2012 Goals Review of basic linear algebra Solution of simple linear systems Gaussian elimination D Leykekhman - MATH 3511 Introduction
More informationMath 4377/6308 Advanced Linear Algebra
2.3 Composition Math 4377/6308 Advanced Linear Algebra 2.3 Composition of Linear Transformations Jiwen He Department of Mathematics, University of Houston jiwenhe@math.uh.edu math.uh.edu/ jiwenhe/math4377
More informationMatrices: 2.1 Operations with Matrices
Goals In this chapter and section we study matrix operations: Define matrix addition Define multiplication of matrix by a scalar, to be called scalar multiplication. Define multiplication of two matrices,
More informationReview of Basic Concepts in Linear Algebra
Review of Basic Concepts in Linear Algebra Grady B Wright Department of Mathematics Boise State University September 7, 2017 Math 565 Linear Algebra Review September 7, 2017 1 / 40 Numerical Linear Algebra
More informationMathematics 13: Lecture 10
Mathematics 13: Lecture 10 Matrices Dan Sloughter Furman University January 25, 2008 Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 1 / 19 Matrices Recall: A matrix is a
More informationChapter 4 No. 4.0 Answer True or False to the following. Give reasons for your answers.
MATH 434/534 Theoretical Assignment 3 Solution Chapter 4 No 40 Answer True or False to the following Give reasons for your answers If a backward stable algorithm is applied to a computational problem,
More informationKevin James. MTHSC 3110 Section 2.1 Matrix Operations
MTHSC 3110 Section 2.1 Matrix Operations Notation Let A be an m n matrix, that is, m rows and n columns. We ll refer to the entries of A by their row and column indices. The entry in the i th row and j
More informationICS 6N Computational Linear Algebra Matrix Algebra
ICS 6N Computational Linear Algebra Matrix Algebra Xiaohui Xie University of California, Irvine xhx@uci.edu February 2, 2017 Xiaohui Xie (UCI) ICS 6N February 2, 2017 1 / 24 Matrix Consider an m n matrix
More informationSolving Linear Systems Using Gaussian Elimination. How can we solve
Solving Linear Systems Using Gaussian Elimination How can we solve? 1 Gaussian elimination Consider the general augmented system: Gaussian elimination Step 1: Eliminate first column below the main diagonal.
More informationCS 246 Review of Linear Algebra 01/17/19
1 Linear algebra In this section we will discuss vectors and matrices. We denote the (i, j)th entry of a matrix A as A ij, and the ith entry of a vector as v i. 1.1 Vectors and vector operations A vector
More information7.5 Operations with Matrices. Copyright Cengage Learning. All rights reserved.
7.5 Operations with Matrices Copyright Cengage Learning. All rights reserved. What You Should Learn Decide whether two matrices are equal. Add and subtract matrices and multiply matrices by scalars. Multiply
More informationBasic Concepts in Linear Algebra
Basic Concepts in Linear Algebra Grady B Wright Department of Mathematics Boise State University February 2, 2015 Grady B Wright Linear Algebra Basics February 2, 2015 1 / 39 Numerical Linear Algebra Linear
More informationLU Factorization. Marco Chiarandini. DM559 Linear and Integer Programming. Department of Mathematics & Computer Science University of Southern Denmark
DM559 Linear and Integer Programming LU Factorization Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark [Based on slides by Lieven Vandenberghe, UCLA] Outline
More informationTime Analysis of Sorting and Searching Algorithms
Time Analysis of Sorting and Searching Algorithms CSE21 Winter 2017, Day 5 (B00), Day 3 (A00) January 20, 2017 http://vlsicad.ucsd.edu/courses/cse21-w17 Big-O : How to determine? Is f(n) big-o of g(n)?
More informationElementary maths for GMT
Elementary maths for GMT Linear Algebra Part 2: Matrices, Elimination and Determinant m n matrices The system of m linear equations in n variables x 1, x 2,, x n a 11 x 1 + a 12 x 2 + + a 1n x n = b 1
More informationLecture 2. Fundamentals of the Analysis of Algorithm Efficiency
Lecture 2 Fundamentals of the Analysis of Algorithm Efficiency 1 Lecture Contents 1. Analysis Framework 2. Asymptotic Notations and Basic Efficiency Classes 3. Mathematical Analysis of Nonrecursive Algorithms
More informationChapter 4 No. 4.0 Answer True or False to the following. Give reasons for your answers.
MATH 434/534 Theoretical Assignment 3 Solution Chapter 4 No 40 Answer True or False to the following Give reasons for your answers If a backward stable algorithm is applied to a computational problem,
More informationLecture 3 Linear Algebra Background
Lecture 3 Linear Algebra Background Dan Sheldon September 17, 2012 Motivation Preview of next class: y (1) w 0 + w 1 x (1) 1 + w 2 x (1) 2 +... + w d x (1) d y (2) w 0 + w 1 x (2) 1 + w 2 x (2) 2 +...
More informationNotes on vectors and matrices
Notes on vectors and matrices EE103 Winter Quarter 2001-02 L Vandenberghe 1 Terminology and notation Matrices, vectors, and scalars A matrix is a rectangular array of numbers (also called scalars), written
More information10. Linear Systems of ODEs, Matrix multiplication, superposition principle (parts of sections )
c Dr. Igor Zelenko, Fall 2017 1 10. Linear Systems of ODEs, Matrix multiplication, superposition principle (parts of sections 7.2-7.4) 1. When each of the functions F 1, F 2,..., F n in right-hand side
More informationLinear Algebra (Review) Volker Tresp 2018
Linear Algebra (Review) Volker Tresp 2018 1 Vectors k, M, N are scalars A one-dimensional array c is a column vector. Thus in two dimensions, ( ) c1 c = c 2 c i is the i-th component of c c T = (c 1, c
More informationPart A Simulation and Statistical Programming HT15. Lecturer: Geoff Nicholls. University of Oxford. Lecture 10: Recursion, Efficiency and Runtime.
Part A Simulation and Statistical Programming HT15 Lecturer: Geoff Nicholls University of Oxford Lecture 10: Recursion, Efficiency and Runtime. Overview for lecture 10 1. Recursive evaluation 2. Extended
More informationMatrix Arithmetic. j=1
An m n matrix is an array A = Matrix Arithmetic a 11 a 12 a 1n a 21 a 22 a 2n a m1 a m2 a mn of real numbers a ij An m n matrix has m rows and n columns a ij is the entry in the i-th row and j-th column
More informationSection 9.2: Matrices.. a m1 a m2 a mn
Section 9.2: Matrices Definition: A matrix is a rectangular array of numbers: a 11 a 12 a 1n a 21 a 22 a 2n A =...... a m1 a m2 a mn In general, a ij denotes the (i, j) entry of A. That is, the entry in
More informationThe QR Factorization
The QR Factorization How to Make Matrices Nicer Radu Trîmbiţaş Babeş-Bolyai University March 11, 2009 Radu Trîmbiţaş ( Babeş-Bolyai University) The QR Factorization March 11, 2009 1 / 25 Projectors A projector
More informationLinear System of Equations
Linear System of Equations Linear systems are perhaps the most widely applied numerical procedures when real-world situation are to be simulated. Example: computing the forces in a TRUSS. F F 5. 77F F.
More informationLecture 1 INF-MAT : Chapter 2. Examples of Linear Systems
Lecture 1 INF-MAT 4350 2010: Chapter 2. Examples of Linear Systems Tom Lyche Centre of Mathematics for Applications, Department of Informatics, University of Oslo August 26, 2010 Notation The set of natural
More informationLinear Algebraic Equations
Linear Algebraic Equations Linear Equations: a + a + a + a +... + a = c 11 1 12 2 13 3 14 4 1n n 1 a + a + a + a +... + a = c 21 2 2 23 3 24 4 2n n 2 a + a + a + a +... + a = c 31 1 32 2 33 3 34 4 3n n
More informationEvaluating Determinants by Row Reduction
Evaluating Determinants by Row Reduction MATH 322, Linear Algebra I J. Robert Buchanan Department of Mathematics Spring 2015 Objectives Reduce a matrix to row echelon form and evaluate its determinant.
More informationRunning Time Evaluation
Running Time Evaluation Quadratic Vs. Linear Time Lecturer: Georgy Gimel farb COMPSCI 220 Algorithms and Data Structures 1 / 19 1 Running time 2 Examples 3 Big-Oh, Big-Omega, and Big-Theta Tools 4 Time
More informationSection 9.2: Matrices. Definition: A matrix A consists of a rectangular array of numbers, or elements, arranged in m rows and n columns.
Section 9.2: Matrices Definition: A matrix A consists of a rectangular array of numbers, or elements, arranged in m rows and n columns. That is, a 11 a 12 a 1n a 21 a 22 a 2n A =...... a m1 a m2 a mn A
More informationDeterminants. Samy Tindel. Purdue University. Differential equations and linear algebra - MA 262
Determinants Samy Tindel Purdue University Differential equations and linear algebra - MA 262 Taken from Differential equations and linear algebra by Goode and Annin Samy T. Determinants Differential equations
More informationL. Vandenberghe EE133A (Spring 2017) 3. Matrices. notation and terminology. matrix operations. linear and affine functions.
L Vandenberghe EE133A (Spring 2017) 3 Matrices notation and terminology matrix operations linear and affine functions complexity 3-1 Matrix a rectangular array of numbers, for example A = 0 1 23 01 13
More informationLecture 1 INF-MAT3350/ : Some Tridiagonal Matrix Problems
Lecture 1 INF-MAT3350/4350 2007: Some Tridiagonal Matrix Problems Tom Lyche University of Oslo Norway Lecture 1 INF-MAT3350/4350 2007: Some Tridiagonal Matrix Problems p.1/33 Plan for the day 1. Notation
More informationMath Linear Algebra Final Exam Review Sheet
Math 15-1 Linear Algebra Final Exam Review Sheet Vector Operations Vector addition is a component-wise operation. Two vectors v and w may be added together as long as they contain the same number n of
More informationWorksheet 3: Matrix-Vector Products ( 1.3)
Problem 1: Vectors and Matrices. Worksheet : Matrix-Vector Products ( 1.) (c)015 UM Math Dept licensed under a Creative Commons By-NC-SA.0 International License. Let us TEMPORARILY think of a vector as
More informationMatrix & Linear Algebra
Matrix & Linear Algebra Jamie Monogan University of Georgia For more information: http://monogan.myweb.uga.edu/teaching/mm/ Jamie Monogan (UGA) Matrix & Linear Algebra 1 / 84 Vectors Vectors Vector: A
More informationMath113: Linear Algebra. Beifang Chen
Math3: Linear Algebra Beifang Chen Spring 26 Contents Systems of Linear Equations 3 Systems of Linear Equations 3 Linear Systems 3 2 Geometric Interpretation 3 3 Matrices of Linear Systems 4 4 Elementary
More informationLinear Algebra and Matrix Inversion
Jim Lambers MAT 46/56 Spring Semester 29- Lecture 2 Notes These notes correspond to Section 63 in the text Linear Algebra and Matrix Inversion Vector Spaces and Linear Transformations Matrices are much
More informationIntroduction. Vectors and Matrices. Vectors [1] Vectors [2]
Introduction Vectors and Matrices Dr. TGI Fernando 1 2 Data is frequently arranged in arrays, that is, sets whose elements are indexed by one or more subscripts. Vector - one dimensional array Matrix -
More informationJim Lambers MAT 610 Summer Session Lecture 1 Notes
Jim Lambers MAT 60 Summer Session 2009-0 Lecture Notes Introduction This course is about numerical linear algebra, which is the study of the approximate solution of fundamental problems from linear algebra
More informationDS-GA 1002 Lecture notes 0 Fall Linear Algebra. These notes provide a review of basic concepts in linear algebra.
DS-GA 1002 Lecture notes 0 Fall 2016 Linear Algebra These notes provide a review of basic concepts in linear algebra. 1 Vector spaces You are no doubt familiar with vectors in R 2 or R 3, i.e. [ ] 1.1
More informationCS100: DISCRETE STRUCTURES. Lecture 3 Matrices Ch 3 Pages:
CS100: DISCRETE STRUCTURES Lecture 3 Matrices Ch 3 Pages: 246-262 Matrices 2 Introduction DEFINITION 1: A matrix is a rectangular array of numbers. A matrix with m rows and n columns is called an m x n
More informationMatrices Gaussian elimination Determinants. Graphics 2009/2010, period 1. Lecture 4: matrices
Graphics 2009/2010, period 1 Lecture 4 Matrices m n matrices Matrices Definitions Diagonal, Identity, and zero matrices Addition Multiplication Transpose and inverse The system of m linear equations in
More informationMatrix decompositions
Matrix decompositions How can we solve Ax = b? 1 Linear algebra Typical linear system of equations : x 1 x +x = x 1 +x +9x = 0 x 1 +x x = The variables x 1, x, and x only appear as linear terms (no powers
More informationCountable and uncountable sets. Matrices.
Lecture 11 Countable and uncountable sets. Matrices. Instructor: Kangil Kim (CSE) E-mail: kikim01@konkuk.ac.kr Tel. : 02-450-3493 Room : New Milenium Bldg. 1103 Lab : New Engineering Bldg. 1202 Next topic:
More informationANALYTICAL MATHEMATICS FOR APPLICATIONS 2018 LECTURE NOTES 3
ANALYTICAL MATHEMATICS FOR APPLICATIONS 2018 LECTURE NOTES 3 ISSUED 24 FEBRUARY 2018 1 Gaussian elimination Let A be an (m n)-matrix Consider the following row operations on A (1) Swap the positions any
More informationBLAS: Basic Linear Algebra Subroutines Analysis of the Matrix-Vector-Product Analysis of Matrix-Matrix Product
Level-1 BLAS: SAXPY BLAS-Notation: S single precision (D for double, C for complex) A α scalar X vector P plus operation Y vector SAXPY: y = αx + y Vectorization of SAXPY (αx + y) by pipelining: page 8
More informationScientific Computing: Dense Linear Systems
Scientific Computing: Dense Linear Systems Aleksandar Donev Courant Institute, NYU 1 donev@courant.nyu.edu 1 Course MATH-GA.2043 or CSCI-GA.2112, Spring 2012 February 9th, 2012 A. Donev (Courant Institute)
More informationGaussian Elimination and Back Substitution
Jim Lambers MAT 610 Summer Session 2009-10 Lecture 4 Notes These notes correspond to Sections 31 and 32 in the text Gaussian Elimination and Back Substitution The basic idea behind methods for solving
More informationI = i 0,
Special Types of Matrices Certain matrices, such as the identity matrix 0 0 0 0 0 0 I = 0 0 0, 0 0 0 have a special shape, which endows the matrix with helpful properties The identity matrix is an example
More informationCSED233: Data Structures (2017F) Lecture4: Analysis of Algorithms
(2017F) Lecture4: Analysis of Algorithms Daijin Kim CSE, POSTECH dkim@postech.ac.kr Running Time Most algorithms transform input objects into output objects. The running time of an algorithm typically
More informationData Structures and Algorithms. Asymptotic notation
Data Structures and Algorithms Asymptotic notation Estimating Running Time Algorithm arraymax executes 7n 1 primitive operations in the worst case. Define: a = Time taken by the fastest primitive operation
More informationn n matrices The system of m linear equations in n variables x 1, x 2,..., x n can be written as a matrix equation by Ax = b, or in full
n n matrices Matrices Definitions Diagonal, Identity, and zero matrices Addition Multiplication Transpose and inverse The system of m linear equations in n variables x 1, x 2,..., x n a 11 x 1 + a 12 x
More informationMATH Topics in Applied Mathematics Lecture 12: Evaluation of determinants. Cross product.
MATH 311-504 Topics in Applied Mathematics Lecture 12: Evaluation of determinants. Cross product. Determinant is a scalar assigned to each square matrix. Notation. The determinant of a matrix A = (a ij
More informationTest 2 Review Math 1111 College Algebra
Test 2 Review Math 1111 College Algebra 1. Begin by graphing the standard quadratic function f(x) = x 2. Then use transformations of this graph to graph the given function. g(x) = x 2 + 2 *a. b. c. d.
More informationMatrix Multiplication
3.2 Matrix Algebra Matrix Multiplication Example Foxboro Stadium has three main concession stands, located behind the south, north and west stands. The top-selling items are peanuts, hot dogs and soda.
More informationAnalysis of Algorithms
October 1, 2015 Analysis of Algorithms CS 141, Fall 2015 1 Analysis of Algorithms: Issues Correctness/Optimality Running time ( time complexity ) Memory requirements ( space complexity ) Power I/O utilization
More informationElementary Matrices. MATH 322, Linear Algebra I. J. Robert Buchanan. Spring Department of Mathematics
Elementary Matrices MATH 322, Linear Algebra I J. Robert Buchanan Department of Mathematics Spring 2015 Outline Today s discussion will focus on: elementary matrices and their properties, using elementary
More informationWhat is Performance Analysis?
1.2 Basic Concepts What is Performance Analysis? Performance Analysis Space Complexity: - the amount of memory space used by the algorithm Time Complexity - the amount of computing time used by the algorithm
More informationEnumerate all possible assignments and take the An algorithm is a well-defined computational
EMIS 8374 [Algorithm Design and Analysis] 1 EMIS 8374 [Algorithm Design and Analysis] 2 Designing and Evaluating Algorithms A (Bad) Algorithm for the Assignment Problem Enumerate all possible assignments
More informationAMS526: Numerical Analysis I (Numerical Linear Algebra)
AMS526: Numerical Analysis I (Numerical Linear Algebra) Lecture 7: More on Householder Reflectors; Least Squares Problems Xiangmin Jiao SUNY Stony Brook Xiangmin Jiao Numerical Analysis I 1 / 15 Outline
More informationAnalysis of Algorithm Efficiency. Dr. Yingwu Zhu
Analysis of Algorithm Efficiency Dr. Yingwu Zhu Measure Algorithm Efficiency Time efficiency How fast the algorithm runs; amount of time required to accomplish the task Our focus! Space efficiency Amount
More informationLecture 4: Products of Matrices
Lecture 4: Products of Matrices Winfried Just, Ohio University January 22 24, 2018 Matrix multiplication has a few surprises up its sleeve Let A = [a ij ] m n, B = [b ij ] m n be two matrices. The sum
More informationMATRICES. a m,1 a m,n A =
MATRICES Matrices are rectangular arrays of real or complex numbers With them, we define arithmetic operations that are generalizations of those for real and complex numbers The general form a matrix of
More informationCLASSICAL FORMS OF LINEAR PROGRAMS, CONVERSION TECHNIQUES, AND SOME NOTATION
(Revised) October 12, 2004 CLASSICAL FORMS OF LINEAR PROGRAMS, CONVERSION TECHNIQUES, AND SOME NOTATION Linear programming is the minimization (maximization) of a linear objective, say c1x 1 + c2x 2 +
More information1. Which one of the following points is a singular point of. f(x) = (x 1) 2/3? f(x) = 3x 3 4x 2 5x + 6? (C)
Math 1120 Calculus Test 3 November 4, 1 Name In the first 10 problems, each part counts 5 points (total 50 points) and the final three problems count 20 points each Multiple choice section Circle the correct
More information15-780: LinearProgramming
15-780: LinearProgramming J. Zico Kolter February 1-3, 2016 1 Outline Introduction Some linear algebra review Linear programming Simplex algorithm Duality and dual simplex 2 Outline Introduction Some linear
More informationMTH 35, SPRING 2017 NIKOS APOSTOLAKIS
MTH 35, SPRING 2017 NIKOS APOSTOLAKIS 1. Linear transformations Definition 1. A function T : R n R m is called a linear transformation if, for any scalars λ,µ R and any vectors u,v R n we have: T(λu+µv)
More informationComputation of the mtx-vec product based on storage scheme on vector CPUs
BLAS: Basic Linear Algebra Subroutines BLAS: Basic Linear Algebra Subroutines BLAS: Basic Linear Algebra Subroutines Analysis of the Matrix Computation of the mtx-vec product based on storage scheme on
More informationG1110 & 852G1 Numerical Linear Algebra
The University of Sussex Department of Mathematics G & 85G Numerical Linear Algebra Lecture Notes Autumn Term Kerstin Hesse (w aw S w a w w (w aw H(wa = (w aw + w Figure : Geometric explanation of the
More informationChapter 2 - Basics Structures MATH 213. Chapter 2: Basic Structures. Dr. Eric Bancroft. Fall Dr. Eric Bancroft MATH 213 Fall / 60
MATH 213 Chapter 2: Basic Structures Dr. Eric Bancroft Fall 2013 Dr. Eric Bancroft MATH 213 Fall 2013 1 / 60 Chapter 2 - Basics Structures 2.1 - Sets 2.2 - Set Operations 2.3 - Functions 2.4 - Sequences
More informationMath Matrix Algebra
Math 44 - Matrix Algebra Review notes - (Alberto Bressan, Spring 7) sec: Orthogonal diagonalization of symmetric matrices When we seek to diagonalize a general n n matrix A, two difficulties may arise:
More informationPrepared by: M. S. KumarSwamy, TGT(Maths) Page
Prepared by: M. S. KumarSwamy, TGT(Maths) Page - 50 - CHAPTER 3: MATRICES QUICK REVISION (Important Concepts & Formulae) MARKS WEIGHTAGE 03 marks Matrix A matrix is an ordered rectangular array of numbers
More informationCountable and uncountable sets. Matrices.
CS 441 Discrete Mathematics for CS Lecture 11 Countable and uncountable sets. Matrices. Milos Hauskrecht milos@cs.pitt.edu 5329 Sennott Square Arithmetic series Definition: The sum of the terms of the
More informationNumerical Linear Algebra
Numerical Linear Algebra Decompositions, numerical aspects Gerard Sleijpen and Martin van Gijzen September 27, 2017 1 Delft University of Technology Program Lecture 2 LU-decomposition Basic algorithm Cost
More informationProgram Lecture 2. Numerical Linear Algebra. Gaussian elimination (2) Gaussian elimination. Decompositions, numerical aspects
Numerical Linear Algebra Decompositions, numerical aspects Program Lecture 2 LU-decomposition Basic algorithm Cost Stability Pivoting Cholesky decomposition Sparse matrices and reorderings Gerard Sleijpen
More informationLecture 12 (Tue, Mar 5) Gaussian elimination and LU factorization (II)
Math 59 Lecture 2 (Tue Mar 5) Gaussian elimination and LU factorization (II) 2 Gaussian elimination - LU factorization For a general n n matrix A the Gaussian elimination produces an LU factorization if
More informationCSE 160 Lecture 13. Numerical Linear Algebra
CSE 16 Lecture 13 Numerical Linear Algebra Announcements Section will be held on Friday as announced on Moodle Midterm Return 213 Scott B Baden / CSE 16 / Fall 213 2 Today s lecture Gaussian Elimination
More informationEE263 Review Session 1
EE263 Review Session 1 October 5, 2018 0.1 Importing Variables from a MALAB.m file If you are importing variables given in file vars.m, use the following code at the beginning of your script. close a l
More informationSection 1.6. M N = [a ij b ij ], (1.6.2)
The Calculus of Functions of Several Variables Section 16 Operations with Matrices In the previous section we saw the important connection between linear functions and matrices In this section we will
More information1 Multiply Eq. E i by λ 0: (λe i ) (E i ) 2 Multiply Eq. E j by λ and add to Eq. E i : (E i + λe j ) (E i )
Direct Methods for Linear Systems Chapter Direct Methods for Solving Linear Systems Per-Olof Persson persson@berkeleyedu Department of Mathematics University of California, Berkeley Math 18A Numerical
More informationLemma 8: Suppose the N by N matrix A has the following block upper triangular form:
17 4 Determinants and the Inverse of a Square Matrix In this section, we are going to use our knowledge of determinants and their properties to derive an explicit formula for the inverse of a square matrix
More information5.1 Introduction to Matrices
5.1 Introduction to Matrices Reminder: A matrix with m rows and n columns has size m x n. (This is also sometimes referred to as the order of the matrix.) The entry in the ith row and jth column of a matrix
More information3. Vector spaces 3.1 Linear dependence and independence 3.2 Basis and dimension. 5. Extreme points and basic feasible solutions
A. LINEAR ALGEBRA. CONVEX SETS 1. Matrices and vectors 1.1 Matrix operations 1.2 The rank of a matrix 2. Systems of linear equations 2.1 Basic solutions 3. Vector spaces 3.1 Linear dependence and independence
More informationj=1 [We will show that the triangle inequality holds for each p-norm in Chapter 3 Section 6.] The 1-norm is A F = tr(a H A).
Math 344 Lecture #19 3.5 Normed Linear Spaces Definition 3.5.1. A seminorm on a vector space V over F is a map : V R that for all x, y V and for all α F satisfies (i) x 0 (positivity), (ii) αx = α x (scale
More informationLectures on Linear Algebra for IT
Lectures on Linear Algebra for IT by Mgr. Tereza Kovářová, Ph.D. following content of lectures by Ing. Petr Beremlijski, Ph.D. Department of Applied Mathematics, VSB - TU Ostrava Czech Republic 2. Systems
More informationAnnouncements. CSE332: Data Abstractions Lecture 2: Math Review; Algorithm Analysis. Today. Mathematical induction. Dan Grossman Spring 2010
Announcements CSE332: Data Abstractions Lecture 2: Math Review; Algorithm Analysis Dan Grossman Spring 2010 Project 1 posted Section materials on using Eclipse will be very useful if you have never used
More informationMatrix-Matrix Multiplication
Chapter Matrix-Matrix Multiplication In this chapter, we discuss matrix-matrix multiplication We start by motivating its definition Next, we discuss why its implementation inherently allows high performance
More informationComputer Algorithms CISC4080 CIS, Fordham Univ. Outline. Last class. Instructor: X. Zhang Lecture 2
Computer Algorithms CISC4080 CIS, Fordham Univ. Instructor: X. Zhang Lecture 2 Outline Introduction to algorithm analysis: fibonacci seq calculation counting number of computer steps recursive formula
More informationComputer Algorithms CISC4080 CIS, Fordham Univ. Instructor: X. Zhang Lecture 2
Computer Algorithms CISC4080 CIS, Fordham Univ. Instructor: X. Zhang Lecture 2 Outline Introduction to algorithm analysis: fibonacci seq calculation counting number of computer steps recursive formula
More informationEE731 Lecture Notes: Matrix Computations for Signal Processing
EE731 Lecture Notes: Matrix Computations for Signal Processing James P. Reilly c Department of Electrical and Computer Engineering McMaster University September 22, 2005 0 Preface This collection of ten
More informationWhat is the Matrix? Linear control of finite-dimensional spaces. November 28, 2010
What is the Matrix? Linear control of finite-dimensional spaces. November 28, 2010 Scott Strong sstrong@mines.edu Colorado School of Mines What is the Matrix? p. 1/20 Overview/Keywords/References Advanced
More informationChapter 8 Gauss Elimination. Gab-Byung Chae
Chapter 8 Gauss Elimination Gab-Byung Chae 2008 5 19 2 Chapter Objectives How to solve small sets of linear equations with the graphical method and Cramer s rule Gauss Elimination Understanding how to
More informationPhys 201. Matrices and Determinants
Phys 201 Matrices and Determinants 1 1.1 Matrices 1.2 Operations of matrices 1.3 Types of matrices 1.4 Properties of matrices 1.5 Determinants 1.6 Inverse of a 3 3 matrix 2 1.1 Matrices A 2 3 7 =! " 1
More informationLinear Algebra Section 2.6 : LU Decomposition Section 2.7 : Permutations and transposes Wednesday, February 13th Math 301 Week #4
Linear Algebra Section. : LU Decomposition Section. : Permutations and transposes Wednesday, February 1th Math 01 Week # 1 The LU Decomposition We learned last time that we can factor a invertible matrix
More informationprinting Three areas: solid calculus, particularly calculus of several
Math 5610 printing 5600 5610 Notes of 8/21/18 Quick Review of some Prerequisites Three areas: solid calculus, particularly calculus of several variables. linear algebra Programming (Coding) The term project
More informationDeterminants of 2 2 Matrices
Determinants In section 4, we discussed inverses of matrices, and in particular asked an important question: How can we tell whether or not a particular square matrix A has an inverse? We will be able
More informationDirect Methods for Solving Linear Systems. Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le
Direct Methods for Solving Linear Systems Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le 1 Overview General Linear Systems Gaussian Elimination Triangular Systems The LU Factorization
More informationSection Partitioned Matrices and LU Factorization
Section 2.4 2.5 Partitioned Matrices and LU Factorization Gexin Yu gyu@wm.edu College of William and Mary partition matrices into blocks In real world problems, systems can have huge numbers of equations
More information