Giter Club home page Giter Club logo

Comments (12)

stchang avatar stchang commented on July 21, 2024

Thanks for the report.

A first wild guess would be that the algorithm depends on some unreliable behavior, e.g., hash table ordering.

I assume you're using a recent version of Racket?

It's been a while since I've checked the tests against the latest Racket so I'm going to do that first. Then I will revisit this bug.

from graph.

kmicinski avatar kmicinski commented on July 21, 2024

Thanks for the response! Yes, that's right: v7.2. Your suspicions here sound like good intuition to me, for sure.

from graph.

stchang avatar stchang commented on July 21, 2024

I think I see the problem. The maximum-bipartite-matching function uses a max flow algorithm for directed graphs. So giving it an undirected graph counts the edges twice.

Looking into possible fixes.

from graph.

kmicinski avatar kmicinski commented on July 21, 2024

from graph.

stchang avatar stchang commented on July 21, 2024

Actually, you are right. Looking at the code more closely, it looks like the duplicate edges are removed before calling the max flow algorithm, so it should work out. Back to testing.

from graph.

kmicinski avatar kmicinski commented on July 21, 2024

from graph.

kmicinski avatar kmicinski commented on July 21, 2024

Wow! Thanks for handling this so quickly!

from graph.

stchang avatar stchang commented on July 21, 2024

I think I fixed it.

Problem was that edge-weight was returning inf for non-existent edges, but that is the wrong default for maxflow.

Let me know if anything still seems off.

from graph.

stchang avatar stchang commented on July 21, 2024

Thanks again for the report!

from graph.

kmicinski avatar kmicinski commented on July 21, 2024

from graph.

stchang avatar stchang commented on July 21, 2024

since I installed this as a Racket package, is there a good way to get the fixed version in a way that is harmonious?

Normally, yes. But the commits before this fix were somewhat drastic. Specifically, they modernized the package by splitting docs/tests/core into different packages, to accommodate min-racket installs and minimize dependencies (see #37). And I've had mixed experiences with updating this kind of change. But worst case, an uninstall-reinstall should do the trick.

from graph.

kmicinski avatar kmicinski commented on July 21, 2024

from graph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.