As a wildfire rages through the grasslands, three lions and three wildebeest flee for their lives. To escape the inferno, they must cross over to the left bank of a crocodile-infested river. Fortunately, there happens to be a raft nearby. It can carry up to two animals at a time, and needs as least one lion or wildebeest on board to row it across the river. There's just one problem. If the lions ever outnumber the wildebeest on either side of the river, even for a moment, their instincts will kick in, and the results won't be pretty. That includes the animals in the boat when it's on a given side of the river. What's the fastest way for all six animals to get across without the lions stopping for dinner? Pause here if you want to figure it out for yourself. Answer in: 3 Answer in: 2 Answer in: 1 If you feel stuck on a problem like this, try listing all the decisions you can make at each point, and the consequences each choice leads to. For instance, there are five options for who goes across first: one wildebeest, one lion, two wildebeest, two lions, or one of each. If one animal goes alone, it'll just have to come straight back. And if two wildebeest cross first, the remaining one will immediately get eaten. So those options are all out. Sending two lions, or one of each animal, can actually both lead to solutions in the same number of moves. For the sake of time, we'll focus on the second one. One of each animal crosses. Now, if the wildebeest stays and the lion returns, there will be three lions on the right bank. Bad news for the two remaining wildebeest. So we need to have the lion stay on the left bank and the wildebeest go back to the right. Now we have the same five options, but with one lion already on the left bank. If two wildebeest go, the one that stays will get eaten, and if one of each animal goes, the wildebeest on the raft will be outnumbered as soon as it reaches the other side. So that's a dead end, which means that at the third crossing, only the two lions can go. One gets dropped off, leaving two lions on the left bank. The third lion takes the raft back to the right bank where the wildebeest are waiting. What now? Well, since we've got two lions waiting on the left bank, the only option is for two wildebeest to cross. Next, there's no sense in two wildebeest going back, since that just reverses the last step. And if two lions go back, they'll outnumber the wildebeest on the right bank. So one lion and one wildebeest take the raft back leaving us with one of each animal on the left bank and two of each on the right. Again, there's no point in sending the lion-wildebeest pair back, so the next trip should be either a pair of lions or a pair of wildebeest. If the lions go, they'd eat the wildebeest on the left, so they stay, and the two wildebeest cross instead. Now we're quite close because the wildebeest are all where they need to be with safety in numbers. All that's left is for that one lion to raft back and bring his fellow lions over one by one. That makes eleven trips total, the smallest number needed to get everyone across safely. The solution that involves sending both lions on the first step works similarly, and also takes eleven crossings. The six animals escape unharmed from the fire just in time and begin their new lives across the river. Of course, now that the danger's passed, it remains to be seen how long their unlikely alliance will last.
Mentre un incendio infuria nelle praterie, tre leoni e tre gnu scappano per salvarsi. Per scampare all'inferno, devono oltrepassare un fiume pieno di coccodrilli. Fortunatamente, si imbattono in una zattera lì vicino. Questa può trasportare due animali alla volta, e ha bisogno a bordo di almeno un leone o uno gnu per remare dall'altra parte del fiume. C'è soltanto un problema. Se i leoni superano il numero degli gnu su ciascuna riva del fiume, anche solo per un istante, i loro istinti prevarranno e il risultato non sarà piacevole. Ciò comprende gli animali sulla zattera arrivati sulla riva giusta. Qual è il modo più veloce per gli animali di oltrepassare evitando ai leoni di fermarsi per cena? Fermati qui se vuoi rifletterci da solo. Rispondi in: 3 Rispondi in: 2 Rispondi in: 1 Se ti senti bloccato su questo problema, prova a fare una lista delle decisioni che puoi prendere ad ogni punto, e delle conseguenze che ogni scelta comporta. Per esempio, ci sono cinque possibilità per chi attraversa per primo: uno gnu, un leone, due gnu, due leoni, o uno per tipo. Se un animale va da solo, dovrà tornare subito indietro. E se due gnu attraversano per primi, quello che rimane sarà subito divorato. Pertanto queste scelte sono fuori discussione. Mandare due leoni, o un animale per tipo, può infatti risolvere la situazione con lo stesso numero di mosse. Per motivi di tempo, ci soffermeremo sulla seconda. Attraversa un animale per tipo. Ora, se lo gnu resta e il leone ritorna, ci saranno tre leoni sulla riva destra. Cattive notizie per gli gnu che rimangono. Perciò occorre che il leone resti sulla riva sinistra e lo gnu faccia ritorno su quella destra. Ora abbiamo le stesse cinque possibilità, ma con un leone già sulla riva sinistra. Se vanno due gnu, quello che rimane verrà mangiato, e se va un animale per specie, lo gnu sulla zattera sarà numericamente inferiore non appena raggiungerà l'altra sponda. Ecco il vicolo cieco, ciò significa che al terzo passaggio, solo i due leoni potranno andare. Uno scenderà, lasciando due leoni sulla riva sinistra. Il terzo leone porterà la zattera indietro sulla riva destra dove gli gnu stanno aspettando. E ora? Bene, siccome abbiamo due leoni sulla riva sinistra, l'unica possibilità per i due gnu è di attraversare. Poi, non ha senso che i due gnu ritornino, perché annullerebbe l'ultimo passaggio. Se i due leoni tornano indietro, supereranno numericamente gli gnu sulla riva destra. Così un leone e uno gnu portano indietro la zattera lasciando un animale per specie sulla riva sinistra e due su quella destra. Di nuovo, non ha senso mandare indietro la coppia leone-gnu, così il viaggio seguente dovrebbe essere o una coppia di leoni o una coppia di gnu. Se vanno i leoni, mangerebbero gli gnu sulla sinistra, quindi rimangono e vanno invece gli gnu. Ora siamo quasi alla fine perché gli gnu sono dove devono essere al sicuro come numero. Quello che rimane è il leone a traghettare e portare i suoi compagni uno a uno. Questo totalizza undici viaggi in tutto, il numero minimo necessario per far attraversare tutti in sicurezza. Funziona uguale la soluzione con due leoni al primo passaggio, e impiega sempre undici attraversamenti. I sei animali scappano incolumi al fuoco giusto in tempo e iniziano la loro nuova vita al di là del fiume. Naturalmente ora che il pericolo è passato, rimane da vedere quanto durerà la loro improbabile alleanza.