# Solving System of Inequalities Relatively

I have been trying to figure out how to solve a system of inequalities relatively. I don't care about values, I just want all possible ordering. An example system might be:$${b > r,\; p > r,\; c - 1 = p,\; c < x,\; h > x,\; h < e, }$$ $${r < k,\; q > k,\; l - 1 = q,\; l < h,\; k > p}$$

I want to get all possible ways they could be arranged in order, satisfying the inequalities. If I am not explaining this well, please let me know, I'm not sure how to describe what I'm looking in a more mathematical way.

Is there a straightforward way to do it? I tried using Reduce over the domain of Integers, but it choked. FindInstance was able to find a single instance, but not more than that.

Edit: I tried:

FindInstance[{ b > r, p > r, c - 1 == p, c < x, h > x, h < e,
r < k, q > k, l - 1 == q, l < h, k > p},
{ b, r, p, c, x, h, e, k, q, l}]

{{b -> 0, r -> -1, p -> 0, c -> 1, x -> 2, h -> 3, e -> 4, k -> 1/2, q -> 1, l -> 2}}


This is basically what I'm looking for, but when I tried increasing n, I let it run for 5+ minutes and never got a solution.

I also tried:

Reduce[{ b > r, p > r, c - 1 == p, c < x, h > x, h < e,
r < k, q > k, l - 1 == q, l < h, k > p},
{b, r, p, c, x, h, e, k, q, l}]

 b ∈ Reals && r < b && p > r && c == 1 + p && x > 1 + p && h > x &&
e > h && p < k < -1 + h && k < q < -1 + h && l == 1 + q


when I tried Reduce over the domain Integers, the output was several hundred lines long.

Edit : Sorting by the second element, the revised version is:

 DeleteDuplicates[
Map[ First, Map[ SortBy[ #, Last] &,
FindInstance[{ b > r, p > r, c - 1 == p, c < x, h > x, h < e, r < k,
q > k, l - 1 == q, l < h, k > p},
{ b, r, p, c, x, h, e, k, q, l}, 10]
], {2}]]

-
Please share your Reduce[] and FindInstance[] codes with us – Dr. belisarius Nov 21 '13 at 1:56
@belisarius just added – kyryx Nov 21 '13 at 2:00
Re:your Edit. Your Map[First, ...] is getting the name of the variables only ... and they (the names) are always the same (of course). I don't get your point – Dr. belisarius Nov 21 '13 at 2:29
@belisarius You're correct, I meant to sort by the second element. I posted a corrected version. I appreciate the help. – kyryx Nov 21 '13 at 2:42

FindInstance[{b > r, p > r, c - 1 == p, c < x, h > x, h < e, r < k,

Very odd, I just realized when I was trying it, I specified the domain Integers, which never gave a solution. But without integers, it does it instantly.. – kyryx Nov 21 '13 at 2:13