After years of experiments, you’ve finally created the pets of the future– nano-rabbits! They’re tiny, they’re fuzzy… and they multiply faster than the eye can see.
Após anos de experimentos, você finalmente criou os bichinhos de estimação do futuro -- os nanocoelhos! Eles são miudinhos, peludinhos e se multiplicam mais rápido do que os olhos conseguem acompanhar.
In your lab there are 36 habitat cells, arranged in an inverted pyramid, with 8 cells in the top row. The first has one rabbit, the second has two, and so on, with eight rabbits in the last one. The other rows of cells are empty… for now. The rabbits are hermaphroditic, and each rabbit in a given cell will breed once with every rabbit in the horizontally adjacent cells, producing exactly one offspring each time. The newborn rabbits will drop into the cell directly below the two cells of its parents, and within minutes will mature and reproduce in turn. Each cell can hold 10^80 nano-rabbits – that’s a 1 followed by 80 zeros – before they break free and overrun the world. Your calculations have given you a 46-digit number for the count of rabbits in the bottom cell– plenty of room to spare.
No seu laboratório, existem 36 células habitat dispostas numa pirâmide invertida, com 8 células na fileira de cima. A primeira possui um coelho, a segunda, dois, e assim por diante, até chegar à última, com oito coelhos. As outras fileiras de células estão vazias... por enquanto. Os coelhos são hermafroditas, e cada coelho de cada célula vai se acasalar uma vez com todos os coelhos das células horizontais adjacentes, produzindo uma única cria por vez. Os coelhinhos recém-nascidos vão cair na célula diretamente abaixo das duas células dos pais e, dentro de minutos, vão virar adultos e se reproduzir também. Cada célula pode abrigar até 10^80 nanocoelhos –- que é o algarismo 1 seguido de 80 zeros -- pois, se houver mais do que isso, eles vão fugir e invadir o mundo. Pelos seus cálculos, você vai obter um número de 46 dígitos na contagem dos coelhos na célula de baixo -- ou seja, há espaço suficiente.
But just as you pull the lever to start the experiment, your assistant runs in with terrible news. A rival lab has sabotaged your code so that all the zeros at the end of your results got cut off. That means you don’t actually know if the bottom cell will be able to hold all the rabbits – and the reproduction is already underway! To make matters worse, your devices and calculators are all malfunctioning, so you only have a few minutes to work it out by hand. How many trailing zeros should there be at the end of the count of rabbits in the bottom habitat? And do you need to pull the emergency shut-down lever?
Mas, quando você vai puxar a alavanca para iniciar o experimento, seu assistente entra correndo com notícias terríveis. Um laboratório rival sabotou o seu código, de modo a cortar todos os zeros no final de seus resultados. Isso significa que você não sabe se a célula de baixo vai ser capaz de abrigar todos os coelhos -- e a reprodução já está em curso. Para piorar as coisas, seus aparelhos e suas calculadoras não estão funcionando bem e, por isso, você tem só alguns minutos pra fazer isso a mão. Quantos zeros à direita deve haver no final da contagem dos coelhos na parte de baixo do habitat? Será que você vai precisar puxar a alavanca de emergência?
Pause the video now if you want to figure it out for yourself.
{Pause o vídeo agora caso queira descobrir a resposta você mesmo.
Answer in 3
Resposta em: três.
Answer in 2
Resposta em: dois.
Answer in 1
Resposta em: um.]
There isn’t enough time to calculate the exact number of rabbits in the final cell. The good news is we don’t need to. All we need to figure out is how many trailing zeros it has.
Não há tempo para calcular o número exato de coelhos na última célula. Mas, felizmente, isso não vai ser preciso. Tudo o que precisamos descobrir é quantos zeros à direita ele vai ter.
But how can we know how many trailing zeros a number has without calculating the number itself? What we do know is that we arrive at the number of rabbits in the bottom cell through a process of multiplication – literally. The number of rabbits in each cell is the product of the number of rabbits in each of the two cells above it. And there are only two ways to get numbers with trailing zeros through multiplication: either multiplying a number ending in 5 by any even number, or by multiplying numbers that have trailing zeroes themselves.
Mas como descobrir quantos zeros à direita tem um número sem calcular o próprio número? O que sabemos é que vamos chegar ao número de coelhos da última célula através de um processo de multiplicação -- literalmente. O número de coelhos em cada célula é o produto do número de coelhos em cada uma das células acima dela. E há apenas duas maneiras de se conseguir números com zeros à direita através da multiplicação: multiplicando um número terminado em cinco por qualquer número par ou multiplicando números com zeros à direita por eles mesmos.
Let’s calculate the number of rabbits in the second row and see what patterns emerge. Two of the numbers have trailing zeros – 20 rabbits in the fourth cell and 30 in the fifth cell. But there are no numbers ending in 5. And since the only way to get a number ending in 5 through multiplication is by starting with a number ending in 5, there won’t be any more down the line either. That means we only need to worry about the numbers that have trailing zeros themselves. And a neat trick to figure out the amount of trailing zeros in a product is to count and add the trailing zeros in each of the factors – for example, 10 x 100 = 1,000.
Vamos calcular o número de coelhos na segunda fileira e ver o padrão que vai surgir. Dois dos números têm zeros à direita -- 20 coelhos na quarta, e 30 na quinta célula. Mas não há números terminados em cinco. E como o único jeito de se obter um número terminado em cinco por meio da multiplicação é começar com um número terminado em cinco, não vai haver mais dali pra frente. Isso significa que temos de nos preocupar só com os números que têm zeros à direita. Um truque para se descobrir a quantidade de zeros à direita num produto é contar e adicionar os zeros à direita em cada um dos fatores -- por exemplo, 10 x 100 = 1.000.
So let’s take the numbers in the fourth and fifth cells and multiply down from there. 20 and 30 each have one zero, so the product of both cells will have two trailing zeros, while the product of either cell and an adjacent non-zero-ending cell will have only one. When we continue all the way down, we end up with 35 zeros in the bottom cell. And if you’re not too stressed about the potential nano-rabbit apocalypse, you might notice that counting the zeros this way forms part of Pascal’s triangle.
Assim, vamos pegar os números da quarta e da quinta célula e multiplicar dali pra baixo. Os números 20 e 30 têm um zero cada, assim, o produto de ambas as células terá dois zeros à direita, enquanto o produto de qualquer célula ou da adjacente não terminada em zero terá apenas um. Quando vamos até o final, terminamos com 35 zeros na última célula. E se você não se estressou com o potencial apocalipse dos nanocoelhos, deve ter reparado que contar os zeros desse jeito forma parte do triângulo de Pascal.
Adding those 35 zeros to the 46 digit number we had before yields an 81 digit number – too big for the habitat to contain! You rush over and pull the emergency switch just as the seventh generation of rabbits was about to mature – hare-raisingly close to disaster.
Adicionar esses 35 zeros ao número de 45 dígitos que tínhamos antes produz um número de 81 dígitos -- grande demais pra caber no habitat! Aí, você corre e puxa a alavanca de emergência bem na horinha em que a sétima geração de coelhos estiver quase maturando, evitando assim um desastre.