Proving (n+1-k)(n-k) / 2 from P(n+1-k)

80 Views Asked by At

A part of a proof by strong induction implementation is :

Given :

$P(K) = k(k-1)/2$

How to arrive at $(n+1-k)(n-k) / 2$ from $P(n+1-k)$ ?

Lecture screenshot (taken from MIT Mathematics for Computer Science) here : enter image description here

Update :

As $P(k)=k(k-1)/2$ should $P(n+1-k)$ not be $n+1- \frac{k\cdot (k-1)}{2}$ ?

1

There are 1 best solutions below

5
On BEST ANSWER

Let $l = n+1-k$, then $$P(l) = \frac{l\cdot (l-1)}{2} = \frac{(n+1-k)\cdot ((n+1-k)-1)}{2} = \frac{(n+1-k)\cdot (n-k)}{2}$$

EDIT: $$(n+1-k) - 1 = n+1-k-1 = n-k+1-1 = n-k + (1-1) = n-k$$