LU Decomposition Method Jamie Trahan, Autar Kaw, Kevin Martin University of South Florida United States of America

Similar documents
Parallel Numerics. 1 Preconditioning & Iterative Solvers (From 2016)

An Application of the Dulmage-Mendelsohn Decomposition to Sparse Null Space Bases of Full Row Rank Matrices

Programming in Fortran 90 : 2017/2018

Gaussian elimination. System of Linear Equations. Gaussian elimination. System of Linear Equations

Exercises (Part 4) Introduction to R UCLA/CCPR. John Fox, February 2005

Solving two-person zero-sum game by Matlab

An Optimal Algorithm for Prufer Codes *

Solitary and Traveling Wave Solutions to a Model. of Long Range Diffusion Involving Flux with. Stability Analysis

Lecture 4: Principal components

6.854 Advanced Algorithms Petar Maymounkov Problem Set 11 (November 23, 2005) With: Benjamin Rossman, Oren Weimann, and Pouya Kheradpour

AP PHYSICS B 2008 SCORING GUIDELINES

Assignment # 2. Farrukh Jabeen Algorithms 510 Assignment #2 Due Date: June 15, 2009.

LOOP ANALYSIS. The second systematic technique to determine all currents and voltages in a circuit

Reading. 14. Subdivision curves. Recommended:

LECTURE NOTES Duality Theory, Sensitivity Analysis, and Parametric Programming

Compiler Design. Spring Register Allocation. Sample Exercises and Solutions. Prof. Pedro C. Diniz

An Accurate Evaluation of Integrals in Convex and Non convex Polygonal Domain by Twelve Node Quadrilateral Finite Element Method

2x x l. Module 3: Element Properties Lecture 4: Lagrange and Serendipity Elements

Kinematics of pantograph masts

Today s Outline. Sorting: The Big Picture. Why Sort? Selection Sort: Idea. Insertion Sort: Idea. Sorting Chapter 7 in Weiss.

Problem Set 3 Solutions

BFF1303: ELECTRICAL / ELECTRONICS ENGINEERING. Direct Current Circuits : Methods of Analysis

Calibrating a single camera. Odilon Redon, Cyclops, 1914

A Binarization Algorithm specialized on Document Images and Photos

Computer Vision. Exercise Session 1. Institute of Visual Computing

Wavefront Reconstructor

Analysis of Continuous Beams in General

Intra-Parametric Analysis of a Fuzzy MOLP

CSE 326: Data Structures Quicksort Comparison Sorting Bound

Introduction to Geometrical Optics - a 2D ray tracing Excel model for spherical mirrors - Part 2

Hermite Splines in Lie Groups as Products of Geodesics

Outline. Third Programming Project Two-Dimensional Arrays. Files You Can Download. Exercise 8 Linear Regression. General Regression

Lecture #15 Lecture Notes

Proper Choice of Data Used for the Estimation of Datum Transformation Parameters

KFUPM. SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture (Term 101) Section 04. Read

Very simple computational domains can be discretized using boundary-fitted structured meshes (also called grids)

Load Balancing for Hex-Cell Interconnection Network

AC : TEACHING SPREADSHEET-BASED NUMERICAL ANAL- YSIS WITH VISUAL BASIC FOR APPLICATIONS AND VIRTUAL IN- STRUMENTS

Course Introduction. Algorithm 8/31/2017. COSC 320 Advanced Data Structures and Algorithms. COSC 320 Advanced Data Structures and Algorithms

Complex Numbers. Now we also saw that if a and b were both positive then ab = a b. For a second let s forget that restriction and do the following.

Accounting for the Use of Different Length Scale Factors in x, y and z Directions

Control strategies for network efficiency and resilience with route choice

Preconditioning Parallel Sparse Iterative Solvers for Circuit Simulation

USING GRAPHING SKILLS

Classification / Regression Support Vector Machines

CSE 326: Data Structures Quicksort Comparison Sorting Bound

Outline. Midterm Review. Declaring Variables. Main Variable Data Types. Symbolic Constants. Arithmetic Operators. Midterm Review March 24, 2014

A SYSTOLIC APPROACH TO LOOP PARTITIONING AND MAPPING INTO FIXED SIZE DISTRIBUTED MEMORY ARCHITECTURES

Radial Basis Functions

Mathematics 256 a course in differential equations for engineering students

arxiv: v3 [cs.na] 18 Mar 2015

Smoothing Spline ANOVA for variable screening

A New Approach For the Ranking of Fuzzy Sets With Different Heights

Module 6: FEM for Plates and Shells Lecture 6: Finite Element Analysis of Shell

Hybrid Non-Blind Color Image Watermarking

S1 Note. Basis functions.

AMath 483/583 Lecture 21 May 13, Notes: Notes: Jacobi iteration. Notes: Jacobi with OpenMP coarse grain

A Saturation Binary Neural Network for Crossbar Switching Problem

Machine Learning 9. week

Dijkstra s Single Source Algorithm. All-Pairs Shortest Paths. Dynamic Programming Solution. Performance. Decision Sequence.

Sequential search. Building Java Programs Chapter 13. Sequential search. Sequential search

R s s f. m y s. SPH3UW Unit 7.3 Spherical Concave Mirrors Page 1 of 12. Notes

Support Vector Machines

Parallelizing Hines Matrix Solver in Neuron Simulations on GPU

Structure from Motion

c 2009 Society for Industrial and Applied Mathematics

Parallelism for Nested Loops with Non-uniform and Flow Dependences

CHAPTER 3 SEQUENTIAL MINIMAL OPTIMIZATION TRAINED SUPPORT VECTOR CLASSIFIER FOR CANCER PREDICTION

SENSITIVITY ANALYSIS IN LINEAR PROGRAMMING USING A CALCULATOR

A CLASS OF TRANSFORMED EFFICIENT RATIO ESTIMATORS OF FINITE POPULATION MEAN. Department of Statistics, Islamia College, Peshawar, Pakistan 2

LEAST SQUARES. RANSAC. HOUGH TRANSFORM.

Empirical Distributions of Parameter Estimates. in Binary Logistic Regression Using Bootstrap

NUMERICAL SOLVING OPTIMAL CONTROL PROBLEMS BY THE METHOD OF VARIATIONS

THE FUZZY GROUP METHOD OF DATA HANDLING WITH FUZZY INPUTS. Yuriy Zaychenko

Mesh Editing in ROI with Dual Laplacian

A One-Sided Jacobi Algorithm for the Symmetric Eigenvalue Problem

Newton-Raphson division module via truncated multipliers

Optimization Methods: Integer Programming Integer Linear Programming 1. Module 7 Lecture Notes 1. Integer Linear Programming

Solutions to Programming Assignment Five Interpolation and Numerical Differentiation

Insertion Sort. Divide and Conquer Sorting. Divide and Conquer. Mergesort. Mergesort Example. Auxiliary Array

Kinematics Modeling and Analysis of MOTOMAN-HP20 Robot

Recognizing Faces. Outline

Computer Animation and Visualisation. Lecture 4. Rigging / Skinning

Parallel Inverse Halftoning by Look-Up Table (LUT) Partitioning

A Fast Content-Based Multimedia Retrieval Technique Using Compressed Data

Computer models of motion: Iterative calculations

ON SOME ENTERTAINING APPLICATIONS OF THE CONCEPT OF SET IN COMPUTER SCIENCE COURSE

GSLM Operations Research II Fall 13/14

Sorting: The Big Picture. The steps of QuickSort. QuickSort Example. QuickSort Example. QuickSort Example. Recursive Quicksort

An Approach in Coloring Semi-Regular Tilings on the Hyperbolic Plane

Sum of Linear and Fractional Multiobjective Programming Problem under Fuzzy Rules Constraints

On Some Entertaining Applications of the Concept of Set in Computer Science Course


Inverse Kinematics (part 2) CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Spring 2016

APPLICATION OF MULTIVARIATE LOSS FUNCTION FOR ASSESSMENT OF THE QUALITY OF TECHNOLOGICAL PROCESS MANAGEMENT

Support Vector Machines

Modeling of the Absorption of the Electromagnetic Wave Energy in the Human Head Induced by Cell Phone

The Grouping Methods and Rank Estimator, Based on Ranked Set sampling, for the linear Error in Variable Models

A Fast Visual Tracking Algorithm Based on Circle Pixels Matching

Parameter estimation for incomplete bivariate longitudinal data in clinical trials

Transcription:

nbm_sle_sm_ludecomp.nb 1 LU Decomposton Method Jame Trahan, Autar Kaw, Kevn Martn Unverst of South Florda Unted States of Amerca aw@eng.usf.edu

nbm_sle_sm_ludecomp.nb 2 Introducton When solvng multple sets of smultaneous lnear equatons wth the same coeffcent matrx but dfferent rght hand sdes, LU Decomposton s advantageous over other numercal methods n that t proves to be numercall more effcent n computatonal tme than other technques. In ths worsheet, the reader can choose a sstem of equatons and see how each step of LU decomposton method s conducted. To learn more about LU Decomposton method as well as the effcenc of ts computatonal tme clc here. LU Decomposton method s used to solve a set of smultaneous lnear equatons, [A] [X] = [C], where [A] nxn s a non-sngular square coeffcent matrx, [X] nx1 s the soluton vector, and [C] nx1 s the rght hand sde arra. When conductng LU decomposton method, one must frst decompose the coeffcent matrx [A] nxn nto a lower trangular matrx [L] nxn, and upper trangular matrx [U] nxn. These two matrces can then be used to solve for the soluton vector [X] nx1 n the followng sequence: Recall that [A] [X] = [C]. Knowng that [A] = [L] [U] then frst solvng wth forward substtuton [L] [Z] = [C] and then solvng wth bac substtuton [U] [X] = [Z] gves the soluton vector [X]. A smulaton of LU Decomposton method follows. Secton 1: Input Data Below are the nput parameters to begn the smulaton. Ths s the onl secton that requres user nput. The user can change the values that are hghlghted and Mathematca wll calculate the soluton vector [X]. è Number of equatons n = 4 4 è [A] nxn coeffcent matrx

nbm_sle_sm_ludecomp.nb 3 A = Table@88175, 25, 5, 1<, 8512, 64, 8, 1<, 81728, 144, 12, 1<, 88, 4, 2, 1<<D; A êê MatrxForm 175 25 5 1 512 64 8 1 1728 144 12 1 8 4 2 1 è [RHS] nx1 rght hand sde arra RHS = Table@8106.8, 177.2, 279.2, 79.3<D; RHS êê MatrxForm 106.8 177.2 279.2 79.3 Secton 2: LU Decomposton method Ths secton dvdes LU Decomposton nto 3 steps: 1) Decomposton of coeffcent matrx @AD nxn 2) Forward Substtuton 3) Bac Substtuton ü Step 1: Fndng [L] and [U] How does one decompose a non-sngular matrx [A], that s, how do ou fnd [L] and [U]? The followng procedure decomposes the coeffcent matrx [A] nto a lower trangular matrx [L] and upper trangular matrx [U], gven [A]=[L][U]. è For [U], the elements of the matrx are exactl the same as the coeffcent matrx one obtans at the end of forward elmnaton steps n Nave Gauss Elmnaton. è For [L], the matrx has 1 n ts dagonal entres. The non-ero elements on the non-dagonal elements are multplers that made the correspondng entres ero n the upper trangular matrx durng forward elmnaton. LU Decomposton procedure: Varable names: n = number of equatons U = nxn upper trangular matrx L = nxn lower trangular matrx

nbm_sle_sm_ludecomp.nb 4 LUdecompose@n_, A_D := ModuleA8AA, multpler<, L = Arra@0, 8n, n<d; U = Arra@0, 8n, n<d; AA = Arra@0, 8n, n<d; For@ = 1, n, ++, L@@, DD = 1; For@ = 1, <= n, ++, AA@@, DD = A@@, DD; If@!=, L@@, DD = 0DDD; ForA = 1, n 1, ++, ForA = + 1, n, ++, AA@@, DD multpler = NA AA@@, DD E; L@@, DD = multpler; For@ = 1, n, ++, AA@@, DD = AA@@, DD multpler AA@@, DDDE For@ = 1, n, ++, For@ = 1, n, ++, U@@, DD = AA@@, DD; If@ <, U@@, DD = 0DDD;E; Prnt@"L", "=", L êê MatrxFormD; Prnt@"U", "=", U êê MatrxFormDE LUdecompose@n, AD 1 0 0 0 2.92571 1 0 0 L= 9.87429 11.25 1 0 0.0457143 0.3125 0.00806452 1 U= 175 25 5 1 0 9.14286 6.62857 1.92571 0 0 37.2 12.79 0 0 0 0.455645 Notce that matrx [L] has onl one unnown to be solved for n ts frst row, and matrx [U] has onl one unnown to be solved for n ts last row. Ths wll prove useful n solvng for the soluton vector [X] n the followng steps of LU decomposton method.

nbm_sle_sm_ludecomp.nb 5 ü Step 2: Forward Substtuton Now that the [L] matrx has been formed, forward substtuton step, [L][Z]=[C], can be conducted, begnnng wth the frst equaton as t has onl one unnown, 1 = c 1 ÅÅÅÅÅÅÅ Equaton (2.1) l 1,1 Subsequent steps of forward substtuton can be represented b the followng formula: -1 Hl, * LD =2..n L Equaton (2.2) l, = Hc -@ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ =1 ÅÅÅÅÅÅÅÅÅÅÅÅÅ The procedure below conducts forward substtuton steps to solve for @ZD nx1. Varable names: n = number of equatons RHS = nx1 rght hand sde arra L = nxn lower trangular matrx forwardsubsttuton@n_, L_, C_D := ModuleA8<, Z = Arra@, nd; C@@1DD Z@@1DD = L@@1, 1DD ; ForA = 2, n, ++, summ = 0; For@ = 1, 1, ++, summ = summ + L@@, DD Z@@DDD; HC@@DD summl Z@@DD = E; L@@, DD Prnt@"Z", "=", Z êê MatrxFormDE forwardsubsttuton@n, L, RHSD Z= 106.8 135.266 746.372 38.1661

nbm_sle_sm_ludecomp.nb 6 ü Step 3: Bac Substtuton Now that [Z] has been found, t can be used n the bac substtuton step, [U][X] = [Z], to solve for soluton vector @X D nx1, where @UD nxn s the upper trangular matrx calculated n Step 1, and @ZD nx1 s the rght hand sde arra. Bac substtuton begns wth solvng the n th equaton as t has onl one unnown. x n = n ÅÅÅÅÅÅÅÅ u n,n Equaton (2.3) The remanng unnowns are solved for worng bacwards from the Hn - 1L th equaton to the frst equaton usng the formula below x = H n -@ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ Hu =+1, *x ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ LD L =n-1. ÅÅÅÅÅÅ.1 The followng procedure solves for @XD nx1. u, Equaton (2.4) Varable names: n = number of equatons Z = nx1 rght hand sde arra U = nxn upper trangular matrx bacsubsttuton@n_, U_, Z_D := ModuleA8<, X = Arra@x, nd; Z@@nDD X@@nDD = U@@n, ndd ; ForA = n 1, >= 1,, summ = 0; For@ = + 1, n, ++, summ = summ + U@@, DD X@@DDD; HZ@@DD summl X@@DD = E; U@@, DD Prnt@"X", "=", X êê MatrxFormDE The soluton vector @X D nx1 s: bacsubsttuton@n, U, ZD X= 0.116681 3.48532 8.73534 83.7628

nbm_sle_sm_ludecomp.nb 7 Concluson Mathematca helped us appl our nowledge of LU Decomposton method to solve a sstem of n smultaneous lnear equatons. The results are as follows: Prnt@"L", "=", L êê MatrxFormD Prnt@"U", "=", U êê MatrxFormD forwardsubsttuton@n, L, RHSD bacsubsttuton@n, U, ZD 1 0 0 0 2.92571 1 0 0 L= 9.87429 11.25 1 0 0.0457143 0.3125 0.00806452 1 U= Z= X= 175 25 5 1 0 9.14286 6.62857 1.92571 0 0 37.2 12.79 0 0 0 0.455645 106.8 135.266 746.372 38.1661 0.116681 3.48532 8.73534 83.7628 Queston 1: Solve the followng set of smultaneous lnear equatons usng LU decomposton method. 5 6 2.3 6 9 2 3.5 7 3.5 6 2 3 1.5 2 1.5 6 x 1 x 2 x 3 x 4 4 5 = 6.7 7.8 Queston 2: Use LU decomposton repeatedl to fnd the nverse of 5 6 2.3 6 9 2 3.5 7 3.5 6 2 3 1.5 2 1.5 6 Queston 3: Loo at the [Z] matrx n [L][Z]=[C] step n LU decomposton method of Queston 1. Is t the same as the [RHS] matrx at the end of forward elmnaton steps n Nave Gauss Elmnaton method? If es, s ths a concdence?

nbm_sle_sm_ludecomp.nb 8 References Autar Kaw, Holstc Numercal Methods Insttute, http://numercalmethods.eng.usf.edu/mws, See Introducton to Sstems of Equatons How does LU Decomposton method wor? Savng of computatonal tme for fndng nverse of a matrx usng LU decomposton