Proving that the permutation 312 is not stack-sortable

89 Views Asked by At

push operation

pop operation

We say that a permutation $σ ∈ S_n $ is sortable through a stack if there is a sequence of (PUSH) and (POP) operations such that the initial state:

permutation

can be transformed into the final state:

after sorting

I’m supposed to prove that the permutation 312 is not stack sortable. Other than writing out all the different combinations of possible operations, I’m not sure how to show this.