# How to label vertices in a grid with random integers?

I would like to assign each vertex a random number with the minimum bound equal to the smallest vertex and the maximum equal to the value of the largest without repeats.

For example, in a 20x20 grid, the vertices would be randomly labeled from 1 to 400 ,without repeats.

• It would be best if you post some code that you have tried so that readers can get a better idea of where your Mathematica problem is. – Jens Apr 9 '13 at 4:43

Partition[RandomSample[Range[16]], 4]

• Might be better to just use RandomSample[Range[16]] for the scrambling. – J. M.'s technical difficulties Apr 9 '13 at 4:59