Author 
Message 
AMindForeverVoyaging
Forum Admin
Joined: 28 May 2011 Posts: 471 Location: Germany 





I think the page you get after solving a challenge points you to the Challenges form instead of the Challenges Solved one 
Quite certainly not in every case, but for some challenges this seems to be what is happening.


Tue Apr 16, 2013 9:53 pm 


meis
Joined: 28 Aug 2012 Posts: 13 Location: Italy 



I'm sorry, but I can't get how could in 8 days be 47 population. I have written a script which gives:
day: 1  bacts: 0,1,0,0,0  sum: 1
day: 2  bacts: 1,0,1,0,0  sum: 2
day: 3  bacts: 1,1,0,1,0  sum: 3
day: 4  bacts: 1,1,1,0,1  sum: 4
day: 5  bacts: 2,1,1,1,0  sum: 5
day: 6  bacts: 2,2,1,1,1  sum: 7
day: 7  bacts: 3,2,2,1,1  sum: 9
day: 8  bacts: 4,3,2,2,1  sum: 12
day: 9  bacts: 5,4,3,2,2  sum: 16
the array of bacts is the succession of days (batters at 1st day of life, batters at 2nd etc...)
What have I done wrong?
p.s. day 0 is 1,0,0,0,0


Sat Apr 27, 2013 5:27 pm 


meis
Joined: 28 Aug 2012 Posts: 13 Location: Italy 



Oh, now I get it, I've made a mistake in the understanding of the moment of the reproduction. Done


Fri May 03, 2013 2:44 pm 


Luk.Online
Joined: 17 Oct 2010 Posts: 3




I think I've programmed the correct algorithm, but is the only way to figure out the answer by iterate


while (amount < 1000000000000); 
???


Tue Jun 04, 2013 6:45 pm 


CodeX
Joined: 17 Oct 2008 Posts: 350






I think I've programmed the correct algorithm, but is the only way to figure out the answer by iterate


while (amount < 1000000000000); 
??? 
I'm not going to Fib, Lucas can solve it with a closedform equation.


Tue Jun 04, 2013 7:41 pm 


Luk.Online
Joined: 17 Oct 2010 Posts: 3




I've got an equation for the growth but not for the death...
But when I've got one for the death, can I subtract them?


Tue Jun 04, 2013 8:42 pm 


FrostyHacks
Joined: 29 Jun 2015 Posts: 1




My solution to this was simply to write a C# app and keep track of the number of bacteria on each specific day.
So each day iteration would basically be the number of day 5 bacteria (those dead) increased by the amount from the previous day, so day 4 become day 5, day 3 become day 4, day 2 become day 3, day 1 become day 2, and day 1 is the addition of day 2+3 since those days result in new bacteria.
The total alive is just day 1+2+3+4 and the total dead is just the size of day 5
The code looks like this, you can simply hit enter to generate each new day and you'll see the totals and then skip through the days until you reach one high enough, or you could modify the code to just keep looping until the total count condition is met, I made this more general, you can put a different starting number in for example.
[Code removed by moderator]


Mon Jun 29, 2015 10:51 am 


AMindForeverVoyaging
Forum Admin
Joined: 28 May 2011 Posts: 471 Location: Germany 



FrostyHacks, you are not supposed to post a complete solution in this section of the forum. That's what the "Challenges Solved" section is for. There, only the people who have solved a challenge can read the thread for that challenge. So it's perfectly fine to post all of your solutions there.


Sat Jul 04, 2015 7:30 am 


Bwill
Joined: 08 Sep 2015 Posts: 1




So I just solved this using


while (population < 1000000000000)
growBacteria()
...

Yet I am curious about the "simple algebraic" and Fibonacci solutions, anyone mind PMing me those solutions?


Wed Nov 11, 2015 6:55 am 


eulerscheZahl
Joined: 29 Nov 2012 Posts: 55 Location: Germany 


Wed Nov 11, 2015 6:47 pm 




You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum


