![]() |
|
#1
|
|||
|
|||
Complexity AnalysisI'm starting to learn about Complexity Analysis and am finding my text a little hard to understand. I borrowed a book from someone to learn it and in the book it has a problem that asks:
Find the complexity of the function used to find the kth smallest integer in an unordered list array of integers. CPP / C++ / C Code:
Last edited by LuciWiz : 22-Jun-2006 at 14:13.
Reason: Please insert your C++ code between [c++] & [/c++] tags
|
|||
|
#2
|
||||
|
||||
Re: Complexity AnalysisIt's O(nk). That's not a tight bound though.
|
|
#3
|
|||
|
|||
Re: Complexity AnalysisQuote:
What do you mean by the above? |
|
#4
|
||||
|
||||
Re: Complexity AnalysisIf g(z) is a function, a tight bound on g is a function f(z) such that there exists constants c1 and c2 with c1f(z) < g(z) < c2f(z) for all z sufficiently large. In this case, for nk, we can find c2 but not c1.
|
|
#5
|
|||
|
|||
Re: Complexity AnalysisI came up with the answer
f(n) = 0( m * n ) Would that be correct? |
|
#6
|
||||
|
||||
Re: Complexity AnalysisWhat is m?
|
Recent GIDBlog
Problems with the Navy (Officers) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Preferred program for audio input analysis | e30 | C++ Forum | 2 | 11-Jun-2006 16:56 |
| conversion double to float | donaldk | C Programming Language | 5 | 12-Feb-2006 23:16 |
| hashing help | saiz66 | C++ Forum | 1 | 06-Jul-2004 06:16 |
| Script needed for letting user input a few days of data for tracking and analysis. | tradertt | MySQL / PHP Forum | 3 | 06-Mar-2003 02:54 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The