Combinations (not permutations) of numbers
Does anyone have a method that I could use to print (or anything) all combinations (so, 123 and 321 are the same) of given numbers, or even something that would do the same to objects??
you want the different ways 123 could be printed? ex:
They say if you play a Microsoft Windows CD backwards it will play satanic messages. But thats nothing, if you play it forwards it installs Windows.
so you dont want all combinations, just all groups.
S = set of all numbers
C = number of elements in a combination, or group
So all possible groups equals S!/C!
Ummm... I don't think you got me...
Permutations, variations and combinations are not the same thing... Permutations are when total number of elements and a number of elements in a group are the same, so you just change their places (so, ordering metters)... variations are when you can group less elements than the maximum, but ordering still metters, and combinations are the same as variations except that ordering does not metter ie. 123, 213 and 321 are the same... and combinations are exactly what I need...
I want my program to take n elements and print out all combinations, meaning from combinations with 1 element to those with all n elements...
By kanakatam in forum Java
Last Post: 05-31-2006, 03:14 AM
Last Post: 10-12-2005, 02:35 AM
Last Post: 05-27-2005, 02:23 AM
By Big Swifty in forum Java
Last Post: 11-10-2002, 07:33 AM
By Jeff Condon in forum Security
Last Post: 08-25-2000, 08:54 PM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL