- 1560
- no_77
- MSOM_SS_Paper.pdf
- Webmethods
- Divide and Conquer Algorithm Design Method
- apio2007sol.pdf
- Regular Expressions Cheat Sheet
- Dynamic Programming
- p106 Carter
- Substitution Method
- Redes InTraffic optimization and monitoring terminals in ad-hoc network through ant colony system
- A Dynamic Programming Based Technique for Optimal Allocation of Radio Resource in Multi-user Cellular Long-term Evolution (LTE) Downlink
- Thesis Fulltext
- algorithm2e.pdf
- Lec-4-Algo-Spr15-Recursion.ppt
- How to Slipstream All Intel SATA Drivers Into a Windows XP Installation Disc.
- Vaultize Secure Content Access Gateway Data Sheet
- CS6301-Syl
- 1107.0434.pdf
- It Imp 03
- Lecture 4
- Solutions Convolutional Codes
- SPC_SAP_A3 - Technical Development List v1.2
- EE304_20140808_Grph_Thry-libre
- A Study on Contrast and Comparison Between Bellman-Ford Algorithm and Dijkstras Algorithms
- READ-ME
- Mathematical Induction
- divide and conquer algo
- Kier Stead
- Red Black Trees
- The Unwinding: An Inner History of the New America
- Yes Please
- Sapiens: A Brief History of Humankind
- Dispatches from Pluto: Lost and Found in the Mississippi Delta
- Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
- The Innovators: How a Group of Hackers, Geniuses, and Geeks Created the Digital Revolution
- Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
- John Adams
- The Emperor of All Maladies: A Biography of Cancer
- A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
- Grand Pursuit: The Story of Economic Genius
- This Changes Everything: Capitalism vs. The Climate
- The Prize: The Epic Quest for Oil, Money & Power
- The New Confessions of an Economic Hit Man
- Team of Rivals: The Political Genius of Abraham Lincoln
- The World Is Flat 3.0: A Brief History of the Twenty-first Century
- Smart People Should Build Things: How to Restore Our Culture of Achievement, Build a Path for Entrepreneurs, and Create New Jobs in America
- The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
- Rise of ISIS: A Threat We Can't Ignore
- Angela's Ashes: A Memoir
- Steve Jobs
- How To Win Friends and Influence People
- Bad Feminist: Essays
- The Light Between Oceans: A Novel
- The Sympathizer: A Novel (Pulitzer Prize for Fiction)
- Extremely Loud and Incredibly Close: A Novel
- Leaving Berlin: A Novel
- The Silver Linings Playbook: A Novel
- You Too Can Have a Body Like Mine: A Novel
- The Incarnations: A Novel
- The Love Affairs of Nathaniel P.: A Novel
- Life of Pi
- Bel Canto
- The Master
- A Man Called Ove: A Novel
- Brooklyn: A Novel
- The Flamethrowers: A Novel
- The First Bad Man: A Novel
- We Are Not Ourselves: A Novel
- The Blazing World: A Novel
- The Rosie Project: A Novel
- The Wallcreeper
- Wolf Hall: A Novel
- The Art of Racing in the Rain: A Novel
- Beautiful Ruins: A Novel
- The Kitchen House: A Novel
- Interpreter of Maladies
- The Perks of Being a Wallflower
- Lovers at the Chameleon Club, Paris 1932: A Novel
- The Bonfire of the Vanities: A Novel
- The Cider House Rules
- A Prayer for Owen Meany: A Novel
- Mislaid: A Novel

**Dynamic programming is an algorithm technique, which is applicable to a problem which is
**

composed of overlapping sub-problems and the problem has Optimal sub-structure.

A problem is said to have overlapping sub-problems if a problem can be broken down into a sub-

problems which are reused several times or recursive algorithm solves same sub-problem over

and over.

So, this overlapping nature of the sub-problems help reducing the complexity by using a technique

called memoization.

emoi!ation is technique in which the result of a sub-problem is stored in a data structure if it

is computed for the 1st time. And next time if the same sub-problem is used, we lookup into the

data structure before solving the sub-poroblem.

So the output of any sub-problem is re-used to solve the other sub-problem.

As a result, the computation of overlapping part in sub-problems is done only once. "hereby

reducing the complexity.

Optimal Substructure-

A problem is said to have optimal sub-structure if an optimal solution for the problem can be

constructed efficiently from optimal solutions of its sub-problems.

Summary-

• Solution to a sub-problem is obtained by using the result of previously computed sub-

problems.

• !ll sub-problems are computed using previously computed sub-problems e"cept the

base cases, which we find to derive before start solving the sub-problems.

• So we consider base cases as previosuly computed sub-problems for solving other sub-

problems.

#.g- fibonaci series

#n fibonacci series, the base case is the following$-

• %e consider Solution for fibonacci of & '(

• %e consider Solution for fibonacci of ( '(

)ow, we use these base cases to get solution to other sub-problems.

Difference between dynamic programming and divide $ con%uer

Divide and con%uer -

Divides the problem into sub-problems.

Solves the sub-problems.

*ombine the result of sub-problems to get the solution to original problem.

&ote- 'n Divide $ (on%uer the sub-problems are independent of each other.+whereas in D,

sub-problems are overlapping in nature means solution to one sub-problem may be dependent on

the output of other sub-problem for computation-.

)ey 'dea behind dynamic programming

• In general, to solve a given problem, we need to solve diferent parts of the problem

(subproblems), then combine the solutions of the subproblems to reach an overall

solution.

• Often, many of these subproblems are really the same.

• The dynamic programming approach seeks to solve each subproblem only once, thus

reducing the number of computations once the solution to a given subproblem has been

computed, it is stored or !memo"i#ed! the ne$t time the same solution is needed, it is

simply looked up.

• This approach is especially useful when the number of repeating subproblems grows

e$ponentially as a function of the si#e of the input.

Top-Down Approach

Problem Solving Help:- %ain task of solving a problem using dp is "

• &reaking down the problem into sub"problems.

• 'inding out the base cases and recurrence relation(re"occurring relation which tells how

one sub"problem uses other sub"problem).

,roblem

Sub-,roblem (

Sub-*roblem +

Sub-,roblem . Sub-,roblem n

Sub-,roblem ( will

act as the base case for

Solving rest of the sub

,roblems. #t is memoi!ed

Sub-,roblem (

)ew Sub-,roblem

*omposed of

/ere Sub-,roblem (

is not recalculated

instead it looks up in

the data structure used

for memoi!ation

"his sub-problem will be

solved as it is a

new sub-problem.

"his sub-problem will be

a part of further

sub-problems.

And there it will not

be recomputed.

*omputation of each sub-problem is done only

0nce.

Types of dynamic programming Approaches

1) Top-down Approach:- (emoi!a"ion Approach)

• In this approach, we solve the top sub"problems (rst which recurses down to solve the

sub"problems.(Overlapping sub"problems)

• The solution to the sub"problem is computed and stored in a table.

• )henever a new sub"problem is being solved, (rst we check whether the sub"problem is

already solved or not. If it is then we use the same result, otherwise we compute it*s result

and store it in the table.

• +ll ,ecursive alog*s uses memoi#ation are e$amples of top"down dynamic programming.

#ons:-

• It re-uires us to save all the previously computed results at any point in time.

• If the si#e of problem is large, then we will end up occupying large space for the previously

computed results which is not good.

• ,ecursion overhead will not be there.

• .ere any subproblem can be encountered any time so we need to store all the results till

end. $a!y approach(or on demand approach)

%&g:- solving 'bonacci series (sing rec(rsive algo and memoi!ing "he res(l"s a"

each s"age&

'b(n) ) 'b(n-1) * 'b(n-+) called rec(rsivly&

+) ,o""om -p Approach:- (dynamic programming)

• In this approach, we solve the sub"problems (rst in a particular order and then use their

solution to build the solution to the original problem/top problems.

• .ere also the solution to sub"problems is memoi#ed.

• Order of the solving sub"problems is of important interest as this order helps us in

memoi#ing the intermediate results only and throwing away the rest of the previously

computed results which are of no use(will not be used further).

• .ere since we are solving the sub"problems in a order, such that only the intermediate

results of sub"problems are re-uired to build the solution to original problem/top problems.

Pros:-

• It re-uires us to store only the intermediate results of sub"problems and throws away the

rest of the results of sub"problems.

• 0o recursion overhead

• 1pace re--uirement is not much.

.or solving s(b-problems/ 0rdering of s(b-problems is impor"an" &

%&g:- 'bonacci series (sing follwong rec(rrence rela"ion&

'b(n) ) 'b(n-1) * 'b(n-+) loopi" from + "o n

- 1560Uploaded byMalavika Ghosh
- no_77Uploaded byrerere
- MSOM_SS_Paper.pdfUploaded bystone_balu
- WebmethodsUploaded bySowmya Nagaraja
- Divide and Conquer Algorithm Design MethodUploaded byEbmesem
- apio2007sol.pdfUploaded bycakrawishnu
- Regular Expressions Cheat SheetUploaded byscribbozr
- Dynamic ProgrammingUploaded byLokesh Khandelwal
- p106 CarterUploaded byshdotcom
- Substitution MethodUploaded byPrakhar Sharma
- Redes InTraffic optimization and monitoring terminals in ad-hoc network through ant colony systemUploaded byMiguel Diaz
- A Dynamic Programming Based Technique for Optimal Allocation of Radio Resource in Multi-user Cellular Long-term Evolution (LTE) DownlinkUploaded bysunilsrsan
- Thesis FulltextUploaded byanhthehtd
- algorithm2e.pdfUploaded byWoska Pires da Costa
- Lec-4-Algo-Spr15-Recursion.pptUploaded byZoHaib Ahmed
- How to Slipstream All Intel SATA Drivers Into a Windows XP Installation Disc.Uploaded bymotiosnv
- Vaultize Secure Content Access Gateway Data SheetUploaded byVaultize Inc.
- CS6301-SylUploaded bycourageouscse
- 1107.0434.pdfUploaded byJonathan
- It Imp 03Uploaded byVijay Sagar
- Lecture 4Uploaded byMittal Sushant
- Solutions Convolutional CodesUploaded bySatheesh Kumar
- SPC_SAP_A3 - Technical Development List v1.2Uploaded byRodge Mendoza
- EE304_20140808_Grph_Thry-libreUploaded bypurushg62
- A Study on Contrast and Comparison Between Bellman-Ford Algorithm and Dijkstras AlgorithmsUploaded byradin1
- READ-MEUploaded byapi-3834244
- Mathematical InductionUploaded bysooryatheja4721
- divide and conquer algoUploaded byankitdocs
- Kier SteadUploaded byAndrew Raspwald
- Red Black TreesUploaded bymahesh