forked from itcharge/AlgoNote
-
Notifications
You must be signed in to change notification settings - Fork 0
[pull] main from itcharge:main #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update 01.State-DP.md
- Loading branch information
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
Contents/10.Dynamic-Programming/07.State-DP/01.State-DP.md
This file contains hidden or 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 的应用 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.