I am a new developer. Please help me understand what a posteriori and a priori analyses of algorithm operations are. I googled it, but I did not get any proper answers.
Apriori analysis of algorithms : it means we do analysis (space and time) of an algorithm prior to running it on specific system - that is, we determine time and space complexity of algorithm by just seeing the algorithm rather than running it on particular system (with different processor and compiler).
Apostiari analysis of algorithms : it means we do analysis of algorithm only after running it on system. It directly depends on system and changes from system to system.
In industry we cannot do Apostiari analysis as software is generally made for an anonymous user which runs it on system different (in processor like Pentium 3 or Pentium 4) from those present in the industry.
In Apriory it is the reason we use asymptotic notations to determine time and space complexity as they changes from computer to computer but asymptotically they are same.
In short
In an priory analysis, we obtain a function which bounds the algorithm computing time.
In a posteriori analysis, we collect actual statistics about the algorithms consumption of time and space, while it is executing.
Here is the book.
Somewhat longer:
Wikipedia definition
Ans another article citation
By far the most important reason to analyze an algorithm is to make sure it will correctly solve your problem. If our algorithm doesn't work, nothing else matters. So we must analyze it to prove that it will always work as expected.
We must also look at the efficiency of our algorithm. If it solves our problem, but does so in O(nn) time (or space!), then we should probably look at a redesign.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With