9 May 2017

# Here is a puzzle that will remind you of math from high school

Take the word “MONOTONE”. In how many different ways can you jumble up all the letters such that M will never come after E?

Posted May 9, 2017 by Rajib Roy in category "Puzzles

1. By Dhananjay Nene on

It’s so much easier to write a brute force program than recollecting permutation combination formulae

1. By Dhananjay Nene on

Yep, thats correct. And although I didn’t know enough to solve it that way, here’s the brute force proof ðŸ™‚ ðŸ™‚

print(len(filter(lambda s: s.index(‘M’) < s.index('E'),
set(itertools.permutations(
['M','O','N','O','T','O','N','E'])))))

Its in a language called python

1. By Anand Iyer on

If you are always making 8 letter words, then half of the permutations have “m” before “e”

2. By Anand Iyer on

But i also see that semantically two eight letter words with repeat letters in similar positions are in fact not unique..

1. By Balaji Kane on

The second part is to account for all cases where EM appear together. Let me see what else I may be missing !

This site uses Akismet to reduce spam. Learn how your comment data is processed.