Hello all,
Ive been looking at polymake (looks great) and have a simple question regarding a specific use case.
I have a lattice polytope and I want to compute some function on its vertices (specifically, I want to calculate probabilities over some properties of the vertices). Because the number of vertices is potentially huge, it is infeasible to use $p->VERTICES to list all the vertices and then compute on them.
So my question is, is there a way to sample randomly from vertices in polymake? If not, is there some way to use existing functionality to do this?
Many thanks,
David
PS. more details:
I want to calculate a weighted sum of the value of one of the dimensions of the polytope over all vertices.
The weight is given by the binomial coefficients of the variables for some fixed values n. For example, lets say a solution (vertex) is
(1, 3, 5, 2, 6)
and I am interested in the first dimension. The value at this point would be something like
1 * (n1 choose 1) * (n2 choose 3) * (n3 choose 5) * (n4 choose 2) * (n5 choose 6)
If there were two points
(1, 3, 5, 2, 6)
(3, 4, 1, 2, 5)
the sum would be
1 * (n1 choose 1) * (n2 choose 3) * (n3 choose 5) * (n4 choose 2) * (n5 choose 6) +
3 * (n1 choose 3) * (n2 choose 4) * (n3 choose 1) * (n4 choose 2) * (n5 choose 5)
and so on. (n1..n6 are given constants)
I have looked at latte and using ehrhart polynomials, but encoding binomial coefficients in the monomials for the weight function seems impossible.