Let TV e N be a positive integer which can be written with k bits. In the follow
ID: 3810995 • Letter: L
Question
Let TV e N be a positive integer which can be written with k bits. In the following problems, we want to find out if N is a prime number, or determine the prime factorization of N. Show that the number of divisions N/n one must perform, in order to find out if N is a prime number, is 0(2^k/2). This problem is thus solvable in exponential time. Show that the number of divisions one must perform, in order to find the prime factorization of N, is 0(2^k/2). This problem is thus solvable in exponential time too.Explanation / Answer
Consider the case where we have to find the number 4 is prime or not
consider i=1 n=4 then n%1=0---->1
consider i=2,n=4 then n%2=0---->2
Note:A number is considered as prime number if and only if it is divisible by one and by itself.So the no. of divisibles will always be 2.
But for above case n=4, after dividing with first 2 natural numbers(1,2) ,it got already 2 divisibles .
So n=4 has factors other than 1 and 4 i.e.2
in this case n=4 thne n/2=2
Hence the number of divisons required to find the prime factorization of Nis O(2 power k/2)
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.