countdown-numbers-game

Solve problems from the number round of the Countdown game show

https://hub.darcs.net/thielema/countdown-numbers-game

Stackage Nightly 2025-04-19:0.0.0.1
Latest on Hackage:0.0.0.1

See all snapshots countdown-numbers-game appears in

BSD-3-Clause licensed by Henning Thielemann
Maintained by [email protected]
This version can be pinned in stack with:countdown-numbers-game-0.0.0.1@sha256:dee494df0fc08bf1acf1456d9bd431d4d7f209f0843f19b16867516b0e4913e7,2424

Module documentation for 0.0.0.1

There are no documented modules for this package.

Solver for the numbers round of the Countdown game show:

That is, given six numbers and a target number, find an arithmetical expression containing exactly those six numbers that yields the target number. The solver however is neither limited to a certain number of operands nor to a certain magnitude of numbers nor to uniqueness of the operands. Please note, that the solver also emits solutions where not all of the given operands are used.

Example:

$ countdown-numbers-solve 23 42 3 4 5 --result 777
(23*3+5)*42/4

The solver employs a brute-force search, but ensures that expressions are unique up to commutativity and associativity. It determines all solutions of a problem within seconds.