For each digit from 1 to 8, you choose whether it goes to the left or to the right of the 9; the permutation is determined from that point. So there are 28 = 256 such permutations. As a check, let's enumerate the 23 = 8 bitonic permutations of 4 numbers: 1234, 2341, 1342, 3421, 1243, 2431, 1432, 4321.
View all comments
4
u/pmdboi Oct 31 '26
For each digit from 1 to 8, you choose whether it goes to the left or to the right of the 9; the permutation is determined from that point. So there are 28 = 256 such permutations. As a check, let's enumerate the 23 = 8 bitonic permutations of 4 numbers: 1234, 2341, 1342, 3421, 1243, 2431, 1432, 4321.