Ask Your Question

Create polyhedron for given matrix A and vector b

asked 2021-12-30 19:58:55 +0100

XLVII gravatar image

P(A,b)={x∣ A.x ≤ b}

I have to create a polyhedron with this inputs

but in sage inequalities like this

A.x + b >= 0

, how to convert

edit retag flag offensive close merge delete


Welcome to Ask Sage! Thank you for your question.

slelievre gravatar imageslelievre ( 2022-01-01 06:52:09 +0100 )edit

1 Answer

Sort by » oldest newest most voted

answered 2022-01-01 10:44:48 +0100

rburing gravatar image

updated 2022-01-01 10:54:58 +0100

$Ax \leq b \iff Ax - b \leq 0 \iff (-A)x + b \geq 0.$

So if you have $(A, b)$ such that $Ax \leq b$ is your polyhedron, then the pair $(A', b)$, where $A'=-A$, is such that $A'x + b \geq 0$ is also your polyhedron.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2021-12-30 19:58:55 +0100

Seen: 28 times

Last updated: Jan 01