Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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
pull merged 1 commit into AlgorithmAndLeetCode:main from itcharge:main
May 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

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
itcharge committed May 1, 2023
commit 14331afa7b0b82b88ebdaae7ed27ce0ab8ed53c2
2 changes: 1 addition & 1 deletion Contents/10.Dynamic-Programming/07.State-DP/01.State-DP.md
View file Open in desktop
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 的应用

AltStyle によって変換されたページ (->オリジナル) /