Doubts in Sorting algorithm-Pancake flipping.

52 Views Asked by At

Here, is the solution pdf for the pancake sorting problem.

http://home.ustc.edu.cn/~ustcsh/py2016/data/GP79.pdf

In the fifth page, the para with the start,"where xi is multiplied by the number of flippings involved....." till the end of the table 2 has been difficult for me to understand.

I cant seem to understand why the adjacencies created out of the actions X31,X32,X33,X34 are 2,3,3,3 respectively.

Can anyone please explain how this is possible in an easy way?

Also, please explain the row of 'increase in number of blocks' as well.

Thank you.