How to compute Permutation of 4P3?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ashishc
    New Member
    • Jan 2008
    • 12

    How to compute Permutation of 4P3?

    Let's say i create a String array that store 4 Alphabets {"A","B","C","D "}
    How can i get the result if i need permutation of 4P3 and 4P2?

    I had refer to many examples from the internet, but those examples cannot compute n selection from m elements. They only able to computer permutation of m elements without selection e.g. 4P4.

    I need help in how to create an algorithm that can perform permutation of n selection from m elements.

    Any help will be appreciated.

    Thanks
    Ash
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    The sequence nCm can be easily generated; for every element in nCm generate all its permutations mPm (which is also easy).

    kind regards,

    Jos

    Comment

    • puneetsardana88
      New Member
      • Aug 2009
      • 57

      #3
      I think Random class can help you alot in this regard.......Po st more what you intend to do ......

      Comment

      Working...