Computers and Technology
Computers and Technology, 03.03.2022 14:00, keylor97

Explain an algorithm that computes 2^n using Θ(log n) multiplications. Justify why your algorithm uses Θ(log n) multiplications. a. Consider the case where n is a power of 2, i. e., n = 2^k . Use Θ(k) multiplications to obtain 2n . Hint: Note that 2^(2^k) = (2^(2^k−1) )^2 .
b. Consider the case where n = 2^k + 2^(k−1) . Use Θ(k) multiplications to obtain 2^n . Hint: Note that 2^(2^k+2^(k−1)) = 2^(2^k) × 2^(2^(k−1)) .
c. Generalize the ideas in parts (a) and (b) to compute 2n using Θ(log n) multiplications for any positive integer n.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 23:30, ansonhunter8891
What are listed in the vertical columns across the top of the event editor? a. file names b. conditions c. check marks d. action types
Answers: 1
image
Computers and Technology, 23.06.2019 09:30, Princessirisperez0
Given a link with a maximum transmission rate of 32.8 mbps. only two computers, x and y, wish to transmit starting at time t = 0 seconds. computer x sends filex (4 mib) and computer y sends filey (244 kib), both starting at time t = 0. statistical multiplexing is used, with details as follows packet payload size = 1000 bytes packet header size = 24 bytes (overhead) ignore processing and queueing delays assume partial packets (packets consisting of less than 1000 bytes of data) are padded so that they are the same size as full packets. assume continuous alternating-packet transmission. computer x gets the transmission medium first. at what time (t = ? ) would filey finish transmitting? give answer in milliseconds, without units, and round to one decimal places (e. g. for an answer of 0.013777 seconds you would enter "13.8" without the quotes)
Answers: 3
image
Computers and Technology, 23.06.2019 13:30, juliajordan427
Best laptops for college [$100-$500 range]?
Answers: 2
image
Computers and Technology, 23.06.2019 21:30, mariah10455
Write a fragment of code that reads in strings from standard input, until end-of-file and prints to standard output the largest value. you may assume there is at least one value. (cascading/streaming logic, basic string processing)
Answers: 3
Do you know the correct answer?
Explain an algorithm that computes 2^n using Θ(log n) multiplications. Justify why your algorithm us...

Questions in other subjects: