Chapter 2: Q2E (page 83)
Show that for any positive integers n and any base b , there must some power of b lying in the range .
Short Answer
To show that some power of b falls in the range of
Chapter 2: Q2E (page 83)
Show that for any positive integers n and any base b , there must some power of b lying in the range .
To show that some power of b falls in the range of
All the tools & learning materials you need for study success - in one app.
Get started for freeIn justifying our matrix multiplication algorithm (Section 2.5), we claimed the following block wise property: if X and Y are n matrices, and
,
where A,B,C,D,E,F,G, and H are sub-matrices, then the product XY can be expressed in terms of these blocks:
Prove this property.
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 . Think of as being role="math" localid="1658920245976" for some constant , so: . By repeatedly applying this rule, we can bound in terms of , then , then , and so on, at each step getting closer to the value of we do know, namely .
.
.
.
A pattern is emerging... the general term is
Plugging in , we get .
(a)Do the same thing for the recurrence . What is the general th term in this case? And what value of should be plugged in to get the answer?(b) Now try the recurrence , a case which is not covered by the master theorem. Can you solve this too?
What is the sum of the nth roots of unity? What is their product if n is odd? If n is even?
Question: You are given an infinite array 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 are accessed.)
The Hadamard matrices are defined as follows:
localid="1658916810283"
Show that if is a column vector of lengthlocalid="1658916598888" , then the matrix-vector product localid="1658916618774" can be calculated using localid="1658916637767" operations. Assume that all the numbers involved are small enough that basic arithmetic operations like addition and multiplication take unit time.
What do you think about this solution?
We value your feedback to improve our textbook solutions.