16-TransformAndConquer

16-TransformAndConquer - Algorithm Design Techniques Brute...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
B.B. Karki, LSU 0.1 CSC 3102 Algorithm Design Techniques Brute force Divide-and-conquer Decrease-and-conquer Transform-and-conquer Space-and-time tradeoffs Dynamic programming Greedy techniques
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
B.B. Karki, LSU 0.2 CSC 3102 Transform-and-Conquer
Background image of page 2
B.B. Karki, LSU 0.3 CSC 3102 Basic Idea Transform-and-conquer algorithm works as a two stage procedure Transformation: modify the problem to be more amenable to solution Conquer: solve the problem Three major variations Instance simplification: Gaussian elimination, AVL trees Representation change: 2-3 Tree, Heaps Problem reduction: Counting paths in a graph, linear programming. Problem’s instance Simpler instance Another representation Solution Another problem’s instance Or Or
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
B.B. Karki, LSU 0.4 CSC 3102 Gaussian Elimination Solving a system of n linear equations in n unknowns a 11 x 1 + a 12 x 2 + ...... + a 1 n x n = b 1 a 21 x 1 + a 22 x 2 + ...... + a 2 n x n = b 2 : a n 1 x 1 + a n 2 x 2 + ...... + a nn x n = b n Substitution method Not suitable when n is large Gaussian elimination Transform a given system of n equations to an equivalent system with an upper triangular coefficient matrix Ax = b In matrix notation A = a 11 a 12 ...... a 1 n a 21 a 22 ... a 2 n : a n 1 a n 2 ... a nn , b = b 1 b 2 : b n Ax = b A x = b A = a 11 a 12 ...... a 1 n 0 a 22 ... a 2 n : 0 .. : 0 0 ... a nn , b = b 1 b 2 : b n
Background image of page 4
B.B. Karki, LSU 0.5 CSC 3102 Upper Triangular Matrix Coefficient A series of elementary operations Exchanging two equations of the system Replacing an equation with its nonzero multiple Replacing an equation with a sum or difference of this equation and some multiple of another equation Elementary operation does not change a solution to a system Normal pivoting
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 17

16-TransformAndConquer - Algorithm Design Techniques Brute...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online