SlideShare a Scribd company logo
1
Summary: Design Methods
for Algorithms
Andreas Klappenecker
Design Methods
We have discussed examples of the
following algorithm design principles:
• Dynamic Programming Paradigm
• Greedy Paradigm
• Divide-and-Conquer Paradigm
2
Main Question
When can one successfully use one of
these algorithm design paradigms to solve
a problem?
3
Dynamic Programming
4
Dynamic Programming
The development of a dynamic programming algorithm
can be subdivided into the following steps:
1. Characterize the structure of an optimal solution
2. Recursively define the value of an optimal solution
3. Compute the value of an optimal solution in a
bottom-up fashion
4. Construct an optimal solution from computed
information
5
Key Question
• When can we apply the dynamic
programming paradigm?
6
Optimal Substructure
A problem exhibits optimal substructure
if and only if an optimal solution to the
problem contains within it optimal
solutions to subproblems.
Whenever a problem exhibits optimal
substructure, it is an indication that a dynamic
programming or greedy strategy might apply.
7
Overlapping Subproblems
A second indication that dynamic programming
might be applicable is that the space of
subproblems must be small, meaning that a
recursive algorithm for the problem solves the
same subproblems over and over.
Typically, the total number of distinct
subproblems is a polynomial in the input size.
8
Overlapping Subproblems
When a recursive algorithm revisits the
same problem over and over again, then
we say that the optimization problem has
overlapping subproblems.
Here two subproblems are called
overlapping if and only if they really are
the same subproblem that occurs as a
subproblem of different problems. 9
Note
If a recursive algorithm solving the
problem creates always new subproblems,
then this is an indication that divide-and-
conquer methods rather than dynamic
programming might apply.
10
Greedy Algorithms
11
Greedy Algorithms
The development of a greedy algorithm can be separated
into the following steps:
1. Cast the optimization problem as one in which we make
a choice and are left with one subproblem to solve.
2. Prove that there is always an optimal solution to the
original problem that makes the greedy choice, so
that the greedy choice is always safe.
3. Demonstrate that, having made the greedy choice,
what remains is a subproblem with the property that
if we combine an optimal solution to the subproblem
with the greedy choice that we have made, we arrive
at an optimal solution to the original problem. 12
Greedy-Choice Property
The greedy choice property is that a
globally optimal solution can be arrived at
by making a locally optimal (=greedy)
choice.
13
Optimal Substructure
A problem exhibits optimal substructure
if and only if an optimal solution to the
problem contains within it optimal
solutions to subproblems.
14
Divide-and-Conquer
15
Divide-and-Conquer
A divide and conquer method can be used for problems
that can be solved by recursively breaking them down
into two or more sub-problems of the same (or related)
type, until these become simple enough to be solved
directly. The solutions to the sub-problems are then
combined to give a solution to the original problem.
This approach is particularly successful when the
number of subproblems remain small in each step and
combining the solutions is easily done.
16

More Related Content

Similar to csce411-set7.ppt

Algorithm and Complexity-Lesson 1.pptx
Algorithm and Complexity-Lesson 1.pptxAlgorithm and Complexity-Lesson 1.pptx
Algorithm and Complexity-Lesson 1.pptx
Apasra R
 
algo classification.pptx
algo classification.pptxalgo classification.pptx
algo classification.pptx
ShivaniSharma335055
 
Greedy Algoritham
Greedy AlgorithamGreedy Algoritham
Greedy Algoritham
RJ Mehul Gadhiya
 
data structure and algorithm (Advanced algorithm Stretegies)
data structure and algorithm (Advanced algorithm Stretegies)data structure and algorithm (Advanced algorithm Stretegies)
data structure and algorithm (Advanced algorithm Stretegies)
shahghanikhan
 
Types of Algorithms.ppt
Types of Algorithms.pptTypes of Algorithms.ppt
Types of Algorithms.ppt
ALIZAIB KHAN
 
Greedymethod
GreedymethodGreedymethod
Greedymethod
Bansari Shah
 
02 greedy, d&c, binary search
02 greedy, d&c, binary search02 greedy, d&c, binary search
02 greedy, d&c, binary search
Pankaj Prateek
 
Greedy algorithm
Greedy algorithmGreedy algorithm
Greedy algorithm
CHANDAN KUMAR
 
Introduction to dynamic programming
Introduction to dynamic programmingIntroduction to dynamic programming
Introduction to dynamic programming
Amisha Narsingani
 
CH-1.1 Introduction (1).pptx
CH-1.1 Introduction (1).pptxCH-1.1 Introduction (1).pptx
CH-1.1 Introduction (1).pptx
satvikkushwaha1
 
Algorithm paradigms
Algorithm paradigmsAlgorithm paradigms
Algorithm paradigms
suresh5c2
 
DAA UNIT 3
DAA UNIT 3DAA UNIT 3
DAA UNIT 3
SURBHI SAROHA
 
Search and Optimization Strategies
Search and Optimization StrategiesSearch and Optimization Strategies
Search and Optimization Strategies
Fulvio Corno
 
Greedy algorithm for design and analysis
Greedy algorithm for design and analysisGreedy algorithm for design and analysis
Greedy algorithm for design and analysis
JavedKhan524377
 
Algorithms Design Patterns
Algorithms Design PatternsAlgorithms Design Patterns
Algorithms Design Patterns
Ashwin Shiv
 
ADA Unit 2.pptx
ADA Unit 2.pptxADA Unit 2.pptx
ADA Unit 2.pptx
AmanKumar879992
 
Analysis and Design of Algorithms notes
Analysis and Design of Algorithms  notesAnalysis and Design of Algorithms  notes
Analysis and Design of Algorithms notes
Prof. Dr. K. Adisesha
 
problem characterstics.pptx
problem characterstics.pptxproblem characterstics.pptx
problem characterstics.pptx
PriyadharshiniG41
 
Introduction to linear programming
Introduction to linear programmingIntroduction to linear programming
Introduction to linear programming
n_cool001
 
igor-kupczynski-msc-put-thesis
igor-kupczynski-msc-put-thesisigor-kupczynski-msc-put-thesis
igor-kupczynski-msc-put-thesis
Igor Kupczyński
 

Similar to csce411-set7.ppt (20)

Algorithm and Complexity-Lesson 1.pptx
Algorithm and Complexity-Lesson 1.pptxAlgorithm and Complexity-Lesson 1.pptx
Algorithm and Complexity-Lesson 1.pptx
 
algo classification.pptx
algo classification.pptxalgo classification.pptx
algo classification.pptx
 
Greedy Algoritham
Greedy AlgorithamGreedy Algoritham
Greedy Algoritham
 
data structure and algorithm (Advanced algorithm Stretegies)
data structure and algorithm (Advanced algorithm Stretegies)data structure and algorithm (Advanced algorithm Stretegies)
data structure and algorithm (Advanced algorithm Stretegies)
 
Types of Algorithms.ppt
Types of Algorithms.pptTypes of Algorithms.ppt
Types of Algorithms.ppt
 
Greedymethod
GreedymethodGreedymethod
Greedymethod
 
02 greedy, d&c, binary search
02 greedy, d&c, binary search02 greedy, d&c, binary search
02 greedy, d&c, binary search
 
Greedy algorithm
Greedy algorithmGreedy algorithm
Greedy algorithm
 
Introduction to dynamic programming
Introduction to dynamic programmingIntroduction to dynamic programming
Introduction to dynamic programming
 
CH-1.1 Introduction (1).pptx
CH-1.1 Introduction (1).pptxCH-1.1 Introduction (1).pptx
CH-1.1 Introduction (1).pptx
 
Algorithm paradigms
Algorithm paradigmsAlgorithm paradigms
Algorithm paradigms
 
DAA UNIT 3
DAA UNIT 3DAA UNIT 3
DAA UNIT 3
 
Search and Optimization Strategies
Search and Optimization StrategiesSearch and Optimization Strategies
Search and Optimization Strategies
 
Greedy algorithm for design and analysis
Greedy algorithm for design and analysisGreedy algorithm for design and analysis
Greedy algorithm for design and analysis
 
Algorithms Design Patterns
Algorithms Design PatternsAlgorithms Design Patterns
Algorithms Design Patterns
 
ADA Unit 2.pptx
ADA Unit 2.pptxADA Unit 2.pptx
ADA Unit 2.pptx
 
Analysis and Design of Algorithms notes
Analysis and Design of Algorithms  notesAnalysis and Design of Algorithms  notes
Analysis and Design of Algorithms notes
 
problem characterstics.pptx
problem characterstics.pptxproblem characterstics.pptx
problem characterstics.pptx
 
Introduction to linear programming
Introduction to linear programmingIntroduction to linear programming
Introduction to linear programming
 
igor-kupczynski-msc-put-thesis
igor-kupczynski-msc-put-thesisigor-kupczynski-msc-put-thesis
igor-kupczynski-msc-put-thesis
 

More from JoshCasas1

Understanding Technologies In Education for the Third Quarter
Understanding Technologies In Education for the Third QuarterUnderstanding Technologies In Education for the Third Quarter
Understanding Technologies In Education for the Third Quarter
JoshCasas1
 
MOST SUCCESSFUL ENTREPRENEURS PRESENTATION (1).pptx
MOST SUCCESSFUL ENTREPRENEURS PRESENTATION (1).pptxMOST SUCCESSFUL ENTREPRENEURS PRESENTATION (1).pptx
MOST SUCCESSFUL ENTREPRENEURS PRESENTATION (1).pptx
JoshCasas1
 
Combined 2nd Section 4900 Slides.ppt
Combined 2nd Section 4900 Slides.pptCombined 2nd Section 4900 Slides.ppt
Combined 2nd Section 4900 Slides.ppt
JoshCasas1
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt
JoshCasas1
 
Chapters_1_2.ppt
Chapters_1_2.pptChapters_1_2.ppt
Chapters_1_2.ppt
JoshCasas1
 
JOSHUA A. CASAS (FILIPINO VALUES SYSTEM AND CHANGE).pptx
JOSHUA A. CASAS (FILIPINO VALUES SYSTEM AND CHANGE).pptxJOSHUA A. CASAS (FILIPINO VALUES SYSTEM AND CHANGE).pptx
JOSHUA A. CASAS (FILIPINO VALUES SYSTEM AND CHANGE).pptx
JoshCasas1
 
L2 COMPUTER ETHICS PPT [Autosaved].pptx
L2 COMPUTER  ETHICS  PPT [Autosaved].pptxL2 COMPUTER  ETHICS  PPT [Autosaved].pptx
L2 COMPUTER ETHICS PPT [Autosaved].pptx
JoshCasas1
 
Essential Access Exercises week 1-4.pdf
Essential Access Exercises week 1-4.pdfEssential Access Exercises week 1-4.pdf
Essential Access Exercises week 1-4.pdf
JoshCasas1
 
MS ACCESS DEFINING DESIGN VIEW AND DATASHEET VIEW.ppt
MS ACCESS DEFINING DESIGN VIEW AND DATASHEET VIEW.pptMS ACCESS DEFINING DESIGN VIEW AND DATASHEET VIEW.ppt
MS ACCESS DEFINING DESIGN VIEW AND DATASHEET VIEW.ppt
JoshCasas1
 
M0DULE 1-MS ACCESS Databases and Database Objects.pdf
M0DULE 1-MS ACCESS Databases and Database Objects.pdfM0DULE 1-MS ACCESS Databases and Database Objects.pdf
M0DULE 1-MS ACCESS Databases and Database Objects.pdf
JoshCasas1
 
Microsoft Access ppt.ppt
Microsoft Access ppt.pptMicrosoft Access ppt.ppt
Microsoft Access ppt.ppt
JoshCasas1
 
MICROSOFT ACCESS 2016Basics-Handouts and LESSON Introduction.pdf
MICROSOFT ACCESS 2016Basics-Handouts and LESSON Introduction.pdfMICROSOFT ACCESS 2016Basics-Handouts and LESSON Introduction.pdf
MICROSOFT ACCESS 2016Basics-Handouts and LESSON Introduction.pdf
JoshCasas1
 
Introduction to Microsoft Access2.ppt
Introduction to Microsoft Access2.pptIntroduction to Microsoft Access2.ppt
Introduction to Microsoft Access2.ppt
JoshCasas1
 
LESSON 1- MICROSOFT ACCESS CREATING DATABASE.pdf
LESSON 1- MICROSOFT ACCESS CREATING DATABASE.pdfLESSON 1- MICROSOFT ACCESS CREATING DATABASE.pdf
LESSON 1- MICROSOFT ACCESS CREATING DATABASE.pdf
JoshCasas1
 

More from JoshCasas1 (14)

Understanding Technologies In Education for the Third Quarter
Understanding Technologies In Education for the Third QuarterUnderstanding Technologies In Education for the Third Quarter
Understanding Technologies In Education for the Third Quarter
 
MOST SUCCESSFUL ENTREPRENEURS PRESENTATION (1).pptx
MOST SUCCESSFUL ENTREPRENEURS PRESENTATION (1).pptxMOST SUCCESSFUL ENTREPRENEURS PRESENTATION (1).pptx
MOST SUCCESSFUL ENTREPRENEURS PRESENTATION (1).pptx
 
Combined 2nd Section 4900 Slides.ppt
Combined 2nd Section 4900 Slides.pptCombined 2nd Section 4900 Slides.ppt
Combined 2nd Section 4900 Slides.ppt
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt
 
Chapters_1_2.ppt
Chapters_1_2.pptChapters_1_2.ppt
Chapters_1_2.ppt
 
JOSHUA A. CASAS (FILIPINO VALUES SYSTEM AND CHANGE).pptx
JOSHUA A. CASAS (FILIPINO VALUES SYSTEM AND CHANGE).pptxJOSHUA A. CASAS (FILIPINO VALUES SYSTEM AND CHANGE).pptx
JOSHUA A. CASAS (FILIPINO VALUES SYSTEM AND CHANGE).pptx
 
L2 COMPUTER ETHICS PPT [Autosaved].pptx
L2 COMPUTER  ETHICS  PPT [Autosaved].pptxL2 COMPUTER  ETHICS  PPT [Autosaved].pptx
L2 COMPUTER ETHICS PPT [Autosaved].pptx
 
Essential Access Exercises week 1-4.pdf
Essential Access Exercises week 1-4.pdfEssential Access Exercises week 1-4.pdf
Essential Access Exercises week 1-4.pdf
 
MS ACCESS DEFINING DESIGN VIEW AND DATASHEET VIEW.ppt
MS ACCESS DEFINING DESIGN VIEW AND DATASHEET VIEW.pptMS ACCESS DEFINING DESIGN VIEW AND DATASHEET VIEW.ppt
MS ACCESS DEFINING DESIGN VIEW AND DATASHEET VIEW.ppt
 
M0DULE 1-MS ACCESS Databases and Database Objects.pdf
M0DULE 1-MS ACCESS Databases and Database Objects.pdfM0DULE 1-MS ACCESS Databases and Database Objects.pdf
M0DULE 1-MS ACCESS Databases and Database Objects.pdf
 
Microsoft Access ppt.ppt
Microsoft Access ppt.pptMicrosoft Access ppt.ppt
Microsoft Access ppt.ppt
 
MICROSOFT ACCESS 2016Basics-Handouts and LESSON Introduction.pdf
MICROSOFT ACCESS 2016Basics-Handouts and LESSON Introduction.pdfMICROSOFT ACCESS 2016Basics-Handouts and LESSON Introduction.pdf
MICROSOFT ACCESS 2016Basics-Handouts and LESSON Introduction.pdf
 
Introduction to Microsoft Access2.ppt
Introduction to Microsoft Access2.pptIntroduction to Microsoft Access2.ppt
Introduction to Microsoft Access2.ppt
 
LESSON 1- MICROSOFT ACCESS CREATING DATABASE.pdf
LESSON 1- MICROSOFT ACCESS CREATING DATABASE.pdfLESSON 1- MICROSOFT ACCESS CREATING DATABASE.pdf
LESSON 1- MICROSOFT ACCESS CREATING DATABASE.pdf
 

Recently uploaded

留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
uehowe
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
zoowe
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
xjq03c34
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
cuobya
 
Ready to Unlock the Power of Blockchain!
Ready to Unlock the Power of Blockchain!Ready to Unlock the Power of Blockchain!
Ready to Unlock the Power of Blockchain!
Toptal Tech
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
davidjhones387
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
Trish Parr
 
[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024
hackersuli
 
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
cuobya
 
Design Thinking NETFLIX using all techniques.pptx
Design Thinking NETFLIX using all techniques.pptxDesign Thinking NETFLIX using all techniques.pptx
Design Thinking NETFLIX using all techniques.pptx
saathvikreddy2003
 
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
ukwwuq
 
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
bseovas
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Florence Consulting
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
SEO Article Boost
 
Explore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories SecretlyExplore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories Secretly
Trending Blogers
 
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
uehowe
 
Azure EA Sponsorship - Customer Guide.pdf
Azure EA Sponsorship - Customer Guide.pdfAzure EA Sponsorship - Customer Guide.pdf
Azure EA Sponsorship - Customer Guide.pdf
AanSulistiyo
 
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
fovkoyb
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
vmemo1
 
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalmanuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
wolfsoftcompanyco
 

Recently uploaded (20)

留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
 
Ready to Unlock the Power of Blockchain!
Ready to Unlock the Power of Blockchain!Ready to Unlock the Power of Blockchain!
Ready to Unlock the Power of Blockchain!
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
 
[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024
 
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
 
Design Thinking NETFLIX using all techniques.pptx
Design Thinking NETFLIX using all techniques.pptxDesign Thinking NETFLIX using all techniques.pptx
Design Thinking NETFLIX using all techniques.pptx
 
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
 
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
 
Explore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories SecretlyExplore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories Secretly
 
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
 
Azure EA Sponsorship - Customer Guide.pdf
Azure EA Sponsorship - Customer Guide.pdfAzure EA Sponsorship - Customer Guide.pdf
Azure EA Sponsorship - Customer Guide.pdf
 
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
 
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalmanuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
 

csce411-set7.ppt

  • 1. 1 Summary: Design Methods for Algorithms Andreas Klappenecker
  • 2. Design Methods We have discussed examples of the following algorithm design principles: • Dynamic Programming Paradigm • Greedy Paradigm • Divide-and-Conquer Paradigm 2
  • 3. Main Question When can one successfully use one of these algorithm design paradigms to solve a problem? 3
  • 5. Dynamic Programming The development of a dynamic programming algorithm can be subdivided into the following steps: 1. Characterize the structure of an optimal solution 2. Recursively define the value of an optimal solution 3. Compute the value of an optimal solution in a bottom-up fashion 4. Construct an optimal solution from computed information 5
  • 6. Key Question • When can we apply the dynamic programming paradigm? 6
  • 7. Optimal Substructure A problem exhibits optimal substructure if and only if an optimal solution to the problem contains within it optimal solutions to subproblems. Whenever a problem exhibits optimal substructure, it is an indication that a dynamic programming or greedy strategy might apply. 7
  • 8. Overlapping Subproblems A second indication that dynamic programming might be applicable is that the space of subproblems must be small, meaning that a recursive algorithm for the problem solves the same subproblems over and over. Typically, the total number of distinct subproblems is a polynomial in the input size. 8
  • 9. Overlapping Subproblems When a recursive algorithm revisits the same problem over and over again, then we say that the optimization problem has overlapping subproblems. Here two subproblems are called overlapping if and only if they really are the same subproblem that occurs as a subproblem of different problems. 9
  • 10. Note If a recursive algorithm solving the problem creates always new subproblems, then this is an indication that divide-and- conquer methods rather than dynamic programming might apply. 10
  • 12. Greedy Algorithms The development of a greedy algorithm can be separated into the following steps: 1. Cast the optimization problem as one in which we make a choice and are left with one subproblem to solve. 2. Prove that there is always an optimal solution to the original problem that makes the greedy choice, so that the greedy choice is always safe. 3. Demonstrate that, having made the greedy choice, what remains is a subproblem with the property that if we combine an optimal solution to the subproblem with the greedy choice that we have made, we arrive at an optimal solution to the original problem. 12
  • 13. Greedy-Choice Property The greedy choice property is that a globally optimal solution can be arrived at by making a locally optimal (=greedy) choice. 13
  • 14. Optimal Substructure A problem exhibits optimal substructure if and only if an optimal solution to the problem contains within it optimal solutions to subproblems. 14
  • 16. Divide-and-Conquer A divide and conquer method can be used for problems that can be solved by recursively breaking them down into two or more sub-problems of the same (or related) type, until these become simple enough to be solved directly. The solutions to the sub-problems are then combined to give a solution to the original problem. This approach is particularly successful when the number of subproblems remain small in each step and combining the solutions is easily done. 16