Skip to content

complex test case to find outer planar graph face #1258

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

Closed
wants to merge 2 commits into from

Conversation

adamhosticka
Copy link

Finding outer face in a more complex graphs doesn't work.

@adamant-pwn
Copy link
Member

Hi, thanks for the pull request! But I'm a bit confused, so you mean that the current implementation is incorrect? Is it possible for you to also add a fix for it in such a case?

Copy link
Contributor

Visit the preview URL for this PR (for commit 922cb9b):

https://cp-algorithms--preview-1258-sdg06vwe.web.app

(expires 2024-04-24T21:46:51.216932235Z)

@adamhosticka
Copy link
Author

Yes, I believe there is an error. Unfortunately I do not have the time right now create a fix in cpp. I am coding in Python and managed to create a workaround, but I am not even sure it is correct. All I can provide right now is the comment I have added to my code 2 weeks ago:

The sourced algorithm contains an error when finding the outer face. It cannot be just found by checking the orientation
of the vertices. Therefore, I changed the logic.
First we find the outer face candidates - these are the faces containing all the vertices.
The outer face is then the face with the least vertices.
Proof by dispute:
The face with more vertices f1 must contain at least one extra vertex v.
This vertex lies inside the face with fewer vertices f2.
If we create a new face f3 by splitting any edge (a,b) of the f2 into (a,v)&(v,b),
then the edge (a,b) won't lie in the new face f3.
Therefore, the extra vertex v is not a part of the outer face.
Repeat for all extra vertices.

@adamant-pwn adamant-pwn deleted the branch cp-algorithms:main October 14, 2024 18:52
@adamant-pwn adamant-pwn reopened this Oct 14, 2024
@adamant-pwn adamant-pwn changed the base branch from master to main October 14, 2024 19:19
Copy link
Contributor

Preview the changes for PR #1258 at https://gh.cp-algorithms.com/1258/ (current version: c7a8dd7).

@adamant-pwn
Copy link
Member

Allegedly fixed in #1394.

github-actions bot added a commit that referenced this pull request Jan 13, 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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy