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

Home > Just Math
Simultaneous Settlement II (Posted on 2013-09-26) Difficulty: 3 of 5
Determine the total number of nonnegative integer solutions to this system of simultaneous equations:

(A) P*Q*R*S*T = 7X*11Y*13Z*79W, and:
(B) X+Y+Z+W = 44

Prove that there are no others.

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.)
Solution solution | Comment 2 of 3 |

If it were just the right had side of (A) we needed to get all the possibilities for, we could use a standard formula for distributing 44 among four variables: C(44+(4-1),(4-1))=C(47,3)=16215.

But now, each of those 16,215 possibilities for the RHS has multiple ways of allocating its prime factors (a different set in each case) to the five variables on the LHS.

In each case, the X factors of 7 and the Y factors of 11 and the Z factors of 13 and the W factors of 79 need to be apportioned separately and the results multiplied:

C(X+4,4) * C(Y+4,4) * C(Z+4,4) * C(W+4,4)

the 4 in each case is 1 less than the number of partitions: P, Q, R, S, T.

These 16,215 products then need to be added together for the final result.

DECLARE FUNCTION combi# (a#, b#)
DEFDBL A-Z
FOR x = 0 TO 44
FOR y = 0 TO 44 - x
FOR z = 0 TO 44 - x - y
  w = 44 - x - y - z
  ct = ct + combi(x + 4, 4) * combi(y + 4, 4) * combi(z + 4, 4) * combi(w + 4, 4)
NEXT
NEXT
NEXT
PRINT ct

FUNCTION combi (a, b)
  c = 1
  FOR i = a TO a - b + 1 STEP -1
    c = c * i
  NEXT
  FOR i = 1 TO b
    c = c / i
  NEXT
  combi = c
END FUNCTION

or, alternatively, to assure best precision:

10  FOR x = 0 TO 44
20  FOR y = 0 TO 44 - x
30  FOR z = 0 TO 44 - x - y
40    w = 44 - x - y - z
50    ct = ct + combi(x + 4, 4) * combi(y + 4, 4) * combi(z + 4, 4) * combi(w + 4, 4)
60  NEXT
70  NEXT
80  NEXT
90  PRINT ct

Either way, the answer is 6,131,164,307,078,475 or over 6 quadrillion, in American speak. or over 6 thousand billion in British speak.


  Posted by Charlie on 2013-09-26 13:01:45
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
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