+ 13
The Greenfly Problem? Can you solve it?
After one week of life a long female can produce 8 offspring a day. Starting at the beginning of day 1 with single mature female, how many greenfly could there be by the end of day 28? *There are no deaths *All offspring are females Note that at the end of day 1 there will be 9 greenfly (original + 8 offspring). At the end of day 7 there will be 57 greenfly (original + 8*7 offspring). At the end of day 8 there will be 129 (original +8*8 + 64)offspring from the daughter produced on day 1.
9 Réponses
+ 9
all offspring are females
+ 8
ok answer is 1,161,889 ...
+ 6
ok you can ask for answer
+ 3
Maybe this helps
Day 1: 1
Day 7: 1+8
Day 8: 1+8 + 8
Day 9: 1+(Day-6)×8
...
Day 14: 1+(Day-6)×8 + 8×8
Day 15: 1+(Day-6)×8 + 8×(2*8)
Day 16: 1+(Day-6)×8+(Day-13)×8^2
...
Day 21: 1+(Day-6)×8+(Day-13)×8^2+8^2×8
Day 22: 1+(Day-6)×8+(Day-13)×8^2+8^2×8×2
Day 23: 1+(Day-6)×8+(Day-13)×8^2+(Day-20)×8^3
...
Day 28: 1+(Day-6)×8+(Day-13)×8^2+(Day-20)×8^3+8^4
Inserting 28 in Day there are 9329 Greenflys
+ 1
And three years later someone gave the answer
https://code.sololearn.com/cV6Dq9rHl7T9/?ref=app
0
After some calculations I made in my mind, I'll go with 435. Nevermind, I'm wrong because I only calculated down to the 2nd generation of greenflies.
0
@Abhishek Pun
Is it 1,866,145? I will post the code if you tell me that it's correct.
0
I only wanted to know if I was right or wrong... But still, I will try to fix my code and get it correctly
- 1
Only 9 because there are no males to mate with. Dont know if it was a trick question but ill stick with it lol