首页 > 其他分享 >Dynamic programming basic principle

Dynamic programming basic principle

时间:2023-10-20 11:45:33浏览次数:35  
标签:programming Dynamic dynamic tabular principle optimal 最优 method

There is a confusing question, i.e. the name of this method is dynamic programming, how can we understand it ?
The dynamic programming in chinese is "动态规划", to be honest, this translation is imprecise, because we can't get the real thinking of the this algorithm.
The programming refers to a tabular method, according to the next context, we will understand what is a tabular method.

性质

  1. 最优子结构 (optimal substructure) 性质:问题的最优解由相关子问题的最优解组合而成,而这些子问题可以独立求解。

optimal substructure: optimal solutions to a problem incorporate optimal solutions to related subproblems, which we may solve independently

标签:programming,Dynamic,dynamic,tabular,principle,optimal,最优,method
From: https://www.cnblogs.com/hongyugao/p/17776699.html

相关文章

  • [Compose] Async programming: Thunks
    ThunksSyncthunk:Ablockerofcodewhichhaseverythingreadyandcanreturnthevaluedirectly.functionadd(x,y){returnx+y}constthunk=function(){returnadd(10,15)}thunk()//25Ao thunkisprettymuchthesameasHighorderfunc......
  • Japan Registry Services (JPRS) Programming Contest 2023 (AtCoder Beginner Contes
    JapanRegistryServices(JPRS)ProgrammingContest2023(AtCoderBeginnerContest324)赛后总结可悲的是:我没来得及写题解。T1Same秒切。直接输入排一遍序再遍历即可。#include<bits/stdc++.h>usingnamespacestd;intn,a[101];intmain(){cin>>n;f......
  • 比赛总结:Japan Registry Services (JPRS) Programming Contest 2023 (AtCoder Beginn
    比赛:JapanRegistryServices(JPRS)ProgrammingContest2023(AtCoderBeginnerContest324)A-same1.常规方法intmain(){ intn; cin>>n; vector<int>s(n);//利用vector容器可以不需要确定内存大小 for(auto&n:s) { cin>>n; } for(inti=0;i......
  • [Compose] Callback is not suitable for Async programming
    Anexampleofcallbackimplemnetationforhandlingasyncflow:functionfakeAjax(url,cb){varfake_responses={file1:"Thefirsttext",file2:"Themiddletext",file3:"Thelasttext",};varrandomDela......
  • Programming abstractions in C阅读笔记:p179-p180
    《ProgrammingAbstractionsInC》学习第60天,p179-p180总结。一、技术总结1.palindrome(回文)(1)包含单个字符的字符串(如"a"),或者空字符串(如"")也是回文。(2)示例:“level”、"noon"。2.predicatefunction(1)predicate的意思pre-("forth")+*deik-("show"),“t......
  • elasticsearch安装dynamic-synonym插件
    今天就来和大家讲讲如何在es中安装dynamic-synonym插件,首先我们需要去github上下载与es版本对应的插件,一般github上基本都是本地词库和远程文本词库的,在gitee上可以找到采用数据库作为词库的源码,大致思路就是修改一些参数配置,然后自己创建一个表作为同义词词库,最后将打包好的jar包......
  • 2022 China Collegiate Programming Contest (CCPC) Guilin Site(持续更新)
    Preface由于还有两周就要滚去打区域赛了,这周开始周末每天都训一场吧这场总体来说打的还可以,虽然E题这个Easy从卡局卡到3h,但由于其它的题都是一遍过所以罚时还尚可跻进Au区后面一个小时看徐神和祁神苦战K大分类讨论,虽然场下感觉摸了一个B的做法出来,但感觉实现还是太麻烦了就没写......
  • 2021 China Collegiate Programming Contest (CCPC) Guilin Site
    A.AHeroNamedMagnus#include<bits/stdc++.h>usingnamespacestd;#defineintlonglongusingpii=pair<int,int>;usingvi=vector<int>;voidsolve(){intx;cin>>x;cout<<2ll*x-1<<"......
  • Programming abstractions in C阅读笔记:p176-p178
    《ProgrammingAbstractionsInC》学习第59天,p176-p178总结。一、技术总结1.addtivesequencestn=tn-1+tn-2序列:3,7,10,17,27,44,71,115,186,301,487,788,1275,...p177,Asageneralclass,thesequencesthatfollowthispatternarecalledadditivesequen......
  • Programming abstractions in C阅读笔记:p176-p178
    《ProgrammingAbstractionsInC》学习第59天,p176-p178总结。一、技术总结1.addtivesequencestn=tn-1+tn-2序列:3,7,10,17,27,44,71,115,186,301,487,788,1275,...p177,Asageneralclass,thesequencesthatfollowthispatternarecalledadditive......