2

Is the expression $\max(a + b, b + c, c + d)$ in its simplest from?

Assuming $a,b,c,d$ are positive integers.

What I've Tried:

I've tried several approaches but they all end up as either:

$\max(\max(a, c) + b, c + d)$

or

$\max(a + b, \max(b, d) + c)$

James
  • 121
  • 2
    What do you mean by a simplest form? – Lord Soth Jul 02 '13 at 18:41
  • @LordSoth I'm attempting to simplify the expression down to 2 term max functions. This is part of a larger expression, but this pattern crops up repeatedly. Thus, moving any terms outside of the max function make simplification with other parts of the expression easier – James Jul 02 '13 at 19:00
  • 1
    My guess is that one should construe the question as whether the first $\max$ given can be expressed as a function of several maximums, each of one or more of $a,b,c,d$. – Michael Hardy Jul 02 '13 at 19:01
  • 1
    If you only want to compare 2 terms each time, then you could do $\max( \max(a+b, b+c), c+d)$ – Calvin Lin Jul 02 '13 at 19:01
  • Well, I think your question is equivalent to "simplifying" $\max{x,y,z}$. If you want to get rid of the maxes altogether, I can give you a more complicated expression that only has addition, division, and absolute value, but that would be lame. – Lord Soth Jul 02 '13 at 19:03
  • I've come up with a set of predicate logic statements to determine which is the max. Not sure if that's what you're looking for, so let me know if it's not. – rurouniwallace Jul 02 '13 at 19:06
  • @LordSoth Is there somewhere I can read up on that decomposition line of thought? The application of this problem is computer hardware simplification and thus it has to be decomposed anyway – James Jul 02 '13 at 19:11
  • 1
    @James $\max{a,b} = \frac{a+b+|a-b|}{2}$. You can extend this to more than $2$ variables, but the expression will get more complicated (e.g. $\max{a,b,c} = \max{\max{a,b},c}$, use the formula two times). – Lord Soth Jul 02 '13 at 19:23
  • 1
    The title of the question seems to be in disagreement with the actual statement -- the first and last argument do not share a term. – Peter Košinár Jul 02 '13 at 20:01

2 Answers2

2

Here is an incomplete answer that may help to convince you that you won't find anything better than you already have, i.e. that the answer to the question in the first line is "Yes". (Note that your restriction to positive integers is no restriction: since your problem is homogeneous, you can multiply all terms $a,b,c,d$ by the same positive number, or you can add to all terms the same real number, and you won't have changed the ordering of $a+b,b+c,c+d$. So I will assume that they are arbitrary real variables.)

In a precise sense, the algebra $(\max,+)$ is a limit of the algebra $(+,\times)$. To wit: for any $t>0$, consider the algebra $(+_t,\times_t)$ defined on $\mathbb R$ by $a +_t b = \log_t( t^a + t^b)$ and $a \times_t b = \log_t(t^a \times t^b)$. (Here and throughout, $\log_t(x) = \frac{\ln x}{\ln t}$, and $t^x = \exp( x \ln t)$, where $\ln$ is the natural logarithm. Note that $\ln t$ is well-defined, since $t>0$.) Three things should be obvious: (1) The algebra $(+_t,\times_t)$ is isomorphic to the algebra $(+,\times)$ on $\mathbb R_{>0}$, via the isomorphism $x \mapsto t^x$. (2) $\times_t= +$ for all $t$. (3) $\lim_{t\to \infty} +_t= \max$.

It follows that any identity that you can make out of $(+,\times)$ (and which never uses any explicit constants, since these don't have limits as $t\to \infty$; also, you're not allowed to use subtraction, but you are allowed to use division, as $\lim_{t\to \infty} \div_t = -$) gives you an identity made out of $(\max,+)$, just by substitution. This process is called tropicalization. For example, the distributive law $a(b+c) = ab + ac$ turns into the tropical distributive law $a+ \max(b,c) = \max(a+b,a+c)$, which you have been using. Here's another example: $$ \frac1a + \frac1b = \frac{a+b}{ab} \quad \Rightarrow \quad \max(-a,-b) = \max(a,b) - (a+b) $$

Conversely, it's approximately true that every tropical identity follows from the corresponding non-tropical identity. (I say "approximately" because I don't mean this as precise mathematics, but more as philosophy. The philosophy works best for homogeneous situations like yours. The identity $a = \max(a,a)$ does not follow from an identity "$a = a + a$".) So your question is approximately equivalent to the following:

Is the expression $ab + bc + cd$ in its simplest from?

I would say "yes". Certainly it does not factorize. Your proposed simplifications correspond to $$ ab + bc + cd = b(a+c) + cd = ab + c(b+d) $$ which are both certainly true, but not any simpler or less simple.

I assume that you have no objections to ternary sums. Why don't you like the $\max$ function of three variables?


Aside: Tropicalization occurs in a number of areas of modern research mathematics. The main reason is that matrix multiplication uses only $+$ and $\times$, and so any identity having to do with matrices gives you a "tropical" identity. Often, mathematicians want to know the number of solutions to some matrix equation, which a priori requires solving some complicated polynomial equations. But quite often the number of solutions of the "non-tropical" equation is the same as the number of solutions of its tropicalization, and this number can sometimes be computed quickly via linear programming. In any case, the number of tropical solutions often has a combinatorial meaning, allowing it to be connected to other combinatorics problems, whereas the non-tropical formulation of the problem often obscures this combinatorics.

  • Wow, that is thorough! I'm trying to apply an edge detection algorithm in computer hardware and was hoping that these expressions could be simplified to reduce signal duplication as many this pattern is found throughout my system. – James Jul 02 '13 at 22:32
0

Iff $c+d$ is the greatest:

$$(c+d)>(b+c)\land{(c+d)}>(a+b)$$ $$d>b\land{(c+d)>(a+b)}$$ $$d>b\land{c\le{a}}$$

Iff $b+c$ is the greatest:

$$(b+c)>(a+b)\land{(b+c)>(c+d)}$$ $$c>a\land{b>d}$$

Iff $a+b$ is the greatest:

$$(a+b)>(b+c)\land{(a+b)>(c+d)}$$ $$a>c\land(a+b)>(c+d)$$ $$a>c\land{b\le{d}}$$