Ask Your Question
1

Extremal Rays of a Cone

asked 2019-07-28 00:36:16 +0100

ElGalloNegro gravatar image

updated 2023-05-19 22:11:04 +0100

FrédéricC gravatar image

Can I use Sage to compute the subspace of a vector space that lies in non-negative real Euclidean space?

For example,

If I compute the nullspace of the matrix,
A =
[ [ 1 0 0 -1 0]
[-1 1 0 0 1]
[ 0 -1 1 0 0]
[ 0 0 -1 1 -1] ]

I get,
[1,1,1,1,0],[0,−1,−1,0,1]
as basis. Now I would like to restrict the solution space to only vectors with non-negative entries. I believe the two basis vectors I am looking for are,
[1,1,1,1,0],[1,0,0,1,1].

My program is written in Python, but I am not sure there is anything written for this sort of problem. Using the simplex method of linear programming (objective function set to zero) only spits out a single solution vector which seems to be the sum of the two I want. I ask here because I see some classes for cones and methods that gives the extremal rays, but it seems I already have to know the extremal rays to use that class.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2019-07-29 15:23:36 +0100

FrédéricC gravatar image

Something like that

sage: P = Polyhedron(rays=[(1,0),(0,1)])
sage: P.intersection(Polyhedron(eqns=[[0,1,-1]]))
A 1-dimensional polyhedron in QQ^2 defined as the convex hull of 1 vertex and 1 ray
edit flag offensive delete link more

Comments

Eventually, such cones will be readily constructible. See the ticket: https://trac.sagemath.org/ticket/26623

jipilab gravatar imagejipilab ( 2019-08-27 11:11:15 +0100 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2019-07-28 00:36:16 +0100

Seen: 352 times

Last updated: Jul 29 '19