I have solved with Mathematica 9 the following integer inequalities using Reduce:
eq = Reduce[
m (k - 1) + (k - 2) == c k && m >= 2 && k >= 2 && c >= 1, {k, m,
c}, Integers, Backsubstitution -> True]
(* (k | m | c) \[Element] Integers && k >= 2 && m >= 2 &&
c == (-2 + k - m + k m)/k *)
better = Reduce[
m (k - 1) + (k - 2) < c k && m >= 2 && k >= 2 && c >= 1, {k, m,
c}, Integers, Backsubstitution -> True]
(* (c \[Element] Integers && k == 2 && m == 2 &&
c >= 2) || ((m | c) \[Element] Integers && k == 2 && m >= 3 &&
c > m/2) || ((k | m | c) \[Element] Integers && k >= 3 && m >= 2 &&
c > (-2 + k - m + k m)/k) *)
worst = Reduce[
m (k - 1) + (k - 2) > c k && m >= 2 && k >= 2 && c >= 1 , {k, m,
c}, Integers, Backsubstitution -> True]
(* ((m | c) \[Element] Integers && k == 2 && m >= 3 &&
1 <= c < m/2) || ((k | m | c) \[Element] Integers && k >= 3 &&
m >= 2 && 1 <= c < (-2 + k - m + k m)/k) *)
Now I need to plot them. However, using RegionPlot3D
I can only plot a region made of reals, while the solutions are integers. What is the proper way to plot the solutions when the domain is Integers
?