Seven little men

Seven little men live in a little cottage.

Their names are:

  • Dopey
  • Sneezy
  • Bashful
  • Doc
  • Sleepy
  • Grumpy
  • Happy

Outside are seven little stepping stones, each inscribed with one letter which corresponds to the first initial of each of the little men. i.e. They are inscribed with the letters D , S , B , D , S , G , and H .

How many different ways can they stand, one on each stepping stone, so that no one stands on a stepping stone with his first initial on it?

e.g. Dopey can't stand on either of the " D " stepping stones.

Note: Dwarves that have the same first initial are distinguishable, so, for example, if Dopey and Doc trade places, it's a different arrangement.


More permutations problems

Image credit: www.disneyclips.com


The answer is 920.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Geoff Pilling
Jul 3, 2016

This is just like this problem, but the difference is the dwarves are distinguishable, while the letters in GOOFING are not. Therefore, we need to multiply the answer by 4 4 . (Two for each set of distinguishable dwarves with the same initial letter in their name). Therefore the answer is 4 230 = 920 4*230 = \boxed{920}

Ivan Koswara
Jul 4, 2016

While I'm sure there is a way to do this without programming, I'm not sure there is a simpler way to do this without programming. (The only method I can think of is a massive case-by-case proof.) So:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import itertools
count = 0 # our final result
# try every possible permutation; double-counts identical things, but we do want it, because the two D's and two S's are distinguishable
for perm in itertools.permutations("DSBDSGH"):
    for i in range(7):
        if perm[i] == "DSBDSGH"[i]: break # if a dwarf stands on its initial, continue with next iteration
    else: # no dwarf stands on its initial, increment count
        count += 1
print(count)
# prints 920

Ah, very nice, @Ivan Koswara ! :)

Geoff Pilling - 4 years, 11 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...