Suppose we wrote $11$ numbers $1,2,3,4,5,6,7,8,9,10,11$ each on different piece of paper and then put all those papers in a box and we shuffle those pieces.
Now how many minimum number of pieces we need to take out from that box to ensure that the number written on any $2$ of the pieces that we are taking out from the box results in sum $12$ without looking at the numbers that we are picking out from the box..
here the name of the box is $S$. i.e. box=set.
The pairs that would result in sum of $12$ are $(1,11) ,(10,2), (3,9),(4,8),(5,7)$ only
So we have to calculate the worst case of getting $12$ as sum of any $2$ numbers that we ae picking out.
We pick $1$ then $2$ then $3$ then $4$ then $5$ then $6$ uptil here sum of none of the $2$ numbers that we picked results in $12$
Now whatever number we pick next from the remaining numbers in the set(box) we would definitely get $12$ as the sum.i.e.
if we pick $7$ then we can get $5+7 =12$
if we pick $8$ then we can get $4+8 =12$
if we pick $9$ then we can get $3+9 =12$
if we pick $10$ then we can get $2+10 =12$
if we pick $11$ then we can get $1+11=12$
$\therefore$ The minimum numbers that we need to pick are $7$ to ensure that we get a sum of $12$.