Hi. I am a member of another forum involved with a game I play. Recently a challenge was set to do the most possible damage without being infinite. I came up with a good answer but I lack the maths knowledge to actually specify the end result of my solution so I'm asking for any help that you can give.
The situation can be characterised as population-growth. Where x is the number in play now, the next step will create 4x-3 new members. Initially there are a small number of steps (11).
I have managed to work out that every step creates five times as many new members as created in the previous step, and also that the total population is approximately 1.25 times the number created in the last step. Therefore after 11 steps there are approx 1.25(x*5^11) members where x is the starting number.
The probelm is that when I run out of steps there is a trick which allows me to repeat the loop another 2n times where n is the number of members in the group at that point.
This trick can be used a few times but not indefinately so it isn't infinite, but as an example I had to work out what 5^(7.94*10^17) was at a very early stage. This was beyond me or my computer...
Does anyone recognise this style of problem? Any help would be very much appreciated.
Let F(i, s) be the population after s steps with an initial population of i
Are you trying to calculate F(F(i, s), 2*F(i, s))?
As the numbers get large, F(i, s) is essentially i*5^s. However, this is too high for small numbers.
If you're after the size of the number and not the exact number, I would use a spreadsheet to calculate the population after 11 steps (call this N). The final population (after 2N more steps) will approximately equal
N*5^(2N) = N*10^(1.4N)
which has approximately
1.4N+1+log(N) digits
So, if you start with a population of 2, after 11 steps, you have N=61035157. After 2N more steps, you have a number that consists of approximately 85449228 digits.
0 Replies
ZZM
1
Reply
Sat 5 Feb, 2005 03:34 am
That's interesting. I didn't know that way of approximating the number of digits.
What I'm after I suppose is if there is a way to define the end result in any way at all (preferably a way a layperson would understand). I appreciate the size of the number makes it difficult to even write down if I did know it.
I have got as far as a point where the population is 3.97*10^17. I now have 7.94*10^17 steps.
If we define x as 3.97*10^17 I can say at the end of those steps I have a population of 1.25(x*5^2x). And now I get to repeat it twice that many times. Gulp. I can say 1.5625(x*5^2x)*5^(2.5(x*5^2x)) but that isn't terrifically useful.
I did have an idea logarithms would help but my understanding of the applications of e is very shaky.
0 Replies
markr
1
Reply
Sat 5 Feb, 2005 12:37 pm
The log in formula is common log (base 10) not natural log (ln, which is base e).
Where are you getting the 1.25 from? You must be starting with 2.
I've taken a closer look. Here's the formula:
F(i, s) = (i - 0.75) * (5^s) + 0.75
I think it is exact.
Also, 5^x = 10^(log(5)*x)
Again, that's common log (approximately 0.69897)
I hope this helps.
0 Replies
ZZM
1
Reply
Sat 5 Feb, 2005 07:10 pm
Yes that's helpful thankyou.
The 1.25 is from the fact that, if x are created at step s, x/5 must have been made in step s-1, x/25 in step s-2 and so on. That is just from knowing that each step adds 5 times as many to the sum as the step before, which is something I simply observed occuring.
So x*1.25 is the sum or the total population at step s. It is actually a number that tends towards 1.25 as far as I can ascertain. 1 + 0.2 + 0.04 + 0.008 + 0.0016 etc.
Anyway, with 5^x, I can translate it into scientific notation the way you showed. That is very useful for making it a little more accessible.
Cheers.
0 Replies
satt fs
1
Reply
Sat 5 Feb, 2005 08:11 pm
For example, y=5^s is as follows..
(n-th step signifies n= s+1, s =0, ...,19 )
You can examine with "log", but exact numbers are available for more..
0 Replies
markr
1
Reply
Sun 6 Feb, 2005 11:26 am
That's nice for "small" numbers. But what about 5^(10^17) as ZZM mentioned in a post? Even if you can compute each digit in only 1 nanosecond, you'll be at it for over two years.
And, if you wanted to print the number in a small font (say 1/20" x 1/20") it would cover (no margins) both sides of over 9*10^11 sheets of paper. That's a stack of paper about 59,000 miles high!
0 Replies
satt fs
1
Reply
Sun 6 Feb, 2005 03:47 pm
You can use logarithm, of course.
If you think about 5^(10^17), then take the common logarithm, i.e.
And hence 5^(10^17) is the number of 69,897,000,433,601,875 digits.
0 Replies
markr
1
Reply
Mon 7 Feb, 2005 12:10 am
I meant exact numbers.
0 Replies
satt fs
1
Reply
Mon 7 Feb, 2005 12:14 am
markr wrote:
I meant exact numbers.
Impossible on a usual computer currently available.
0 Replies
ZZM
1
Reply
Mon 7 Feb, 2005 02:09 am
Cheers for the tips both of you.
Markr - the point made about the stack of paper miles high is well made. I've tried to think about how to apply what you told me about logs to the rest of the progression but truthfully I think I'll just accept it's an extremely large number.
You see the point where I have a population of 3.97*10^17 is a very early stage. If we call that a, I now get to perform the basic step within this stage 2a times.
The population at the end of that can be b, and it is ~ 1.25(a*5^2a).
Then again, c = 1.25(b*5^2b)
Then a larger stage where I get 8c-6 steps instead of just 2c.
So d = 1.25(c*5^(8c-6)).
Again e = 1.25(d*5^(8d-6))
And f = 1.25(e*(5^(8e-6)).
That completes one grand cycle and there are 5 more. It just so happens that the remaining 5 have the same stages as above, but twice as many times each.
Something else I left out earlier for simplicity's sake was at the end of each grand cycle I square the population and add that many new members before beginning the next.
I'm not kidding - I knew it was astronomical but I was hoping perhaps there was a way to approximate the size of the end result. Now though I am happy to just accept it as being huge. Before we get a tiny bit along the first cycle there are less protons in the universe, I've heard! (Though I can't make any claims about the truth of that.)
Thanks very much for your help though. I am glad to know about the tricks with log.
0 Replies
markr
1
Reply
Mon 7 Feb, 2005 09:53 am
satt_fs wrote:
markr wrote:
I meant exact numbers.
Impossible on a usual computer currently available.
My point exactly.
0 Replies
Vengoropatubus
1
Reply
Mon 7 Feb, 2005 07:20 pm
Isn't this essentially a problem of the limit of f(x) as x approaches infinity where f(x)=ab^x (because it's geometric) and b is greater than 1 (because it's increasing). I'm not seeing any other factors that would limit the growth so wouldn't the population just increase without bound?
0 Replies
satt fs
1
Reply
Mon 7 Feb, 2005 07:31 pm
Vengoropatubus wrote:
.. b is greater than 1
If b is greater than 1, the function f(x) diverges as x tends to infinity, while it converges to zero if b is less than 1. If b is unity, the value remains constant.
0 Replies
Vengoropatubus
1
Reply
Mon 7 Feb, 2005 08:35 pm
Are you suggesting that b be complex? I don't really see how that would change anything... but I haven't thought about it much. And can't be 1 because then it would stay the same.
0 Replies
satt fs
1
Reply
Mon 7 Feb, 2005 08:42 pm
No, I used the wording of b being a positive real number. When b is complex, one should use another wording: "modulus of b" is grater than (smaller than, or equal to) 1.
0 Replies
markr
1
Reply
Mon 7 Feb, 2005 10:33 pm
Vengoropatubus wrote:
Isn't this essentially a problem of the limit of f(x) as x approaches infinity where f(x)=ab^x (because it's geometric) and b is greater than 1 (because it's increasing). I'm not seeing any other factors that would limit the growth so wouldn't the population just increase without bound?
It is bounded in this particular case because there are a finite number of steps to ZZM's algorithm.
0 Replies
Vengoropatubus
1
Reply
Tue 8 Feb, 2005 06:05 pm
markr wrote:
Vengoropatubus wrote:
Isn't this essentially a problem of the limit of f(x) as x approaches infinity where f(x)=ab^x (because it's geometric) and b is greater than 1 (because it's increasing). I'm not seeing any other factors that would limit the growth so wouldn't the population just increase without bound?
It is bounded in this particular case because there are a finite number of steps to ZZM's algorithm.
I see. I missed the part where he said there were only 11 steps.