+ Reply to Thread
Results 1 to 4 of 4

COMPLETE permutations from permutations

  1. #1
    Registered User
    Join Date
    11-19-2014
    Location
    Mumbai, Maharashtra, INDIA
    MS-Off Ver
    2003
    Posts
    52

    COMPLETE permutations from permutations

    How can the code for permutations (appended) be modified to output only complete permutations. A complete permutation is a permutation of the order of distinct items in which no item appears in its original place.

    Attaching a reference link https://rosettacode.org/wiki/Permutations/Derangements. A derangement is a permutation of the order of distinct items in which no item appears in its original place. For example, the only two derangements of the three items (0, 1, 2) are (1, 2, 0), and (2, 0, 1).

    CROSS POSTED by me in Mr. Excel at https://www.mrexcel.com/board/thread.../#post-5610896.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: COMPLETE permutations from permutations

    This VBA code is translated from the FreeBasic code listed on your mentioned rosettacode webpage :

    Please Login or Register  to view this content.
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  3. #3
    Registered User
    Join Date
    11-19-2014
    Location
    Mumbai, Maharashtra, INDIA
    MS-Off Ver
    2003
    Posts
    52

    Re: COMPLETE permutations from permutations

    @karedog; thanks, this works

  4. #4
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: COMPLETE permutations from permutations

    You are welcome.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Regards

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Permutations
    By Ipinho100 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-06-2019, 04:23 AM
  2. [SOLVED] Permutations
    By zik86 in forum Excel General
    Replies: 6
    Last Post: 05-16-2017, 06:10 PM
  3. Permutations
    By kajabiwan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-28-2012, 01:08 PM
  4. Permutations
    By alan73 in forum Excel General
    Replies: 3
    Last Post: 11-07-2011, 06:37 PM
  5. Permutations
    By Christopher_1 in forum Excel General
    Replies: 7
    Last Post: 07-05-2010, 02:28 PM
  6. [SOLVED] permutations
    By newyorkjoy in forum Excel General
    Replies: 3
    Last Post: 11-02-2005, 06:17 PM
  7. [SOLVED] Permutations
    By RedChequer in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-25-2005, 12:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1