Hey CBauer00010010.

A permutation just takes a set of things and shuffles them in an arbitrary order. So if you have four elements (1,2,3,4) one shuffling might be (2,3,1,4) and another might be (4,3,2,1). This is all a permutation is.

Now P and Q are functions: they take the input and give an output. In this scenario though, P and Q are not just any function: they are probabilities (according to the website).

So P(x) calculates the probability of getting x and same for Q(x).

So what is really saying is that x is a permutation from an initial state to a shuffled state and P(x) is the probability of that happening. So as an example if I start off with (1,2,3,4) in that order and I do a shuffle x where I go to (4,3,2,1) then P(x) is the probability of going from (1,2,3,4) to (4,3,2,1).

P and Q are different probability spaces and if P is the same as Q then the distance will be 0. Think of each probability space being a vector with each permutation type being an independent element of the vector and you are finding the "distance" between the two vectors.