[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

547.0. "<><><> 72 * ? = x67.9y <><><>" by THEBUS::KOSTAS (An investment in knowledge pays the best interest.) Wed Jul 30 1986 09:51

    This has been on my desk for four weeks now.
    
       An old and somewhat illegible invoice shows that  72  canned
       hams were purchased for  $x67.9y.  Find  x  and  y.
    
    kgg
    
T.RTitleUserPersonal
Name
DateLines
547.1Ham can be dangerous...ENGINE::MCKINLEYWed Jul 30 1986 12:5211
answer

       After image enhancement, the invoice shows that 72 canned
       hams were purchased at $5.11 each for a total of $367.92.

       Unfortunately, the amount was deciphered just as two burly,
       mean-looking men from the Hack-em-up Hog Farm arrived (with
       meat hooks) requesting their $367.92 that was four months
       overdue.

       Moral:  Always keep your hams out of hock!
547.2An Inelegant SolutionCOMET::ROBERTSDwayne RobertsWed Jul 30 1986 12:57112
    
    I find the answer 72 * $5.11 = $367.92 in the following manner:
    
    Dividing 1 by 72 yields the residual differences*
    
    	1, 10, 28, 64, 64, 64, 64, ...
    
    64  64  64  64  64  64  64  64  28  10   1
     0   0   0   0   0   0   x   6   7   9   y
    
    which means that 64*x + 64*6 + 28*7 + 10*9 + 1*y must be congruent
    to 0 mod 72.  Reducing this yields
    
    	y is congruent to 8*x + 50 (mod 72)
    
    Plugging in the integers from 0 to 9 into x gives the following
    table:

    	x	y (mod 72)
    	===	==========
    	0	50
    	1	58
    	2	66
    	3	2
    	4	10
    	5	18
    	6	26
    	7	34
    	8	42
    	9	50
    
    The only value in the table where 0<=y<=9 is when x=3; thus, 367.92
    is the product.  367.92 / 72 = 5.11.
    
    
    ====================================================================
    * I don't believe the term "residual differences" is correct, but
    I can't recall the correct terminology.  They are calculated by
    dividing 1 by the number (in this case 72), recording the intermediate
    differences:
    
    
         0
       ______________
    72 ) 10000000000
         0
         -
         1 <- first residual difference
    
    
         00
       ______________
    72 ) 10000000000
         0
         -
         10
         00
         --
         10 <- second residual difference
    
    
         001
       ______________
    72 ) 10000000000
         0
         -
         10
         00
         --
         100
    	  72
         ---
          28 <- third residual difference
    
    
         0013
       ______________
    72 ) 10000000000
         0
         -
         10
         00
         --
         100
    	  72
         ---
          280
    	  216
          ---
           64 <- fourth residual difference
    
    
         00138
       ______________
    72 ) 10000000000
         0
         -
         10
         00
         --
         100
    	  72
         ---
          280
    	  216
          ---
           640
           576
           ---
            64 <- fifth and continued residual differences
    
                                                         
547.3CLT::GILBERTschmaltzyWed Jul 30 1986 15:1023
re 547.2

	Another way is to note that

		72*z = 10000*x + 6790 + y
	implies
		0 = (10000 mod 72)*x + (6790 mod 72) + y, modulo 72
	or equivalently,
		0 = 64*x + 22 + y, modulo 72


	Thus, we'd like to find solutions to 72k = 64x + 22 + y, with
	0 <= x,y <= 9.  We could notice immediately that y must be even.
	Actually, because gcd(72,64) = 8, we'll consider this equation
	modulo 8.  This gives:

		0 = (22 mod 8) + y, modulo 8
	    or	0 = 6 + y, modulo 8
	    or	2 = y, modulo 8.

	Here, we can trivially solve the following two equations for y:

		y mod 8 = 2  and  0 <= y <= 9
547.4SSDEVO::LARYThu Aug 14 1986 11:468
An even simpler solution method is to use the facts that:

1)	A number is divisible by 8 iff its low 3 digits are divisible by 8.

2)	A number is divisible by 9 iff the sum of its digits is divisible by 9

3)	72 = 8 * 9, so any number divisible by 72 is divisible by 8 and 9