Skip to content

Update knuth-optimization.md #1438

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 2 commits into from
Apr 12, 2025
Merged

Conversation

FloppaInspector
Copy link
Contributor

In time complexity proof cancellation explanation, j=N -> j=N-1

In time complexity proof cancellation explanation, j=N -> j=N-1
@mhayter
Copy link
Contributor

mhayter commented Apr 11, 2025

This is technically true probably should say something showing how when j=N-1 the second argument is N to be more thorough.

@FloppaInspector
Copy link
Contributor Author

FloppaInspector commented Apr 12, 2025

This is technically true probably should say something showing how when j=N-1 the second argument is N to be more thorough.

Well, it should be clear that since the term j=N-1 remains, and i iterates range [1, N], opt(k, N) form should make clear sense. Saying j=N is a lot more confusing, since the positive term is "opt(i+1, j+1)", not "opt(i, j)", where j=N makes sense, but it isn't the positive term and people can easily misinterpret for the negative term. Though I don't think more explanation is needed, since positive term should clearly refer to "opt(i+1, j+1)" where j=N-1 is correct. Plus j cannot be N because j iterates range [i, N-1].

@mhayter
Copy link
Contributor

mhayter commented Apr 12, 2025

You're right. I guess I'd prefer to add an additional line but surely it's not more wrong than what's already there.

@mhayter mhayter merged commit 862a10b into cp-algorithms:main Apr 12, 2025
3 checks passed
github-actions bot added a commit that referenced this pull request Apr 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants