You are the first officer aboard the Starship Enterpuzz, and moments after your captain departs for his week-long vacation, you discover that your ship is infested with tiny creatures called doorples.
Doorples come in two varieties: black and red. Both varieties love doors but hate each other.
Knowing that doorples multiply rapidly, you scour the ship and capture all doorples accessible to you, but there are still 16 doorples in a series of 11 rooms inaccessible to you and the crew, as shown below.
The room in blue is a room you can access, but only doorples can pass in and out through the blue doors to the 11 rooms.
During the day, doorples sleep. But when evening comes, they become active and the following sequence of events takes place:
Doorples love passing through doors, and so all the doorples in a room will pass through a door into an adjacent room. If there is only one door, all doorples will pass through that door. If there are two doors, half of the doorples will pass through each one. If there are three doors, a third will pass through each one, etc. All doorples migrate at the same time.
Once the doorples are in their new rooms, if there are both black and red doorples in the same room, they fight. Each red doorple fights one black doorple and the two doorples eliminate each other. As many doorples as possible pair off in this way so that only one variety of doorple remains in the room (or all the doorples are dead).
After all the fights are resolved, the doorples reproduce. Doorples are doorsexual and reproduce in the presence of doors. Doorples in a room with one door won't reproduce, but each doorple in a room with two doors will split into two identical copies of itself, each doorple in a room with three doors will split into three identical copies of itself, etc.
Once reproduction is complete, the doorples settle in for the coming day and go back to sleep.
Since the rooms are inaccessible, the only way to eliminate the doorples is i) by capturing any that come in though the two blue doors during the nightly migration, and ii) by releasing new doorples through these doors during the migration.
Fortunately, you have a huge supply of both black and red doorples to work with. Every evening, you can send as many of either variety through the north door and as many of either variety through the east door as you wish.
Your goal is to eliminate every last one of the doorples in all 11 rooms, since even one doorple can quickly become a million if left unattended.
Can you figure out a strategy to eliminate all the doorples?
And for bonus credit: Can you figure out a strategy to eliminate all the doorples before the captain returns in a week (7 days)?
Good luck, first officer. You'll need it!