<< Newer
Articles
Older >>
Articles

Compilers ignore comments!

Friday, June 10, 2011
Until I get more creative, here's something interesting.

It is a comment I made here: Cicadas: ready for prime time. At the time of publishing this post it is still awaiting approval.

The article talks about a particular variety of cicadas who show up only every 13 year and are currently screeching/chirping around in Alabama and Arkansas (USA states). The author explains one existing theory why they show up after such a strange number of years. I just added my two pennies worth. Here's my nerdy comment. Have fun ;)!

"Cool explanation. I thought a little about it, thought I would present the thoughts to maybe make this 'more complete' or at least add food for thought.

I think LCM (Lowest Common Multiple, since different people learnt different names for it in school) has a very important part in this, even more than a prime. The LCM of two numbers is their product if they have no factors in common.

e.g.
6 & 7 - no factors common. LCM is 42 (6X7)
6 & 9 - 3 is common factor, so LCM = 18 (6X3 or 9X2) is smaller than above even though 9 is larger than 7

So if our 13 year friend has 39 year cycle predator, every generation of the predator would still get a nice cicada buffet, even though that would be every third cicada generation.

On other hand, if our cicada had a 10 (2*5) year cycle, which is definitely not a prime, the twain shall meet every (2 * 5 * 3 * 13) ie 390 years!!! that way 38 cicada generations would heave a sigh of relief, and every 39th would be screwed. But that 'years of peace' is just the direct advantage. Additinally, the same predator's 9 generations would be devoid of cicada. If cicada were vital to their survival, they might be very dwindled in numbers, if not gone totally extinct. So more reasons for the 39th cicada generation to rejoice!

  --->So, if the cicada is looking at saving itself from just ONE particular predator ( as your article says "these loud insects are trying to evade A predator"), it would get maximum advantage by 1) having a life cycle years number which has no factors common with predator life cycle years number, even if it is not a prime. 2) Within constraints of condition 1, having as large cycle as possible.

But, therein comes the statistical aspect, and an important one. Does the cicada have to worry about just one predator? Most likely, no. And even if yes, does the cicada/nature know what the life cycle of this predator is? Again, we could lean in favour of no. In such a 'blind' or 'random' case, cicada's best option is to go for a prime number, because it can only have factors common with predator if the predator's cycle is a multiple of it's cycle. I that case, the twain shall meet at every preadtor generation (tough luck!) for such special 'multilple of cicada year's predator, and will meet at large intervals (product of cicada & predator's cycle years) for every other predator!!!

  --->So yeah, that way primes are best, if we don't know the predator's nature!

And hopefully, the things the cicadas eat do grow every year, otherwise such prime cicada's would hit puberty, come out happy to find no predators, and die hungry!!

Also, this theory makes sense only if, the 'adult cicada' eating preadtors themselves are in a biological state of feeding on cicadas for only 1 year (or such short duration of time that the cicadas are out)

Otherwise, say the cicada has 13 year cycle, and predator has 30 year cycle. Mathematician will predict many happy care-free generations for the cicada, (13 * 30 = 390, so only 390th generation needs to worry). But suppose out of those 30 years, the predator is in a state that can feed on cicadas for 5 years (adulthood suppose). Then well, the cicada and this theory are both screwed. Like this...

say year 0 of the cicada (13th year of last generation) was year 0 of predator (25th year of last generation). Then in the 13th year 1st generation cicadas are safe. But in the very next generation ie. in the 26th year, the cicadas are out just when the predator starts feeding! Shit! So if the predator has a large 'feeding band' of years, prime or its neighbour non prime would not make heck of a difference. cicadas with 13, 14 or 15 years cycle would be toast in their second generation. Rather the cicadas with 12 year cycle (non prime) will be safe at least in second generation. This is just a knee jerk thought, and a very conveniently picked example to illustrate it. I have yet to think whether primes still cope better with such 'band feeding duration' predators in the long run. I think in this case the optimum number might be a function of the 'ideal cicada prime' (if predator was not banded duration feeded), the predator cycle, and the predator feeding band years. Just an intuition. Maybe will work on it later, maybe not."



<< Newer
Articles
Older >>
Articles

2 comments :

  1. Glad for the deeper analysis! Thanks. This further thinking you've put into this is exactly what I hoped to do with my column. Your LCM reasoning leads to the conclusion that the two life-cycles need to be relatively prime.

    ReplyDelete
  2. This is the looooooooooooongeest post i have read (read as seen) of yours.

    ReplyDelete