You belong to an intelligence agency that is monitoring some terrorists. There are three of them in the Hideout A with three hostages and a bomb. Unfortunately, this hideout is extremely secure. But there is a chance to get them: inside informants report that they are leaving for the Hideout B in the next morning. As soon as they get all there (terrorists and hostages), the agency is going to surprise them. What you know is:
- There are 3 terrorists, 3 hostages and 1 bomb to be transported;
- They only have one horse that will transport them from Hideout A to Hideout B or back, if needed;
- The horse needs a rider (terrorist or hostage) to move;
- The horse only supports 2 persons, or 1 person and the bomb;
- The journey takes the whole day, and the horse needs to rest until the next morning;
- If there are more hostages than terrorists in one hideout, they will fight, so the terrorists will plan to avoid this. Hostages alone are permitted, though;
- The hostages cannot escape in the desert, so they will ride the horse to the correct hideout as requested.
So, assuming that the terrorists are perfect strategists, what would be the minimum number of days for them to leave completely the Hideout A and move all (terrorists, hostages and the bomb) to the Hideout B?