1

I apologize if this is off topic but I think it fits. I am trying to succinctly describe a logical check for an algorithm which is a logical or. That is I want to say that we remove any cells $k$ with any grid corner $i$ that satisfies

\begin{equation} \left[\begin{array}{cc} x_i^{(k)} & y_i^{(k)}\end{array}\right]\left[\begin{array}{c} x_i^{(k)} \\ y_i^{(k)} \end{array}\right]>d_{max}^2 \end{equation}

where $x_i^{(k)}$ and $y_i^{(k)}$ are the $x-$ and $y-$ components of the $i^{th}$ vertex of the $k^{th}$ cell. What I would like it to look like is something like

\begin{equation} \left[\begin{array}{cc} x_i^{(k)} & y_i^{(k)}\end{array}\right]\left[\begin{array}{c} x_i^{(k)} \\ y_i^{(k)} \end{array}\right]>d_{max}^2\text{, }\forall i\in 1-4 \end{equation}

where instead of $\forall$ meaning "for all" it really means "for any". I know the $\forall$ can occasionally mean "for any" but in my experience it only means this when "for any" implies "for all."

Is there some other notation I can use for this or should I just use a somewhat lengthy explanation like I have given in this question. I know one simple way to do it would be to write out all of the logical "or"s which wouldn't be too bad in this case since there's only 4 options, but I am interested for future cases as well where there may be many options (which of course I could just write out using an elipses but again I'm hoping there's a more succinct way to do this that I just haven't come across yet).

Andrew
  • 288
  • What is the difference between "for all" and "for any" in a mathematical context ? – Mauro ALLEGRANZA Oct 13 '15 at 14:02
  • I would agree that there generally is not a difference, and that is the problem I was running into. I want there to be a difference when none really exists. – Andrew Oct 13 '15 at 14:07

1 Answers1

1

If you want to test if at least one of the four inequalities is satisfied, try:

\begin{equation} \max_{1\le i \le 4} \left( \left[\begin{array}{cc} x_i^{(k)} & y_i^{(k)}\end{array}\right]\left[\begin{array}{c} x_i^{(k)} \\ y_i^{(k)} \end{array}\right]-d_{max}^2\right)>0 \end{equation}

If instead you want to test if all four of the inequalities are satisfied, try:

\begin{equation} \min_{1\le i \le 4} \left( \left[\begin{array}{cc} x_i^{(k)} & y_i^{(k)}\end{array}\right]\left[\begin{array}{c} x_i^{(k)} \\ y_i^{(k)} \end{array}\right]-d_{max}^2\right)>0 \end{equation}

vadim123
  • 82,796
  • Hah... great answer. And ironically this is how I have the algorithm implemented in code but I was thinking about it too hard (something similar to the xy problem that is discussed frequently over on stack overflow). I will accept once stack exchange allows me to... – Andrew Oct 13 '15 at 14:09