Ronaldo, Arnoldo and Ornaldo

Sometimes,two or more people may have names that are anagrams of each other. Let us call a group of distinct names that are all anagrams of each other an anagramic tuple.

For example (Norma, Ramon, Roman) is an example of an anagramic tuple of size 33.

In names.txt, a 46K text file containing over five-thousand first names, let the size of the largest anagramic tuple be NN. Let MM be the number of anagramic tuples of size NN. What is the value of the product N×MN \times M?

Details and assumption

  • The arrangement of the names in the tuple doesn't matter. I.e. (Tia, Tai) is the same tuple as the tuple (Tai, Tia).

  • All the names in an anagramic tuple are distinct.


Problem Loading...

Note Loading...

Set Loading...