المرجع الالكتروني للمعلوماتية
المرجع الألكتروني للمعلوماتية

الرياضيات
عدد المواضيع في هذا القسم 9764 موضوعاً
تاريخ الرياضيات
الرياضيات المتقطعة
الجبر
الهندسة
المعادلات التفاضلية و التكاملية
التحليل
علماء الرياضيات

Untitled Document
أبحث عن شيء أخر
اليمين واقسامه واحكامه
2024-10-06
النذر والعهد واليمين
2024-10-06
الخمس وموارده
2024-10-06
الانفال
2024-10-06
كفارة حلق الرأس
2024-10-06
كفارة جزاء الصيد
2024-10-06

الأفعال التي تنصب مفعولين
23-12-2014
صيغ المبالغة
18-02-2015
اولاد الامام الحسين (عليه السلام)
3-04-2015
الجملة الإنشائية وأقسامها
26-03-2015
معاني صيغ الزيادة
17-02-2015
انواع التمور في العراق
27-5-2016

Karatsuba Multiplication  
  
1394   12:41 صباحاً   date: 14-11-2019
Author : Bernstein, D. J.
Book or Source : "Fast Multiplication and Its Applications." To appear in Alg. Number Th. http://cr.yp.to/lineartime/multapps-20041007.pdf.
Page and Part : ...


Read More
Date: 25-12-2019 602
Date: 27-9-2020 530
Date: 24-7-2020 834

Karatsuba Multiplication

 

It is possible to perform multiplication of large numbers in (many) fewer operations than the usual brute-force technique of "long multiplication." As discovered by Karatsuba (Karatsuba and Ofman 1962), multiplication of two n-digit numbers can be done with a bit complexity of less than n^2 using identities of the form

 (a+b·10^n)(c+d·10^n)=ac+[(a+b)(c+d)-ac-bd]10^n+bd·10^(2n).

(1)

Proceeding recursively then gives bit complexity O(n^(lg3)), where lg3=1.58...<2 (Borwein et al. 1989). The best known bound is O(nlgnlglgn) steps for n>>1 (Schönhage and Strassen 1971, Knuth 1998). However, this algorithm is difficult to implement, but a procedure based on the fast Fourier transform is straightforward to implement and gives bit complexity O((lgn)^(2+epsilon)n) (Brigham 1974, Borodin and Munro 1975, Borwein et al. 1989, Knuth 1998).

As a concrete example, consider multiplication of two numbers each just two "digits" long in base w,

N_1 = a_0+a_1w

(2)

N_2 = b_0+b_1w,

(3)

then their product is

P = N_1N_2

(4)

= a_0b_0+(a_0b_1+a_1b_0)w+a_1b_1w^2

(5)

= p_0+p_1w+p_2w^2.

(6)

Instead of evaluating products of individual digits, now write

q_0 = a_0b_0

(7)

q_1 = (a_0+a_1)(b_0+b_1)

(8)

q_2 = a_1b_1.

(9)

The key term is q_1, which can be expanded, regrouped, and written in terms of the p_j as

 q_1=p_1+p_0+p_2.

(10)

However, since p_0=q_0, and p_2=q_2, it immediately follows that

p_0 = q_0

(11)

p_1 = q_1-q_0-q_2

(12)

p_2 = q_2,

(13)

so the three "digits" of p have been evaluated using three multiplications rather than four. The technique can be generalized to multidigit numbers, with the trade-off being that more additions and subtractions are required.

Now consider four-"digit" numbers

 N_1=a_0+a_1w+a_2w^2+a_3w^3,

(14)

which can be written as a two-"digit" number represented in the base w^2,

 N_1=(a_0+a_1w)+(a_2+a_3w)w^2.

(15)

The "digits" in the new base are now

= a_0+a_1w

(16)

= a_2+a_3w,

(17)

and the Karatsuba algorithm can be applied to N_1 and N_2 in this form. Therefore, the Karatsuba algorithm is not restricted to multiplying two-digit numbers, but more generally expresses the multiplication of two numbers in terms of multiplications of numbers of half the size. The asymptotic speed the algorithm obtains by recursive application to the smaller required subproducts is O(n^(lg3)) (Knuth 1998).

When this technique is recursively applied to multidigit numbers, a point is reached in the recursion when the overhead of additions and subtractions makes it more efficient to use the usual O(n^2) multiplication algorithm to evaluate the partial products. The most efficient overall method therefore relies on a combination of Karatsuba and conventional multiplication.


REFERENCES:

Bernstein, D. J. "Fast Multiplication and Its Applications." To appear in Alg. Number Th. http://cr.yp.to/lineartime/multapps-20041007.pdf.

Borodin, A. and Munro, I. The Computational Complexity of Algebraic and Numeric Problems. New York: American Elsevier, 1975.

Borwein, J. M.; Borwein, P. B.; and Bailey, D. H. "Ramanujan, Modular Equations, and Approximations to Pi, or How to Compute One Billion Digits of Pi." Amer. Math. Monthly 96, 201-219, 1989.

Brigham, E. O. The Fast Fourier Transform. Englewood Cliffs, NJ: Prentice-Hall, 1974.

Brigham, E. O. Fast Fourier Transform and Applications. Englewood Cliffs, NJ: Prentice-Hall, 1988.

Cook, S. A. On the Minimum Computation Time of Functions. Ph.D. Thesis. Cambridge, MA: Harvard University, pp. 51-77, 1966.

Hollerbach, U. "Fast Multiplication & Division of Very Large Numbers." sci.math.research posting, Jan. 23, 1996.

Karatsuba, A. and Ofman, Yu. "Multiplication of Many-Digital Numbers by Automatic Computers." Doklady Akad. Nauk SSSR 145, 293-294, 1962. Translation in Physics-Doklady 7, 595-596, 1963.

Knuth, D. E. The Art of Computer Programming, Vol. 2: Seminumerical Algorithms, 3rd ed. Reading, MA: Addison-Wesley, pp. 278-286, 1998.

Schönhage, A. and Strassen, V. "Schnelle Multiplikation Grosser Zahlen." Computing 7, 281-292, 1971.

Toom, A. L. "The Complexity of a Scheme of Functional Elements Simulating the Multiplication of Integers." Dokl. Akad. Nauk SSSR 150, 496-498, 1963. English translation in Soviet Mathematics 3, 714-716, 1963.

Zuras, D. "More on Squaring and Multiplying Large Integers." IEEE Trans. Comput. 43, 899-908, 1994.




الجبر أحد الفروع الرئيسية في الرياضيات، حيث إن التمكن من الرياضيات يعتمد على الفهم السليم للجبر. ويستخدم المهندسون والعلماء الجبر يومياً، وتعول المشاريع التجارية والصناعية على الجبر لحل الكثير من المعضلات التي تتعرض لها. ونظراً لأهمية الجبر في الحياة العصرية فإنه يدرّس في المدارس والجامعات في جميع أنحاء العالم. ويُعجب الكثير من الدارسين للجبر بقدرته وفائدته الكبيرتين، إذ باستخدام الجبر يمكن للمرء أن يحل كثيرًا من المسائل التي يتعذر حلها باستخدام الحساب فقط.وجاء اسمه من كتاب عالم الرياضيات والفلك والرحالة محمد بن موسى الخورازمي.


يعتبر علم المثلثات Trigonometry علماً عربياً ، فرياضيو العرب فضلوا علم المثلثات عن علم الفلك كأنهما علمين متداخلين ، ونظموه تنظيماً فيه لكثير من الدقة ، وقد كان اليونان يستعملون وتر CORDE ضعف القوسي قياس الزوايا ، فاستعاض رياضيو العرب عن الوتر بالجيب SINUS فأنت هذه الاستعاضة إلى تسهيل كثير من الاعمال الرياضية.

تعتبر المعادلات التفاضلية خير وسيلة لوصف معظم المـسائل الهندسـية والرياضـية والعلمية على حد سواء، إذ يتضح ذلك جليا في وصف عمليات انتقال الحرارة، جريان الموائـع، الحركة الموجية، الدوائر الإلكترونية فضلاً عن استخدامها في مسائل الهياكل الإنشائية والوصف الرياضي للتفاعلات الكيميائية.
ففي في الرياضيات, يطلق اسم المعادلات التفاضلية على المعادلات التي تحوي مشتقات و تفاضلات لبعض الدوال الرياضية و تظهر فيها بشكل متغيرات المعادلة . و يكون الهدف من حل هذه المعادلات هو إيجاد هذه الدوال الرياضية التي تحقق مشتقات هذه المعادلات.