We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,304 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Recursive multiplication and Karatsuba

Hey everyone, I've got a question where I'm sort of stuck on writing a java code for a recursive "school method" multiplication where we have input 'n' and two n digit numbers 'a' and 'b' where the output is m=a.b. I also have to use an array representation for representing numbers. Could anyone please help me out? Thanks

The basic format is a=a1.B^(k) + a0 and b=b1.B^(k) + b0 where a.b=a1.b1.B^(2k)+(a1.b0+a0.b1).B^(k)+a0.b0 and k=floor(n/2)

Also then how would you use this and implement a Karatsuba multiplication if say n>3.

2
Contributors
1
Reply
6 Hours
Discussion Span
2 Years Ago
Last Updated
2
Views
jsp01
Newbie Poster
1 post since Mar 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
Darryl.Burke
Newbie Poster
12 posts since Jul 2010
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0821 seconds using 2.67MB