> -----Original Message-----
> From: mi400-bounces@xxxxxxxxxxxx / Bob Cozzi
> Sent: Monday, September 20, 2004 11:14 AM
> How about just moving the '11000000' strings into an 8-element array and
> xFoot the array? If the result if 2, you've got a 2-bit number of it is 3
> you've got your 3-bit numbers.

How do I get to '11000000' in the first place?  Did I increment by one all
the way up to 192 to get there, throwing out all of the non-2-bit numbers on
the way there?  That might be fine for a small total number of amounts, but
when you start looking at a list of hundreds of amounts, I think I'd spend a
huge percentage of time throwing out all of the non-2-bit numbers.

I am starting to think that this problem requires another array that I can't
quite put in words (there's a horrendous machine buzzing in my background
all morning - need to get some noise-cancelling headphones).  Essentially,
it would be an array of integers that would have as many elements as there
would be the number amount of combinations as I want to test for.  In my
first iteration, only elements 1 & 2 would be used.  Element1 is set to 1
and element2 is set to 2.  Increment element2 until get to the high limit,
then add 1 to element1 and set element2 to (element1 + 1).

Once I get to the end of 2-bit combos, set e1 to 1, e2 to 2, and e3 to 3,
and repeat the process as described for the 2-bit combos.

Does that make any sense?


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.