Skip to content
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

Contact Form Submission - Mistake (Advanced - Sum over Subsets DP) #4995

Open
maggieliu05 opened this issue Dec 18, 2024 · 1 comment
Open
Labels
content content-related issue good first issue Good for newcomers

Comments

@maggieliu05
Copy link
Contributor

Someone submitted the contact form!

URL: https://usaco.guide/adv/dp-sos
Module: Advanced - Sum over Subsets DP
Topic: Mistake
Message:
The following explanation:
Notice how in both of these examples we don't seem to be saving much information between different subsets which is the essence of DP.
Define
$\texttt{SOS}(\texttt{mask}, x)$
to be the sum of subsets of mask such that the first
$x$
bits of the subset are identical to the first
$x$
bits of mask.
For example,
$\texttt{SOS}(1001001, 3)$
includes the subsets
$1001001$
,
$1000001$
,
$1001000$
,
$1000000$
which all have the same common prefix of
$100$
.

I'm pretty sure It should be the last x bits, since if it were the first x bits, then when you transition to x+1 the answer is non-increasing which makes no sense

@maggieliu05 maggieliu05 added content content-related issue good first issue Good for newcomers labels Dec 18, 2024
@bqi343
Copy link
Member

bqi343 commented Dec 19, 2024

it should be something like last $n-x$ bits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content content-related issue good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants