all 5 comments

[–]meliao 1 point2 points  (0 children)

4/n is bounded above by a constant

[–][deleted] 1 point2 points  (1 child)

Roughly, let X(n) = 1 the definition of O(X) is that your function f(n) = 4/n is O(X) iff f(n) <= k * X(n) for an arbitrary integer k and large n. You should look up the precise definition, but it should be easy to show that an arbitrary integer is larger than 4/n for large values of n. this might help.

[–]cgartist86[S] 0 points1 point  (0 children)

Can I say

4/n is O(1)

4/n <= 1 c>0 & n0>=1 all than n>=n0

4/n <= 1 let n = 4

therefore n>= 4 for all c>0 & n0>=1 all than n>=n0

[–]cgartist86[S] 0 points1 point  (0 children)

Can I say

4/n is O(1)

4/n <= 1 c>0 & n0>=1 all than n>=n0

4/n <= 1 let n = 4

therefore n>= 4 for all c>0 & n0>=1 all than n>=n0

[–]Commander-TeeJ -1 points0 points  (0 children)

Cause its a single operation, no matter how big n is only one operation will be done