lec14&15 - Discrete Computation Structures CSE 2353...

Info icon This preview shows pages 1–25. Sign up to view the full content.

View Full Document Right Arrow Icon
Discrete Computation Structures CSE 2353 Bhanu Kapoor, PhD Department of Computer Science & Engineering Southern Methodist University, Dallas, TX [email protected] , 214-336-4973 October 15 and 20, 2009 Embrey 129, SMU, Dallas, Texas Lectures 14 and 15 1
Image of page 1

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

View Full Document Right Arrow Icon
Lecture 12 & 13 Agenda Bi i l C ffi i t Binomial Coefficients Recurrence 2
Image of page 2
Binomial Coefficients ALGORITHM 7.3: Determine C ( n , r ) using dynamic programming programming. Input: n , r , n > 0, r > 0, r n Output: C ( n , r ) 1 function combDynamicProg (n r) 1. (n,r) 2. begin 3. for i := 0 to n do 4. for j := 0 to min(i,r) do 5. if j = 0 or j = i then 6. C[i,j] := 1; 7. else 8. C[i,j] := C[i-1, j-1] + C[i-1, j]; 9. return C[n, r]; 10. end 3
Image of page 3

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

View Full Document Right Arrow Icon
Sequences and Recurrence Relations 4
Image of page 4
Sequences and Recurrence Relations 5
Image of page 5

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

View Full Document Right Arrow Icon
Sequences and Recurrence Relations 6
Image of page 6
Sequences and Recurrence Relations 7
Image of page 7

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

View Full Document Right Arrow Icon
Sequences and Recurrence Relations 8
Image of page 8
Sequences and Recurrence Relations 9
Image of page 9

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

View Full Document Right Arrow Icon
10
Image of page 10
Linear Homogenous Recurrence Relations 11
Image of page 11

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

View Full Document Right Arrow Icon
Linear Homogenous Recurrence Relations 12
Image of page 12
Linear Homogenous Recurrence Relations 13
Image of page 13

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

View Full Document Right Arrow Icon
Linear Homogenous Recurrence Relations 14
Image of page 14
Linear Homogenous Recurrence Relations 15
Image of page 15

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

View Full Document Right Arrow Icon
Linear Homogenous Recurrence Relations 16
Image of page 16
17
Image of page 17

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

View Full Document Right Arrow Icon
18
Image of page 18
Design and Analysis of Algorithms Analysis: predict the cost of an algorithm in terms of resources and performance Design: design algorithms which minimize the cost Hard Problems: for some problems no efficient algorithms exist => NP-Complete problems, Equally important to know that you are dealing with such a problem. 19
Image of page 19

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

View Full Document Right Arrow Icon
Why algorithms are important? Total system performance depends upon both hardware and software Hardware with high clock rates Pipelining Superscalar architecture Very high speed networking Poor choice of algorithm can bring the highest f i hi t it k performing machine to its knees Problem sizes that we are dealing with is also increasing Complexity of solution needed is also increasing 20
Image of page 20
This is the end of the preview. Sign up to access the rest of the document.