I can only say so much about permutations without giving the whole

thing away. Permutations are a reordering of a list. The *reordering* is

the permutation...*not* the list. Once we have a reordering, we can use

it to reorder any list (of the correct length). For example, taking the list

1 2 3 4 5 to the list 3 2 1 4 5 is a permutation, but we could

use the same permutation and apply it to "d e s v t" and get

"s e d v t" (make sure you see why) and so on.

A "standard" way of *writing* a permutation, is by writing what it

does to the sorted set 1 2 3 4 5 (for a permutation of 5 elements)

thus 3 2 1 4 5 is considered "the permutation" (even though it is

not..it is only what the permutation does to the list 1 2 3 4 5). So

y =[ 3 2 1 4 5] is a vector (in Matlab) and I want you to use this

vector to permute a second list (since that is what all permutations

love doing the most!) specifically, permute x = [4 3 7 8 2] (and get

7 4 3 8 2) somehow. (In the actual question 4 I used other examples.)

In question 5 I'm taking about combining permutations. If I have two

permutations p and q, I can think of the combined permutation "permute

by q and then by p" and I call it pq. So pq(s) = p(q(s)) where s is

the list that I'm permuting. The question asks that you find how to find

in Matlab this pq permutation given that you have p and q (to try it out,

use specific p and q, e.g p = [2 1 3], q = [1 3 2] , note that

pq != qp (not equal) since pq = [3 1 2] and qp = [2 3 1] ) .

Finally, p^{-1} is the "inverse" of p, i.e. the permutation so that

p^{-1} = [1 2 3 4 5] the "identity" permutation, which doesn't do

anything to the original list. For example [3 1 2] ^{-1} = [2 3 1]

(and vice versa!!) the question is how to find the inverse in Matlab.

I must note that you should not look for any special function. You can

do this homework using ONLY what we have learn. Furthermore, the

answers are one-liners! Very short, very elegant solutions.