How to solve the Tower of Hanoi with L pegs, a maximal height H, and the goal is to discover the largest disc. I've stumbled upon an interesting variation of the Tower of Hanoi problem.
Here are the conditions :

*

*You have $P$ pegs ;

*On each peg can stack a maximum of $H$ discs ;

*Discs can be of various size, and not necessarily all different. The only guarantee is the existence of an unique largest disc ;

*Usual Hanoi rules apply meaning that at any time on any peg all disks are in decreasing size order (disks of same size can stack on top of each other) from the bottom to the top.

Starting on a random configuration you have to find, if it exists, the minimal path in terms of movement leading to the largest disk being uncovered.
As it is quite unusual, I thought it could make a good question (as I struggle to find an algorithm myself).
 A: (this is not a complete solution, but rather merely some interesting facts)
First of all, let's get some obvious information out of the way. If you have $d$ disks, $p$ pegs, and a maximum height of $h$. We know that $h\geq d$, as otherwise the starting orientation could not be set up. Also, is $p\geq d$, then the problem is easily solved by placing one disk on each peg, allowing for a solve using $d-1$ moves.
Now some slightly more complicated things. Concerning the disks of the same size, it is optimal to treat them as if they were a single disk. To prove this, imagine two identical disks $D$ are on two separate pegs. They would either be on the bottom of the stack or above another dikc of a larger size, $D_1$. This is most definitely sub-optimal, as any disk where $D\le x\le D_1$ is unable to be placed due to our bad movements. So treating any disks of the same size as one is the best option. Using this, we can refine our earlier statement to say that if the number of disk sizes is $S$, then if $p\geq S$ we can solve in $d-1$ moves. (As the question states that the largest disk is unique, we can remove that possibility)
One last piece of information that might be useful when trying to fully optimize this problem is the following: We can make many smaller towers of Hanoi to save on the pegs we use. For example, if $S=4$ and $p=3$, we can move the smallest two disks to the second and third pegs, then stack them to make room for the third disk, which after moving would reveal the largest disk and solve our problem.
