Skip to main content
Commonmark migration
Source Link

Super Permutations

#Super Permutations FindFind the super permutation for a set of size n. A super permutation of a set is one string that contains all permutations of that set. Here is a helpful video by Matt Parker #Example For

Example

For a set of size 2 all the permutations are AB, BA but the super permutation is ABA because it contains the string AB and BA.
For a set of 3 all permutations are ABC,ACB,BAC,BCA,CBA,CAB and the super permutation is ABCABACBA. #Challenge Given

Challenge

Given a certain size n (n>=1) find a super permutation of that set. To do this you have to use a pattern explained in the video. #Input An

Input

An integer greater than 0. This can be a function input superperm(n) or be taken from user input. #Output super

Output

super permutation of that sized set. This can either be printed out or the return value of a function #Sample Inputs all

Sample Inputs

all of these are the shortest for that length but this is not a requirement.

    1: A
    2: ABA
    3: ABCABACBA
    4: ABCDABCADBCABDCABADABACDBACBDACBADCBA

#Super Permutations Find the super permutation for a set of size n. A super permutation of a set is one string that contains all permutations of that set. Here is a helpful video by Matt Parker #Example For a set of size 2 all the permutations are AB, BA but the super permutation is ABA because it contains the string AB and BA.
For a set of 3 all permutations are ABC,ACB,BAC,BCA,CBA,CAB and the super permutation is ABCABACBA. #Challenge Given a certain size n (n>=1) find a super permutation of that set. To do this you have to use a pattern explained in the video. #Input An integer greater than 0. This can be a function input superperm(n) or be taken from user input. #Output super permutation of that sized set. This can either be printed out or the return value of a function #Sample Inputs all of these are the shortest for that length but this is not a requirement.

    1: A
    2: ABA
    3: ABCABACBA
    4: ABCDABCADBCABDCABADABACDBACBDACBADCBA

Super Permutations

Find the super permutation for a set of size n. A super permutation of a set is one string that contains all permutations of that set. Here is a helpful video by Matt Parker

Example

For a set of size 2 all the permutations are AB, BA but the super permutation is ABA because it contains the string AB and BA.
For a set of 3 all permutations are ABC,ACB,BAC,BCA,CBA,CAB and the super permutation is ABCABACBA.

Challenge

Given a certain size n (n>=1) find a super permutation of that set. To do this you have to use a pattern explained in the video.

Input

An integer greater than 0. This can be a function input superperm(n) or be taken from user input.

Output

super permutation of that sized set. This can either be printed out or the return value of a function

Sample Inputs

all of these are the shortest for that length but this is not a requirement.

    1: A
    2: ABA
    3: ABCABACBA
    4: ABCDABCADBCABDCABADABACDBACBDACBADCBA
deleted 53 characters in body
Source Link
Jackson
  • 111
  • 1

#Super Permutations Find the super permutation for a set of size n. A super permutation of a set is one string that contains all permutations of that set. Here is a helpful video by Matt Parker #Example For a set of size 2 all the permutations are AB, BA but the super permutation is ABA because it contains the string AB and BA.
For a set of 3 all permutations are ABC,ACB,BAC,BCA,CBA,CAB and the super permutation is ABCABACBA. #Challenge Given a certain size n (n>=1) find a super permutation of that set. Please note that concatenating all permutations is valid all though it is slightly trivial toTo do it that waythis you have to use a pattern explained in the video. #Input An integer greater than 0. This can be a function input superperm(n) or be taken from user input. #Output any supersuper permutation of that sized set. This can either be printed out or the return value of a function #Sample Inputs all of these are the shortest for that length but this is not a requirement.

    1: A
    2: ABA
    3: ABCABACBA
    4: ABCDABCADBCABDCABADABACDBACBDACBADCBA

#Super Permutations Find the super permutation for a set of size n. A super permutation of a set is one string that contains all permutations of that set. Here is a helpful video by Matt Parker #Example For a set of size 2 all the permutations are AB, BA but the super permutation is ABA because it contains the string AB and BA.
For a set of 3 all permutations are ABC,ACB,BAC,BCA,CBA,CAB and the super permutation is ABCABACBA. #Challenge Given a certain size n (n>=1) find a super permutation of that set. Please note that concatenating all permutations is valid all though it is slightly trivial to do it that way. #Input An integer greater than 0. This can be a function input superperm(n) or be taken from user input. #Output any super permutation of that sized set. This can either be printed out or the return value of a function #Sample Inputs all of these are the shortest for that length but this is not a requirement.

    1: A
    2: ABA
    3: ABCABACBA
    4: ABCDABCADBCABDCABADABACDBACBDACBADCBA

#Super Permutations Find the super permutation for a set of size n. A super permutation of a set is one string that contains all permutations of that set. Here is a helpful video by Matt Parker #Example For a set of size 2 all the permutations are AB, BA but the super permutation is ABA because it contains the string AB and BA.
For a set of 3 all permutations are ABC,ACB,BAC,BCA,CBA,CAB and the super permutation is ABCABACBA. #Challenge Given a certain size n (n>=1) find a super permutation of that set. To do this you have to use a pattern explained in the video. #Input An integer greater than 0. This can be a function input superperm(n) or be taken from user input. #Output super permutation of that sized set. This can either be printed out or the return value of a function #Sample Inputs all of these are the shortest for that length but this is not a requirement.

    1: A
    2: ABA
    3: ABCABACBA
    4: ABCDABCADBCABDCABADABACDBACBDACBADCBA
Source Link
Jackson
  • 111
  • 1

#Super Permutations Find the super permutation for a set of size n. A super permutation of a set is one string that contains all permutations of that set. Here is a helpful video by Matt Parker #Example For a set of size 2 all the permutations are AB, BA but the super permutation is ABA because it contains the string AB and BA.
For a set of 3 all permutations are ABC,ACB,BAC,BCA,CBA,CAB and the super permutation is ABCABACBA. #Challenge Given a certain size n (n>=1) find a super permutation of that set. Please note that concatenating all permutations is valid all though it is slightly trivial to do it that way. #Input An integer greater than 0. This can be a function input superperm(n) or be taken from user input. #Output any super permutation of that sized set. This can either be printed out or the return value of a function #Sample Inputs all of these are the shortest for that length but this is not a requirement.

    1: A
    2: ABA
    3: ABCABACBA
    4: ABCDABCADBCABDCABADABACDBACBDACBADCBA