SPUG: FW: Help..Any Math GENIUS out there?

Pommert, Daniel Daniel.Pommert at verizonwireless.com
Thu Jul 25 14:42:35 CDT 2002


This is an integer programming problem.  But if you look at it, you see that
E can only be values from 1 through 17.  You don't care about the value of
A: it will be whatever it needs to be.  So, you could do a simple exhostive
search for solutions by looping through the 36 * 36 * 36 * 17 values of B,
C, D, and E (respectively).  This shouldn't take more than a couple seconds
of computer time and could be written in under 20 lines of code.

-- Daniel Pommert 
  Verizon Wireless
  425-603-8612

-----Original Message-----
From: Orr, Chuck (NOC) [mailto:chuck.orr at attws.com]
Sent: Thursday, July 25, 2002 10:51 AM
To: 'spug-list at pm.org'
Subject: SPUG: FW: Help..Any Math GENIUS out there?




> Hello, 
> 
> I am hoping to use Perl to solve an equation like the below:
> 
> A + (36*B) + (360*C) + (3600*D) + (129600*E) = 2,307,012
> 
> I know that each of the variables A - E is a whole number in the range
> 1-36.
> 
> Could I load those numbers (1 -36) in an array and substitute each number
> for each variable until this is solved?
> 
> Any ideas would be greatly appreciated.
> 
> 
> Thanks,
> Chuck Orr
> AT&T Wireless Services
> 425 288 2386
> chuck.orr at attws.com

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org




More information about the spug-list mailing list