Results 1 to 1 of 1
Thread: arrange Combinations
- 05-07-2012, 11:10 AM #1
Member
- Join Date
- May 2012
- Posts
- 2
- Rep Power
- 0
arrange Combinations
Hi, guys.
I don't speak Englisher very well
Anyway, I have a problem
U can see the process I intend below
1. get 2 numbers from user
eg) A=2, B=3 (A is amount of 1, B is amount of 0 )
I don't know how to explain, but the result I want is like this.
--------------------------------------------------------
0. 1 1 0 0 0
1. 1 0 1 0 0
2. 1 0 0 1 0
3. 1 0 0 0 1
4. 0 1 1 0 0
5. 0 1 0 1 0
6. 0 1 0 0 1
7. 0 0 1 1 0
8. 0 0 1 0 1
9. 0 0 0 1 1
--------------------------------------------------------
I wanna arrange all cases without repetition
According to an ancient mathematician,
amount of all cases is (A+B)!/(A!*B!) 입니다.
from eg, 5!/3!2! = 10
I'll be so much appreciated If you give me a full code and detailed information or any idea or algorithm.
Thank you guys!
have a good day
Similar Threads
-
Combinations
By atomant in forum New To JavaReplies: 1Last Post: 02-22-2012, 07:41 AM -
Combinations in Java
By Roam in forum New To JavaReplies: 12Last Post: 08-25-2011, 10:22 PM -
Possible combinations for a n- digit number???
By anishr6 in forum New To JavaReplies: 4Last Post: 05-25-2011, 08:55 AM -
arrange(java.lang.String[][]) in Test cannot be applied to (java.lang.String) arrange
By prizzly in forum New To JavaReplies: 4Last Post: 01-01-2011, 10:52 AM -
All possible combinations given a binary number
By LeanA in forum New To JavaReplies: 9Last Post: 06-18-2010, 05:33 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks