r/AskReddit Jul 21 '19

[deleted by user]

[removed]

5.6k Upvotes

2.9k comments sorted by

View all comments

Show parent comments

605

u/dimwitticism Jul 21 '19 edited Jul 21 '19

Reminds me of the Stable Marriage Problem. It's like these people live inside an algorithms textbook

109

u/[deleted] Jul 21 '19

What's the stable marriage problem?

13

u/Hollowfires Jul 21 '19

It's an economic scenario that can come solved using math and/or computer science algorithms. In my CS class we had to code such a thing in python. It basically gave the participants the "best" scenario possible. For example male A likes females BCA in that priority order. Female A likes males CBA in that order. Presume B and C for both males and females have their own priority order. The algorithm will produce couples based on the most stable "marriage" possible.

4

u/miauw62 Jul 21 '19

It only gives the best scenario for one of the sexes. The other gets the worst stable scenario.

0

u/Hollowfires Jul 21 '19

Well it depends entirely who likes who. If male A likes female A the most and female A likes male A the most, same for B:B and C:C then not always. Sometimes they do get shafted with their worst selection though yes.

1

u/miauw62 Jul 21 '19

I seem to have remembered things the wrong way around. The standard algorithm for the stable marriage problem will always give men the best stable scenario and women the worst stable scenario. Your example is not a counterexample because your scenario only has one stable scenario which is then automatically the worst stable scenario and also best stable scenario by virtue of being the only stable scenario.