Skip to content

Commit

Permalink
Update 01.Greedy-Algorithm.md
Browse files Browse the repository at this point in the history
  • Loading branch information
itcharge committed Mar 7, 2023
1 parent b5180fd commit 4ec0012
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@

换句话说,贪心算法不从整体最优上加以考虑,而是一步一步进行,每一步只以当前情况为基础,根据某个优化测度做出局部最优选择,从而省去了为找到最优解要穷举所有可能所必须耗费的大量时间。

对许多问题来说,可以使用贪心算法,通过局部最优解而得到整体最优解或者是整体最优解的近似解。
### 1.2 贪心算法的特征

但并不是所有问题,都可以使用贪心算法的。
对许多问题来说,可以使用贪心算法,通过局部最优解而得到整体最优解或者是整体最优解的近似解。但并不是所有问题,都可以使用贪心算法的。

一般来说,这些能够使用贪心算法解决的问题必须满足下面的两个特征:

1. **贪⼼选择性质**
2. **最优子结构**

### 1.2 贪心算法的特征

#### 1.2.1 贪心选择性质

> **贪心选择**:指的是一个问题的全局最优解可以通过一系列局部最优解(贪心选择)来得到。
Expand Down

0 comments on commit 4ec0012

Please sign in to comment.