All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Two Equations - Four Unknowns (Posted on 2024-06-01) Difficulty: 3 of 5
Each of a, b, c, and d is an integer that satisfies this system of equations:

ab+cd = 34
ac-bd =19

Determine all possible values of a, b, c, and d.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts Solution | Comment 1 of 2
First I let one of the variables (b) be zero:
    cd = 34
    ac = 19
    34/d = 19/a --> a=19, b=0, c=1, d=34   one solution
Then, a brute force checking values from 0 to ±200.
    
There are really only two base solutions, plus variations as shown below.
The two solutions are:
(19, 0, 1, 34)  found analytically by setting 'b' equal to 0.
(6, 5, 4, 1)    found by computer

For any solution (a, b, c, d), the following will also be 7 variations:
    (b, a, -d, -c)
    (c, d, a, b)
    (d, c, -b, -a)
    (-d, -c, b, a)
    (-c, -d, -a, -b)
    (-b, -1, d, c)
    (-a, -b, -c, -d)
 
Program output  (16 solutions):
-34 -1 0 19
-19 0 -1 -34
-6 -5 -4 -1
-5 -6 1 4
-4 -1 -6 -5
-1 -34 -19 0
-1 -4 5 6
0 -19 34 1
0 19 -34 -1
1 4 -5 -6
1 34 19 0
4 1 6 5
5 6 -1 -4
6 5 4 1
19 0 1 34
34 1 0 -19
----------
solutions = []
hi = 50
lo = - hi
for a in range(lo,hi):
    for b in range(lo,hi):
        for c in range(lo,hi):
            for d in range(lo,hi):
                if a*b+c*d != 34:
                    continue
                if a*c-b*d != 19:
                    continue
                solutions.append([a,b,c,d])
                print(a,b,c,d)
----------
I also used a more efficient program disallowing any variable from being zero and checked up to ±200 with no additional results.

  Posted by Larry on 2024-06-01 09:20:28
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information