Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I'm having a bit of trouble with this problem:

$$\forall (f, g) \in F, f \in O(g) \implies \lceil{f}\rceil \in O(g)$$

Where F is the family of functions from $\mathbb{N}$ to $\mathbb{R}^+$.

I know that $f(n) \leq \lceil{f(n)}\rceil \leq f(n)+1$, since the next int that fits is always less than 1 unit away.

I'm kind of stuck on how to show $f(n) + 1 \leq cg(n)$, using the definition: $$\exists c > 0, \exists n_0, \forall n, n \geq n_0 \implies f(n)+1 \leq cg(n)$$

Any guidance would be greatly appreciated. Thanks!

share|improve this question
2  
The statement is only true if the limit of $g$ is not $0$... –  5xum Aug 1 at 7:32
2  
@5xum limes inferior ... so this is true if $g$ is bounded below. –  martini Aug 1 at 7:34

1 Answer 1

up vote 8 down vote accepted

The statement you want to prove is wrong. Let $g(n) = f(n) = \frac 1{n}$. Then $\lceil f\rceil(n) = 1$ for all $n$. Obviously $f \in O(g)$, but there is no $c$ such that $1 \le \frac cn$ for almost all $n$, as this is equivalent to $n \le c$. So $\lceil f\rceil \not\in O(g)$.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.