473,385 Members | 1,372 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Algorithm for combinations...

I've seen an algorithm for permutations, but I need to find combinations.
Is there an STL equivalent to next_permutation for combinations? The
material I'm finding is kinda light, if anyone would like to offer advice on
how to approach this problem, it would be much appreciated.

Thanks,
d
Jul 23 '05 #1
2 6014

"deancoo" <s2*******@yahoo.ca> wrote in message news:OGfTd.15890$9a3.9110@edtnps91...
I've seen an algorithm for permutations, but I need to find combinations.
Is there an STL equivalent to next_permutation for combinations? The
material I'm finding is kinda light, if anyone would like to offer advice on
how to approach this problem, it would be much appreciated.

Thanks,
d


Look at "Generating combinatorial objects"
https://sourceforge.net/projects/comb-objects/

The program generates combinatorial objects: exponents, all exponents, permutations, color permutations, arrangements, combinations
for any numbers and words.
--
Alex Vinokur
email: alex DOT vinokur AT gmail DOT com
http://mathforum.org/library/view/10978.html
http://sourceforge.net/users/alexvn

Jul 23 '05 #2

thanks!
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: cody | last post by:
I have to write an algorithm with must ensure that objects are put in buckets (which are always 4 in size). The objects have two properties: A and B. It is not allowed that in a bucket are objects...
1
by: Lee Garrington | last post by:
Hey, Is there an algorithm within the Standard C++ Library which performs the following task :- Given a set X and a parameter of size Y. Find all unique subsets of size Y from the set X. ...
3
by: spakka | last post by:
I'm useless at templates, but, inspired by this post: <hinnant-074D8A.11281207032005@syrcnyrdrs-01-ge0.nyroc.rr.com>, I'm trying to write an algorithm template <class BidirectionalIterator,...
19
by: Thomas Cameron | last post by:
Hello all, I have an array of values which I would like to generate all possible combinations for. And example would be the values "a,b,c". This would produce the following: a ab abc ac
15
by: Thomas Cameron | last post by:
Hello all, I have an array of values which I would like to generate all possible combinations for. And example would be the values "a,b,c". This would produce the following: a ab abc ac b
3
by: Ryan | last post by:
I've been trying to find an algorithm that will output all of the possible combinations of items in an array. I know how to find the number of combinations for each set using nCr=n!/(r!(n-r)!) ...
8
by: jason | last post by:
Hello everyone, I am looking for an algorithm that would take an incremental value and map that to a case-inspecific alphanumeric string. However, I don't want the string to simply step through...
16
by: a | last post by:
We are writing an app that assigns people to teams based on their curent score. Teams are 8 people, there are 2 teams. (i would like it to be flexible, but this is a start). I need an algorithm...
22
by: MLH | last post by:
If 3 things can be in one of 2 states, the number of possible combinations is equal to 2^3. But if I have 3 things, 2 of which can be in 2 states and the other in 3 states, what's the simplest...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.