pydatastructs icon indicating copy to clipboard operation
pydatastructs copied to clipboard

Add Edmond's algorithm

Open czgdp1807 opened this issue 5 years ago • 20 comments

Description of the problem

In graph theory, Edmonds' algorithm or Chu–Liu/Edmonds' algorithm is an algorithm for finding a spanning arborescence of minimum weight (sometimes called an optimum branching). It is the directed analog of the minimum spanning tree problem.

Example of the problem

References/Other comments

.. [1] https://en.wikipedia.org/wiki/Edmonds%27_algorithm

czgdp1807 avatar Mar 21 '20 15:03 czgdp1807

@czgdp1807 I would like to work on it as part of GSSOC'20. Please assign it to me. Thank You.

ka1shi avatar Mar 23 '20 05:03 ka1shi

@czgdp1807 Can I take up this issue?

kichloo avatar Mar 25 '20 18:03 kichloo

Yes you can. Start with some use cases and design an API which can be used to access the implementation of this algorithm. Go through, https://github.com/codezonediitj/pydatastructs/wiki/Guidelines-for-Summer-Winter-Projects

czgdp1807 avatar Mar 25 '20 18:03 czgdp1807

@czgdp1807 Function mst will have 2 parameters:

  • root
  • G

Then,we will have function load having 2 parameters:

  • arcs
  • weights

Then function reverse having the parameters:

  • graph

Function getCycle having 4 parameters:

  • n
  • g
  • visited
  • cycle

Function mergeCycles having 5 parameters:

  • cycle
  • G
  • RG
  • g
  • rg

kichloo avatar Apr 11 '20 02:04 kichloo

API for minimum spanning trees are already there in master. Why do you need load, reverse, getCycle, and mergeCycles? Can you please explain the use of each one of them?

czgdp1807 avatar Apr 11 '20 06:04 czgdp1807

@czgdp1807 Actually, this is my first contribution to this project, so I didnt know about which functions are already present, thats why I mentioned all the functions of the program

kichloo avatar Apr 11 '20 07:04 kichloo

@czgdp1807 load function will be used to set the value of g depending on the source. reverse function will be used to set the value of g based on the destination. getCycle function will be used to set the value of the visited variable and the cycle variable. The mergeCycle will be used to find the minimal internal edge weight

kichloo avatar Apr 11 '20 14:04 kichloo

Any update @kichloo ?

robotjellyzone avatar May 06 '20 11:05 robotjellyzone

@robotjellyzone I had submitted the API for it and was waiting for reply by czdp. Why have you unassigned it?

kichloo avatar May 06 '20 12:05 kichloo

Hi @kichloo i can't see your submitted api for it, please refer the guidelines to know more about API

robotjellyzone avatar May 06 '20 12:05 robotjellyzone

Yes you can. Start with some use cases and design an API which can be used to access the implementation of this algorithm.

This is the comment. And I want to work on this issue and was waiting to be assigned or discussed with.

kichloo avatar May 06 '20 13:05 kichloo

Hi @kichloo there is no assignment here in this org, you can right away start to work on the issue but first, you need to discuss your API here regarding your solution , if you have any doubt then go to this --> https://github.com/codezonediitj/pydatastructs/wiki/Guidelines-for-Summer-Winter-Projects and also for API design go through --> https://github.com/codezonediitj/pydatastructs/wiki/Plan-of-Action-for-the-Projects

robotjellyzone avatar May 06 '20 13:05 robotjellyzone

Also, to ensure you regarding the assignment for an issue, you can check our issue policy -> https://github.com/codezonediitj/pydatastructs/wiki/Issue-Policy

robotjellyzone avatar May 06 '20 13:05 robotjellyzone

@czgdp1807 Function mst will have 2 parameters:

  • root
  • G

Then,we will have function load having 2 parameters:

  • arcs
  • weights

Then function reverse having the parameters:

  • graph

Function getCycle having 4 parameters:

  • n
  • g
  • visited
  • cycle

Function mergeCycles having 5 parameters:

  • cycle
  • G
  • RG
  • g
  • rg

That's the API I submitted a month ago

kichloo avatar May 06 '20 13:05 kichloo

To make things clear, the suggested API doesn't look really good. We don't use camel case for naming functions. See, https://github.com/codezonediitj/pydatastructs/issues/186#issuecomment-612346631 as well. No modifications made according to the feedback. README has all the necessary links, if needed you can go through them. P.S. A PR should be such that it requires less review for coding style and more discussion can happen on efficiency, correctness. If the case is former, then the PR will be closed. May sound harsh but we have to do that. We don't want to hang contributors and waste their time as well as ours. See merged PRs to know what all is needed. Thanks for interest and keep contributing to open source.

czgdp1807 avatar May 06 '20 13:05 czgdp1807

i would like to work on it as part of GSSOC'20. assign it to me. Thank You.

Moddy2024 avatar May 26 '20 01:05 Moddy2024

Hi @Moddy2024 yes, go ahead but do remember to share its API first here !

robotjellyzone avatar May 30 '20 09:05 robotjellyzone

Hi @Moddy2024 yes, go ahead but do remember to share its API first here !

@robotjellyzone i am from GSSOC'20 please look at my PR for this

Moddy2024 avatar May 31 '20 02:05 Moddy2024