Week 1 Puzzle: Cicada Survival
This week on The Code, Marcus takes a look at the surprising mathematics behind the mating patterns of the Magicicada. These incredible insects take safety in numbers, emerging at precisely coordinated intervals of 13 or 17 years. By appearing in the hundreds of thousands, the risk to each cicada of being eaten is massively reduced - the predators simply aren’t able to eat the cicadas fast enough to pose a significant threat to the population.
This is a survival strategy known as "predator satiation". The key to this strategy is for the cicadas to emerge in such large numbers. For this to happen, the cicadas must maintain their tightly synchronised life cycles.
It is thought that the primality of these life cycles could be the reason for the survival of these broods of Magicicada. Because the period of their emergence is indivisible, the chances of them appearing at the same time as another brood is greatly reduced. This prevents crossbreeding between broods, which could cause the cicadas to appear at a variety of intervals, vastly reducing their numbers at any given time and increasing the threat presented by predators.
We’ve taken this theory as the inspiration for our puzzle for this week. We want you to imagine an environment which contains four broods of cicadas: A, B, C and D.
Brood A emerges every four years, starting in year four.
Brood B emerges every six years, starting in year six.
Brood C emerges every seven years, starting in year seven.
If a brood’s survival is compromised by emerging in the same year as another brood, what is the shortest life cycle Brood D can have and still survive past year 40?
Enter your answer into the Episode 1 Codebreaker on the ‘fourth hand’. Good luck!


Comment number 1.
At 17:35 27th Jul 2011, archie_f wrote:Depends on what "survival is compromised" means.
Does it mean "has a lower chance of surviving" ? (because if it does, there's still a chance that brood D could survive with ANY life cycle)
Or does it mean " has zero chance of surviving", so that if two broods appear in the same year, they both die out completely ? i.e when broods A and B coincide in year 12, both are wiped out and never appear again ? If so, why not say so instead of using ambiguous language ?
Complain about this comment (Comment number 1)
Comment number 2.
At 17:35 27th Jul 2011, Killerbadger wrote:Can you confirm if you can start a brood on a different year to it's emerging year, for example: "Brood D emerges every 2 years starting on year 1"? Thanks
Complain about this comment (Comment number 2)
Comment number 3.
At 18:04 27th Jul 2011, happeecow wrote:I'm just taking it to mean that you have to avoid any other broods, and assume that the pattern is the same ie the start year is the same as the cycle length. Can anyone confirm these rules? Cheers.
Complain about this comment (Comment number 3)
Comment number 4.
At 18:10 27th Jul 2011, happeecow wrote:Actually, now I look at this, I can see that A and B will coincide in year 12 so would therefore both be 'compromised'. If we then knock out A and B thereafter (assuming them dead), it gives us an answer that is NOT one of the options! Why is this? Are we to assume that we can't let nature take its course for Broods A-C?
Complain about this comment (Comment number 4)
Comment number 5.
At 18:53 27th Jul 2011, Hypericus wrote:If "compromised" is taken to mean dies out then the implied "counting from now" means all four broods have emerged in year 0 so none would be left.
So the question is really asking "what is the shortest life cycle Brood D can have and still survive the next 40 years without being compromised?"
This would also mean that broods A and B survive year 12, albeit in a compromised way.
Complain about this comment (Comment number 5)
Comment number 6.
At 19:00 27th Jul 2011, Nick wrote:Killerbadger's question is relevant - otherwise brood D could emerge in year 39 with a 2 year cycle and survive to year 41...
Complain about this comment (Comment number 6)
Comment number 7.
At 22:16 27th Jul 2011, Robin Saunders wrote:I think the setup of the question makes it clear that the answer to Killerbadger's question is "no". In particular, if brood D has a 2-year cycle then it shouldn't be absent for the first 39 years.
Also Hypericus must be right, since as happeecow points out otherwise the correct answer would be one which does not appear.
Complain about this comment (Comment number 7)
Comment number 8.
At 22:25 27th Jul 2011, Julie wrote:"otherwise brood D could emerge in year 39 with a 2 year cycle and survive to year 41..."
But if it had a 2 year cycle, it would also have appeared in years 37, 35, 33, 31, etc
There are 2 different answers to this problem though - we need an answer to Killerbadgers question above.
Complain about this comment (Comment number 8)
Comment number 9.
At 22:33 27th Jul 2011, Julie wrote:"otherwise the correct answer would be one which does not appear."
I disagree.
Complain about this comment (Comment number 9)
Comment number 10.
At 22:37 27th Jul 2011, KenMaynard wrote:With repect to the largest dover sole caught, could Marcus du Sautoy (sorry, not sure of correct title) use the same (normal) distribution to predict how many negative weight dover sole have been caught?
Complain about this comment (Comment number 10)
Comment number 11.
At 22:51 27th Jul 2011, pattayalob wrote:This comment has been referred for further consideration. Explain.
Complain about this comment (Comment number 11)
Comment number 12.
At 22:54 27th Jul 2011, zippyneil wrote:Do we know if the meeting and mating of broods A and B in year 12 won't "cause the cicadas to appear at a variety of intervals"? If it does, the problem has a different solution.
Complain about this comment (Comment number 12)
Comment number 13.
At 22:56 27th Jul 2011, Dhaval10 wrote:This is very simple and no need to complicate things, the answer is 25.
Complain about this comment (Comment number 13)
Comment number 14.
At 23:02 27th Jul 2011, brickie100 wrote:Oh dear, pattayalob, did you have to? Most of the words I'd use to describe you would be moderated out.
Complain about this comment (Comment number 14)
Comment number 15.
At 23:03 27th Jul 2011, Dhaval10 wrote:This comment has been referred for further consideration. Explain.
Complain about this comment (Comment number 15)
Comment number 16.
At 23:41 27th Jul 2011, Simon Kemp wrote:This comment has been referred for further consideration. Explain.
Complain about this comment (Comment number 16)
Comment number 17.
At 10:15 28th Jul 2011, Beersmith wrote:I agree with happeecow @4. A puzzle can be difficult but still be a good puzzle, but I really dislike puzzles that have vague or ambiguous statements or inconsistencies. I too identified an answer not on the list subject to A and B disappearing after year 12. But if and B can appear in the same year and still survive why should D not equally survive even if comprimised?
Complain about this comment (Comment number 17)
Comment number 18.
At 11:25 28th Jul 2011, nuome wrote:think you guys are just over complicating things
Complain about this comment (Comment number 18)
Comment number 19.
At 11:25 28th Jul 2011, stuffy131270 wrote:The methodology for working out this solution is clearly illustrated in episode 1. I think some people just try and look for added complications that just aren't there.
Complain about this comment (Comment number 19)
Comment number 20.
At 12:01 28th Jul 2011, dogsbody wrote:Whilst I appreciate the "you're over-thinking/complicating" the problem comments, surely finding the non-obvious answer (for example the Monty Hall problem) is often part of the fun in logic/maths puzzles?
Even ignoring the possibility that A&B kill each other off in year 12, there is still a perfectly valid non-prime answer based on the wording of the question. If the question required us to use the methodology illustrated in the episode to arrive at a prime answer (by treating year '0' as year dot, as it were, before which there were no cicadas) then it could have been rephrased to say so.
Complain about this comment (Comment number 20)
Comment number 21.
At 12:39 28th Jul 2011, witcheryk wrote:Wouldn't the easiest way to find the solution be to gather all the numbers available in the 'Codebreaker' and choose the most fitting one?... ie 3 6 7 8 9 11 12 17 23 25 28 36 42 47 56..etc
Looks like 11 would be the best as it doesn't hit any multiples of 4 6 or 7 before 40... although I'm tempted to go with the Hitchhikers Guide and choose 42. Its the ultimate answer, afterall.
Complain about this comment (Comment number 21)
Comment number 22.
At 15:43 28th Jul 2011, EmmaGx wrote:@witcheryk ... 9 isn't one of the answers is it? ... think you're looking at 6 upside down ... unless I'm blind ... and I wondered last night why a programme about real world maths highlighted 42 ... now I can see why!
Complain about this comment (Comment number 22)
Comment number 23.
At 16:37 28th Jul 2011, Ross wrote:"This is very simple and no need to complicate things, the answer is 25"
Its 11! :P
Complain about this comment (Comment number 23)
Comment number 24.
At 17:45 28th Jul 2011, James wrote:Considering the Cicada aspect of the show was about prime numbers, I have a suspicion the answer is prime. I was working on it for 30 minutes - but then it hit me. It's obvious when you just look at the numbers. Perhaps try what Marcus du Sautoy did in the video with the grid ;)
Complain about this comment (Comment number 24)
Comment number 25.
At 20:14 28th Jul 2011, manus_coyle wrote:Would the answer be 11 since this is less than 25 suggested above and it is suggested that we look for "primality of these life cycles" ie prime numbers.
Complain about this comment (Comment number 25)
Comment number 26.
At 21:24 28th Jul 2011, geordie_berks wrote:agree with 11 as every other number before it would have coincided with a.n.other broods cycle at some point before 40, thus putting it at risk.
Complain about this comment (Comment number 26)
Comment number 27.
At 02:20 29th Jul 2011, elpaw wrote:The real answer is 8: the brood emerges in years 1, 9, 17, 25, 33, 39 and never encounters another. The rules didn't specify that it has to emerge in year 8 for the first time.
Obviously that is not the answer you are looking for, but you should have worded the puzzle better
Complain about this comment (Comment number 27)
Comment number 28.
At 10:54 29th Jul 2011, ruju wrote:I think the answer is 10, where the brood emerges first on year 9. Later broods will be on years 19, 29, 39. None of these years will be compromised by any other cicada broods.
Complain about this comment (Comment number 28)
Comment number 29.
At 11:16 29th Jul 2011, ruju wrote:elpaw has given a better answer. How did I miss that?
Complain about this comment (Comment number 29)
Comment number 30.
At 17:10 29th Jul 2011, Ted wrote:Re-watching the episode is to be recommended.
I think it makes clear that two cohorts of cicadas hatching simultaneously results in unwanted interbreeding that changes the lifecycles of their offspring. It doesn't result in all the cicadas for that year being wiped out as all cicadas from a cohort will die after mating (and the females after laying their eggs) to produce the next generation in any case.
This is what I understand by the use of the word 'compromised' in this context.
Read it carefully and I think this is all covered in Adrian's post.
Complain about this comment (Comment number 30)
Comment number 31.
At 22:49 29th Jul 2011, geordie_berks wrote:I still think 11 is the answer. One has to adopt a baseline in the absence of one being stipulated, meaning all broods start from the same baseline (and not in say year 1 as others have posted). Brood A then will emerge with other broods (except D) 4 times within the 40yr period. Brood B 3 times and Brood C once. Given then survival is compromised by a single cross breed (Brood C once) one has to conclude no cross breeding can take place if survival were to be guaranteed. Therefore the SHORTEST brood cycle to survive past year 40 is 11 (prime number and whole point of piece on this). 11 could not survive past year 44 because in it's 4th brood cycle it would clash with Brood A (if they were not totally wiped out by then).
Complain about this comment (Comment number 31)
Comment number 32.
At 12:24 30th Jul 2011, Ted wrote:I think it is safe to assume that the puzzle is designed to test your understanding of the maths involved and not the laws of Mendelian genetic inheritance.
Complain about this comment (Comment number 32)
Comment number 33.
At 13:42 31st Jul 2011, DrlngEngr wrote:Nothing ambiguous about it... :)
Complain about this comment (Comment number 33)
Comment number 34.
At 16:28 1st Aug 2011, dnap wrote:11 :) 44th year will not be the good one but respects the "past 40" rule.
Complain about this comment (Comment number 34)
Comment number 35.
At 21:15 12th Aug 2011, rstyle wrote:the solution is to find a number whose least common multiple with any the others 3 numbers is bigger that 40.
Complain about this comment (Comment number 35)