taocp

This site has no text of the book. Keep your own copy of TAOCP next to it. See what is checked.

Exercise · Volume 1 · 1.2.3-35

Exercise 1.2.3-35

not stated yet in Lean solution written

RatingHM20
MarkersHM (needs higher mathematics)
KindK1, prove: show that a stated fact is true from the written solution
SectionSection 1.2.3 of Volume 1. Companion chapter: Sums and products

The task

Adapt the four rules of the section to the notation sup⁡R(j)aj\sup_{R(j)} a_j for the least upper bound. Prove the analog of rule (a), where a sum of two suprema becomes a double supremum, and define the notation when no jj satisfies R(j)R(j).

The exact wording is in your copy of the book.

Hints

Open one hint at a time. Try the exercise again after each.

Hint 1

In ∑\sum the operation is ++ and the neutral element is 00. For sup⁡\sup the operation is "larger of two" and the neutral element is the value that is below every number.

Hint 2

For the analog of rule (a), prove the two inequalities separately. One is direct. The other needs a choice of ii and jj that come close to both suprema.

Solution

Show the solution

Work in the extended reals [−∞,+∞][-\infty, +\infty]. Every set of extended reals has a least upper bound there.

The empty case. The empty sum is 00, which is the neutral element of ++. The neutral element of "larger of two" is −∞-\infty, since max⁡(−∞,a)=a\max(-\infty, a) = a. So define sup⁡R(j)aj=−∞\sup_{R(j)} a_j = -\infty when no jj satisfies R(j)R(j). With this definition sup⁡R(j) or S(j)aj=max⁡(sup⁡R(j)aj,sup⁡S(j)aj)\sup_{R(j) \text{ or } S(j)} a_j = \max(\sup_{R(j)} a_j, \sup_{S(j)} a_j) has no exception. Also put −∞+c=−∞-\infty + c = -\infty for every cc, including c=+∞c = +\infty.

Rule (a), the sum. The claim is sup⁡R(i)ai+sup⁡S(j)bj=sup⁡R(i)sup⁡S(j)(ai+bj).\sup_{R(i)} a_i + \sup_{S(j)} b_j = \sup_{R(i)} \sup_{S(j)} (a_i + b_j). If RR or SS is never true, both sides are −∞-\infty by the conventions above. Now let both be non-empty. Write α\alpha and β\beta for the two suprema on the left.

First, ai+bj≤α+βa_i + b_j \le \alpha + \beta for each admissible pair (i,j)(i, j). So the right side is at most α+β\alpha + \beta.

Second, let γ\gamma be a real number with γ<α+β\gamma < \alpha + \beta. Choose reals α′<α\alpha' < \alpha and β′<β\beta' < \beta with α′+β′≥γ\alpha' + \beta' \ge \gamma. This is possible for finite and for infinite α\alpha, β\beta (if α=+∞\alpha = +\infty take α′\alpha' large). By the definition of the supremum there are admissible ii and jj with ai>α′a_i > \alpha' and bj>β′b_j > \beta'. Then ai+bj>γa_i + b_j > \gamma, so the right side exceeds γ\gamma. Since γ\gamma was arbitrary, the right side is at least α+β\alpha + \beta. □\square

The operation that plays the role of the product in rule (a) is ++, and it is distributive over sup⁡\sup. The same proof gives c+sup⁡R(j)aj=sup⁡R(j)(c+aj)c + \sup_{R(j)} a_j = \sup_{R(j)} (c + a_j) for finite cc and c⋅sup⁡R(j)aj=sup⁡R(j)(c aj)c \cdot \sup_{R(j)} a_j = \sup_{R(j)} (c\, a_j) for real c>0c > 0. For c<0c < 0 the supremum turns into an infimum.

Rule (b), change of variable. Let pp map the set {j:R′(j)}\{j : R'(j)\} onto the set {j:R(j)}\{j : R(j)\}. Then sup⁡R(j)aj=sup⁡R′(j)ap(j)\sup_{R(j)} a_j = \sup_{R'(j)} a_{p(j)}. The map need not be one to one, because a repeated value does not change a supremum. This is weaker than the condition for ∑\sum, where pp must be a bijection.

Rule (c), interchange. For all index sets, sup⁡R(i)sup⁡S(j)aij=sup⁡S(j)sup⁡R(i)aij,\sup_{R(i)} \sup_{S(j)} a_{ij} = \sup_{S(j)} \sup_{R(i)} a_{ij}, and, if the inner condition depends on ii, sup⁡R(i)sup⁡S(i,j)aij=sup⁡S′(j)sup⁡R′(i,j)aij\sup_{R(i)} \sup_{S(i, j)} a_{ij} = \sup_{S'(j)} \sup_{R'(i, j)} a_{ij} whenever R(i)R(i) and S(i,j)S(i, j) together hold exactly when S′(j)S'(j) and R′(i,j)R'(i, j) together hold. Both sides are the supremum over the set of pairs (i,j)(i, j) that satisfy both conditions. No convergence condition is needed, unlike for infinite ∑\sum.

Rule (d), domain. For two conditions RR and SS, sup⁡R(j) or S(j)aj=max⁡(sup⁡R(j)aj, sup⁡S(j)aj).\sup_{R(j) \text{ or } S(j)} a_j = \max\Bigl(\sup_{R(j)} a_j,\ \sup_{S(j)} a_j\Bigr). This holds even if some jj satisfy both conditions. For ∑\sum one needs the extra term ∑R and S\sum_{R \text{ and } S}. Here it is not needed, since max⁡(a,a)=a\max(a, a) = a.

Check

Take ai∈{1,4}a_i \in \{1, 4\} and bj∈{2,7}b_j \in \{2, 7\}. Then 4+7=114 + 7 = 11. The pairs ai+bja_i + b_j are 3,8,6,113, 8, 6, 11 and their maximum is 1111. If bj∈{2,7}b_j \in \{2, 7\} is replaced by the empty set, both sides are −∞-\infty.

Remarks

The same proof works with inf⁡\inf and +∞+\infty. Rule (a) is the form of the distributive law in the max-plus semiring, in which "larger of two" replaces ++ and ++ replaces ×\times. Rules (b), (c) and (d) use only that the operation is associative and commutative with a neutral element, so they carry over to any such operation. Rule (a) needs in addition a second operation that distributes over the first.

This solution is checked, and a person has not reviewed it yet. The source.

In Lean

not stated yet The exercise is not stated in Lean yet.

The status is computed from the Lean build. The node of the map.

Something is wrong? Report it.