More Difficult System of Equations

Solve the following system of equations:

a + b + c + d = 2241.000000000000 a + b + c + d = 1300.208973068654 a + b + c + d = 1590.057628441591 a + b + c + d = 1681.207436873820 a + b + c + \sqrt{d} = 2241.000000000000 \\ a + b + \sqrt{c} + d = 1300.208973068654 \\ a + \sqrt{b} + c + d = 1590.057628441591 \\ \sqrt{a} + b + c + d = 1681.207436873820

Report your answer as ( 2 10 ) 3 a + ( 2 10 ) 2 b + 2 10 c + d \left(2^{10}\right)^3 a+\left(2^{10}\right)^2 b+2^{10} c+d

Details:

  • a , b , c , d a,b,c,d are positive integers not more than 2 10 2^{10}

  • 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 a,b,c,d at random.

Inspired by: Difficult system of Equations


The answer is 629925689348.

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.

4 solutions

Ivan Koswara
Feb 21, 2015

Let { x } \{x\} be the fractional part of x x ; that is, { x } = x x \{x\} = x - \lfloor x \rfloor . Since a , b , c , d a,b,c,d are integers, { a } = { b } = { c } = { d } = 0 \{a\} = \{b\} = \{c\} = \{d\} = 0 . Also, { x + y } { x } + { y } ( m o d 1 ) \{x+y\} \equiv \{x\} + \{y\} \pmod{1} , which means the fractional part function is additive modulo 1 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 ) \{a+b+c+\sqrt{d}\} \equiv \{a\} + \{b\} + \{c\} + \{\sqrt{d}\} \equiv 0 \pmod{1}

{ d } 0 ( m o d 1 ) \{\sqrt{d}\} \equiv 0 \pmod{1}

Since 0 { d } < 1 0 \le \{\sqrt{d}\} < 1 , we obtain { d } = 0 \{\sqrt{d}\} = 0 .

By the same reasoning, we obtain { c } 0.208973 , { b } 0.057628 , { a } 0.207436 \{\sqrt{c}\} \approx 0.208973, \{\sqrt{b}\} \approx 0.057628, \{\sqrt{a}\} \approx 0.207436 .

Now, since a , b , c a,b,c are positive integers not greater than 1024 1024 , we can do a brute force search:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Python 3.4
for num in range(1, 1025):
    sqrt = num**.5
    rem = sqrt - int(sqrt)
    rem = str(rem)[2:8] # from 0.abcdefghijk, we take abcdef
    if rem in ["208973", "057628", "207436"]: print(num, rem)

# prints:
# 586 207436
# 679 057628
# 974 208973

Thus a = 586 , b = 679 , c = 974 a = 586, b = 679, c = 974 , and by plugging to the first equation, we obtain d = 2 \sqrt{d} = 2 or d = 4 d = 4 . Thus the solution is ( a , b , c , d ) = ( 586 , 679 , 974 , 4 ) (a,b,c,d) = (586,679,974,4) , which can be verified to be indeed a solution, and thus 102 4 3 a + 102 4 2 b + 1024 c + d = 629925689348 1024^3a+1024^2b+1024c+d = \boxed{629925689348} .

Same as I did! :)

Pranjal Jain - 6 years, 3 months ago

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
In[139]:= a
b
c
d
Out[139]= 586
Out[140]= 679
Out[141]= 974
Out[142]= 4

In[115]:= a (2^10)^3 + b (2^10)^2 + c (2^10) + d

Out[115]= 629925689348

Gopinath No
Jun 25, 2016

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']
Aakarshit Uppal
Feb 23, 2015

Subtracting equation 4 from equation 1 and equation 2 from equation 3, we get 2 equations : a + d a d = 559.79256312618 c + b c b = 289.84865537294 a + \sqrt{d} - \sqrt{a} - d = 559.79256312618\\ c + \sqrt{b} - \sqrt{c} - b = 289.84865537294

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
//c++ 11
#include<iostream>
#include<cmath>

using namespace std;

int calc1(long , long );
int calc2(long , long );

int main()
{
    long a,b,c,d;
    long long ans=0;

    for(d=1;d<1025;d++)
        for(a=1;a<1025;a++)
            if(calc1(a,d))
                ans+=((pow(2,30)*a)+d);

    for(b=1;b<1025;b++)
        for(c=1;c<1025;c++)
            if(calc2(b,c))
                ans+=((pow(2,20)*b)+(pow(2,10)*c));


    cout.setf(ios::fixed);
    cout<<ans;

    return 0;
}

int calc1(long a, long d)
{
    double n1;

    n1=a-sqrt(a)-d+sqrt(d);

    if (floor(1000*n1)==559792)
        return 1;

    return 0;
}

int calc2(long b, long c)
{
    double n2;
    n2=c-sqrt(c)-b+sqrt(b);

    if (floor(1000*n2)==289848)
        return 1;

    return 0;
}

Output :

1
2
3
4
5
629925689348

Process returned 0 (0x0)   execution time : 0.742 s

Press any key to continue.

P.S. Ivan's solution is much better, mine just shows how lazy i am ;)

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...