Show that for any positive integers n and any base b , there must some power of b lying in the range [b,bn].

Short Answer

Expert verified

To show that some power of b falls in the range of n,bn

Step by step solution

01

Introduction

With each integer values n and so any base b , basic process of designing algorithms is used to argue that there must be some power of b lying in the range n,bn. Each algorithm's execution duration is determined by the randomness of our inputs.

In the above question any positive integers either it is n and any base as b , it must be power of b lying with the range of n and bn . To check or understand see base information theory.

Condition of origin:

Here,n is a positive integer and b would be any base, as shown by numerically solving.

Assume n=1 and b as the basis.

As a result, there is a power of b that falls inside the range1,b .

02

Proving

Hypothesis via Induction:

Look at the fact that for each given base number b and n=k, there must be a factor of b inside the range k,bk.

Within interval k,bk, there persists a strength of b , say, bp , for some base b and positive integer k .

The proof:

Its proven assertion holds with n=k+1, i.e., for each set of base number b, a power of b within range k+1,bk+1 exists at all times.

To get all the bottom limits' area, do the following:

By inductive inference, if bp>k, then k is a positive integer and bp should be in the range k,bk.

As a result, the following integer as in k value is k+1 .

As a result, the sentence bp>kmay be written bpk+1.

To have the higher boundaries' area, do the following:

Assume the logical premise bp=k .

Multiply either system of equations by b.

This is undeniably true.

bbp=bkbk<bk+1bbp<bk+1bp+1<bk+1k+1bpbp+1<k+1k+1bp<bk+1

As a result, it is shown that for each positive integer k+1 and b , there exists some power of b in the region k+1,bk+1.

As a result, there exists some power of b in the range n,bn for each positive integer n and also any base b.

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

Section 2.2 describes a method for solving recurrence relations which is based on analyzing the recursion tree and deriving a formula for the work done at each level. Another (closely related) method is to expand out the recurrence a few times, until a pattern emerges. For instance, let’s start with the familiar T(n)=2T(n/2)+o(n). Think of o(n) as being role="math" localid="1658920245976" <cnfor some constant , so: T(n)<2T(n/2)+cn. By repeatedly applying this rule, we can bound T(n) in terms of T(n/2), then T(n/4), then T(n/8), and so on, at each step getting closer to the value of T(.) we do know, namely .

T(1)=0(1).

T(n)2T(n/2)+cn2[2Tn/4+cn/2]+cn=4T(n/4)+2cn4[2Tn/8+cn/4]+2cn=8T(n/8)+3cn8[2Tn/16+cn/8]+3cn=16T(n/16)+4cn

.

.

.

A pattern is emerging... the general term is

T(n)2kT(n/2k)+kcn

Plugging in k=log2n, we get T(n)nT(1)+cnlog2n=0(nlogn).

(a)Do the same thing for the recurrence T(n)=3T(n/2)+0(n). What is the general kth term in this case? And what value of should be plugged in to get the answer?(b) Now try the recurrence T(n)=T(n-1)+0(1), a case which is not covered by the master theorem. Can you solve this too?

In Section 2.1 we described an algorithm that multiplies two n-bit binary integers x and y in time na, where a=log23. Call this procedure fast multiply (x,y).

(a) We want to convert the decimal integer 10n(a 1 followed by n zeros) into binary. Here is the algorithm (assume n is a power of 2):

function pwr2bin(n)

if n = 1: return10102

else:

z= ???

return fastmultiply(z,z)

Fill in the missing details. Then give a recurrence relation for the running time of the algorithm, and solve the recurrence.

(b) Next, we want to convert any decimal integer x with n digits (where n is a power of 2) into binary. The algorithm is the following:

function dec2bin(x)

if n=1: return binary [ x ]

else:

split x into two decimal numbers xt,xRwith n/2 digits each

return ???

Here binary [.] is a vector that contains the binary representation of all one-digit integers. That is, binary role="math" localid="1659333641173" [0]=02, binary [1]=12, up to binary [9]=10012. Assume that a lookup in binary takes 0(1) time. Fill in the missing details. Once again, give a recurrence for the running time of the algorithm, and solve it.

Question: Solve the following recurrence relations and give a bound for each of them.

(a)T(n)=2T(n/3)+1(b)T(n)=5T(n/4)+n(c)T(n)=7T(n/7)+n(d)T(n)=9T(n/3)+n2(e)T(n)=8T(n/2)+n3(f)T(n)=49T(n/25)+n(3/2)logn(g)T(n)=T(n-1)+2(h)T(n)=T(n-1)+nc,whereisaconstant(i)T(n)=T(n-1)+cn,whereissomeconstant(j)T(n)=2T(n-1)+1(k)T(n)=T(n)+1

Practice with the fast Fourier transform.

(a) What is the FFT of (1,0,0,0)? What is the appropriate value of ωin this case? And of which sequence is (1,0,0,0)the FFT?

(b)Repeat for (1,0,1,-1).

You are given an array of nelements, and you notice that some of the elements are duplicates; that is, they appear more than once in the array. Show how to remove all duplicates from the array in time O(nlogn) .

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