# graphical representation of permutations and combinations

#### PG1995

Joined Apr 15, 2011
832
Hi

I have been searching for an online calculator or a program which graphically shows the resulting permutations and combinations. If there are 3 objects and we need combination of any two at a time, then there are going to be 3 combinations in total. Is there a calculator or program which when given three values such as A, B, and C, then it shows combinations as AB, AC, BC? Please let me know if you have any information on such calculator/program. Thank you.

Regards
PG

#### Filox

Joined Oct 11, 2011
7
Hello Pg,

I created a permutation calculator which I attach here. It does not protect you fully from wrong input but it helps as it is. Feedback is welcome!

edit: Don't worry it doesnt include a keylogger or anything of that kind.

#### Attachments

• 105.5 KB Views: 25
Last edited:

#### Georacer

Joined Nov 25, 2009
5,182
I 'll vouch for the contents of that .zip. Filox is a very close friend and in fact I was the one to commission that executable.

Cheers.

Joined Jul 7, 2009
1,583
Here's a way to do it in a reasonably recent version of python. For example:

Rich (BB code):
from itertools import combinations
for i in combinations("ABCD", 3):
print ''.join(i)
results in

ABC
ABD
ACD
BCD

Note the output is in lexicographic sort order.

#### PG1995

Joined Apr 15, 2011
832
Filox: Thanks for the program. It requires me to download .Net Framework 4 which I don't want to! Anyway, I still appreciate your effort to help me. Once again, thanks.

I have found these:
http://www.mathsisfun.com/combinatorics/combinations-permutations-calculator.html
http://scriptar.com/JavaScript/permute.html

GeoRacer: I had downloaded the file even before your post appeared. I was hesitant at first considering that Filox was a new member. But I still took the risk!

someonesdad: Thank you for the code. But unfortunately I have very limited experience with programming. I know a little C++. But someone else might find it useful.

Best wishes
PG

#### HARRYM

Joined Dec 13, 2012
1
Hi

I have been searching for an online calculator or a program which graphically shows the resulting permutations and combinations. If there are 3 objects and we need combination of any two at a time, then there are going to be 3 combinations in total. Is there a calculator or program which when given three values such as A, B, and C, then it shows combinations as AB, AC, BC? Please let me know if you have any information on such calculator/program. Thank you.

Regards
PG
Greetings.
I have just joined and I am from South Africa Johannesburg.
I am very interested in the Quote above as I am looking for a calculator which can do what is stated above.
I am particularly interested in the graphic solution of 8 objects combined 4 and 5 at a time. (8 objects combined 4 at a time yields 70 combinations and combined 5 at a time yields 56 combinations).

Thank you

HARRYM

#### amilton542

Joined Nov 13, 2010
497
I don't think this relates to the title of your thread, but are you familiar with the "n choose r" facility on a scientific calculator?

If "n" is equal to the number of objects and "r" is equal to the number of objects in each frame, then:

$$^nC_{r} = \frac{n!}{r!(n-r)!}$$

$$^5C_{2} = \frac{5!}{2!3!} = \frac{5\times4\times3\times2\times1}{2\times1 \times3\times2\times1} = \frac{20}{2} = 10$$

Basically, what this tells you is that there are ten ways of choosing 2 elements out of five different ones.

Using a bit of mind power then the ten frames to empty are:

#### Georacer

Joined Nov 25, 2009
5,182
Doesn't the first link given in post#5, by PG1995, satisfy you?

After you give your specifications you can hit List and have all the choices displayed in a text file.

If you want the output to be a collection of, say, actual balls of different colours, then, no it doesn't cover you and I don't see how it would be helpful.

#### amilton542

Joined Nov 13, 2010
497
Ohhh, milkin' it off computer software.