-
Notifications
You must be signed in to change notification settings - Fork 25
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
bug in definition of "minimum-weight perfect matching" function #4
Comments
@Shriyanshagro Thank you so much! Great catch! Could you, please, make PR to resolve this issue + test which shows that it will actually solve this problem? |
Sure, will do that
On Fri, 29 Nov 2019 at 3:03 PM, Andrew Zhuravchak ***@***.***> wrote:
@Shriyanshagro <https://github.com/Shriyanshagro> Thank you so much!
Great catch!
Could you, please, make PR to resolve this issue + test which shows that
it will actually solve this problem?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4?email_source=notifications&email_token=ADJZYQTCJU5IAW75LNFU7CLQWDOXVA5CNFSM4JSFQ6JKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFOLNCI#issuecomment-559724169>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADJZYQUCLHE3Y75EMPRBHLTQWDOXVANCNFSM4JSFQ6JA>
.
--
Shriyansh
|
This code is not running correctly. It is not written well (difficult to understand) and having a lot of mistakes. Example: finding the perfect matching and union with spanning tree is included in function 'minimum_weight_matching'. But did not check the redundance adding: 1 edge could be added more than 1 time.
Some more points but I do not list here. |
@PhanLeSon03 You are welcome in submitting the PR to fix that |
Unfortunately this code only finds a perfect matching with a lot of good edges, but it doesn't find the one and only minimal perfect matching (e.g. it is possible that the minimal perfect matching doesn't contain the edge with lowest weight) |
ChristofidesAlgorithm/christofides.py
Line 129 in 7e85e6d
The current approach doesn't ensure minimum weighted edges from odd_vert with no two edge-sharing same vertices.
the function should be instead:
The text was updated successfully, but these errors were encountered: