4 ms·
How is it different? By the definition of equivalent in the article: > when everyone in either graph pays the amounts they owe everyone else, they end up with
by justinnhli 11y ago
How is it different? By the definition of equivalent in the article:
> when everyone in either graph pays the amounts they owe everyone else, they end up with the same amounts in the end.
It seems my algorithm also accomplishes that goal. I'm not sure that my algorithm is optimal, but I do think it's a good approximation and is somewhat simpler than the approximation in the article.
- dragonwriter 11y ago> How is it different? On review of the problem statement, it does appear that you are solving the problem they say they are solving, which appears to lack some of the constraints that seem to apply to the problem they are actually solving. (I suspect that the intent here was to show something about graph algorithms and so the problem statement is just insufficiently constrained, but its possible that the stated problem really is the interesting problem, and that the solution is unintentionally overconstrained because someone thought of a too-clever graph algorithm.)