Generate a random symmetric permutation matrix (recursively)

rsymperm(K)

Arguments

K

size of the matrix

Value

A random K x K symmetric permutation matrix