I have a question regarding polytopes. I have a constraint matrix and a vector. This matrix has a set amout of equalities on top and then the rest is inequalities. I know the number of equalities.
As I understand correctly, this polytope is not full dimensional. I would like to calculate its volume. I was thinking a package in R named Volesti should help. It has a function called volume(). But it expects full dimensional polytope.
So I found out I should be able to get rid of the equalities using null space like this:
- Take the null space of the matrix of equalities.
- Get a feasible point in the matrix of equalities, i use python function
np.linalg.pinv(A_eq) @ b_eq - Parametrize is using
A_z = A_ineq @ null_space - For the vector
b_z = b_ineq - A_ineq @ x0
Now, this should get rid of the equalities, but it does not mean the polytope is now full dimensional, right?
So I take the rank of the matrix, take its null_space (of the inequality matrix) and do A_z = A_z @ null_space_ineq and let the vector stay the same.
Is this correct approach? If not, what step is wrong? And if yes, does this ensure full-dimensionality? And does this somehow change the volume?
Thank you
null_spacecan arbitrarily distort any further volume computations: for example, if the generating vectors of yournull_spaceare multiplied by a scalar $\lambda \neq 0$, then you still “get rid of inequalities,” but your “volume” will be multiplied by $\lambda$ as well $\endgroup$