The Ladies from U.N.K.A.L.
Published in Brain Teasers
With each arrangement considered identical to its reverse, there are 126 possible arrangements.
FKO are interchangeable, and can be arranged 6 ways. FKO stays together unless N is next to M outside GLM (more on that below).
JH must be together, and J must be at the end, because H is the only other Russian speaker. JH has 2 slots in the above configuration (H next to FKO, with J on the outside).
GLM has 1 slot in the above configuration (G next to FKO, opposite JH).
2[JH]*6[FKO]*1[MLG]=12 arrangements, or 2 mirror groups of 6 arrangements each. Thus, 6 distinct arrangements - 1 for each FKO order.
Keeping the above groups self-contained, N has 5 slots (2 within FKO, 1 between FKO and H, 1 between FKO and G, 1 beside M). That makes 30 arrangements - 5 for each FKO order.
When N is in certain positions, however, the groups can break up. Unless N is next to M outside GLM, GLM can be GML. If N is between FKO and GLM, GLM can scramble, and G can be anywhere touching FKO, except N cannot touch L. When G-[L/M]-N are consecutive in either direction, FKO can straddle that subgroup. That makes 126 arrangements - 21 for each FKO order.
Here are the 21 arrangements, using xxx for the interchangeable FKO.
JHNxxxGLM, JHNxxxGML, JHxNxxGLM, JHxNxxGML
JHxxNxGLM, JHxxNxGML, JHxxxNGLM, JHxxxNGML
JHxxxNMGL, JHxxxNMLG, JHxxNMLGx, JHxNMLGxx
JHNMLGxxx, JHxxxGLMN, JHxxGLMNx, JHxGLMNxx
JHGLMNxxx, JHGxxxNML, JHxGxxNML, JHxxGxNML
JHxxxGNML
By 'Mad' Ade Bozzay, courtesy of Braingle.com.