Answer the question
In order to leave comments, you need to log in
What is an "asymptotically exact estimate of the running time of an algorithm"?
Hello to all granite gnawing. I analyze Kormen "Algorithms. Construction and analysis". For a deeper understanding, I look through materials from other sources - some points are presented in a more primitive way and settle faster. I came across an article algolist.manual.ru/misc/o_n.php . I immediately got hooked on determining the exact estimate Θ():
The estimate Θ() exists only when O() and Ω() are the same and equal to them.
So, O() is the asymptotic evaluation of the algorithm on the worst input data, Ω() is on the best input data, Θ() is shorthand for the same O() and Ω().two dubious points. Even though they sounded obviously wrong, I realized that I was confused and did not grasp the concept of an exact estimate ( Θ() ).
Θ() gives both upper and lower bounds for the growth of the functionIt is known that, for example, for sorting qsort, the average estimate for a random distribution of input data (it is also the best, for a fully balanced version) is Θ(nlogn), while the upper estimate (for specially selected non-optimal data) is O(n^2).
Answer the question
In order to leave comments, you need to log in
My authoritative amateur opinion is as follows.
Firstly, it makes sense to read the primary source on this topic, namely the articleDonald Knuth. On page 19, it gives a convenient, in the author's opinion, definition of the relations Θ,O,Ω. These ratios are initially given as ratios of the values of some two functions. Estimating time and space complexity are applications. The purpose of introducing such a notation was to simplify the calculation of the number of operations required to execute the algorithm without losing quality characteristics, and also to get rid of possible dependencies on the architecture, compiler, etc. Roughly speaking, if the algorithm calculates 1000 units of input data per hour, then this notation helps to quickly estimate how long, for example, 2000 units will be calculated. Naturally, this notation "roughens" information about the values of the function, this is its purpose.
What is an "asymptotically exact estimate of the running time of an algorithm"?If we are talking about Θ-notation, then this is a function (or set of functions) that grows as fast as the running time of the algorithm with an increase in the length of the input data.
The estimate Θ() exists only when O() and Ω() are the same and equal to them.This position seems to me partially correct. If f(n)=O(g(n)) and f(n)=Ω(g(n)), then f(n)=Θ(g(n)), where g(n) is some function, for example, of the form nlogn. Another thing is that if f(n)=O(n), then it is also true that f(n)=O(n^2), that is, despite the fact that the function has a Θ-estimate, its O- and Ω-estimates may not coincide.
So, O() is the asymptotic evaluation of the algorithm on the worst input data, Ω() is on the best input dataIf we define "best"/"worst" data as requiring the minimum/maximum time among input data sets of the same length, then this statement also seems to me partially correct. The number of operations that the algorithm performs in the worst, average and best cases are functions of the length of the input data. Each of these functions can be evaluated using each of the three (Ω,Θ,O) notations.
while the upper bound (for tailor-made non-optimal data) is O(n^2).and also equal to Θ(n^2).
Would it be correct to say that a really asymptotically accurate estimate of an algorithm is given primarily based on the specifics of the operation of a particular algorithm for averaged input data (understanding averaged data as a randomly distributed array of data), and in complex cases, starting from O() and below estimates Ω()?From my point of view, if there are coinciding estimates O and Ω, the Θ-estimate is obtained in an elementary way. Another thing is that the "worst", "best", "average" computational complexity are functions of the length of the input data. For each of these functions, an estimate of the asymptotic rate of increase can be given, whether it be Ω, Θ or O. Talking about a "randomly distributed array of data", you can delve into mathematical statistics, which, in my opinion, will not simplify the task.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question