-
Notifications
You must be signed in to change notification settings - Fork 970
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
## 1. 状态压缩 DP 简介 | ||
|
||
> **状态压缩 DP**:如果使用动态规划方法设计的状态是一个大小不超过 `n` 的集合,并且集合中的每个元素都是小于 `k` 的正整数,则我们可以把这个集合看做是一个 `n` 位的 `k` 进制数,以一个 $[0, k^n - 1]$ 之间的十进制整数的形式作为动态规划状态的一维。这种把集合转化为整数记录在动态规划状态中的一类方法,被称为状态压缩动态规划方法。 | ||
> **状态压缩 DP**:如果使用动态规划方法设计的状态是一个大小不超过 $n$ 的集合,并且集合中的每个元素都是小于 $k$ 的正整数,则我们可以把这个集合看做是一个 $n$ 位的 $k$ 进制数,以一个 $[0, k^n - 1]$ 之间的十进制整数的形式作为动态规划状态的一维。这种把集合转化为整数记录在动态规划状态中的一类方法,被称为状态压缩动态规划方法。 | ||
## 2. 状态压缩 DP 的应用 |