Ask Your Question
1

Create polyhedron for given matrix A and vector b

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

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

Comments

Welcome to Ask Sage! Thank you for your question.

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

1 Answer

Sort by » oldest newest most voted
1

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

rburing gravatar image

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

$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

Stats

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

Seen: 45 times

Last updated: Jan 01