.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

The Falklands War: 1982- Save $9.00
winSPMBT: Main Battle Tank- Save $5.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

Reply
 
Thread Tools Display Modes
  #1  
Old September 22nd, 2004, 03:58 AM
Will's Avatar

Will Will is offline
Lieutenant Colonel
 
Join Date: Mar 2001
Location: Emeryville, CA
Posts: 1,412
Thanks: 0
Thanked 0 Times in 0 Posts
Will is on a distinguished road
Default Re: OT: Interesting math problem...

Narf, the equation means you take the constant e (2.71828183...) to the power of one half times the natural logarithm of x, or log base e of x. It doesn't have to be e though, you can get away with something like 10. So, 10^(0.5 * log(x)). It works because of the laws of logarithms, since a^b=c is equivalent to log(a)(c)=b. Then, it is simple to reconstruct as a^(log(a)(c))=c. Square root is simply a number to the one half power, so 10^(0.5 * log(x)) is the sqrt(x).

Either way, you're left with pretty much imprecise methods. I remember they briefly showed how to do it in high school, and that's probably an algorithm like the one Fyron pointed to, and it would be written in an equation as the Riemann sum of varying powers of 10, which would be a very nasty looking thing. Jack's method is easier to write, so I would go with that one. To write it in terms of an equation for square root, it would be something like:

lim(x->&#8734 R(x,N) = sqrt(N)

--edit: ^ that up there is supposed to be the infinity symbol.
__________________
GEEK CODE V.3.12: GCS/E d-- s: a-- C++ US+ P+ L++ E--- W+++ N+ !o? K- w-- !O M++ V? PS+ PE Y+ PGP t- 5++ X R !tv-- b+++ DI++ D+ G+ e+++ h !r*-- y?
SE4 CODE: A-- Se+++* GdY $?/++ Fr! C++* Css Sf Ai Au- M+ MpN S Ss- RV Pw- Fq-- Nd Rp+ G- Mm++ Bb@ Tcp- L+
Reply With Quote
  #2  
Old September 21st, 2004, 04:41 PM
Will's Avatar

Will Will is offline
Lieutenant Colonel
 
Join Date: Mar 2001
Location: Emeryville, CA
Posts: 1,412
Thanks: 0
Thanked 0 Times in 0 Posts
Will is on a distinguished road
Default Re: OT: Interesting math problem...

A more rigorous "proof", took me about five minutes before I went to class, posting it now after class:

Code:
 TRIED
+DRIVE
------
RIVET

Assuming we disregard the trivial solution (all zeros), and
force each letter to be distinct (ie for any x and y in
{T,R,I,E,D,V}, the values x != y), and noticing that the
carry can be at most 1 (9 + 9 + 1 = 19):

either E + V = E (V = 0)
or E + V + 1 = E (V = 9)
disregard V = 0 as uninteresting, so V = 9
and D + E > 10 and T < D, T < E
either I + I = V = 9
or I + I + 1 = V = 9
I + I != 9, so I + I + 1 = V is true
so I = {4,9}, but V = 9, so I = 4
so R + R = I = 4 (no carry from previous digit)
then R = {2,7}
V = 9, I = 4, R = {2,7}
either T + D = R = 2
or T + D + 1 = R = 7
assume there is no final carry
so if T + D = 2, then T = D = 1
then T + D + 1 = 7 = R
then T < (7 - D)
V = 9, I = 4, R = 7, T < (7 - D), T < E
try T = 1:
V = 9, I = 4, R = 7, T = 1, D = 5, E = 6

__________________
GEEK CODE V.3.12: GCS/E d-- s: a-- C++ US+ P+ L++ E--- W+++ N+ !o? K- w-- !O M++ V? PS+ PE Y+ PGP t- 5++ X R !tv-- b+++ DI++ D+ G+ e+++ h !r*-- y?
SE4 CODE: A-- Se+++* GdY $?/++ Fr! C++* Css Sf Ai Au- M+ MpN S Ss- RV Pw- Fq-- Nd Rp+ G- Mm++ Bb@ Tcp- L+
Reply With Quote
  #3  
Old September 21st, 2004, 05:44 PM
Suicide Junkie's Avatar
Suicide Junkie Suicide Junkie is offline
Shrapnel Fanatic
 
Join Date: Feb 2001
Location: Waterloo, Ontario, Canada
Posts: 11,451
Thanks: 1
Thanked 4 Times in 4 Posts
Suicide Junkie is on a distinguished road
Default Re: OT: Interesting math problem...

Here is a tough one:
Fill in the long division using the blanks and the given numbers.
Code:

_ _ 8 _
_______________
_ _ _ | _ _ _ _ _ _ 5
_ _ _ _
========
_ _ _ _
_ _ _
========
_ _ _ _
_ _ _
========
_ _ _ _
_ _ _ _
========
0

Reply With Quote
  #4  
Old September 21st, 2004, 06:13 PM
geoschmo's Avatar

geoschmo geoschmo is offline
National Security Advisor
 
Join Date: Jan 2001
Location: Ohio
Posts: 8,450
Thanks: 0
Thanked 5 Times in 2 Posts
geoschmo is on a distinguished road
Default Re: OT: Interesting math problem...

Will, that's a good thourough proof there, but I'm curious why you "discount V=0 as uninteresting". Maybe that's a math thing I don't get, but it seems V=0 is just as valid a posibility as V=9 until it's proven or disproven. In fact I did disprove V=0 in this case, in a very similer fasion to how you proved V=9.

If V=0 then

D + E < 10, since no number for E + 0 + 1 = E or 10 + E
Since D + E < 10, there is no carry over to the second or third columns.
Therefore I = 5, since I must be either 0 or 5 and we have already determined V = 0.
I + I gives us a carry to the next position so R + R + 1 = 5. For this to be correct R must be either 2 or 7. (Somehow I got this point while disproving V = 0, but forgot it while attempting to prove V = 9 ) If R is 2 then there is no carry and T + D is 2. For this to be correct either T and D must both be 1 or T and D are 0 and 2. Both violate our assumptions so R cannot be 2, therefore R = 7.
Therefore 1 + T + D = 7, T + D = 6. T and D cannot both be 3, and neither T or D can be 0(+6) or 5(+1), so T & D must be 2 & 4. To determine which is which we can try and substitute that into D + E = T (Which as we have already calculated is < 10)
If D is 2, E would have to also be 2 for T to be 4, so D cannot be 2.
If D is 4, E would have to be -2 for T to be 2, so D cannot be 4.

Since D cannot be 2 or 4 then it follows that V cannot be 0

Heh, reading this out loud I realized I sound like Vizzini from the Princess Bride.
__________________
I used to be somebody but now I am somebody else
Who I'll be tomorrow is anybody's guess
Reply With Quote
  #5  
Old September 21st, 2004, 07:02 PM
douglas's Avatar

douglas douglas is offline
Major
 
Join Date: Apr 2004
Location: Atlanta, Georgia
Posts: 1,152
Thanks: 0
Thanked 0 Times in 0 Posts
douglas is on a distinguished road
Default Re: OT: Interesting math problem...

Quote:
Suicide Junkie said:
Here is a tough one:
Fill in the long division using the blanks and the given numbers.
Code:

_ _ 8 _
_______________
_ _ _ | _ _ _ _ _ _ 5
_ _ _ _
========
_ _ _ _
_ _ _
========
_ _ _ _
_ _ _
========
_ _ _ _
_ _ _ _
========
0


Took me about 5 minutes
Code:

9 8 8 9
_______________
1 1 5 | 1 1 3 7 2 3 5
1 0 3 5
========
1 0 2 2
9 2 0
========
1 0 2 3
9 2 0
========
1 0 3 5
1 0 3 5
========
0

Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 08:24 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.