/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} Q2E Show that for any positive integ... [FREE SOLUTION] | 91Ó°ÊÓ

91Ó°ÊÓ

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 bp≥k+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+1→bbp<bk+1→bp+1<bk+1→k+1≤bp≤bp+1<k+1→k+1≤bp<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 91Ó°ÊÓ!

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

In Section 1.2.3, we studied Euclid’s algorithm for computing the greatest common divisor (gcd) of two positive integers: the largest integer which divides them both. Here we will look at an alternative algorithm based on divide-and-conquer.

(a) Show that the following rule is true.

gcd(a,b)={2gcd(a2,b2)ifa,bareevengcd(ab2)ifaisodd,bisevengcd(a-b2,b)ifa,bareodd

(b) Give an efficient divide-and-conquer algorithm for greatest common divisor.

(c) How does the efficiency of your algorithm compare to Euclid’s algorithm if a and b are n-bit -bit integers? (In particular, since n might be large you cannot assume that basic arithmetic operations like addition take constant time.)

Suppose you are choosing between the following three algorithms: • Algorithm A solves problems by dividing them into five sub-problems of half the size, recursively solving each sub-problem, and then combining the solutions in linear time. •

Algorithm B solves problems of size n by recursively solving two sub-problems of size n-1and then combining the solutions in constant time. • Algorithm C solves problems of size n by dividing them into nine sub-problems of size n/3, recursively solving each sub-problem, and then combining the solutions in O(n2)time.

What are the running times of each of these algorithms (in big- O notation), and which would you choose?

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: You are given an infinite array A[·]in which the first n cells contain integers in sorted order and the rest of the cells are filled with ∞. You are not given the value of n. Describe an algorithm that takes an integer x as input and finds a position in the array containing x, if such a position exists, in O(log n) time. (If you are disturbed by the fact that the array A has infinite length, assume instead that it is of length n, but that you don’t know this length, and that the implementation of the array data type in your programming language returns the error message ∞whenever elements A[i]withi>n are accessed.)

A binary tree is full if all of its vertices have either zero or two children. Let Bndenote the number of full binary trees with n vertices. (a)By drawing out all full binary trees with 3, 5, or 7 vertices, determine the exact values of B3, B5, and B7. Why have we left out even numbers of vertices, like B4?

(b) For general n, derive a recurrence relation for Bn.

(c) Show by induction that Bnis Ω(2n).

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.