O(log n). If u add in pairs. e.g. (5+5)=10. now add 10+10.
On Sat, Jul 31, 2010 at 6:28 PM, sourav <[email protected]> wrote: > When you first learned to multiply numbers, you were told that x * y > means adding x a total of y times, so 5 * 4 = 5+5+5+5 = 20. What is > the time complexity of multiplying two n-digit numbers in base b using > the repeated addition method, as a function of n and b. Assume that > single-digit by single-digit addition or multiplication takes O(1) > time. > > Show how you arrive at your answer. > > (Hint that was given : "how big can y be as a function of n and b?") > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<algogeeks%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
