Question 1112566

When I see problems like this I like to first imagine all the letters are distinct, like WXYZ.
With WXYZ you can make 4! = 24 unique words.

Obviously this over-counts by a certain amount.  How much does it over-count?

If  WX is really HH  then we've over-counted by 2! times (= the number of ways WX can be uniquely arranged).
If  YZ is really AA then we've over-counted by another 2! times.

So the number of unique words with HAHA is   4!/(2!*2!) = 24/4 = {{{ highlight( 6 ) }}} .

Since this is a small number, the unique patterns can be easily enumerated:
AAHH, AHAH, AHHA, HAAH, HAHA, and HHAA