Single number set problem

49 Views Asked by At

I can´t solve this problem and I will appreciate any help.

Given a set with N (N >= 1) distinct natural numbers. In each step we increase the lowest number by 2 and for every other number X we add X+1 to the set. Then, we replace each pair X,X with X+1 until all numbers in the set are distinct.

Prove that after finite number of steps we end up with a set that has only a single number.

Example:

A = {1,2,5,6,7,10}

Increase the lowest number by 2.

A = {3,2,5,6,7,10}

For every other number X we add X+1 to the set.

A = {3,2,2+1,5,5+1,6,6+1,7,7+1,10,10+1}

A = {2,3,3,5,6,6,7,7,8,10,11}

We replace each pair X,X with X+1.

A = {2,4,5,7,8,8,10,11}

We again replace each pair X,X with X+1.

A = {2,4,5,7,9,10,11} (after first step)