Permutations and Variations

Werner Knobloch shared this question 9 years ago
Answered

Hi,


I'm working on the visualisation of permutations and variations. I'm looking especially for a possibility to create

lists of permutations and variations. I was succesfull in some cases but there are much more types of such lists that I can't create. Perhaps somebody works on the same problem and can help me. I add a ggb-file with the results I have

got so far.

For interested users another nice representation:

http://www.geogebra.org/en/...


cheers Werner

https://ggbm.at/552103

Comments (13)

photo
1

Hi iotarho,


you're right, I will try to do things better in the future. :D

The problem in this case was, that I always try to use "speaking" names for variables, which can be

very helpfull to understand programms after some month.

But changing the language in geogebra to translate the commands can be done by every user after

he has loaded the file.


cheers Werner

photo
1

hello

i have tried this

n,p integer sliders from 1 to 8

VR=Sequence[Sequence[Mod[Div[k, n^j], n], j, p - 1, 0, -1], k, 0, n^p - 1]

V=RemoveUndefined[Zip[If[Length[L] ≟ Length[Unique[L]], L], L, VR]]


i like but

RemoveUndefined[Zip[If[Length[L] ≟ Length[Unique[L]], L], L, Sequence[Sequence[Mod[Div[k, n^j], n], j, p - 1, 0, -1], k, 0, n^p - 1]]]

says me illegal argument k

it is possible bug


saludos

photo
1

Hi mathmagic,


Thank you very much . It'll take me some time to understand your formula. But I've implemented it in

my file and it works without my understanding :D

Perhaps I can use your method to find a solution for the last of those lists: Combination with repetitions.


saludos

photo
1

hello

it is simple; i make all variations with repetitions using the "base n representation of numbers" then i select them under "unique" condition


saludos

photo
1

Hello,

@Mathmagik, this is a very clever idea of classification options. Thank you very much!

In a very useful new command Zip (In my opinion) there is a problematic place. In this case, L is a one-dimensional list. If VR is a three-dimensional list, L it is logical - two-dimensional list. Are there any restrictions on the dimension of those lists?

Roman Chijner

photo
1

hello

i do not know


combinations soon, first i must study the best use of memory


saludos

photo
1

hello

really there is a problem with the memory of system (over 7 elements)


saludos

https://ggbm.at/552173

photo
1

Hello,

Saludos, really a simple algorithm for solving the difficult problem of combinatorics!

It remains to add a list of coefficients. As an example, give the expansion (x_0 +x1 +... +x_p) ^ n

Roman Chijner

photo
1

Hi mathmagic,


Wonderfull your algorithms! Now I have together all the lists I wanted. But I would like to change

your list, so that it can start from every number. (parameter: start).

Perhaps you could tell me how I have to change the counters in your formulas.


saludos Werner

photo
1

hello

i do not understand you

what means "parameter start"?

give me an example, please


saludos

photo
1

Hi mathmagic,


I mean the first number of the basicset that will be permutated or varied.

{1,2,3} start=1

{0,1,2} start= 0

{start,start+1,start+2}


Saludos

photo
1

hello

do you mean like Comb+8 ? try it.

or

VR=Sequence[Sequence[Mod[Div[k, n^j], n], j, p - 1, 0, -1], k, 0, n^p - 1]+8 ?

saludos

photo
1

Hi mathmagic,

Why didn't I find this solution myself ? :? I expected a much more complicated solution for my last question.


Thank you very much !

saludos Werner

© 2021 International GeoGebra Institute