Thursday 18 May 2017
Big-Oh Notation: Part 1 - Basics for Newbies


In 2009, one of the employees from a company named Unlimited IT (in Durban, South Africa) got frustrated by the slow speed of data transmission on ADSL and complained about it saying- "a pigeon can transfer the data faster than this broadband". The company decided to test the validity of his statement with
aplomb.

Carrier Bird: Pegion
Carrier Bird: Pigeon

Hence, they armed a pigeon with 4GB memory stick against the ADSL service from the country's biggest web firm, Telkom. The main aim was to see how slow is the internet provided by the broadband.

The captivating result was funny!! Guess who won the race? Winston the Pigeon!

Winston took 2 hours to carry the 4 GB data 60 miles; meanwhile, ADSL could send only 4% of the same 4 GB data in 2 hours. Now, Let's assume that this Pigeon is as strong as Superman.

Case 1: We want to transfer 8 GB data from location A to B using same broadband mentioned earlier.
Time taken by Pigeon to transfer 8 GB data = 2 hours.
And, Time taken by Broadband to transfer 8 GB data = 25 hours.

Case 2: We want to transfer 32 GB data from location A to B using same broadband mentioned earlier.
Time taken by Pigeon to transfer 32 GB data = 2 hours.
And, Time taken by Broadband to transfer 32 GB data = 50 hours.

Note: As the data gets larger and larger, time taken by the broadband increase proportionally with the size of the data; whereas the pigeon would still take sme time (2 hours) to transfer the data from A to B i.e., the time remains constant (2 hours) irrespective of the size of the data.

So, Time taken by the Pigeon = Constant = O(1),  This means that the time it takes to transfer N gigabytes varies proportionally with 1. That is, it remains constant. Whereas, Time taken by the broadband to transfer data would increase proportionally with the size of the input data.  Hence it takes O(N) time.

Next Part - Big-Oh : Theory & Calculation