combinatorics

On a bookcase there are n ≥ 3 books side by side by different authors. A librarian considers the first and second book from left and exchanges them iff they are not alphabetically sorted. Then he is doing the same operation with the second and third book from left etc. Using this procedure he iterates through the bookcase three times from left to right. Considering all possible initial book configurations how many of them will then be alphabetically sorted?

Be the first to Answer

Close [X]