Give an algorithm to compute the integer part of
(1+√2)n
in number of operations which is polynomial in logn.
Note: I had a mistake earlier by using time, instead of number of operations. Even though we use only polynomial in logn integer operations, the running time will be Ω(n), as we are dealing with θ(n) bit integers.
[Solution]
(1+√2)n
in number of operations which is polynomial in logn.
Note: I had a mistake earlier by using time, instead of number of operations. Even though we use only polynomial in logn integer operations, the running time will be Ω(n), as we are dealing with θ(n) bit integers.
[Solution]
No comments:
Post a Comment