Expense and Balance Mismatch
The question goes like this:
Suppose I have 50 Rupees initially, and spend them so:
Spent Balance 0 50
20 30
15 15 9 6 6 0If we see the sum of amount spent it gives $50$ Rupees.
But if we calculate the balance amount $(30+15+6)$ it gives $51$ rupee instead of $50$ rupees.
How could this be possible?
$\endgroup$2 Answers
$\begingroup$There is no reason why the sum of the sequentially diminishing balance amounts should total the original amount.
To see why it is absurd to expect so, consider the example of sequentially spending $1$ rupee at a time:
Spend$\quad$Balance
$0\qquad\qquad 100$
$1\qquad\qquad 99$
$1\qquad\qquad 98$
$\;\vdots \qquad \qquad \;\vdots$
$1 \qquad \qquad 1$
$1\qquad \qquad 0$
$100\qquad \quad 99 + 98 + \cdots 2 + 1 = 99\cdot 50 = 4950 \neq 100$
In the above example, the sum of the intermediate balance amounts greatly exceeds the starting balance of $100$.
In the following example, the sum of the intermediate balance is much less than the starting balance of $100$ rupee:
Spend$\quad$Balance
$0\qquad\qquad 100$
$99\qquad\qquad 1$
$\;\,1\qquad\qquad \,0$
$100\qquad \quad 1 \neq 100$
The important thing is to note that we must only have:
$$\text{Sum of amounts spent}\; = \;\text{Starting balance}\;-\;\text{Ending balance}$$
$\endgroup$ 3 $\begingroup$Starting with total amount of Rs. 50 and spending given amounts in 4 transactions following spend balance table is obtained.
$$\begin{array}{c|c|} \hline &\text{spend} & \text{Balance} \\ \hline &20 & 30 \\ \hline &15 & 15 \\ \hline &9& 6\\ \hline &6&0\\ \hline sum&50&51 \end{array}$$
Now, Sum of spent amounts is always equal to the total sum but sum of balance transaction depends upon number of transactions. If we spend Rs.50 in single transaction then sum of spend amounts will be $50$ and sum of balance amounts will be $0$.
i.e. Sum of spend amounts $>$ Sum of balance amounts
In other case if we spend Rs. 1 in $50$ transactions then sum of spend amounts will be $50$ and sum of balance amounts will be $49+48+47+\dots+2+1+0 = 1225$.
i.e. Sum of spend amounts $<$ Sum of balance amounts
Sum of spend amounts is always same but sum of balance amounts vary according to number of transactions and spend amount in each transaction.
So for generalizing the sum of balance we will proceed inductively.
For number of transactions $(n=1)$
Let $S$ be total amount and $a_1$ be spent amount in transactions. Here $S=a_1$\begin{array}{|c|c|c|} \hline Transaction No.&Spend & Balance \\ \hline 1&a_1 & S - a_1\\ \hline sum & S & 0\\ \hline \end{array}
Hence sum of balance\begin{equation} \label{s1} S_1 = 0 \hspace{2cm} ..........(1) \end{equation}
For number of transactions $(n=2)$
Let $S$ be total amount and $a_1$ be spent amount in transactions.\begin{array}{|c|c|c|} \hline Transaction No.&Spend & Balance \\ \hline 1&a_1 & S - a_1\\ \hline 2&S - a_1 & 0\\ \hline sum & S & S - a_1\\ \hline \end{array}Hence sum of balance \begin{equation} \label{s2} S_2 = S - a_1 \hspace{2cm} ..........(2) \end{equation}
For number of transactions $(n=3)$
Let $S$ be total amount and $a_1,a_2$ be spent amount in transactions.\begin{array}{|c|c|c|} \hline Transaction No.&Spend & Balance \\ \hline 1&a_1 & S - a_1\\ \hline 2&a_2 & S - a_1-a_2\\ \hline 3&S - a_1-a_2 & 0\\ \hline sum & S & 2S - 2a_1-a_2\\ \hline \end{array}Hence sum of balance \begin{equation} \label{s3} S_3 = 2S - 2a_1-a_2 \hspace{2cm} ..........(3) \end{equation}
Now, for number of transactions $(n=k)$
Let $S$ be total amount and $a_1,a_2,a_3,\dots$ be spent amount in transactions.
\begin{array}{|c|c|c|} \hline Transaction No.&Spend & Balance \\ \hline 1&a_1 & S - a_1 \\ \hline 2&a_2 & S - a_1-a_2 \\ \hline 3&a_3 & S - a_1-a_2-a_3 \\ \hline \dots & \dots & \dots \\ \hline k-1&a_{k-1} & S - a_1-a_2-a_3-\dots-a_{k-1} \\ \hline k & S - a_1-a_2-a_3-\dots-a_{k-1} & 0\\ \hline sum & S & (k-1)S - (k-1)a_1-\dots - 2a_{k-2}-a_{k-1}\\ \hline \end{array}Hence sum of balance \begin{equation} \label{sk} S_k = (k-1)S - (k-1)a_1-(k-2)a_2-(k-3)a_3-\dots - 2a_{k-2}-a_{k-1} \hspace{2cm} ..........(4) \end{equation}
Hence, If $S$ be the total amount and $a_1,a_2,a_3,\dots, a_n$ be spent amount in $n$ transactions. Then, Sum of Balance amount in transactions\begin{align*} S_n &= (n-1)S - (n-1)a_1-(n-2)a_2-(n-3)a_3-\dots - 2a_{n-2}-a_{n-1}\\ &=(n-1)(a_1+a_2+a_3+\dots+a_{n-1}+a_n) - (n-1)a_1-(n-2)a_2-(n-3)a_3-\dots - 2a_{n-2}-a_{n-1}\\ &=(n-1)a_1+(n-1)a_2+(n-1)a_3+\dots+(n-1)a_{n-2}+(n-1)a_{n-1}+(n-1)a_n- (n-1)a_1-(n-2)a_2-(n-3)a_3-\dots - 2a_{n-2}-a_{n-1}\\ &=((n-1)-(n-1))a_1 + ((n-1)-(n-2))a_2 +((n-1)-(n-3))a_3 +\dots+((n-1)-2)a_{n-2}+((n-1)-1)a_{n-1}+(n-1)a_n\\ &=0a_1+1a_2+2a_3+3a_4+\dots+(n-3)a_{n-2}+(n-2)a_{n-1}+(n-1)a_n\\ &=\sum_{k=1}^{n} (k-1)a_k \end{align*}So, Sum of Balance amount of $n$ transactions is$$\boxed{S_n=\sum_{k=1}^{n} (k-1)a_k}$$
Now, for conditions of "sum of spent amount in transactions" and "sum of balance amount in transactions" to be equal.i.e. \begin{equation} \label{s=sk} S=S_k \hspace{2cm} ..........(5) \end{equation}
From equation (4) and (5) for $n$ transactions,\begin{align*} S &= (n-1)S - (n-1)a_1-(n-2)a_2-(n-3)a_3-\dots - 2a_{n-2}-a_{n-1}\\ (n-1)S-S &=(n-1)a_1+(n-2)a_2+(n-3)a_3+\dots + 2a_{n-2}+a_{n-1}\\ (n-2)S &=(n-1)a_1+(n-2)a_2+(n-3)a_3+\dots + 2a_{n-2}+a_{n-1}\\ S &= \frac{[(n-1)a_1+(n-2)a_2+(n-3)a_3+\dots + 2a_{n-2}+a_{n-1}]}{(n-2)}\\ &=\frac{\sum_{k=1}^{n} (n-k)a_k }{(n-2)} \end{align*}
Hence, in spend balance problem the "sum of spent amount in transactions" and "sum of balance amount in transactions" will be equal if amounts in spend transactions $(a_1,a_2,a_3,\dots)$ are related to total amount $S$ in following manner.$$\boxed {S=\frac{\sum_{k=1}^{n} (n-k)a_k }{(n-2)}}$$
$\endgroup$