$6$ people, $3$ rooms, $1$ opening door $6$ people spread in $3$ distinguishable rooms, every room needs one person who opens the door.
There are ${6 \choose 3}\cdot 3 \cdot 2$ options to choose the three door opener persons and let them open one certain room, so that every room is opened by one person.
Further, there are then $3$ options to have all left three guys in one of the rooms, $3\cdot 2$ options to have exactly one other guy in every room, and ${3 choose 2}\cdot 3 \cdot 2$ options to have one guy in one room, two in the other and none in the last room.
So in total there are ${6 \choose 3}\cdot 3 \cdot 2 \cdot 3 \cdot 3 \cdot 2 {3 \choose 2} \cdot 3 \cdot 2$ options to have all rooms opened by exactly one person and spread the others in these rooms.
If only there are 3 people who can open the doors (only they have keys for all the rooms). There are only $3 \cdot 2 \cdot 3 \cdot 3 \cdot 2 {3 \choose 2} \cdot 3 \cdot 2$ options left, right?

Answer would be different if interpreted like this. Instead of designating a person as a "door-man" if it were that any-person inside the room could open the door (and ofcourse there has to be someone inside to open the room) The solution would be as follows.
3^6 - (possibilities one or two rooms could be empty)
Exactly 2 rooms could be empty = Just 3 ways.
Exactly 1 room could be empty = 3C1 * (2^6 - 2) = 186 ways.
Therfore the asnwer is 729 - 3 - 186 = 540 ways.
Please confirm this.
Warm Regards,
Shanky
