Jump to content

max and min of a sum

Featured Replies

I would appreciate very much your help or direction to solve the problem.

Looks like equation

Q=SUM(ABS(B-Ai))

has got min and max values

with the assumptions

0<B<1

0<=Ai<=1

SUM(A1:AK)=1

and i is a natural number from 1 to K

 

Looks like the Qmax and Qmin depend on B and K only. I failed to find general solution for Qmax and Qmin.

 

I attach the pdf with the problem written in Word Equation instead of Excel manner

Q.pdf

Edited by Pawel Wembley

  • 2 weeks later...

Hello Pawel.

 

The mimimum [math]Q_{min}=\max(KB-1,0)[/math] is calculated as follows:

 

[math]\sum_{i=1}^{K}|B-A{_i}|\geq 0[/math] is trivial, and reached if all [math]A{_i}[/math] are equal to [math]B[/math].

If [math]KB-1>0[/math] then the minimum is not reached at 0, but at [math]\sum_{i=1}^{K}|B-A{_i}|\stackrel{|x|\geq x}{\geq}\sum_{i=1}^{K}(B-A{_i})\[/math] [math]=KB-\sum_{i=1}^{K}A{_i}\ \stackrel{\sum_{i=1}^{K}A{_i}=1}{=}KB-1[/math]. This minimum value is reached if and only if [math]A{_i}<B \forall i[/math].

In the case [math]KB-1<0[/math], you have [math]B<\frac{1}{K}[/math], so at least one of the [math]A{_i}[/math] is larger than [math]B[/math] (by the Pigeon Principle). Which means that [math]KB-1[/math] can't be reached. In that case, the mimimum is 0.

 

 

For the maximum [math]Q_{max}=1+B(K-2)[/math]:

 

[math]\sum_{i=1}^{K}|B-A{_i}| \stackrel{extend}{=}\sum_{i=1}^{K}(B+A{_i})-\sum_{i=1}^{K}(B+A_{i}-|B-A{_i}|)[/math] [math]=KB+1-\sum_{i=1,A{_i}>B}^{K}(B+A{_i}+B-A{_i})-\sum_{i=1,A{_i}\leq B}^{K}(B+A{_i}-B+A{_i})[/math] [math]=KB+1-\sum_{i=1,A{_i}>B}^{K}(2B)-\sum_{i=1,A{_i}\leq B}^{K}(2A{_i})[/math]. This will get maximal if you have [math]A{_i}=0 \forall A{_i}\leq B[/math], when it will be equal to [math]KB+1-2B \cdot 1_{A{_i}>B}[/math].

If one of the [math]A{_i}[/math] is equal to [math]1[/math] (and all other [math]A_{i}[/math] are [math]0[/math]), this will take its maximum value [math]KB+1-2B \cdot 1=1+B(K-2)[/math].

Edited by renerpho

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.