Jump to content

- - - - -

max and min of a sum

  • Please log in to reply
2 replies to this topic

#1 Pawel Wembley

Pawel Wembley


  • New Members
  • 2 posts

Posted 8 November 2016 - 06:59 AM

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

Looks like equation


has got min and max values

with the assumptions




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

Attached Files

  • Attached File  Q.pdf   200.59KB   28 downloads

Edited by Pawel Wembley, 8 November 2016 - 07:00 AM.

  • 0

#2 renerpho



  • Members
  • 20 posts
  • LocationGermany

Posted 20 November 2016 - 09:58 PM

Hello Pawel.


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


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

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

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



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


\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}|) =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}) =KB+1-\sum_{i=1,A{_i}>B}^{K}(2B)-\sum_{i=1,A{_i}\leq B}^{K}(2A{_i}). This will get maximal if you have A{_i}=0 \forall A{_i}\leq B, when it will be equal to KB+1-2B \cdot 1_{A{_i}>B}.

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

Edited by renerpho, 20 November 2016 - 10:37 PM.

  • 2

#3 Pawel Wembley

Pawel Wembley


  • New Members
  • 2 posts

Posted 21 November 2016 - 12:29 AM

Hi Quark, it is great. Big thanks and regards.

  • 1

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users