[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: bigo.png (125 KB, 1231x613)
125 KB
125 KB PNG
What is it about big O notation that is so hard to understand for people?
Despite being a fundamental concept in CS, so many CS graduates think they understand what big O means, but when they try to explain it they are completely wrong.
For example pic related, almost every statement in the "explanation" is incorrect.
>>
>>107723015
Get a job
>>
>>107723096
What do I need a second job for?
>>
>>107723160
To replace your first job of being bestest good boy point getter.
>>
>>107723015
The hardest thing to understand about "Big O notation" is its use case. It only tells you how well an algorithm scales instead of telling you how well it runs, an algorithm with worse big O notation can run faster. The other issue is that it takes the hardware out of the equation, binary search and the "cache friendly binary search" have the same big O notation, but the cache friendly one not only runs faster, but it also scales faster.
>>
>>107723160
Blacked.com cleanup crew doesn't count.
>>
>>107723205
>It only tells you how well an algorithm scales instead of telling you how well it runs
Wrong.
>>107723187
>>107723238
That is not my job.
>>
>>107723257
Oh really, tell me what you can infer from knowing that Quicksort, Mergesort, Shellsort, and Introsort all have the same Big O notation in the best case.
>>
>>107723257
Are you the same idiot that ruins every daily programming thread?
>>
>>107723303
Wrong.
>>107723299
>Quicksort, Mergesort, Shellsort, and Introsort all have the same Big O notation in the best case
Meaningless claim. Mathematical gibberish.
>>
>>107723015
I'm not even a programmer but I get it:
O(n) is a function dictating the required processing time based on "n", the size of the input.
So for example, if I were to say O(n), and the processing time is 10s for n=1, here's what you'd get:

n=1, O(1) = 10s*1 = 10s
n=2, O(2) = 10s*2 = 20s
n=9001, O(9001) = 10s*9001 =~ 90ks etc.

If the function was O(n^(3/2)) instead:
n=1, O(1) = 10s*1^(3/2) = 10s
n=2, O(2) = 10s*2^(3/2) =~ 28s
n=9001, O(9001) = 10s*9001^(3/2) =~ 854ks

So if "n" is large you'll probably want to stick to functions that grow slower, such as log(n). But if "n" is small you'll probably want to look at the time necessary to run when n=1.
>>
>>107723367
>O(n) is a function
Wrong
>n=1, O(1) = 10s*1 = 10s
>n=2, O(2) = 10s*2 = 20s
>n=9001, O(9001) = 10s*9001 =~ 90ks etc.
Wrong wrong wrong.
>>
O(n) describes a function's upper bound

A function f(n) is O(g(n)) if there exist positive constants M and k such that 0 <= f(n) <= M * g(n) for all n >= k

THERE OP you can stop sperging out now
>>
>>107723401
Get a job.
>>
But how will this help me create a new GET endpoint for return number of sales?
>>
>>107723493
Correct.
>>107723499
see
>>107723160
>>
>>107723015
>pic related, almost every statement in the "explanation" is incorrect
No.
You are wrong.
Kill yourself.
>>
>>107723205
>an algorithm with worse big O notation can run faster
can********!!!!!!!!!!!!!!
>>
>>107723401
Calm down, autist.
>>
>>107723493
>0 <= f(n)
Do you even know how retarded you are?
>>
assume that n is the size of a dataset. O(1) constant time, and does not grow based on n. this could be returning the size of the dataset, if it is known. O(n) is linear time, and it means essentially any constant operations applied to each of the dataset. this could be looping over it 100 times. as n grows so do the operations. O(logn) is something that is always less than O(n), but still grows as n grows. the classic example is binary search. O(n^m) is for each element in the dataset n^(m-1) operations are applied to it. the only other one that is real is O(n!) and this is just brute forcing combinations, an example would be the traveling salesman.
>>
>>107723205
>an algorithm with worse big O notation can run faster
Correct. Quicksort is O(n^3) in the average case and bubble sort is O(n^2), yet quicksort sometimes runs faster.
>>
>>107723652
>You are wrong.
Wrong.
>>107723804
>O(1) constant time, and does not grow based on n
Wrong.
>O(n) is linear time, and it means essentially any constant operations applied to each of the dataset
Wrong.
>O(logn) is something that is always less than O(n)
Wrong.
>but still grows as n grows
Wrong.

Clearly you know next to nothing about big O notation, just like the redditor in OP's pic.
>>
>>107723015

BigO notation can be understood in O(LogN)2¥ time. Basically you need to be naturally exponentially asian.
>>
>>107723367
big O has nothing to do with time
you can't make generalizations like this
>>
This autistic shit is for no code retards. (YOU) would save years of your life if you actually just fucking wrote code instead of obsessing over semantic minutiae. Fucking spergs.
>>
>>107723928
What he did was specification not generalization. The opposite of generalization.
>>107724013
>understanding the most basic CS terms is for no code retards
>>
>>107723850
If that's not it, then what is?
>>
>>107723928
>big O has nothing to do with time
It has EVERYTHING to do with time.
>>
File: nerd.png (290 KB, 1000x997)
290 KB
290 KB PNG
>>107723257
>UMM AKSHUALLY THAT'S NOT MY JOB OKAYYYYYY
>>
>>107724129
What point in particular are you inquiring about? Your question is unclear.
>>
>>107724122
This is all you need. Now kill yourself.
>>
>>107724184
This image is incredibly wrong and unbelievably stupid. The person who made it didn't have a clue as to what big O notation stands for
>>
>>107724184
Actual candidate for one of the worst illustrations of a math concept ever made.
>>
Non-whites can't comprehend Big-O notation. They might be able to recite it, but they never truly understand it.
>>
>>107723015
In the real world O(1) can be slower than O(log n). Some trees are faster than hashmaps in practice.
>>
>>107724256
In the mathematical world too. Literally nothing about the concept implies that a member of O(1) is faster than a member of O(logn), not even asymptotically.
>>
>>107723367
>I get it
>every conclusion is wrong
>>
>>107724268
>>107724256
Also you needing to specify "in the real world" implies you don't understand what the concept means, i.e. what big O stands for. It's not just the real world.
>>
>>107724268
>not even asymptotically
Yes even asymptotically
>>
>>107724256
You can make that claim for all time complexities.
>>
>>107723015
This is a good explanation.
>>
>>107724289
Wrong.
>>
>>107724316
Wrong. Nearly every sentence of the "explanation" is incorrect, the person demonstrates little to no understanding of what big O notation stands for.
>>
>>107724122
>O(n) is a function dictating the required processing time based on "n", the size of the input.
how is this not a generalization of the concept in terms of time
anyhow, it's wrong

>>107724137
no it's not
big-O is just the upper bound as your input becomes sufficiently large. it has nothing to do with time.
>>
>>107724333
>Nearly every sentence of the "explanation" is incorrect,
Prove it
>>
>>107724353
>O(1) is constant time, which means it doesn't take longer as the input size increases
This is incorrect. A function that takes time
f(n) = 1000 - 1000/(n + 1)
is O(1) yet its execution time increases with input.
>>
>>107724401
That function would be O(n), not O(1)
>>
>>107724401
>is O(1) yet its execution time increases with input.
But it doesn't. It decreases instead
>>
>>107723015
>>107723257
deja vu
how often do you make this thread op
I remember seeing an anon have a melty over this replying
>WRONG WRONG WRONG
to every post in the thread on at least one earlier occasion
>>
>>107724442
Learn basic arithmetic
>>
I feel like I saw this exact OP with the same Wrong. poster like 6 months ago.

Really inane stuff on the website today guys.
>>
>wahhhh the intuitive explanation did not talk about sets constants and limits this will not stand



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.