This uses a greedy algorithm that is not necessarily optimal, but is likely to be pretty close.
1 | optimal_z(L)
|
L |
a matrix like that returned by |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.