buca escort
App DevelopmentFeaturedUncategorized

The Analysis of How to Learn Dynamic Programming

Used in mathematics, management science, computer science, economics, and bioinformatics, dynamic programming (DP) can solve complex problems by decomposing the original problem into relatively simple subproblems. And at AlgoMonster, we will share how to solve the dynamic programming problem.

What is dynamic programming?

In 1951, American mathematician B. E. Bellman and others proposed the “optimality principle.” The characteristics of a class of multi-stage decision problems transform them into a series of interrelated single-stage decision problems. It then solves them one by one in stages, thus creating an optimality solution. It makes a new method for solving optimization problems – dynamic programming.

Classification of dynamic programming

Dynamic programming models classify processes into discrete and continuous decision processes according to whether the time covariates of the multi-stage decision process are discrete or continuous variables. Depending on whether the evolution of the decision process is deterministic or stochastic, these processes are identified accordingly. There are four decision process models: discrete deterministic, discrete stochastic, continuous deterministic, and continuous stochastic.

Dynamic programming is not a specific algorithm but an algorithmic idea: to solve a given problem, we need to solve its different parts (i.e., subproblems) and then, based on the solutions of the subproblems to derive the resolution of the original problem.

The feasibility of applying this algorithmic idea to solve a problem has some requirements on two aspects. The relationship between the subproblem and the original problem and the relationship between the subproblems. It corresponds to the optimal substructure and the repeated subproblem, respectively.

What is the optimal substructure in dynamic programming?

The optimal substructure specifies the relationship between the subproblem and the original problem.

Dynamic programming is about finding the optimal solution to some problem, i.e., finding the optimal one from many resolutions. When we seek the optimal solution of a problem, if we can decompose the problem into multiple subproblems, then recursively find the optimal solution of each subproblem. And finally, combine the optimal solutions of each subproblem through specific mathematical methods to obtain the final result. To summarize, the optimal solution of its subproblems determines the optimal solution of a problem.

Combining the subproblems’ solutions to obtain the original problem’s solution is the key to the feasibility of dynamic programming. The state transfer equation generally describes this combination in the solution.

The example

The solution of the original problem is f(n)f(n), where we call f(n)f(n) the state. The state transfer equation f(n) = f(n – 1) + f(n – 2)f(n) = f(n-1) + f(n-2) describes a combination of the original problem and the subproblem . There are some choices on the original problem, and different choices may correspond to different subproblems or different combinations.

n = 2k and n = 2k + 1n=2k+1 correspond to different choices on the original problem, corresponding to different subproblems and combinations, respectively.

After finding the optimal substructure, we can also derive a state transfer equation f(n)f(n), by which we can quickly write a recursive implementation of the problem.

How to solve dynamic programming problems?

The core of solving a dynamic programming problem is finding the subproblem and its relationship to the original problem.

Once we find the subproblem and its relationship to the original problem, we can solve the subproblem recursively. However, the overlapping subproblems make direct recursion a lot of repeated calculations, so the idea of mnemonic recursion. If the scope of the subproblems can be sure in advance, then build the tap to store the answers to the subproblems.

Example: Dynamic programming in a continuous state

Think about why this problem is dynamic programming. You can use this method.

First, due to the fixed sum of three variables, it limits the space for the other two variables to take values after selecting one variable. That is, the decision affects the state.

Second, the importance of three variables can be a determination one by one to achieve a certain step. That is, there is a stage division possible.

Finally, it satisfies Markovianity. Then at this time, “fix the sum of the last 50 variables at b” in the set state, which means the values of the first 50 variables do not have any effect on the choice of the last 50 variables. It is posterior-free. It determines that Finally, it satisfies Markovianity. Then at this time, “fix the sum of the last 50 variables at b” in the set state. Meaning the values of the first 50 variables do not have any effect on the choice of the last 50 variables. It is posterior-free. It determines that dynamic programming can solve such problems.

The next step

The next step is to clarify the basic concept of dynamic programming. The stage can be defined as the number of variables taken. Like taking the first variable’s value is stage 1, and taking the value of 1, 2 variables are stage 2. The state can be defined as the sum of k variables when taking k variables.

Also, decision and strategy become the processes of taking values naturally. And the indicator function is the form of z. The optimal function is the largest indicator function.

Sub-indicator (optimal) function is a certain stage of the variables are taken after the value of the part in the manifestation of z.

For example, the sub-indicator of stage 2 is x1x2^2.

In the first stage, the value of x1 is taken, and according to the state’s definition, the reachable state of stage 1 is the set of all matters of x1, which means all values of [0,c], and the subindex function is also x1.

The key starts at the second stage, where values are taken for x1 and x2 simultaneously, at which point the reachable state of stage 2 is the set of all possible values of (x1+x2), again all values of [0,c], and the subindex function is x1x2^2. But then, we have to find the optimal policy for each of these states.

When the stage 2 state is s2, we can adjust the values of x1 and x2 to reach the maximum value of x1x2^2. And also, we can require this maximum value by treating s2 as a constant derivative concerning x2 to obtain the optimal strategy for state s2.

The third stage of the reachable state is only c. It means that the decision of the third stage is also certain when the second state is over. At this time there is already x1 + x2 = s2, s2 + x3 = s3 = c. Then consider s3 as a constant (and it is) derivative. So that obtains the optimal strategy for the state s3.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button
Pendik Escorten iyi casino sitelerimatadorbet twitterultrabetonwindeneme bonusu veren siteleranadolu yakası escortKartal EscortPendik Escortsahabetbetturkey girişpragmatic playaviator oynasweet bonanza oynagates of olympus oynaataşehir escortSpace Fortuna CasinoescortJackpot Bob Casinodeneme bonusubonus veren sitelerescort konyamelbetbetebetbetlikekazansana girişromabethttp://www.6mv.org/http://www.escortbayanlariz.netligobetroketbetaviatormatadorbetbetmatikrizz casinobookmaker hors arjel1xbet girişbetcitynlvipdevushki.comdeneme bonusucasino siteleriJojobettempobetfixbetbetturkeybetgarbetonredstarzbetcasinoplusdinamobetbahiscomistanbul escortdeneme bonusuküçükçekmece escortşişli escort1xbetmeritkingtürk pornohttps://sahipleniyorum.com/casinolevantbahisbeyJojobetDeneme bonusu veren sitelercasibomotobetotobet girisMarmaris escorttempobetbetgar üyelikbizbet üyelik7slots üyelikbizbet girişbetgar giriştempobet girişbetgar twitter7slots twitterbizbet7slotstempobetbizbet linksweet bonanza demo oynabetgar güncel girişbetgar para çekmetempobet yeni adresaviator sinyal hilesisugar rush 1000 max wingates of olympus taktikbig bass bonanza demoankara escortstarzbetVozol 12000limosbet güncel girişwolbet son girişyonjabet güncel girişpeswin güncel girişhedefbet yeni girişbetvigo yeni girişmilosbet üyelikgettobet üyelikvizyonbet üyelikbetman üyelikslottica mobilfixbetxslototobetgrandpashabetpin upmatadorbet twitter1xbet twitterbetmatik twitterfixbet girişbetmatik girişroketbet girişroketbet üyelikxslot üyelikotobet üyelikJojobetroketbet güvenilir mixslot bahispashabetotobet yeni girişmostbet.com indircasibom girişonwinkadıköy escort1windeneme bonusu veren sitelermatadorbetcasibomzetcasinocasilot twitterbetibom twittermaslakcasinobahisbey twitterbetmabet giriş1winistanbul escortorjinbet girişretrobet üyelikyonjabet girişbetosferhedefbetmasalbetcasinomobi girişbankobet üyelikmakrobet üyelikistanbul fatih escortbakırköy escortantalya escbakırköy escortcasibomataköy escortchumba casino $100 free playzula casino reviewluckyland slotsluckyland slotsluckyland slots appluckyland slots appglobal pokerglobal poker loginglobal poker loginglobal pokerindit-africa.comholiganbetmerikting - meritking giriş - meritking güncel adres - madridbet - madridbet giriş - madridbet güncel adres - kingroyal - kingroyal güncel adres - kingroyal giriş antalya vip escortlarfortune coins casinowow vegaswow vegas online casinobetriversding ding ding casinofortune coinsfortune coinsfortune coins casinohigh 5 casinostakecasino worldcasino world onlineslotomaniaslotomania free coinsbetparkmcluck casinomcluck casino loginslots of vegashello millionswow vegas online casinopulsz casinobetriversbetrivers casinobetrivers casinobingo blitzding ding dingfunrizemcluck casinomcluck casino loginmcluck casino loginmcluck casino loginsweepslotssweepslots loginsweepslots loginhello millionshello millions loginhello millions loginextrabetdeneme bonusu veren sitelerSerdivan EscortПроститутки Бишкекаcasibomsohbet hattıbetcio girişcasinolevantTek kullanımlık tulumcasinolevantcasinolevant girişbettiltmatbetjackpot party casinogolden hearts gamesgolden hearts casino loginmatadorbetonwinonwin giriş1win1win1winmatadorbetpusulabet girişpusulabet girişbetexperdumanbet güncel girişdinamobet güncel girişbetebet girişnakitbahis güncel girişsultanbetyouwincasibomcasibom giriş1xbetmeritkingmatadorbet1xbet1xbetgrandpashabet girişsahabetonwinsekabetcasibomholiganbetjojobetmarsbahis güncel girişholiganbet güncel girişjojobetcasibomwinxbetbetpasyouwinyouwinholiganbet güncel girişbetkanyon güncel girişyouwingoldenbahiscasibom girişkralbet güncel girişmadridbet güncel girişotobet güncel giriştipobet güncel giriştrendbet güncel girişcasibom girişcasibom girişcasibombetturkey güncel girişcasibomvaycasino güncel girişmeritking girişcasibomfixbet güncel girişsuperbetinkulisbet güncel girişbetturkey girişjojobetcasibomfixbetjojobet girişdumanbettrendbetjojobetbetparkjojobetcasibombetpark girişselçuksportsbetwildcasibom girişcasibomhttps://www.turgok.org/casibom güncel girişbetturkeytao fortunejackpot partyjackpot party casinopusulabetmatbetcasibomholeyycasinolevantcasinolevantcasinolevantcasibomsekabetistanbul zenci escortistanbul güvenlik kameraEscort bayan izmirwinxbetPusulabet güncel girişizmir escortmeritkingmeritkingcasibomcasino https://www.welovebirds.org/carnival citi casinocarnival citi social casinojefebet complayfame casinoplayfame social casinothe money factoryfirespin casino bonusspree casinospree casinospree casino loginchanced casinovegas gemsvegas gemsvegas gemsvegas gems casinoluckybirdmoonspin casino no deposit bonusslot madness no deposit bonusslot madness no deposit bonussweeptastic casinocash frenzycash frenzycash frenzy free slotsclub vegasclub vegasclub vegas casinobig fish casino real moneyrolling richesrolling riches casinohorseplayhorseplay logintao fortuneGrandpashabetgrandpashabetgrandpashabetcratosroyalbetGrandpashabetbetwooncasibom giriştao fortunetao fortune casinocrown coinsfunzcityfunzcity sweepstakes bonuskickr casinopop slotspop slots freejackpotajackpota promo codefortune wheelzfortune wheelzreal prizemega bonanzaslots era jackpotcarnival citi casinocarnival citi sweepstakesnolimitcoins casinonolimitcoin sweestakesplayfame social casinothe money factory casinoslotparkslotparkslotpark casinojojobetjojobetistanbul escortbüyükçekmece escortjojobet güncel girişcasibom girişpinbahis güncel girişcasibom girişpinbahis güncel girişbetcio güncel girişmeritbet güncel girişgrandpashabet güncel girişcasibom girişsekabet güncel girişjojobet güncel girişmarsbahis güncel girişpusulabetmarsbahismarsbahissocial casino no depositsweep coins casinossweeps cash casinostempobetcasibomcasinomaxisultanbetyouwinjojobet girişcasibomjojobet girişsekabetjojobet girişcasibom girişjojobet girişcasibombahiscom güncel girişGoldenbahisbağcılar escortnew sweepstakes casinossocial casino no deposit bonusfree sweeps coinscircle sweeps casino real moneyfree sc casinoyay casino no deposit bonusyay casino no deposit bonuscaesars social casinofirespin casinofirespin casino bonussweeps coins casinosweeps casinosweeps cash casinossc casinofree sc coins no depositnew sweepstakes casinosnew sweepstakes casinossocial casino no deposit bonusCasibom Casino Sitelerisefaköy escortimajbetcasibomzlotextrabetimajbetonwinonwin girişextrabetzbahisgaziantep çatıdeneme bonusu veren siteleristanbul escortsbetexper güncel giriş1xbet girişmeritking girişmatadorbet girişgrandpashabet girişsahabet girişgates of olympusonwin girişdeneme bonusu veren siteler 2024sekabet girişportobet girişcanlı maç izlecasibom girişholiganbet girişjojobet güncel girişcasibomcanlı maç izlecasibom girişcasibom mobil girişcasibom yeni girişasyabahis girişsahabetjustin tvcasibomcasibom girişbettiltmatbet girişimajbet girişmeritkingcasibom giriştürk pornomarsbahis girişkingroyal güncel girişcasibom güncel girişcasibomcasibom girişcasibom bonuslarcasibom mobil girişbedava bonus veren sitelertümbetNarlıdere EscortMarsbahis güncel girişesenyurt escortjustintvjustintvmaltcasino girişkingbetting güncel giriştaraftariumimajbetzbahiscasinolevantpusulabet girişpusulabethttps://www.kadikoyescortum.com/fluxus executoristanbul escortcanlı maç izlehaartransplantatiesugar rushGoldbahisPerabetpulibet güncel girişcasibom 726CASİBOMCASİBOM GİRİŞCASİBetzoneZlotKlasbahisMadridbetMadridbetMadridbetcanlı maç izletempobetjojobet girişkarşıyaka escortcasibommarsbahisganobetcasibom girişcasibomcasibom girişistanbul escortcasibom girişcasibom