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

Unlike a decreasing geometric series, the sum of the1,12,13,14,15,..... diverges; that is,i=1n1i=

It turns out that, for large n , the sum of the first n terms of this series can be well approximated as

i=1n1iInn+y

where is natural logarithm (log base e=2.718...) and y is a particular constant 0.57721...... Show that

i=1n1i=θ(logn)

(Hint: To show an upper bound, decrease each denominator to the next power of two. For a lower bound, increase each denominator to the next power of 2 .)

Short Answer

Expert verified

It is proved thati=1n1i=Θ(logn).

Step by step solution

01

Finding the Upper Bound of the equation

Upper bound:

So, here we are going to expand the given expressioni=1n1i=

i=1n1i=1+12+13+14+

Now, we know that the above expression is lesser than

role="math" localid="1658914247883" i=1n1i1+12+13+14+14+14+14++12k......2kterms+12k...=1+1+...+1lognterms+....

Because the above sum series is almost equivalent tologn

So, the upper bound is:(logn)

02

Finding Lower Bound of the equation

Now consider i=1n1i, then

i=1n1i=1+12+13+14+12+12+14+14+14+14+18+18+18+...

Now, we know that the above expression is greater than or equal to,22+44+88+.... . Then,

i=1n1i22+44+88+....

Now, the number of terms in above expression is roughly (logn).

role="math" localid="1658914145755" i=1n1i22+44+88+....=logn

So, the lower bound is .

From the upper bound and lower bound, we have i=1n1i=Θ(logn).

Hence proved.

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

Most popular questions from this chapter

Prove that the grade-school multiplication algorithm (page 24), when applied to binary numbers, always gives the right answer.

What is the least significant decimal digit of (1717)17? (Hint: For distinct primesp,q, and any a is not equal to role="math" localid="1658726105638" a0(modpq), we proved the formula role="math" localid="1658726171933" a(p-1)1(modpq)in Section 1.4.2.)

A positive integer N is a power if it is of the formqk , where q,role="math" localid="1658399000008" k are positive integers and k>1.

(a) Give an efficient algorithm that takes as input a number and determines whether it is a square, that is, whether it can be written asq2 for some positive integer q. What is the running time of your algorithm?

(b) Show that if N=qk (with role="math" localid="1658399171717" N,q , andk all positive integers), then either role="math" localid="1658399158890" klogNorN=1.

(c) Give an efficient algorithm for determining whether a positive integerN is a power. Analyze its running time.

Wilson's theorem says that a numberis prime if and only if
(N-1)!=-1(modN).

(a) If is prime, then we know every number1x<p is invertible modulo . Which of thesenumbers is their own inverse?
(b) By pairing up multiplicative inverses, show thatrole="math" localid="1658725109805" (p-1)!=-1(modp) for prime p.
(c) Show that if N is not prime, then(N-1)!(modN) .(Hint: Considerd=gcd(N,(N-1)!.)
(d) Unlike Fermat's Little Theorem, Wilson's theorem is an if-and-only-if condition for primality. Why can't we immediately base a primality test on this rule?

The Fibonacci numbers F0,F1,...are given by the recurrenceFn+1=Fn+Fn-1,F0=0,F1=1. Show that for anyn1,gcd(Fn+1,Fn)=1.

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free