啥是 Dynamic Programing (動態規劃)? 此名稱是因為這方法是用來解決循序性 多階段決策, 第一個決策會影響下一個決策, ... 所以叫做"動態規劃"。 以下是我從網路上六篇中英文文章剪貼而成的, 有興趣的就加減看一看!!! 阿英文看不太懂? 可去問 Tony Chen 或寇乃馨啊 :-) edited by tsaiwn@csie.nctu *** 靜態(static) 與 動態(dynamic) *** 這裡不是要講 Static Random Access Memory (SRAM) 與 Dynamic RAM (DRAM), 阿也不是要講 Static Linking 與 Dynamic Linking, 更不是要講靜態變數(static variable)與動態變數或自動變數(auto variable)! 靜態變數是指靜態繫結static binding的變數, 動態變數則為dynamic binding. (static binding 是指在RUN之前(LOAD完之後)就已經安排好變數在記憶體的位置)。 Dynamic Programming is a "Paradigm" that most often applied in the construction of algorithms to solve a certain class of Optimisation Problems, i.e., problems which require the minimisation or maximisation of some measure. One disadvantage of using Divide-and-Conquer is that the process of recursively solving separate sub-instances can result in the same computations being performed repeatedly since identical sub-instances may arise. The idea behind dynamic programming is to avoid this pathology by obviating the requirement to calculate the same quantity twice. The method usually accomplishes this by maintaining a table of sub-instance results. That is to say, the optimization problem is solved by caching subproblem solutions (memoization) rather than recomputing them. Dynamic Programming is an approach developed to solve sequential, or multi-stage, decision problems; hence, the name "dynamic" programming. The word "Programming" in the name has nothing to do with writing computer programs. Mathematicians use the word to describe a set of rules which anyone can follow to solve a problem. They do not have to be written in a computer language. Dynamic Programming is a Bottom-Up technique in which the smallest sub-instances are explicitly solved first and the results of these used to construct solutions to progressively larger sub-instances. 現在要講的是靜態問題(Static problems)和動態問題(Dynamic problems)。 在大學課程中,我們所碰到的問題大多屬於靜態的,也就是在考慮問題時,不加 入時間的變數,如在個體經濟學中,消費者效用極大的問題(把錢用在刀口上)。 例如: 考慮一消費者在某一時點及給定其在該時點的薪資與物價下, 試求解,可使其在該時點效用最大之該時點的消費水準。 但是,在真實的世界中,我們可以看到,消費者的決策並非是在每一期各自獨立 而不受影響。例如,如果消費者知道未來的所得會增加,則現在他會多消費一點; 反之,若其知道未來的所得會減少(事先知道阿扁會當選:-),則其必然事先會少消費 而多儲蓄一點。 更進一步來說,在經濟學上, 研究"一經濟單位如何在某一特定時點,將有限的資源配置在不同的用途上", --- 就是靜態最佳化問題; 研究"一經濟單位如何將有限資源配置於一段時間內的不同時點", --- 就是動態最佳化(Dynamic Optimization)問題。 大約在1950年代末期,美國數學家Richard Bellman,為了解決這類多階段決策 的問題,而提出了解決這類問題的最佳化原理(Principle of Optimality),也就是 著名的貝爾曼(Bellman)原理。 最佳化原理後來被用於研究解決了許多實際問題,進而創建了解最佳化問題的 一種新方法--動態規劃法(Dynamic Programming)。 The essence of dynamic programming is Richard Bellman's Principle of Optimality(貝爾曼最佳化原理). This principle, even without rigorously defining the terms, is intuitive: An optimal policy has the property that whatever the initial state and the initial decisions are, the remaining decisions must constitute an optimal policy with regard to the state resulting from the first decision. This is a self-evident principle in the sense that a proof by contradiction is immediate. Rutherford Aris restates the principle in more colloquial terms: If you don't do the best with what you have happened to have got, you will never do the best with what you should have had. In the forty-odd years since this development, the number of uses and applications of dynamic programming has increased enormously. --------- edited by tsaiwn@csie.nctu.edu.tw