Every now and then I’ll run into a problem and say, “Oh, that would be a great thing to give in a job interview”. In addition to the Corona issue, Israel has been faced with multiple cases of hung parliament. Therefor, I decided that the next candidate we’ll interview will have to solve that problem. If you are good enough to solve conflicts in politics, you can solve conflicts in a distributed system.
Here is the problem, given the following parliament’s makeup, find all the possible coalitions that has 61 or greater votes.
- Likud – 36 seats
- KahulLavan – 33 seats
- JointList – 15 seats
- Shas – 9 seats
- YahadutHatura – 7 seats
- IsraelBeitenu – 7 seats
- AvodaGesherMeretz – 7 seats
- Yemina – 6 seats
There is a total of 120 seats in the Israeli parliament and you need 61 seats to get a coalition. So far, so good, but now we come to the hard part, not all parties like each other. Here is the make up of the parties’ toleration to one another:
As you can see, the parties are ranked based on how probable they are to seat with one another. Note that just this listing of probabilities is probably highly political and in the time since the last election (all of a week ago), the situation has likely changed.
All of that said, I don’t really think that it is fair of a job candidate to actually solve the issue at an interview. I’m pretty sure that would require dynamic programming and a lot of brute force (yes, this is a political joke), but the idea is to get a list of ranked coalition options.
If you want to try it, the initial parameters are here:
And hey, we won’t get a government out of this, but hopefully we’ll get a new employee .