Prove that for every a > 1 and b > 1, a^log_2 b = b^log_2 a. Give a formula for
ID: 3683983 • Letter: P
Question
Prove that for every a > 1 and b > 1, a^log_2 b = b^log_2 a. Give a formula for the number of digits in the decimal expansion for a positive integer n. Give a formula for the number of digits in the binary expansion for a positive integer n. Give a formula for the number of digits in the base b expansion for a positive integer n and base b > 1. Consider the following algorithm procedure Loops(n: a positive integer) Write what the algorithm prints when n = 4. Describe what the algorithm prints in general terms. How many times does print routine get called? Describe (in words) a rule to decide, if (i_1, j_1) and (i_2, j_2) have both been printed for some n then which ordered pair was printed first? Consider a room of people and over the course of the evening, some people shook hands. Prove that whatever pairs of people shake hands, there are an even number of people who have shaken hands an odd number of times.Explanation / Answer
1...
Let x = a^log2(b), and y = b^log2(a)
log2 x = log2(a^log2(b)) = log2(b)log2(a)
log2 y = log2(b^log2(a)) = log2(a)log2(b) = log2(b)log2(a)
So, log2 x = log2 y
x = y
2.a.
A positive integer n has b bits when 2b-1 n 2b – 1. For example:
Using Logarithms
the number of bits is the exponent of the smallest power of two greater than your number. You can state that mathematically as:
bspec = log2(n) + 1
2.b...
A positive integer n has d digits when 10d-1 n 10d – 1. For example, 376 has 3digits because 100 376 999, or 102 376 103 – 1. Said another way, the number of digits in n is the exponent of the smallest power of ten greater than n; mathematically, that’s stated as:
dspec = log10(n) + 1
2.c..
If we have a dd digit string in base BB, this is an element of the set {0,1,…,B1}d{0,1,…,B1}d which has BdBdelements. This means we can represent exactly 0,1,…,Bd10,1,…,Bd1 using dd digits; solving for NN gives d=logB(N+1)d=logB(N+1).
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.