15,793,547 members
Home / Discussions / Algorithms

# Algorithms

 Re: formulate an algorithm Gerry Schmitz14-Dec-20 12:37 Gerry Schmitz 14-Dec-20 12:37
 Re: formulate an algorithm Patrice T14-Dec-20 13:38 Patrice T 14-Dec-20 13:38
 Re: formulate an algorithm Member 1525570320-Jun-21 21:01 Member 15255703 20-Jun-21 21:01
 Problem in c language Member 150165689-Dec-20 4:16 Member 15016568 9-Dec-20 4:16
 Re: Problem in c language Richard Deeming9-Dec-20 4:43 Richard Deeming 9-Dec-20 4:43
 Re: Problem in c language CHill609-Dec-20 4:44 CHill60 9-Dec-20 4:44
 Re: Problem in c language Serhii Oleksenko15-May-21 2:38 Serhii Oleksenko 15-May-21 2:38
 Stamp circular trade Shir Gans29-Nov-20 7:25 Shir Gans 29-Nov-20 7:25
 Hi, I am building a small web app that allow stamp collectors to swap their stamps. The main problem I am trying to solve is 1-on-1 (direct) swap. Since usually A needs something from B, but B not always need something from A. But the solution is to find a circular swap, for example: A needs from B B needs from C C needs from A result: everyone is happy. I have a list of collectors, and for each a list of stamps they got, and a list of stamp they are looking for. I am trying to find a way, to create a circle, by matching the "have" and "want". The problem is that this may take a very long time with lots of collectors and lots of stamps . What would be the best approach for this? The straight forward algorithm I think (which is obviously not optimized) is to: 1) look what "B" want. 2) find who got what B want (stamp after stamp) 3) for each one, see if he (C) needs something from A 4) if yes, YAY 5) if not, see what C want (stamp after stamp) 6) for each one, see if (D) has something from A ... and so on ... long procedure... Any suggestions will be very welcome. Thank you
 Re: Stamp circular trade Gerry Schmitz29-Nov-20 19:40 Gerry Schmitz 29-Nov-20 19:40
 Re: Stamp circular trade Mircea Neacsu6-Dec-20 6:45 Mircea Neacsu 6-Dec-20 6:45
 Re: Stamp circular trade Shir Gans6-Dec-20 8:51 Shir Gans 6-Dec-20 8:51
 Given an array x, get the array y from a data set of arrays which has the smallest distance to x Member 1499380315-Nov-20 18:17 Member 14993803 15-Nov-20 18:17
 CLOSED AlgoHelp14-Nov-20 0:31 AlgoHelp 14-Nov-20 0:31
 Re: How to determine if 2 labelled graphs are identical? Greg Utas14-Nov-20 2:48 Greg Utas 14-Nov-20 2:48
 Re: How to determine if 2 labelled graphs are identical? Greg Utas14-Nov-20 4:04 Greg Utas 14-Nov-20 4:04
 CLOSED AlgoHelp14-Nov-20 4:49 AlgoHelp 14-Nov-20 4:49
 Re: How to determine if 2 labelled graphs are identical? Greg Utas14-Nov-20 5:03 Greg Utas 14-Nov-20 5:03
 CLOSED AlgoHelp14-Nov-20 5:24 AlgoHelp 14-Nov-20 5:24
 Re: How to determine if 2 labelled graphs are identical? Greg Utas14-Nov-20 6:41 Greg Utas 14-Nov-20 6:41
 Re: How to determine if 2 labelled graphs are identical? Greg Utas15-Nov-20 2:27 Greg Utas 15-Nov-20 2:27
 Long Division / Assembly Language Style C-P-User-313-Oct-20 5:34 C-P-User-3 13-Oct-20 5:34
 Re: Long Division / Assembly Language Style Richard Deeming13-Oct-20 5:53 Richard Deeming 13-Oct-20 5:53
 Re: Long Division / Assembly Language Style harold aptroot13-Oct-20 6:31 harold aptroot 13-Oct-20 6:31
 Re: Long Division / Assembly Language Style trønderen13-Oct-20 7:25 trønderen 13-Oct-20 7:25
 Re: Long Division / Assembly Language Style Greg Utas13-Oct-20 13:04 Greg Utas 13-Oct-20 13:04
 Last Visit: 31-Dec-99 19:00     Last Update: 3-Dec-23 11:07 Refresh ᐊ Prev1...6789101112131415 Next ᐅ