There are numbers from 1to n,which are inverted such that it results in numbers from n to 1.if only two consecutive numbers are stampled at a time and are inverted ,how many moves are required?
Answers
Answered by
3
Answer:
Step-by-step explanation:
Series of numbers from = 1 to n
Series of inverted numbers from = n to 1
In order to overlap any previous numbers we need to swap them with it atleast once a time. Now for every number at pos p we have atleast n-p-1 numbers to be swapped with.
Thus, the formula used here will be -
∑i = 1n−1i = n × (n−1)2
After using the formula, a series that can be generated is - 5 4 3 2 1.
Thus, there can be n number of moves.
Similar questions