SlideShare a Scribd company logo
Comments from last time
• Purpose of Master theorem?
• What does a, b, and d represent
• Finding a, b, d from pseudocode
Div-Conquer Multiplication
1234 × 5678
n: lenth of numbers,
input size: 2n
12 × 78
1×5
34 × 56 34 × 78
12 × 56
1×6 2×5 2×6
O(n) time operations
n: lenth of numbers
Shift  multiply by 10: take
array, move all elements
Addition / subtraction:
add/subtract digits, then carry
Comment cards
https://goo.gl/RKd8vq
Faster Div-Conquer Multiplication
1234 × 5678
34 × 78 (12 + 56) × (34 + 78)
12 × 56
=
68 × 112
Faster Div-Conquer Multiplication
12345678
× 87654321
5678
× 4321
(1234 + 5678)
× (8765 + 4321)
1234
× 8765
=
6912
× 13086
Recursion Tree: T(n) = 3T(n / 2) + O(n)
n: lenth of numbers,
input size: 2n
n
n/2 n/2 n/2
n/4
n/4 n/4 n/4 n/4 n/
n/4
/4 n/4
Recursion Tree: T(n) = 2T(n / 3) + O(n)
n
n/3
n/9 n/9 n/9 n/9
n/3
Recursion Tree: T(n) = 3T(n / 3) + O(n)
n/3
n/9 n/9 n/9 n/9 n/9 n/9
n/3
n
n/9 n/9 n/9
n/3

More Related Content

PPT
L6_Large_number_multi.ppt large number multiplication
PPT
Vedicmaths
PPT
Divide and Conquer
PPT
07 dc3
PDF
A primer on computer algebra
PPTX
DAA - UNIT 4 - Engineering.pptx
PPTX
dicrete_chap4.pptxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PPTX
Insider mathematical
L6_Large_number_multi.ppt large number multiplication
Vedicmaths
Divide and Conquer
07 dc3
A primer on computer algebra
DAA - UNIT 4 - Engineering.pptx
dicrete_chap4.pptxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Insider mathematical

Similar to Computer Science study slides on Recursion (20)

PPTX
Complex numbers polynomial multiplication
PPT
2010 3-24 cryptography stamatiou
PPTX
Multiplying With Exponents
PDF
02 Notes Divide and Conquer
PDF
Lec06-CS110 Computational Engineering
PDF
Introduction to Network security and privacy
PPT
cryptography for students and for learning
PPT
ch08 modified.pptmodified.pptmodified.ppt
PPT
ADVANCED ALGORITHMS-UNIT-3-Final.ppt
PDF
Speed maths techniqiues in multiplication(2)
PDF
Rabin Karp Algorithm
PPTX
strassen matrix multiplication algorithm
PDF
A study on number theory and its applications
PDF
02 Analysis of Algorithms: Divide and Conquer
DOC
pradeepbishtLecture13 div conq
PDF
38 116-1-pb
PPTX
Chapter_07_Computer_Arithmdddssetic_1.pptx
PDF
Scientific calculator project in c language
PDF
Math for 800 03 real numbers
PDF
Is unit 4_number_theory
Complex numbers polynomial multiplication
2010 3-24 cryptography stamatiou
Multiplying With Exponents
02 Notes Divide and Conquer
Lec06-CS110 Computational Engineering
Introduction to Network security and privacy
cryptography for students and for learning
ch08 modified.pptmodified.pptmodified.ppt
ADVANCED ALGORITHMS-UNIT-3-Final.ppt
Speed maths techniqiues in multiplication(2)
Rabin Karp Algorithm
strassen matrix multiplication algorithm
A study on number theory and its applications
02 Analysis of Algorithms: Divide and Conquer
pradeepbishtLecture13 div conq
38 116-1-pb
Chapter_07_Computer_Arithmdddssetic_1.pptx
Scientific calculator project in c language
Math for 800 03 real numbers
Is unit 4_number_theory
Ad

Recently uploaded (20)

PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
GDM (1) (1).pptx small presentation for students
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
01-Introduction-to-Information-Management.pdf
PDF
Insiders guide to clinical Medicine.pdf
PDF
Classroom Observation Tools for Teachers
PPTX
Cell Structure & Organelles in detailed.
PDF
Computing-Curriculum for Schools in Ghana
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
Lesson notes of climatology university.
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Institutional Correction lecture only . . .
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
Cell Types and Its function , kingdom of life
Pharmacology of Heart Failure /Pharmacotherapy of CHF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Microbial diseases, their pathogenesis and prophylaxis
GDM (1) (1).pptx small presentation for students
O5-L3 Freight Transport Ops (International) V1.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
01-Introduction-to-Information-Management.pdf
Insiders guide to clinical Medicine.pdf
Classroom Observation Tools for Teachers
Cell Structure & Organelles in detailed.
Computing-Curriculum for Schools in Ghana
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Lesson notes of climatology university.
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Institutional Correction lecture only . . .
human mycosis Human fungal infections are called human mycosis..pptx
PPH.pptx obstetrics and gynecology in nursing
Cell Types and Its function , kingdom of life
Ad

Computer Science study slides on Recursion