Skip to content

Instantly share code, notes, and snippets.

@madaan
Last active April 28, 2019 00:25
Show Gist options
  • Save madaan/9ffead8459df988514ff180d2c03de3d to your computer and use it in GitHub Desktop.
Save madaan/9ffead8459df988514ff180d2c03de3d to your computer and use it in GitHub Desktop.
divvy.md

Castle Bill Split

  • We have 8 people living in the castle. Thus, the bill gets split in 8 parts.

  • Each part is thus 1/8

  • 4 of these parts are paid by AS. Thus, AS pays 4/8th.

  • Because AS pays 4/8th of the bill, we are left with 4/8th of the bill to pay.

  • This remaining 4/8th is divided between the remaining 7 people. Thus, everyone else pays (4/8) * (1/7) = (4 / 56)

  • Thus, we have

  • AS pays (4/8) * 100 = 50%, everyone else pays (4/56) * 100 = 7.14%.

  • The numbers for AS will go down more drastically as more people move in, which is fair.

General case, for N people in the castle

  • With N people, the percentages will be as follows:
  • AS pays (400/N) %
  • The remaining is equally divided between everyone else. The remaining share is (((N - 4)/ N)) * 100) %

#Castle mates AS% Everyone else%
4 100 0
5 80 5
6 66.67 6.67
7 57.14 7.14
8 50 7.14
9 44.44 6.95
10 40 6.67
11 36.36 6.36
12 33.33 6.06
13 30.77 5.77
14 28.57 5.49
15 26.67 5.24

Trends

Trends

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment