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

Conditional Asymptotic Notation

This document discusses using asymptotic notation to analyze algorithms when the input size satisfies certain conditions, such as being a power of 2. It gives the example of a divide and conquer algorithm for multiplying large integers where the algorithm directly handles a base case of input size 1 in a constant time, and if the size is greater than 1 it recursively multiplies four pairs of smaller inputs and performs additional linear work, taking O(n log n) time overall.

Uploaded by

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

Conditional Asymptotic Notation

This document discusses using asymptotic notation to analyze algorithms when the input size satisfies certain conditions, such as being a power of 2. It gives the example of a divide and conquer algorithm for multiplying large integers where the algorithm directly handles a base case of input size 1 in a constant time, and if the size is greater than 1 it recursively multiplies four pairs of smaller inputs and performs additional linear work, taking O(n log n) time overall.

Uploaded by

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

Conditional asymptotic notation Many algorithms are easier to analyze if initially we restrict our attention to instances whose size

satisfies a certain condition, such as being a power of 2. Consider, for example, the divide and conquer algorithm for multiplying large integers that we saw in the Introduction. et n be the size of the integers to be multiplied. !he algorithm proceeds directly if n = 1, which requires a microseconds for an appropriate constant a. If n>1, the algorithm proceeds by multiplying four pairs of integers of size n"2 #or three if we use the better algorithm$. Moreover, it ta%es a linear amount of time to carry out additional tas%s. &or simplicity, let us say that the additional wor% ta%es at most bn microseconds for an appropriate constant b.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy