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 EscortSpace Fortuna CasinoescortJackpot Bob Casinodeneme bonusubonus veren sitelerescort konyamelbetbetebetbetlikekazansana girişromabethttp://www.escortbayanlariz.netligobetroketbetaviatorbetmatikbookmaker hors arjel1xbet girişПроститутки Бишкекdeneme bonusucasino siteleritempobetfixbetbetturkeybetgarbetonredstarzbetcasinoplusdinamobetbahiscomdeneme bonusuküçükçekmece escort1xbetbahisbeyotobetotobet giristempobetbetgar ü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 demolimosbet 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şdeneme bonusu veren sitelerzetcasinocasilot twitterbetibom twittermaslakcasinobahisbey twitterbetmabet girişbeylikdüzü eskort bayanorjinbet girişretrobet üyelikyonjabet girişbetosferhedefbetmasalbetcasinomobi girişbankobet üyelikmakrobet üyelikistanbul fatih escortbakırköy escortataköy escortchumba casino $100 free playluckyland slotsluckyland slotsluckyland slots appglobal poker loginglobal poker loginglobal pokerholiganbetmerikting - meritking giriş - meritking güncel adres - madridbet - madridbet giriş - madridbet güncel adres - kingroyal - kingroyal güncel adres - kingroyal giriş fortune coins casinowow vegaswow vegas online casinobetriversding ding ding casinofortune coins casinohigh 5 casinoslotomaniaslotomania free coinsmcluck casinomcluck casino loginslots of vegashello millionswow vegas online casinopulsz casinobetriversbetrivers casinobetrivers casinoding ding dingmcluck casinomcluck casino loginsweepslotssweepslots loginsweepslots loginhello millionsjackpot party casinogolden hearts gamesgolden hearts casino loginonwinonwin giriştao fortunejackpot party casinohttps://www.bakirkoyfal.com/casino https://www.welovebirds.org/carnival citi casinocarnival citi social casinojefebet complayfame casinoplayfame social casinothe money factoryfirespin casino bonusspree casinospree casinochanced casinovegas gemsvegas gemsvegas gemsluckybirdmoonspin casino no deposit bonussweeptastic casinocash frenzy free slotsclub vegasclub vegasbig fish casino real moneyrolling richesrolling riches casinohorseplayhorseplay logintao fortunegrandpashabetgrandpashabetgrandpashabetcratosroyalbetgrandpashabetbetwoontao 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 casinopusulabetpusulabetsocial casino no depositsweep coins casinossweeps cash casinosnew sweepstakes casinossocial casino no deposit bonusfree sweeps coinscircle sweeps casino real moneyfree sc casinoyay 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 bonusistanbul escortcasibomcasibom güncel girişimajbetcasibom mobilcasibomhttps://www.bakirkoyfal.com/casibom girişhaartransplantatiecasinolevanthttps://denemebonusu.com.tr/cCasibomdscasino france en lignejojobetholiganbetstarzbet twittermatbetotobetbetebetmatbetbetebetbetebetmeilleurs bonus paris sportifsdumanbetmavibetdumanbetmarsbahishaartransplantatiecasibomMarsbahiscasino en ligne argent réeljojobetjojobetholiganbet giriştaraftariumjustin tvselcuksportshdmadnixTruvabetbets10 girişmadnixspace fortunaOdeonbetiptvcasibomstarzbet twittermaxwinjojobetonwinKralbettipobet girişbetturkey girişmatbetCasibom girişMarsbahiscasino siteleribetebet girişnakitbahis girişultrabet girişrestbetrestbetcasibomgrandpashabetotobet güncel girişmarsbettipobettrendbetvaycasinovaycasinovaycasinodinamobet girişkralbet girişmatadorbetjojobetjojobetholiganbetmarsbahisonwinholiganbetsahabetsekabetrestbetdeneme bonusu veren sitelerdeneme bonusu veren sitelervaycasinodumanbet güncel girişfixbetcasibom girişbetturkey güncel girişhttps://sol.edu.pk/marsbahisbetwoonbetsmovegalabetsuperbetingalabetmaxwincasibomjojobetDeneme BonusuDeneme BonusuholiganbetsahabetsahabetimajbetjojobetnakitbahiscasinomaximarsbahisnakitbahissuperbetinpiabetgoldenbahismavibetOdeonbettaraftarium24grandpashabetcasibom güncel girişfixbetjojobet girişKralbetbetpark girişcasibombetciocasibom üye olcasinomaxilunabetmavibetcasinometropolcasinomaximobilbahisbets10matadorbetgrandpashabetsahabetonwinsekabetholiganbetjojobet girişKralbetDeneme BonusuJojobet GirişSekabetjojobetcasino en ligne fiabletümbet güncelBiabet GirişBetkare GirişBetkare Giriş Yapcasibomkingroyalcasibomcasibom girişKralbetgrandbettingotobetİzmir EscortCasibom girişatasehir escortbeylikduzu escortAtlasbetmobilbahisbahis paketleri kumar siteleriSEKABETmatadorbetbetturkeysekabetsekabet girişdeneme bonusu veren sitelerjojobet giriş Four memejojobet güncel girişcasibom güncel girişcasibom girişdeneme bonusu veren sitelerjojobetcasibom 891 comjojobetballettea tropazTHE TIDES LABjokerbet güncel girişmatadorbetbetcio girişmatadorbet girişmatbettipobetcasibommatadorbetgrandpashabetsahabetsekabetholiganbetCasibomjojobetjojobet girişcasibom girişjojobetmatbet girişimajbet girişmarsbahisbetsmoveotobettrendbetroblox fisch scriptblox fruits scriptredz hub scripthacklinkpusulabetarnavutkoy escortesenyurt escortdeneme bonusu veren sitelerBeylikdüzü Escortstarzbet twitterbetsmovemaltcasinocasinometropolbetofficemaltcasinocasinolevantklasbahiscasinovalebettiltrokubetartemisbetonwinmatbetPUSULABETimajbet girişgates of olympus oynaLisanslı Casino Siteleristake girişgrandpashabet girişmarsbahis telegramMarsbahismarsbahisjojobetmavibet girişcasinometropol girişcasinomaxi giriştipobetmobilbahis girişbets10 girişmatadorbet güncel girişgrandpashabet güncel girişsahabet güncel girişistanbul escortonwin güncel girişsekabet güncel girişholiganbet girişhipercasinohipercasino girişhipercasinobahisnowbahisnowcasilotonwinonwin girişSekabet güncel girişmaldives casinocasino maldivesfixbet girişartemisbetmaldives betmaldives online casinomaldives online betjojobetjojobet güncel girişCasibomtürbanlı ifşajojobet girişsisli escortistanbul escortmaldives betgalabetbeşiktaş escortonwinbets10jojobetavcilar escort bayancasibom instagramMarsbahis girişkingroyalcasibomultrabet giriş güncelbetebetbets10 girişbets10bets10 girişbetcio1xbetjojobet girişcasibommarsbahisbets10bets10 girişcasibom girişbets10