Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>Name a function that is neither O(n) nor Omega(n)</p> </blockquote> <p>Saying <code>f ∈ O(g)</code> means the quotient</p> <pre><code>f(x)/g(x) </code></pre> <p>is bounded from above for all sufficiently large <code>x</code>.</p> <p><code>f ∈ Ω(g)</code> on the other hand means the quotient</p> <pre><code>f(x)/g(x) </code></pre> <p>is bounded below away from zero for all sufficiently large <code>x</code>.</p> <p>So to find a function that is neither <code>O(n)</code> nor <code>Ω(n)</code> means finding a function <code>f</code> such that the quotient</p> <pre><code>f(x)/x </code></pre> <p>becomes arbitrarily large, and arbitrarily close to zero on every interval <code>[y, ∞)</code>.</p> <blockquote> <p>I'm thinking this may be a correct answer: <code>(n^3 (1 + sin n))</code> is neither O(n) nor Omega(n).</p> </blockquote> <p>Let's plug it in our quotient:</p> <pre><code>(n^3*(1 + sin n))/n = n^2*(1 + sin n) </code></pre> <p>The <code>n^2</code> grows to infinity, and the factor <code>1 + sin n</code> is larger than 1 for roughly three out of every six <code>n</code>. So one every interval <code>[y, ∞)</code> the quotient becomes arbitrarily large. Given an arbitrary <code>K &gt; 0</code>, let <code>N_0 = y + K + 1</code> and <code>N_1</code> the smallest of <code>N_0 + i, i = 0, 1, ..., 4</code> such that <code>sin (N_0+i) &gt; 0</code>. Then <code>f(N_1)/N_1 &gt; (y + K + 1)² &gt; K² + K &gt; K</code>.</p> <p>For the <code>Ω(n)</code> part, it's not so easy to prove, although I believe it is satisfied.</p> <p>But, we can modify the function a bit, retaining the idea of multiplying a growing function with an oscillating one in such a way that the proof becomes simple.</p> <p>Instead of <code>sin n</code>, let us choose <code>cos (π*n)</code>, and, to offset the zeros, add a fast decreasing function to it.</p> <pre><code>f'(n) = n^3*(1 + cos (π*n) + 1/n^4) </code></pre> <p>now,</p> <pre><code> / n^3*(2 + 1/n^4), if n is even f'(n) = &lt; \ 1/n , if n is odd </code></pre> <p>and it is obvious that <code>f'</code> is neither bounded from above, nor from below by any positive constant multiple of <code>n</code>.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload