Our Sponsors



Download BioinformaticsOnline(BOL) Apps in your chrome browser.




Question: Question: What is Big-O Notation ?

Surabhi Chaudhary
3741 days ago

Question: What is Big-O Notation ?

Hi All,

I am currectly focusing on algorithmic section of computational biology. I came across Big-O Notation in a research paper which made my head hurt. I google it but unable to understand it. I appreciate any help to get rid of my confusion. Any practical examples and a proper explanation of this would really help.

Thanks

Answers
0

I will try to explain it in simple way.

Just think of the Big-O as a way to express the performance of the algorythm. That performance will depend on the number of elements the algorythm is handeling = n.

An example, when you have to make a sum. You need one statement for the first addition, one statement for the second addition, and so on... So the performance will be linear with the number of elements = O(n).

Imagine a sort algorythm, which is very smart, and for each element of handles it automatically shortens the sort for the next element. This will be logarithmic with the number of elements = O(log(n)).

Or a complex formula with parameters, and with each extra parameter, the execution time multiplies. This will be exponential = O(10^n).

Thanks

0

Big O notation just represent the complexity of algorithm or any written script. there are two types of O : one is space complexity that is how much memory or space need to reserve or use while running the script and second one is time complexity that is how much time or steps require by running script.

For e.g. Global alignment of sequence A and B needs a time complexity of O(mn) and a space complexity of O(mn) , where m and n are length of sequence A and B respectively.