Comments from last time

Slides:



Advertisements
Similar presentations
A simple example finding the maximum of a set S of n numbers.
Advertisements

The master method The master method applies to recurrences of the form T(n) = a T(n/b) + f (n), where a  1, b > 1, and f is asymptotically positive.
Divide-and-Conquer1 7 2  9 4   2  2 79  4   72  29  94  4.
Recurrence Examples.
Unit 1. Sorting and Divide and Conquer. Lecture 1 Introduction to Algorithm and Sorting.
Operations on Scientific Notation Addition and Subtraction 1. If they have the same exponent - add/subtract the number in front - keep the same exponent.
Operations with Scientific Notation. Addition and Subtraction Format Addition (N * 10 x ) + (M * 10 x ) = (N + M) * 10 x Subtraction (N * 10 y ) - (M.
1 Chapter 4-2 Divide and Conquer Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
1 How to Multiply Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. integers, matrices, and polynomials.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 16.
Add and subtract matrices. Multiply by a matrix scalar.
Simplify MultiplyDivide Add & Subtract Proportion.
Điều trị chống huyết khối trong tai biến mạch máu não
Front End Electronics for SOI Monolithic Pixel Sensor
Fairness-oriented Scheduling Support for Multicore Systems
Quantum-classical transition in optical twin beams and experimental applications to quantum metrology Ivano Ruo-Berchera Frascati.
A little math, a little physics
P48 Telescope Drive Upgrade Preliminary Design Review October 21, 2015
Single wavelength / channel optical communication
MEC-E5005 Fluid Power Dynamics L (5 cr)
Economics of vertical cities 三维城市的经济学分析
Massachusetts Institute of Technology
Pre Public Examination
Metabolism and Bioenergetics
Some Consequences of Brexit
Novel approaches in endocrine sensitive breast cancer
1 INTRODUCTION - Q2KFortran2_11
Shortest Paths Readings? Chapter 28
Unit 2 Removals.
PEOPLE! THE BUSINESS OF MUSIC…
The PNPM-Generasi Project One-Year Impact Evaluation Preliminary Findings Presented by: Susan Wong, EASER, The World Bank Ben Olken, M.I.T. Department.
The Lancet Series on Maternal and Child Nutrition
Chapter 21: Growth and Development
Script Manager Training Module
Advanced Programming Language Features and Software Engineering: Friend or Foe? Greg Sullivan, AI Lab Programming Languages and Software.
New predictive and diagnostic biomarkers for preeclampsia
Improving Door to Needle Time In a Statewide Telestroke Program
大学英语 实用阅读(上) Unit 7.
21.12 Preparation and Reactions of Amides
Curriculum and technology: Today and tomorrow
Sponsorship opportunities
Licensed Electrical & Mechanical Engineer
C H A P T E R 7 The Cost of Production CHAPTER OUTLINE
Merge Sort.
Introduction to Algorithms: Divide-n-Conquer Algorithms
Introduction to Algorithms
Multiplication
Multiplying Matrices.
Multiplying 2 Digit Factors
Divide-and-Conquer 6/30/2018 9:16 AM
Unit 1. Sorting and Divide and Conquer
Math & Exponents.
Lecture 4 Divide-and-Conquer
Multiplication
Divide-and-Conquer The most-well known algorithm design strategy:
Chapter 4 Divide-and-Conquer
2 Digit by 2 Digit Multiplication
Algorithms with numbers (1) CISC4080, Computer Algorithms
Divide and Conquer.
Order Statistics(Selection Problem)
WarmUp 2-3 on your calculator or on paper..
2-Digit Subtraction.
Divide-and-Conquer 7 2  9 4   2   4   7
4.1 Matrices – Basic Operations
Lecture 6 More Divide-Conquer and Paradigm #4 Data Structure.
CSE 373 Data Structures and Algorithms
Divide-and-Conquer 7 2  9 4   2   4   7
Trevor Brown CS 341: Algorithms Trevor Brown
Topic: Divide and Conquer
Presentation transcript:

Comments from last time Purpose of Master theorem? What does a, b, and d represent Finding a, b, d from pseudocode 1

Div-Conquer Multiplication n: lenth of numbers, input size: 2n 1234 × 5678 12 × 56 12 × 78 34 × 56 34 × 78 1×5 1×6 2×5 2×6 2

O(n) time operations n: lenth of numbers Shift  multiply by 10: take array, move all elements Addition / subtraction: add/subtract digits, then carry 3

Comment cards https://goo.gl/RKd8vq 4

= Faster Div-Conquer Multiplication 1234 × 5678 12 × 56 34 × 78 (12 + 56) × (34 + 78) = 68 × 112 5

= Faster Div-Conquer Multiplication 12345678 × 87654321 12345678 × 87654321 (1234 + 5678) × (8765 + 4321) 1234 × 8765 5678 × 4321 = 6912 × 13086 6

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/4 n/4 n/4 n/4 7

Recursion Tree: T(n) = 2T(n / 3) + O(n) 8

Recursion Tree: T(n) = 3T(n / 3) + O(n) 9