Skip to content

Update manhattan-distance.md #1490

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 1 commit into from
Aug 11, 2025
Merged

Update manhattan-distance.md #1490

merged 1 commit into from
Aug 11, 2025

Conversation

Shoot
Copy link
Contributor

@Shoot Shoot commented Aug 3, 2025

Transformation \alpha was wrong, because it should just be a 45-degree rotation of the plane followed by a dilation about a center.

Wrong transformation: (x=1,y=100) -> (x'=101, y'=-99) (wrong transformation is about 135 degrees clockwise in this case, not 45),

Correct transformation: (x=1,y=100) -> (x'=101, y'=99)

Basically, I removed reflection over x-axis.

Transformation \alpha was wrong, because it should just Quote: rotation of the plane followed by a dilation about a center

Wrong transformation: (x=1,y=100) -> (x'=101, y'=-99) (wrong transformation is 135 degrees clockwise in this case, not 45),
 
Correct transformation: (x=1,y=100) -> (x'=101, y'=99)

Basically, I removed reflection over line x
@mhayter
Copy link
Contributor

mhayter commented Aug 8, 2025

I'm not familiar with this. Thoughts? @Kostero or @adamant-pwn.

@Kostero
Copy link
Contributor

Kostero commented Aug 11, 2025

It doesn't matter too much, as we still take the absolute value later, but I believe it is a correct fix.

@adamant-pwn
Copy link
Member

It matters in the sense that in the next paragraph we claim it's a $45^\circ$ clockwise rotation, which it is no.

I'll merge this, thanks for the pull request!

@adamant-pwn adamant-pwn merged commit 742db16 into cp-algorithms:main Aug 11, 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.

4 participants