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

Check number of edges when testing if graph is a path #9

Open
pnevyk opened this issue Feb 6, 2022 · 0 comments
Open

Check number of edges when testing if graph is a path #9

pnevyk opened this issue Feb 6, 2022 · 0 comments
Labels
good first issue Good for newcomers

Comments

@pnevyk
Copy link
Owner

pnevyk commented Feb 6, 2022

When checking if a graph is a valid path here, the code should check if it's even possible to be true given the number of vertices and edges, as a path must have n - 1 edges. This can early identify some non-paths.

Implement the number of edges in a path as another fact (zero vertices must be correctly handled, too).

@pnevyk pnevyk added the good first issue Good for newcomers label Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant