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

complex test case to find outer planar graph face #1258

Open
wants to merge 1 commit into
base: master
Choose a base branch
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

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.

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.

None yet

2 participants