Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Show that n! is notO(2n)

Short Answer

Expert verified

n! is notOn2 from theproof by contradiction.

Step by step solution

01

Definition of Big-O  Notation

Letfandgbe functions from the set of integers or the set of real numbers to the set of real numbers. We say thatf(x)isO(g(x))if there are constants C and k such that

|f(x)|C|g(x)|

Wheneverx>k

02

 To prove n! is not O(2n)

By the proof by contradiction,

Let us assume n! is O(2n). Thenthere are constants C and k such that

|n!|C|2n|

Whenevern>k

Divide by|2n|on both sides,

|n!||2n|C|2n||2n||n!||2n|C

03

Final Solution

Letk>2 for n>2, then,

n!2n=n2n12n222212n2111112

n!2nn4 ,

Now combing with the previous inequality we get,

n4n!2nC

Here the functionfn=n4is not bounded as n is large.

Hence our assumption n! is O2nis false.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Study anywhere. Anytime. Across all devices.

Sign-up for free