0% found this document useful (0 votes)
36 views22 pages

Week 7 Lec 13

This document summarizes a lecture on analyzing algorithms. It introduces recurrence relations and methods for solving them, including iterative methods and the master theorem. It provides examples of applying these methods and references the textbook Introduction to Algorithms for further information.

Uploaded by

aleemabbas828
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views22 pages

Week 7 Lec 13

This document summarizes a lecture on analyzing algorithms. It introduces recurrence relations and methods for solving them, including iterative methods and the master theorem. It provides examples of applying these methods and references the textbook Introduction to Algorithms for further information.

Uploaded by

aleemabbas828
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

1

ary 18, 2024


Thursday, Janu
gorithm
Lahore Garrison University
CSC354-Design and Analysis of Algorithms
Week-7 Lecture-13

Analysis of Al
Semester-# Fall 2019
Prepared by:

Awais Salman Qazi


2
Instructor Contact Details

 Name: Awais Salman Qazi


 Course Instructor: Design and Analysis of Algorithms
 Credit Hours: 3
 Office Location: CS-Faculty Office, 2nd Floor New Building
 Email: [email protected]
 Visiting Hours: Friday 8am-10:30am. Also after class. Students can also walk in if I am
free

Lahore Garrison University Analysis of Thursday, Jan


Algorithm uary 18, 2024
3
Previous Lecture Summary

 Radix Sort
 Bucket Sort

Lahore Garrison University Analysis of Thursday, Jan


Algorithm uary 18, 2024
4
Today’s Lecture Summary

 Recurrence
 Solving recurrence
 Iterative Method
 Master Method

Lahore Garrison University Analysis of Thursday, Jan


Algorithm uary 18, 2024
5
Recurrence

 Recursive equation
 Problem solution in term of same problem, with smaller size input.
 f(n)= f(n-c)
 f(n)= f(n/c)

Lahore Garrison University Analysis of Thursday, Jan


Algorithm uary 18, 2024
6
Recurrence

 Recursive Algorithm
 Function call itself with smaller size input.

Lahore Garrison University Analysis of Thursday, Jan


Algorithm uary 18, 2024
7

Iterative Method

Lahore Garrison University Analysis of Thursday, Jan


Algorithm uary 18, 2024
8

Lahore Garrison University Analysis of Thursday, Jan


Algorithm uary 18, 2024
9

Lahore Garrison University Analysis of Thursday, Jan


Algorithm uary 18, 2024
10

Lahore Garrison University Analysis of Thursday, Jan


Algorithm uary 18, 2024
11

Lahore Garrison University Analysis of Thursday, Jan


Algorithm uary 18, 2024
12

Lahore Garrison University Analysis of Thursday, Jan


Algorithm uary 18, 2024
13

Lahore Garrison University Analysis of Thursday, Jan


Algorithm uary 18, 2024
14

Lahore Garrison University Analysis of Thursday, Jan


Algorithm uary 18, 2024
15

Lahore Garrison University Analysis of Thursday, Jan


Algorithm uary 18, 2024
16

Lahore Garrison University Analysis of Thursday, Jan


Algorithm uary 18, 2024
17

Master Theorem

Lahore Garrison University Analysis of Thursday, Jan


Algorithm uary 18, 2024
18

Lahore Garrison University Analysis of Thursday, Jan


Algorithm uary 18, 2024
19

Lahore Garrison University Analysis of Thursday, Jan


Algorithm uary 18, 2024
20

Lahore Garrison University Analysis of Thursday, Jan


Algorithm uary 18, 2024
21
Examples

Lahore Garrison University Analysis of Thursday, Jan


Algorithm uary 18, 2024
22
References

 These lecture notes were taken from following source:

 Introduction to Algorithms 2nd ,Cormen, Leiserson, Rivest and Stein, The


MIT Press, 2001.

Lahore Garrison University Analysis of Thursday, Jan


Algorithm uary 18, 2024

You might also like