Navigation

I participated in DIMACS/DIMATIA REU program at Rutgers University. Our research group consisted of four other undergraduate students Ondrej Bilka, Tomas Gavenciak, Zuzana Safernova, Jan Volec and two graduate students Eva Jelinkova, Vitek Jelinek.

I would really thank to our advisors Mario Szegedy, Dan Cranston, and Padmini Mukkamala who gave us a lot of their time.

Reversing Permutations with Minimal Cost

The problem is described in more detail at Honza's page.

I developed an algorithm for reversing permutations with cost at most 7/12 k3. Unfortunately, this is not the best algorithm as there is an algorithm following from the Mercedes construction with cost at most 13/24 k3. I will now describe the idea of the algorithm.

We are given a permutation (1, 2, ..., n) and a cost vector (n/2, n/2-1, ..., 1, 0, 1, 2, ..., n/2 -1, n/2) describing the cost of swapping two neighbors at that position.

The algorithm starts by reversing the left half of the permutation 1, 2, ..., n/2+1. This is done by taking the numbers from right to left and each bubbling completely to the right.

Now, we need to reverse the right half of the permutation and switch it with left half. Number by number we move the right half to the middle of the permutation. We recursively reverse right half and then move it to its position on left.