Ask Your Question

ElGalloNegro's profile - activity

2024-02-23 13:08:53 +0200 received badge  Notable Question (source)
2023-05-19 22:10:54 +0200 received badge  Popular Question (source)
2019-08-27 11:08:10 +0200 received badge  Student (source)
2019-07-28 20:48:47 +0200 received badge  Editor (source)
2019-07-28 18:36:06 +0200 asked a question Extremal Rays of a Cone

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.