6 Pages

Master theorem - Wikipedia

Course: CS 570, Fall 2006
School: USC
Rating:
 
 
 
 
 

Word Count: 853

Document Preview

theorem Master - Wikipedia, the free encyclopedia http://en.wikipedia.org/wiki/Master_theorem Help us provide free content to the world by donating today! Master theorem From Wikipedia, the free encyclopedia In the analysis of algorithms, the master theorem, which is a specific case of the Akra-Bazzi theorem, provides a cookbook solution in asymptotic terms for recurrence relations of types that occur in...

Register Now

Unformatted Document Excerpt

Coursehero >> California >> USC >> CS 570

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
theorem Master - Wikipedia, the free encyclopedia http://en.wikipedia.org/wiki/Master_theorem Help us provide free content to the world by donating today! Master theorem From Wikipedia, the free encyclopedia In the analysis of algorithms, the master theorem, which is a specific case of the Akra-Bazzi theorem, provides a cookbook solution in asymptotic terms for recurrence relations of types that occur in practice. It was popularized by the canonical algorithms textbook Introduction to Algorithms by Cormen, Leiserson, Rivest, and Stein, which introduces and proves it in sections 4.3 and 4.4, respectively. Nevertheless, not all recurrence relations can be solved with the use of the master theorem. Contents 1 Generic form 2 Case 1 2.1 Generic form 2.2 Example 3 Case 2 3.1 Generic form 3.2 Example 4 Case 3 4.1 Generic form 4.2 Example 5 Inadmissible[1] 6 See also 7 References 8 External links Generic form The master theorem concerns recurrence relations of the form: In the application to the analysis of a recursive algorithm, the constants and function take on the following significance: n is the size of the problem. a is the number of subproblems in the recursion. n/b is the size of each subproblem. (Here it is assumed that all subproblems are essentially the same size.) f (n) is the cost of the work done outside the recursive calls, which includes the cost of dividing the problem and the cost of merging the solutions to the subproblems. It is possible to determine an asymptotic tight bound in these three cases: 1 of 6 10/8/2008 11:42 AM Master theorem - Wikipedia, the free encyclopedia http://en.wikipedia.org/wiki/Master_theorem Case 1 Generic form If it is true that it follows that: for some constant > 0 Example As one can see in the formula above, the variables get the following values: , , , Now we have to check that the following equation holds: If we insert the values from above, we get: If we choose = 1, we get: Since this equation holds, the first case of the master theorem applies to the given recurrence relation, thus resulting in the conclusion: If we insert the values from above, we finally get: Thus the given recurrence relation T(n) was in (n). (This result is confirmed by the exact solution of the recurrence relation, which is T(n) = 1001n3 1000n2, assuming T(1) = 1.) Case 2 2 of 6 10/8/2008 11:42 AM Master theorem - Wikipedia, the free encyclopedia http://en.wikipedia.org/wiki/Master_theorem Generic form If it is true that: it follows that: Example As we can see in the formula above the variables get the following values: , , , , Now we have to check that the following equation holds (in this case k=0): If we insert the values above, from we get: Since this equation holds, the second case of the master theorem applies to the given recurrence relation, thus resulting in the conclusion: If we insert the values from above, we finally get: Thus the given recurrence relation T(n) was in (n log n). (This result is confirmed by the exact solution of the recurrence relation, which is T(n) = n + 10nlog2n, assuming T(1) = 1.) Case 3 Generic form If it is true that: 3 of 6 10/8/2008 11:42 AM Master theorem - Wikipedia, the free encyclopedia http://en.wikipedia.org/wiki/Master_theorem for some constant > 0 and if it is also true that: for some constant c < 1 and sufficiently large n it follows that: Example As we can see in the formula above the variables get the following values: , , , Now we have to check that the following equation holds: If we insert the values from above, and choose = 1, we get: Since this equation holds, we have to check the second condition, namely if it is true that: If we insert once more the values from above, we get: If we choose , it is true that: So it follows: If we insert once more the necessary values, we get: 4 of 6 10/8/2008 11:42 AM Master theorem - Wikipedia, the free encyclopedia http://en.wikipedia.org/wiki/Master_theorem Thus the given recurrence relation T(n) was in (n), that complies with the f (n) of the original formula. (This result is confirmed by the exact solution of the recurrence relation, which is T(n) = 2n2 n, assuming T(1) = 1.) Inadmissible[1] The following equations cannot be solved using the master theorem. a is not a constant non-polynomial difference between f(n) and a<1 cannot have less than one sub problem f(n) is not positive case 3 but regularity violation See also Big O notation References Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms, Second Edition. MIT Press and McGraw-Hill, 2001. ISBN 0-262-03293-7. Sections 4.3 (The master method) and 4.4 (Proof of the master theorem), pp.7390. 1. ^ http://www.cag.lcs.mit.edu/~thies/6.046-web/master.pdf 5 of 6 10/8/2008 11:42 AM Master theorem - Wikipedia, the free encyclopedia http://en.wikipedia.org/wiki/Master_theorem External links Retrieved from "http://en.wikipedia.org/wiki/Master_theorem" Categories: Asymptotic analysis Mathematical theorems Recurrence relations This page was last modified on 6 October 2008, at 08:25. All text is available under the terms of the GNU Free Documentation License. (See Copyrights for details.) Wikipedia is a registered trademark of the Wikimedia Foundation, Inc., a U.S. registered 501(c)(3) tax-deductible nonprofit charity. 6 of 6 10/8/2008 11:42 AM
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

USC - CS - 570
USC - CS - 585
Session 6 : Object-Relational Databases Object-Oriented Databases Introduction The need for extensions in Relational Data Model Classification of database systems Introduce extensions to the basic relational model Applications that would benefit from
USC - CS - 585
CS 585 Fall 2010CS 585 Fall 20101Farid ParviniOutline Instructor Logistics Prerequisite Introducing to DBMCS 585 Fall 20102Farid ParviniFarid Parvini Website :http:/www-scf.usc.edu/~fparvini/ Education: Ph.D. in Computer Science M.S. in Compu
USC - CS - 585
Database design process review&quot; Entity Sets&quot; Relationship Sets&quot; Design Issues &quot; Mapping Constraints &quot; Keys&quot; E-R Diagram&quot; Extended E-R Features&quot; Design of an E-R Database Schema&quot; Reduction of an E-R Schema to Tables&quot;1.Requirements Analysis&quot; What data i
USC - CS - 585
Formally, given sets D1, D2, . Dn a relation r is a subset of D 1 x D 2 x x D n Thus a relation is a set of n-tuples (a1, a2, , an) where a i D i! Example: if###customer-name = cfw_Jones, Smith, Curry, Lindsay #customer-street = cfw_Main, North, Park
USC - CS - 585
Basic Structure &quot; Set Operations&quot; Aggregate Functions&quot; Null Values&quot; Nested Subqueries&quot; Derived Relations&quot; Views&quot; Modication of the Database &quot; Joined Relations&quot; Data Denition Language &quot;branch (branch-name, branch-city, assets) customer (customer-name, cu
USC - CS - 585
Review Some Examples&quot; Application Programming&quot; Embedded SQL, &quot; Dynamic SQL &quot; ODBC &quot; JDBC&quot;An Instance of Boats An Instance of Sailors An Instance of Reserves1. Construct the cross-product of tables in the from-list2. The second step is to apply the qua
USC - CS - 585
Web Interfaces to Databases&quot; Performance Tuning&quot; Performance Benchmarks&quot; Standardization&quot; E-Commerce&quot; Legacy Systems&quot;2 The Web is a distributed information system based on hypertext.&quot; Most Web documents are hypertext documents formatted via theHyperTe
USC - CS - 585
Session 7 : Spatial DB &amp; Spatial IndexingCS585 Fall 2010 Farid Parvini1Spatial DB Outline Introduction Modeling Querying Data StructuresSpatial Indexing Outline Introduction Spatial Indexing R-Tree R+-Tree QuadtreesSpatial Database Applications Va
USC - CS - 585
Session 10: XML &amp; XML QueryCS585 Fall 2010 Farid ParviniIntroduction XML: Extensible Markup Language Defined by the WWW Consortium (W3C) Originally intended as a document markup language not adatabase language Documents have tags giving extra infor
USC - CS - 585
Session 11: Database System Architectures &amp; Distributed Database Centralized Systems Client-Server Systems Parallel Systems Distributed Systems Network Types Distributed DatabasesCS585 Fall 2010 Farid ParviniCentralized Systems Run on a single com
USC - CS - 585
OLAP (Online Analytical Processing)Excerpt from OLAP Presentation by Cyrus ShahabiUSC - CSCI585 Fall 2010 Farid Parvini1ContentIntroduction to Decision Support Multidimensional DatabasesFocus Application: OLAP Prefix-Sum Data Cube Dynamic Data Cub
USC - CS - 585
OLAP (Online Analytical Processing): Wavelet-based ApproachesExcerpt Partially from Presentation by Cyrus ShahabiUSC - CSCI585 Fall 2010 Farid Parvini1ContentIntroduction to Multidimensional Databases Focus Application: OLAP Prefix-Sum Data Cube Dyn
USC - CS - 585
1 Temporal Data&quot; Spatial and Geographic Databases&quot; Multimedia Databases&quot; Mobility and Personal Databases&quot;2 While most databases tend to model reality at a point in time (atthe `current' time), temporal databases model the states of the real world acro
USC - CS - 578
Homework 1: Connecting requirements and architecture using partial behavior modelsIn this assignment you will explore the relation between functional requirements specifications and an architecture-level behavioral specification of a software system. Ini
USC - CS - 578
Homework #2 AssignmentThe Call Center Customer Care (C4) Case Study, provided as an appendix to this assignment, presents an initial high level (Level 1) architectural breakdown for the system used by a large telecommunications company. This system compr
USC - CS - 578
Homework #3 AssignmentIn the last assignment you were tasked with designing an architecture for the C4 system that achieves particular requirements and use cases. In this assignment, you will be provided with the C4 system architecture designed by a deve
USC - CS - 578
CS 578 Software Architectures Fall 2010Homework Assignment #4 (The Final Project) Due: Wednesday, December 1, 2010, 11:59:59pmThis is an individual assignment, at the end of which you will be expected to demonstrate your solution to the instructor and/o
USC - CS - 561
CS 561: Artificial IntelligenceInstructor:TA:Sofus A. Macskassy, macskass@usc.eduHarris Chiu (chichiu@usc.edu), Wed 2:45-4:45pm, PHE 328 Penny Pan (beipan@usc.edu), Fri 10am-noon, PHE 328Lectures: MW 5:00-6:20pm, ZHS 159 Office hours: By appointment
USC - CS - 561
CS 561: Artificial IntelligenceInstructor:TA:Sofus A. Macskassy, macskass@usc.eduHarris Chiu (chichiu@usc.edu), Wed 2:45-4:45pm, PHE 328 Penny Pan (beipan@usc.edu), Fri 10am-noon, PHE 328Lectures: MW 5:00-6:20pm, ZHS 159 Office hours: By appointment
USC - CS - 561
CS 561: Artificial IntelligenceInstructor:TA:Sofus A. Macskassy, macskass@usc.eduHarris Chiu (chichiu@usc.edu), Wed 2:45-4:45pm, PHE 328 Penny Pan (beipan@usc.edu), Fri 10am-noon, PHE 328Lectures: MW 5:00-6:20pm, ZHS 159 Office hours: By appointment
USC - CS - 561
CS 561: Artificial IntelligenceInstructor:TA:Sofus A. Macskassy, macskass@usc.eduHarris Chiu (chichiu@usc.edu), Wed 2:45-4:45pm, PHE 328 Penny Pan (beipan@usc.edu), Fri 10am-noon, PHE 328Lectures: MW 5:00-6:20pm, ZHS 159 Office hours: By appointment
USC - CS - 561
gCSCI 561 Foundations of Artificial Intelligence Fall 2010 Instructor: Sofus A. Macskassy Project 1: A* Search (100 points) Due: October 11, 2010 1. IntroductionIn this project, you are required to use C/C+ or JAVA as the programming language to solve a
USC - CS - 561
CSCI 561 Foundations of Articial Intelligence Fall 2010Project 2: Logic Agent Due: 4:59 p.m., Nov 24, 2010(a) A Sudoku Puzzle(b) Corresponding SolutionFigure 1: Sudoku [Graphics from Wikipedia][1]1IntroductionThe goal of Sudoku puzzle is a board of
USC - CS - 561
CSCI-561 Fall 2010 Homework 3 Student name: _Macskassy Due Nov. 3, 2010 Student ID: _Question 1[Q1: 20 points]a). P Q is defined as being equivalent to (P Q) ^ (Q P). Based on this definition, show that P Q is logically equivalent to (P v Q) (P ^ Q).
USC - CS - 561
CSCI-561 Fall 2010 Homework 4 Student name: _Macskassy Due Nov. 17, 2010 Student ID: _Question 1 [30 points] Sudoku problem can be as general with size n2 x n2 . The rules are: (1) Each row contains unique number from 1 to n2. (2) Each column contains u
USC - CS - 561
CS 561: Artificial IntelligenceInstructor: TA: Sofus A. Macskassy, macskass@usc.eduHarris Chiu (chichiu@usc.edu), TBA Penny Pan (beipan@usc.edu), SAL 112, Fri, 10am-noonLectures: MW 5:00-6:20pm, ZHS 159 Office hours: By appointment Class page: http:/ww
USC - CS - 561
CS 561: Artificial IntelligenceInstructor:TA:Sofus A. Macskassy, macskass@usc.eduHarris Chiu (chichiu@usc.edu), TBA Penny Pan (beipan@usc.edu), SAL 112, Fri, 10am-noonLectures: MW 5:00-6:20pm, ZHS 159 Office hours: By appointment Class page: http:/ww
USC - CS - 561
CS 561: Artificial IntelligenceInstructor:TA:Sofus A. Macskassy, macskass@usc.eduHarris Chiu (chichiu@usc.edu), TBA Penny Pan (beipan@usc.edu), SAL 112, Fri, 10am-noonLectures: MW 5:00-6:20pm, ZHS 159 Office hours: By appointment Class page: http:/ww
USC - CS - 561
CS 561: Artificial IntelligenceInstructor:TA:Sofus A. Macskassy, macskass@usc.eduHarris Chiu (chichiu@usc.edu), Wed 2:45-4:45pm, PHE 328 Penny Pan (beipan@usc.edu), Fri 10am-noon, PHE 328Lectures: MW 5:00-6:20pm, ZHS 159 Office hours: By appointment
UCSD - BIBC - 120
Simons Rock - SD - 32703
Question bank for AP Final:http:/www.mhhe.com/cgi-bin/webquiz.pl Chapter 1 -Spring Semester1. The essential modifier used by geographers in forming their concepts is: a. absolute b. human c. relative d. spatial2. The statement that &quot;the journey to sch
UCSD - BIBC - 120
IIT Kanpur - MOS - 204
Walsh College - ACC - 505
Quiz #1Your score on this exam is 12 out of 21 .Answer Key Question 1 (Worth 3 points)An employee accidentally overstated the year's advertising expense by $50,000. Which of the following correctly depicts the effect of this error? Cost of goods manufa
UCSD - BIBC - 120
UOIT - PSYC - 1000
Chapter1:Introduction&amp;Methodso Manyquestionsthatpsychologistsdealwithareoldbutpsychologyasascienceisyoung psychologyemergesfromtwodistinctlinesofinquiry:philosophyandthenaturalsciencesof biologyandphysiologyPsychologyemergedasascienceinthelatenineteenthc
UCSD - BIBC - 120
UCSD - BIBC - 120
IIT Kanpur - MOS - 204
UCSD - BIBC - 120
Montclair - BUS - Mkt
Group Purchasing Organizations (GPO) and Inventory ManagementSTEVEN L. DAMATO RPH, BCOP MAINE CENTER FOR CANCER MEDICINE SCARBOROUGH, METhe Oncology Market$16 billion market growing to $40 billion in 2012 1.5 million new patients diagnosed annually 85%
Montclair - BUS - Mkt
Goods, Funds, and Information:Supply Chain Tactics for 2010 Copyright 2008 United Parcel Service of America, Inc. All rights reserved.The Evolving Global Supply ChainSupplierManufacturerDistributorRetailEnd UserSupplierManufacturer DistributorR
Montclair - BUS - Mkt
SITUATION ANALYSISUpdated: August, 2001 This work plan should be reviewed and the relevant steps performed as soon as practical at the beginning of an assignment. This review should provide us with the following: 1. 2. 3. 4. A thorough understanding of t
Montclair - BUS - Mkt
Inputs for WACC Calculation: Risk free rate (%) Yield-to-Maturity of debt (%) Equity risk premium (%) Beta of stock Corporate tax rate (%) Common shares (MM) Share price ($) Market value of debt ($, MM) 5.85% 4.72% 3.20% 1.3 35% 320.0 $52.00 $8.5Online T
Montclair - BUS - Mkt
Maine Lobster Potpie Pilot's Grill Restaurant, a Bangor landmark for almost 60 years, used to serve a similar version of this savory potpie. Traditionally Maine Lobster Potpies are topped with biscuit dough, but I often use puff pastry for an even richer
UCSD - BIBC - 120
University of Phoenix - HIS - 135
Cold War Ideology and Policies1Cold War Ideology and Policies Melody Benitez HIS/135 October 3, 2010 Daniel LiestmanCold War Ideology and Policies2Following World War II, Europe was left devastated and weak. This new found weakness from World War II,
University of Phoenix - HIS - 135
Axia College MaterialAppendix B Liberal Reform OrganizerPresidents John F. Kennedy and Lyndon B. Johnson both sought to fight poverty and racial inequality. The legislation that Kennedy proposed was called the New Frontier and that which Johnson propose
IIT Kanpur - MOS - 204
UCSD - BIBC - 120
UCSD - BIBC - 120
Academy of Art University - MATH - 115
Name:_ Date:_MAT115Final Exam Chapters 1 - 9 40 problems 6 points each 2 problems worth 5 points each 250 points possible Solve all problems and attach your solutions document in your Individual Forum (IF). Remember to show all steps and check your work
UCSD - BIBC - 120
University of Phoenix - PSYCH - 211
University of Phoenix MaterialAppendix DPiaget WorksheetDirections: Review Module 26 of Psychology and Your Life. Complete the matrix below and answer the questions that follow. Cognitive Stage Age Range Major Characteristics1. This is the awareness t
UCSD - BIBC - 120
IIT Kanpur - MOS - 204
UCSD - BIBC - 120
UCSD - BIBC - 120
UCSD - BIBC - 120
UCSD - BIBC - 120