1.

Given the factorization of a number n, then the sum of divisors can be computed in _______(a) linear time(b) polynomial time(c) O(logn)(d) o(n+1)I got this question in class test.This intriguing question originated from Counting topic in section Counting of Discrete Mathematics

Answer»

Correct choice is (B) polynomial time

To explain I would SAY: The exact number of running time depends on the computational MODEL. When analyzing arithmetic with large numbers, we USUALLY count either BIT operations or arithmetic operations of size O(logn) (where n is the input size). Now, given the factorization of a number n, then the sum of divisors can be computed in polynomial time.



Discussion

No Comment Found

Related InterviewSolutions