- A game played in Sydney trains by bored schoolkids.
- Every train carriage has a four-digit number.
- Use the digits to make ten using plus, minus, multiply and divide.

- Using the numbers
*in order*scores higher. - Brackets are involved
- Some people use other math operations like exponents, roots etc.

- given four digits
- run through a sequence of calculations with those digits
- stop when you get to one which calculates to 10

- given four digits
- for each
*permutation*of those digits- run through a sequence of calculations with those digits
- stop when you get to one which calculates to 10

So, lots of calculationsâ€¦

Some permutations are identical so you can optimise those away

If any of the digits are repeated, some permutations will be identical

1234 has 24 permutations

1231 also has 24 permutations, but some of them are identical, so there are really only 12

It doesn't

Because permutations and combinations are different things.

This script runs it through 768 different `eval()` calls:

The strings for those `eval()` calls were in turn generated by this script:

To create this library of possible combinations:

Nothing!

It's just a better user experience if you feel like the website is *really working hard* finding your answerâ€¦

/