Skip to content
This repository has been archived by the owner on Apr 21, 2024. It is now read-only.

endless loop in some case #5

Closed
kthh07 opened this issue Jul 7, 2023 · 1 comment
Closed

endless loop in some case #5

kthh07 opened this issue Jul 7, 2023 · 1 comment

Comments

@kthh07
Copy link

kthh07 commented Jul 7, 2023

The program will be stuck in an endless loop in this case:

edges = [(1, 3), (1, 7), (1, 4), (7, 8), (7, 1), (7, 2), (7, 9), (5, 2), (8, 3), (8, 7), (8, 4), (8, 6), (4, 1), (4, 2), (4, 8), (4, 9), (3, 8), (3, 2), (3, 9), (3, 1), (3, 6), (2, 7), (2, 3), (2, 0), (2, 4), (2, 5), (0, 2), (6, 8), (6, 3), (9, 3), (9, 4), (9, 7)]
match = Match.from_edges(10, edges)

Yorkyer added a commit that referenced this issue Aug 23, 2023
@Yorkyer
Copy link
Owner

Yorkyer commented Aug 23, 2023

Hi, I just fixed the bug. Sorry for the late reply here, and I've been a little busy recently:)

The bug is related to finding the augmenting path in a blossom. As in the figure below, [1, 3, 6, 8, 4] is the blossom, and [1, 3], [4, 8] is the existed match. When choosing the next node from 3's neighbor nodes with the partial augmenting path [7, 1, 3], the unmatched node in the blossom has priority and should be selected first.

image

@Yorkyer Yorkyer closed this as completed Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants