Определите количество переворотов и равномерность следующего смещения. 1,5, ..4n-3, 2,6,., 4n-2,3,7,., 4n-1,4,8,. Определите количество переворотов и равномерность следующего смещения. 1,5, ..4n-3, 2,6,., 4n-2,3,7,., 4n-1,4,8,. 4n

1 Фев 2021 в 19:45
105 +1
0
Ответы
1

This sequence has 4n numbers arranged in a special way:

1, 5, ..., 4n-3, 2, 6, ..., 4n-2, 3, 7, ..., 4n-1, 4, 8, ..., 4n

To find the number of inversions, we need to count the number of pairs of elements that are in the wrong order. In this sequence, each element is exactly (4n-1) positions away from its correct position. Therefore, the total number of inversions is (4n-1)*(4n)/2 = 2n(4n-1).

To determine the uniformity of the displacement, we can observe that each element is shifted by a constant amount of 4. Therefore, the displacement is uniform in this sequence.

In conclusion, the number of inversions in this sequence is 2n(4n-1) and the displacement is uniform.

17 Апр 2024 в 21:05
Не можешь разобраться в этой теме?
Обратись за помощью к экспертам
Гарантированные бесплатные доработки в течение 1 года
Быстрое выполнение от 2 часов
Проверка работы на плагиат
Поможем написать учебную работу
Прямой эфир