0

This is a pretty obscure question but I thought I'd try my luck.

I need to generate invalid combinations of inequalities for a set of unknown variables.

For example, given a, b and c, I would like to generate these:

a < b && a ≥ c && b ≤ c
a ⩵ b && a ≤ c && b > c
a ⩵ b && a > c && b ≤ c
a > b && a ≤ c && b ≥ c

The above all evaluate to false.

I need to be able to generate them for an arbitrary number of variables.

How can this be done?

Max
  • 2,760
  • 1
  • 28
  • 47

3 Answers3

0

Without loss of generality, all variables are from finite set {1,2,..,n}, where n = number of variables.
Every condition like "ai < aj" is in fact a subset of finite set of all nn points.
So, simply search for combinations of conditions with empty intersection of corresponding subsets.

Egor Skriptunoff
  • 23,359
  • 2
  • 34
  • 64
  • All variables are real numbers. – Max May 24 '13 at 12:21
  • @Alec - The problem for real variables is equivalent to the same problem for variables from finite set 1..n. – Egor Skriptunoff May 24 '13 at 12:25
  • Ah. Could you possibly elaborate on "simply search for combinations of conditions with empty intersection of corresponding subsets"? I'm not quite sure how to go about that. Are you suggesting trying every combination of operator and variables? Because as far as I can tell that gets unviable very quickly. (I think it would require 6^(x nCr 2) iterations, where x is the number of variables, no?) – Max May 24 '13 at 12:34
  • @Alec - Search strategy may vary. Do you need to find ALL possible inequality combinations or only a few number of them? – Egor Skriptunoff May 24 '13 at 12:44
  • I need to find all of them – Max May 24 '13 at 12:54
  • @Alec - There are VERY many of them. So, trying every combination is not very bad solution. – Egor Skriptunoff May 24 '13 at 13:06
0

First, write the following proposition:

P1: a <= b <= c <= ... <= zzz

then write

P2: a = b = c = ... = zzz

and

P3: zzz <= a <= b <= c <= ... <= zzy

then write

P1 & ¬P2 & P3

which is false.

I expect that you will now retort that this solution does not satisfy your requirements. I believe it satisfies what you have told us of your requirements, tell us more if necessary.

And yes, I know that this has more the nature of a comment than of an answer.

High Performance Mark
  • 77,191
  • 7
  • 105
  • 161
  • Just trying to get my head around this.. So when I've got `(a ≤ b ≤ c) && (¬(a ⩵ b ⩵ c)) && (c ≤ a ≤ b)`, I need to simplify it the form I need, but not go so far as to simplify it to false. I'll have a play around.. Thanks. – Max May 24 '13 at 13:05
0

Given n variables representing numeric values, a minimal invalid (infeasible) set of inequalities has the form:

a_1 ≥ a_2 ≥ ... ≥ a_n ≥ a_1

with any one of these n weak inequalities changed to a strong inequality >. [NB: It's not clear from the font used if you are allowing a nonequality (slash-equals), but adding that to a cycle of weak inequalities would also create an infeasible set of conditions.]

Such infeasible sets can be elaborated in several ways. The variables can be arbitrarily permuted (besides changing the position of the strong inequality), and additional inequalities can be added to the minimal set (further restrictions preserve infeasibility). As a special case of the latter, more than one of the weak inequalities can be changed to strong inequality.

Also note that any invalid set of inequalities on n-1 variables can be extended (passively) to an invalid set on n variables.

hardmath
  • 8,753
  • 2
  • 37
  • 65