(SPOILER: result to the question is provided at the link!!!)
The problem is taken from Computer Science Fundamentals quiz.: link to problem
Objective
There are 3 possible places (right shore, boat, left shore) where 4 distinct objects (fox, beans, farmer, goose) can be placed. Calculate the number of possible arrangements. The order of objects at one place does not matter.
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.
I have calculated the solution correctly, but my approach is cumbersome and needs to be more general.
I have listed the possible arrangements without distinguishing the objects.
I have calculated the possibilities for each arrangement.
total = 3 × 1 + 6 × 4 + 3 × 2 4 × 3 + 3 × 2 4 × 3 × 2 = 81
If anybody can provide a more general solution and explanation, it would be much appreciated.