by lostatseajoshua · 8y ago · 0 comments
If you have two values, you can arrange them two ways. Three values you can arrange six ways. Four values you can arrange 20 ways. 0-20 takes a little over four bits to represent.
If you have a set, you don’t care about order. So if you save the data without an order to it, it takes a little less space to hold it. About four bits worth.
With five values you can save almost seven bits (120) and with six it’s over 9 bits (720).