graphical representation of permutations and combinations

Discussion in 'Math' started by PG1995, Nov 4, 2011.

  1. PG1995

    Thread Starter Active Member

    Apr 15, 2011
    753
    5
    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
     
  2. Filox

    New Member

    Oct 11, 2011
    7
    4
    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.
     
    Last edited: Nov 4, 2011
    PG1995 likes this.
  3. Georacer

    Moderator

    Nov 25, 2009
    5,142
    1,266
    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.
     
  4. someonesdad

    Senior Member

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

    Code ( (Unknown Language)):
    1. from itertools import combinations
    2. for i in combinations("ABCD", 3):
    3.     print ''.join(i)
    results in

    ABC
    ABD
    ACD
    BCD

    Note the output is in lexicographic sort order.
     
  5. PG1995

    Thread Starter Active Member

    Apr 15, 2011
    753
    5
    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
     
  6. HARRYM

    New Member

    Dec 13, 2012
    1
    0
    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).

    Please help!!!

    Thank you

    HARRYM
     
  7. amilton542

    Active Member

    Nov 13, 2010
    494
    64
    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:

    AB,AC,AD,AE,BC,BD,BE,CD,CE,DE.
     
  8. Georacer

    Moderator

    Nov 25, 2009
    5,142
    1,266
    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.
     
  9. amilton542

    Active Member

    Nov 13, 2010
    494
    64
    Ohhh, milkin' it off computer software.
     
Loading...