MHB How can big O's have values of the form A+B?

  • Thread starter Thread starter find_the_fun
  • Start date Start date
  • Tags Tags
    Form
AI Thread Summary
The discussion centers on the use of big O notation in relation to bucket sort's expected time complexity of O(n+k). It explores the rationale behind incorporating arithmetic in big O notation, emphasizing that it reflects the combined growth rates of two variables, n and k. The notation indicates that the upper bound is not determined until the algorithm is implemented, allowing for either n or k to dominate the complexity. The conversation also touches on a fundamental property of big O notation, stating that if two functions are in O of their respective bounds, their sum is also in O of the sum of those bounds. This highlights the flexibility of big O notation in analyzing algorithmic performance based on varying inputs.
find_the_fun
Messages
147
Reaction score
0
For example according to wikipedia and this question bucket sort has the expected time complexity O(n+k). How does it make sense to use big O notation with arithmetic in it? Is it because it is not known which of n or k will determine the upper bound but once it is known (i.e. the algorithm is implemented) then it would be known if it actually is O(n) or O(k)?
 
Technology news on Phys.org
find_the_fun said:
For example according to wikipedia and this question bucket sort has the expected time complexity O(n+k). How does it make sense to use big O notation with arithmetic in it? Is it because it is not known which of n or k will determine the upper bound but once it is known (i.e. the algorithm is implemented) then it would be known if it actually is O(n) or O(k)?

To say that \(f(n,k)\in O(n+k)\) means that there exists a \(C>0\) such that for \(n+k\) large enough:

\[|f(n,k)| < C |n+k|\]

That is they jointly define the bound on the growth of \(|f(x,k)|\)

CB
 
find_the_fun said:
For example according to wikipedia and this question bucket sort has the expected time complexity O(n+k). How does it make sense to use big O notation with arithmetic in it? Is it because it is not known which of n or k will determine the upper bound but once it is known (i.e. the algorithm is implemented) then it would be known if it actually is O(n) or O(k)?

One of the basic property of the 'big-O notation' is that, if f and g are positive functions, then ... $\displaystyle f_{1} \in \mathcal{O} (g_{1})\ \text{&}\ f_{2} \in \mathcal{O} (g_{2}) \implies f_{1}+f_{2} \in \mathcal{O} (g_{1}+g_{2}) $

Kind regards

$\chi$ $\sigma$
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top