0% found this document useful (0 votes)
36 views1 page

CS445 - Spring 2006 Brief Class Notes

This document provides notes on common recursions that will be covered in CS445, including formulas for recursion, their solutions, and time complexities. It lists five types of recursions - ones with solutions of O(n), O(n^2), O(n log n), and O(n log n) time complexities, with the base case being T(1)=c where c is a constant.

Uploaded by

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

CS445 - Spring 2006 Brief Class Notes

This document provides notes on common recursions that will be covered in CS445, including formulas for recursion, their solutions, and time complexities. It lists five types of recursions - ones with solutions of O(n), O(n^2), O(n log n), and O(n log n) time complexities, with the base case being T(1)=c where c is a constant.

Uploaded by

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

CS445 Spring 2006

Brief Class Notes


In this course, we will see a few common recursions. Here are some of
them, and their solution. The conditions of all of them is T (1) = c, where a
and c are constants, and 0 < a < 1.
F ormula
T (n) = c + T (n 1)
T (n) = cn + T (n 1)
T (n) = cn + T (bn/2c) + T (dn/2e)
T (n) = cn + T (an)
T (n) = cn + T (an) + T ((1 a)n)

Solution
T (n) = O(n)
T (n) = O(n2 )
T (n) = O(n log n)
T (n) = O(n)
T (n) = O(n log n)

(1)

You might also like