Jump to content
BrainDen.com - Brain Teasers
  • 0


Guest
 Share

Question

Determine all possible sextuplet(s) (A, B, C, D, E, F) of positive integers, with A <= D, that satisfy this system of equations:

A/(B*C) = D - E - F, and:

D/(E*F) = A - B - C

Edited by K Sengupta
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Determine all possible sextuplet(s) (A, B, C, D, E, F) of positive integers, with A <= D, that satisfy this system of equations:

A/(B*C) = D - E - F, and:

D/(E*F) = A - B - C

I noticed that you have been posting many puzzles that require one ti find "all possible" values that satisfy the equation. I'm just wondering if there is a particular way one would go about doing so?

note: I'm 16 and as such do not have any significant computing power at my disposal.

Link to comment
Share on other sites

  • 0

Any Numbers with the following relationships

A > B

A > C

A ⋝ D

B > C

D > E

D > F

E > F

A = B*C*(D – E – F)

D = E*F*(A – B – C)

{A,B,C,D,E,F} ∈ N

In my oppinion, the only way to achieve the relationships above is to make A = D, B = E, C = F. So basically:

A > B

A > C

B > C

A = B*C*(A - B - C)

Example:

A = 6, B = 2, C = 1.

6 > 2

6 > 1

2 > 1

6 = 2*1*(6-2-1)

6 = 2*3

6 = 6, which prooves I'm right

Link to comment
Share on other sites

  • 0

It's easy to show that D must be the maximum

of A,B,C,D,E,F. Then, it's easy to come up

with the following 26 solutions:


# ( A, B. C, D, E, F)
1 ( 6, 1, 2, 6, 1, 2)
2 ( 6, 2, 1, 6, 1, 2)
3 ( 6, 1, 3, 6, 1, 3)
4 ( 6, 3, 1, 6, 1, 3)
5 ( 6, 1, 2, 6, 2, 1)
6 ( 6, 2, 1, 6, 2, 1)
7 ( 6, 2, 3, 6, 2, 3)
8 ( 6, 3, 2, 6, 2, 3)
9 ( 6, 1, 3, 6, 3, 1)
10 ( 6, 3, 1, 6, 3, 1)
11 ( 6, 2, 3, 6, 3, 2)
12 ( 6, 3, 2, 6, 3, 2)
13 ( 4, 1, 1, 8, 2, 2)
14 ( 4, 1, 2, 8, 2, 4)
15 ( 4, 2, 1, 8, 2, 4)
16 ( 4, 1, 2, 8, 4, 2)
17 ( 4, 2, 1, 8, 4, 2)
18 ( 5, 1, 1, 9, 1, 3)
19 ( 5, 1, 1, 9, 3, 1)
20 ( 3, 1, 1, 9, 3, 3)
21 ( 7, 1, 1,10, 1, 2)
22 ( 4, 1, 1,10, 1, 5)
23 ( 7, 1, 1,10, 2, 1)
24 ( 3, 1, 1,10, 2, 5)
25 ( 4, 1, 1,10, 5, 1)
26 ( 3, 1, 1,10, 5, 2)

But, so far, I can't prove that D has an

upper bound (which I believe is 10).

Still trying....

Link to comment
Share on other sites

  • 0

...note: I'm 16 and as such do not have any significant computing power at my disposal.

Oh, but you do! you have a FREE relational database that can handle millions of rows at your disposal. Check out mySQL, for example. If you can post updates on BrainDen (and are not running MacOS), I'm sure your computer can run mySQL. There are all sorts of tutorials online to get you started, and if you are interested, I'd be willing to give you some starting tips.

This problem is easily solved with a database!

for example, I did this one like this:

mysql -uroot -p

(then give your pw)

create database millions;

use database millions;

create table a (digit int);

create table b (digit int);

create table c (digit int);

create table d (digit int);

create table e (digit int);

create table f (digit int);

insert into a values(0);

insert into a values(1);

insert into a values(2);

insert into a values(3);

insert into a values(4);

insert into a values(5);

insert into a values(6);

insert into a values(7);

insert into a values(8);

insert into a values(9);

commit;

insert into b (digit) select digit from a;

insert into c (digit) select digit from a;

insert into d (digit) select digit from a;

insert into e (digit) select digit from a;

insert into f (digit) select digit from a;

commit;

select

concat(a.digit,b.digit,c.digit,d.digit,e.digit,f.digit) numerals

from

a,b,c,d,e,f

where

-- with A <= D

a.digit <= d.digit

and

-- A/(B*C) = (D - E - F)

a.digit/(b.digit * c.digit) = (d.digit - e.digit - f.digit)

and

-- D/(E*F) = (A - B - C)

d.digit/(e.digit * f.digit) = (a.digit - b.digit - c.digit)

order by

concat(a.digit,b.digit,c.digit,d.digit,e.digit,f.digit) asc

;

We get:

+----------+

| numerals |

+----------+

| 311933 |

| 411822 |

| 412824 |

| 412842 |

| 421824 |

| 421842 |

| 511913 |

| 511931 |

| 612612 |

| 612621 |

| 613613 |

| 613631 |

| 621612 |

| 621621 |

| 623623 |

| 623632 |

| 631613 |

| 631631 |

| 632623 |

| 632632 |

+----------+

20 rows in set (0.31 sec)

mysql>

Link to comment
Share on other sites

  • 0

Oh, but you do! you have a FREE relational database that can handle millions of rows at your disposal. Check out mySQL, for example. If you can post updates on BrainDen (and are not running MacOS), I'm sure your computer can run mySQL. There are all sorts of tutorials online to get you started, and if you are interested, I'd be willing to give you some starting tips.

This problem is easily solved with a database!

for example, I did this one like this:

mysql -uroot -p

(then give your pw)

create database millions;

use database millions;

create table a (digit int);

create table b (digit int);

create table c (digit int);

create table d (digit int);

create table e (digit int);

create table f (digit int);

insert into a values(0);

insert into a values(1);

insert into a values(2);

insert into a values(3);

insert into a values(4);

insert into a values(5);

insert into a values(6);

insert into a values(7);

insert into a values(8);

insert into a values(9);

commit;

insert into b (digit) select digit from a;

insert into c (digit) select digit from a;

insert into d (digit) select digit from a;

insert into e (digit) select digit from a;

insert into f (digit) select digit from a;

commit;

select

concat(a.digit,b.digit,c.digit,d.digit,e.digit,f.digit) numerals

from

a,b,c,d,e,f

where

-- with A <= D

a.digit <= d.digit

and

-- A/(B*C) = (D - E - F)

a.digit/(b.digit * c.digit) = (d.digit - e.digit - f.digit)

and

-- D/(E*F) = (A - B - C)

d.digit/(e.digit * f.digit) = (a.digit - b.digit - c.digit)

order by

concat(a.digit,b.digit,c.digit,d.digit,e.digit,f.digit) asc

;

We get:

+----------+

| numerals |

+----------+

| 311933 |

| 411822 |

| 412824 |

| 412842 |

| 421824 |

| 421842 |

| 511913 |

| 511931 |

| 612612 |

| 612621 |

| 613613 |

| 613631 |

| 621612 |

| 621621 |

| 623623 |

| 623632 |

| 631613 |

| 631631 |

| 632623 |

| 632632 |

+----------+

20 rows in set (0.31 sec)

mysql>

Well, what if you wanted the variables to go up to 1,000,000 instead of 9? How would that change your script? And what would its output look like?

Edited by superprismatic
Link to comment
Share on other sites

  • 0

Well, what if you wanted the variables to go up to 1,000,000 instead of 9? How would that change your script? And what would its output look like?

I hope you know I respect you, superprismatic. Your contributions to this site help make it a pleasure to visit! This question however, seems a little pointed. But if the variables went up to a million, I might pass and wait for your response (which hopefully will NOT present 10 as an integer!). - Just kidding!

If you mean: what if A B C D E F could be values 0-1,000,000 instead of 0-9, well that's easy...

You see, I stopped writing SQL code years ago. Now i spend my time writing control scripts in either ruby or perl which produce valid SQL code. Given this level of abstraction, the data definition statements and the data insert statements are controlled with simple syntax. For example, Ruby lets me say (1...9).each or (1...1000000).each to do something for each number from 1 to 9, or each number from 1 to a million. So from my perspective, I do vals 0-9 just as easily as I do 0-1000000. Sure, when I hit 'go', I have to play more ping pong before the results are ready for the 0-1000000 case... For the 0-9 case, I didn't even have time to play ping pong- mySQL found the solution in 0.31 secs!

So it took 0.31 secs for mySQL to consider 10^6 records/numbers. Allowing ABCDEF to be 0-1000000 yields 1,000,000^6 records/items to consider. That's a lot, but it's just diskspace...and time.

Lastly, I agree with you that comma separated values are a good way to present the answer when the variables are not limited to integers. So, my output would be just like yours, except it'd be right.

If you like, I'll run it for 0-1,000,000 and post the result.

Link to comment
Share on other sites

  • 0

I hope you know I respect you, superprismatic. Your contributions to this site help make it a pleasure to visit! This question however, seems a little pointed. But if the variables went up to a million, I might pass and wait for your response (which hopefully will NOT present 10 as an integer!). - Just kidding!

If you mean: what if A B C D E F could be values 0-1,000,000 instead of 0-9, well that's easy...

You see, I stopped writing SQL code years ago. Now i spend my time writing control scripts in either ruby or perl which produce valid SQL code. Given this level of abstraction, the data definition statements and the data insert statements are controlled with simple syntax. For example, Ruby lets me say (1...9).each or (1...1000000).each to do something for each number from 1 to 9, or each number from 1 to a million. So from my perspective, I do vals 0-9 just as easily as I do 0-1000000. Sure, when I hit 'go', I have to play more ping pong before the results are ready for the 0-1000000 case... For the 0-9 case, I didn't even have time to play ping pong- mySQL found the solution in 0.31 secs!

So it took 0.31 secs for mySQL to consider 10^6 records/numbers. Allowing ABCDEF to be 0-1000000 yields 1,000,000^6 records/items to consider. That's a lot, but it's just diskspace...and time.

Lastly, I agree with you that comma separated values are a good way to present the answer when the variables are not limited to integers. So, my output would be just like yours, except it'd be right.

If you like, I'll run it for 0-1,000,000 and post the result.

Actually, I was just fishing to see if mySQL could handle much bigger things here than single digits. I know absolutely nothing about mySQL so I can't criticize. But I'd like to get some idea of how big a problem it can handle. I'd like to see allowing ABCDEF to be in the range 0-100 or 0-1000 or 0-10000, etc. and seeing how that affects the runtime. Thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...