# 动态规划基础概念

### 什么是动态规划?

在多阶段决策问题中, **动态规划 (Dynamic Programming)** 是一种用于求解具有重叠子问题和最优子结构性质的优化问题的算法设计方法. 其核心思想是将原问题拆分成若干个相互重叠的子问题, 逐个解决子问题, 最终合并子问题的解来构造原问题的最优解

* 最优子结构意味着给定优化问题的解可以通过其子问题的最优解的组合来获得
* 子问题重叠意味着子问题的空间必须很小, 也就是说, 任何解决这个问题的递归算法都应该一遍又一遍地解决相同的子问题, 而不是生成新的子问题


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yutians-organization.gitbook.io/yun-chou-xue-he-you-hua-dao-lun/dong-tai-gui-hua-wen-ti/dong-tai-gui-hua-ji-chu-gai-nian.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
