lecture2 - CS 473: Algorithms Chandra Chekuri...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS 473: Algorithms Chandra Chekuri chekuri@cs.illinois.edu 3228 Siebel Center University of Illinois, Urbana-Champaign Fall 2009 Chekuri CS473ug Merge Sort Quick Sort Part I Divide and Conquer Chekuri CS473ug Merge Sort Quick Sort Divide and Conquer Paradigm Divide and Conquer is a common and useful type of recursion Approach Chekuri CS473ug Merge Sort Quick Sort Divide and Conquer Paradigm Divide and Conquer is a common and useful type of recursion Approach Break problem instance into smaller instances - divide step Chekuri CS473ug Merge Sort Quick Sort Divide and Conquer Paradigm Divide and Conquer is a common and useful type of recursion Approach Break problem instance into smaller instances - divide step Recursively solve problem on smaller instances Chekuri CS473ug Merge Sort Quick Sort Divide and Conquer Paradigm Divide and Conquer is a common and useful type of recursion Approach Break problem instance into smaller instances - divide step Recursively solve problem on smaller instances Combine solutions to smaller isntances to obtain a solution to the original instance - conquer step Chekuri CS473ug Merge Sort Quick Sort Divide and Conquer Paradigm Divide and Conquer is a common and useful type of recursion Approach Break problem instance into smaller instances - divide step Recursively solve problem on smaller instances Combine solutions to smaller isntances to obtain a solution to the original instance - conquer step Chekuri CS473ug Merge Sort Quick Sort Divide and Conquer Paradigm Divide and Conquer is a common and useful type of recursion Approach Break problem instance into smaller instances - divide step Recursively solve problem on smaller instances Combine solutions to smaller isntances to obtain a solution to the original instance - conquer step Question: Why is this not plain recursion? Chekuri CS473ug Merge Sort Quick Sort Divide and Conquer Paradigm Divide and Conquer is a common and useful type of recursion Approach Break problem instance into smaller instances - divide step Recursively solve problem on smaller instances Combine solutions to smaller isntances to obtain a solution to the original instance - conquer step Question: Why is this not plain recursion? In divide and conquer, each smaller instance is typically at least a constant factor smaller than the original instance which leads to efficienct running times Chekuri CS473ug Merge Sort Quick Sort Divide and Conquer Paradigm Divide and Conquer is a common and useful type of recursion Approach Break problem instance into smaller instances - divide step Recursively solve problem on smaller instances Combine solutions to smaller isntances to obtain a solution to the original instance - conquer step Question: Why is this not plain recursion?...
View Full Document

Page1 / 77

lecture2 - CS 473: Algorithms Chandra Chekuri...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online