Solve the following system of equations:
a + b + c + d = 2 2 4 1 . 0 0 0 0 0 0 0 0 0 0 0 0 a + b + c + d = 1 3 0 0 . 2 0 8 9 7 3 0 6 8 6 5 4 a + b + c + d = 1 5 9 0 . 0 5 7 6 2 8 4 4 1 5 9 1 a + b + c + d = 1 6 8 1 . 2 0 7 4 3 6 8 7 3 8 2 0
Report your answer as ( 2 1 0 ) 3 a + ( 2 1 0 ) 2 b + 2 1 0 c + d
Details:
a , b , c , d are positive integers not more than 2 1 0
Only the first 16 digits of the exact values have been given in the RHS.
I have generated the values of a , b , c , d at random.
Inspired by: Difficult system of Equations
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Same as I did! :)
As stated, I do not have a solution but I will put the value of a,b,c,d here so that people may check that the answer is correct and I do not forget them:
1 2 3 4 5 6 7 8 9 10 11 12 |
|
Idea is the same as the solution given:
# Python 2.7
from math import sqrt
lst= []
dct = {}
for a in range(1, 1025):
if abs(sqrt(a)-int(sqrt(a))-0.208973068654) <= 0.00000001:
lst.append(a)
dct['c'] = a
if abs(sqrt(a)-int(sqrt(a))-0.057628441591) <= 0.00000001:
lst.append(a)
dct['b'] = a
if abs(sqrt(a)-int(sqrt(a))-0.207436873820) <= 0.00000001:
lst.append(a)
dct['a'] = a
for a in range(1,33):
if a + sum(lst) == 2241:
lst.append(a**2)
dct['d'] = a**2
break
print 1024**3*dct['a']+1024**2*dct['b']+1024*dct['c']+dct['d']
Subtracting equation 4 from equation 1 and equation 2 from equation 3, we get 2 equations : a + d − a − d = 5 5 9 . 7 9 2 5 6 3 1 2 6 1 8 c + b − c − b = 2 8 9 . 8 4 8 6 5 5 3 7 2 9 4
now check for solution within the range of the variables :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
|
Output :
1 2 3 4 5 |
|
P.S. Ivan's solution is much better, mine just shows how lazy i am ;)
Problem Loading...
Note Loading...
Set Loading...
Let { x } be the fractional part of x ; that is, { x } = x − ⌊ x ⌋ . Since a , b , c , d are integers, { a } = { b } = { c } = { d } = 0 . Also, { x + y } ≡ { x } + { y } ( m o d 1 ) , which means the fractional part function is additive modulo 1 . Thus, taking the fractional part of both sides from equation 1,
{ a + b + c + d } ≡ { a } + { b } + { c } + { d } ≡ 0 ( m o d 1 )
{ d } ≡ 0 ( m o d 1 )
Since 0 ≤ { d } < 1 , we obtain { d } = 0 .
By the same reasoning, we obtain { c } ≈ 0 . 2 0 8 9 7 3 , { b } ≈ 0 . 0 5 7 6 2 8 , { a } ≈ 0 . 2 0 7 4 3 6 .
Now, since a , b , c are positive integers not greater than 1 0 2 4 , we can do a brute force search:
Thus a = 5 8 6 , b = 6 7 9 , c = 9 7 4 , and by plugging to the first equation, we obtain d = 2 or d = 4 . Thus the solution is ( a , b , c , d ) = ( 5 8 6 , 6 7 9 , 9 7 4 , 4 ) , which can be verified to be indeed a solution, and thus 1 0 2 4 3 a + 1 0 2 4 2 b + 1 0 2 4 c + d = 6 2 9 9 2 5 6 8 9 3 4 8 .