Explore

Explore

Pick n and k and see every count at once. Walk through a family of objects by rank, or draw from it with a seed. Then type a graph and see what can be said about it: paths and trees, matchings, colourings, planarity, symmetry and spectrum.

Counts

A family, by rank

The family uses the n and k above. Rank may be any whole number below the count, however large: try permutations with n = 30 and a rank of thirty digits.

Seeded draws

A graph

Write edges as u-v (u>v when directed), with an optional exact weight after a colon, and lone vertices by name. The picture places the vertices on a circle; proper graph drawing is planned for the graphics library.

A game

Rows are separated by semicolons and entries by spaces; fractions such as 1/2 are welcome. Leave the second matrix empty for a zero-sum game, which is then solved by linear programming as well. See Matrix games and Bimatrix games.

Try itEdit the code and run it with @ratmath/discrete and Core's Rational in scope. The last line's value is shown; PRINT(…) adds lines, TEX(…) typesets math.
Ctrl/⌘ + Enter runs