CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Threaded View

  1. #1
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    628

    need algorithm name

    hello all.. been a few days since i visited "the forums"

    need some help.

    what i would like to do:

    -consider an excel sheet. dealing with 5 columns.
    -each column has a heading, followed by a bunch of numerical entries
    -in the first column i can have 10 possible values, second, 20 possible values, 3rd 5 possible values, 4th 3, and 5th 2 poss values.
    -want to write a program to generate all possible combinations of values.

    question:
    is there a well known algorithm to do this? if so, what is it called? if not, suggestions please.

    please do not worry about hooking into excel from c++ etc yet. I have not decided yet whether i will use vba or c++. i'm just looking for an algorithm to do this. also, keep in mind that there is a large number of combinations (which will only get larger in the future- never smaller). there are many other things i have to take into account, so i'm not in the coding phase yet. i just want to see what i can get by way of algorithms so i can plan the rest of the stuff!

    i seem to remember from univ courses some sort of good algorithm to do this, but i can't remember! its been a logn time!

    thanks!

    ps- as much as this sounds like a school assignment, it is not!!!!!!!!!!! i have been done school for a few years!
    Last edited by drewdaman; August 19th, 2005 at 03:04 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured