Dan:

First, a+b+c is the same as c+b+a in your case. Second, the number of 
combinations is _potentially_ still astronomical even for only 100 elements 
particularly since you have no way of knowing how many to take at a time. (This 
won't necessarily be true depending on whether or not you have any negative 
amounts and other factors.) Fortunately you can put a lot of intelligence into 
the problem before getting started so that ridiculous combinations are avoided.

However, I'm curious what you've actually done so far to find the discrepancy. 
Simply eye-balled the numbers? Do the line-item counts match?

Is it possible to output the spreadsheet values to a .CSV file or whatever and 
upload back to the AS/400? Import those values into a _new_ table and run 
various SELECTs that find values that are in one table but not in the other. 
I.e., run various exception tests? SQL can be your friend here.

Go for high-yield/low-hanging fruit first.

Of course, a slick MI solution would be cool, especially if it also had some 
fundamental intelligence.

Tom Liotta

"Dan Bale" <dbale@xxxxxxxxxxxxx> wrote:

>> -----Original Message-----
>> From: mi400-bounces@xxxxxxxxxxxx / Joe Pluta
>> Sent: Monday, September 20, 2004 4:03 PM
>>
>> > BTW, 100! = 9.3 e+153 = the number of any possible combination of a
>> > list of 100 elements.  Were you thinking of a different value?
>>
>> Factorials are permutations.  Combinations are "far smaller", relatively
>> speaking.  The number of possible combinations of N elements is 2^N, or
>> in the case of 100 elements, about a million possibilities.
>
>Darn it dude!  I knew this stuff in the last millenium, but my brain turned
>fuzzy tutoring my kids through 8th grade math!
>
>So, forgive my ignorance, but what is 2^N?  In the example above, is it
>2^100, or 2 to the 100th power?  Windows calculator has a x^y button and
>when I type 2 [x^y] 100 [=], I get
>1,267,650,600,228,229,401,496,703,205,376.
>
>Does the following represent 3 permutations but only 1 combination?
>a) 1, 5, 8
>b) 5, 1, 8
>c) 8, 5, 1
>
>(Re)learning my math today!
>
>db

-- 
Tom Liotta
The PowerTech Group, Inc.
19426 68th Avenue South
Kent, WA 98032
Phone  253-872-7788 x313
Fax    253-872-7904
http://www.powertech.com


__________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.