Link : Reduce time taken to get feasible solution
I have 18 inequations with 4 variables vars2 = {arb[1], arb[2], arb[3], arb[4]} , To get a feasible solution, NMinimize and Nmaximize were used as was suggested in the link. But unfortunately this method is not returning any feasible solution (which was required).
expr2 = (31 (52275 arb[1] + 17425 arb[2] -
8659 (3 arb[3] + arb[4])))/(
181178952 (-arb[2] arb[3] + arb[1] arb[4])) >= 0 && (
31 (6531 arb[1] + 2177 arb[2] - 4283 (3 arb[3] + arb[4])))/(
181178952 (-arb[2] arb[3] + arb[1] arb[4])) >= 0 && (
31 (129 arb[1] + 43 arb[2] - 13 (3 arb[3] + arb[4])))/(
4213464 (-arb[2] arb[3] + arb[1] arb[4])) >= 0 && (
505325 arb[1] + 5035825 arb[2] - 8659 (29 arb[3] + 289 arb[4]))/(
60392984 (arb[2] arb[3] - arb[1] arb[4])) >= 0 && (
63133 arb[1] + 629153 arb[2] - 4283 (29 arb[3] + 289 arb[4]))/(
60392984 (arb[2] arb[3] - arb[1] arb[4])) >=
0 && (-1247 arb[1] - 12427 arb[2] + 377 arb[3] + 3757 arb[4])/(
1404488 (-arb[2] arb[3] + arb[1] arb[4])) >=
0 && (-557600 arb[1] + 2247825 arb[2] +
8659 (32 arb[3] - 129 arb[4]))/(
90589476 (arb[2] arb[3] - arb[1] arb[4])) >=
0 && (-69664 arb[1] + 280833 arb[2] +
4283 (32 arb[3] - 129 arb[4]))/(
90589476 (arb[2] arb[3] - arb[1] arb[4])) >= 0 && (
1376 arb[1] - 5547 arb[2] - 416 arb[3] + 1677 arb[4])/(
2106732 (-arb[2] arb[3] + arb[1] arb[4])) >=
0 && ((93 - 745 arb[2]) arb[3] + (31 + 745 arb[1]) arb[4])/(
838 (-arb[2] arb[3] + arb[1] arb[4])) >= 0 && (
31 (-arb[2] (-1 + arb[3]) + arb[1] (3 + arb[4])))/(
838 (arb[2] arb[3] - arb[1] arb[4])) >= 0 && (
31 (arb[2] (29 - 774 arb[3]) + 31 (3 arb[3] + arb[4]) +
arb[1] (87 + 774 arb[4])))/(
216204 (-arb[2] arb[3] + arb[1] arb[4])) >= 0 && (
87 (1 + arb[2]) arb[3] + 3 (289 - 29 arb[1]) arb[4])/(
838 (arb[2] arb[3] - arb[1] arb[4])) >=
0 && (-867 arb[2] (-1 + arb[3]) + arb[1] (87 + 867 arb[4]))/(
838 (-arb[2] arb[3] + arb[1] arb[4])) >= 0 && (
arb[2] (8381 - 7482 arb[3]) + 899 arb[3] + 8959 arb[4] +
29 arb[1] (29 + 258 arb[4]))/(
72068 (arb[2] arb[3] - arb[1] arb[4])) >=
0 && ((32 - 387 arb[2]) arb[3] + 129 (-1 + 3 arb[1]) arb[4])/(
419 (-arb[2] arb[3] + arb[1] arb[4])) >= 0 && (
129 arb[2] (-1 + arb[3]) + arb[1] (32 - 129 arb[4]))/(
419 (arb[2] arb[3] - arb[1] arb[4])) >= 0 && (
992 arb[3] - 129 arb[2] (29 + 64 arb[3]) - 3999 arb[4] +
32 arb[1] (29 + 258 arb[4]))/(
108102 (-arb[2] arb[3] + arb[1] arb[4])) >= 0;
vars2 = arb /@ Range[4];
cons2 = And @@ Thread[-10 <= vars2 <= 10];
(soln3 = NMinimize[{Total[List @@ expr2[[All, 1]]], expr2 && cons2},
vars2, Reals]) // Quiet // AbsoluteTiming
expr2 && cons2 /. soln3[[2]]
(soln4 = NMaximize[{Total[List @@ expr2[[All, 1]]], expr2 && cons2},
vars2, Reals]) // Quiet // AbsoluteTiming
expr2 && cons2 /. soln4[[2]]
To make sure there exist some feasible solution, I have examples which were found using randomSearch technique (took a long time).
{arb[1] -> 151/2000, arb[2] -> 88147/258000, arb[3] -> 4019/4000, arb[4] -> -(67417/516000)}
{arb[1] -> 49/160, arb[2] -> 46837/64500, arb[3] -> 7071/4000, arb[4] -> 25619/129000}
soleg1=Thread[vars2 -> {49/160, 46837/64500, 7071/4000, 25619/129000}];
soleg2=Thread[vars2 -> {151/2000, 88147/258000, 4019/4000, -(67417/516000)}];
expr2 && cons2 /. soleg1 (* Returns True *)
expr2 && cons2 /. soleg2 (* Returns True *)
As asked in the comments about groupInverse of a matrix A. Code to find group Inverse of a matrix of index 1 :
function Ahash = phash( A )
%Matrix return group inverse of A
%Date:1/10/2017
r=rank(A);
if(r==rank(A*A))
Q=[orth(A) null(A,'r')];
P=Q\A*Q;
C=P(1:r,1:r);
D=zeros(size(A,1));
D(1:r,1:r)=inv(C);
inv(C)
Ahash=Q*D/Q;
else
disp('Invalid input : Matrix is not of index 1.');
Ahash=-1;
end
end
(-arb[2] arb[3] + arb[1] arb[4])
look like determinants. I am not sure if this helps: If you add the requirement that you only want to study matrices with nonnegative determinant, i.e., by add(-arb[2] arb[3] + arb[1] arb[4]) >=0
to the constraints and useSimplify
, you get much simpler polynomial inequalities. And{0,0,0,0}
is a feasible point for that. $\endgroup$ – Henrik Schumacher Oct 19 '17 at 10:51