vendredi 25 janvier 2019

How random is this 50 x 50 Latin square?

I have the following 50 x 50 Latin square:

    latin_square = [[2,3,4,5,34,37,18,50,36,21,20,35,19,10,12,13,11,43,42,27,26,7,6,39,23,38,22,45,44,14,46,15,30,28,1,33,17,47,31,49,29,8,40,9,24,41,16,48,32,25],[1,33,9,37,41,49,17,25,5,2,35,3,34,21,44,19,43,11,27,18,10,39,38,7,6,22,14,46,28,30,50,42,26,12,23,4,36,15,20,13,47,40,31,45,8,24,29,16,48,32],[33,34,41,7,1,2,50,18,37,49,10,39,42,3,28,17,27,26,38,23,6,15,22,36,14,9,46,30,12,4,47,35,31,44,19,20,25,11,40,45,43,24,8,29,16,5,13,32,21,48],[34,2,3,39,18,50,35,36,19,43,42,4,20,37,1,27,12,10,11,26,33,44,28,49,8,41,17,40,6,7,9,24,25,38,48,5,21,16,13,23,32,45,29,47,22,46,14,30,15,31],[49,18,36,4,3,34,1,2,12,17,44,50,33,42,20,43,38,27,6,10,22,9,41,23,25,35,5,8,37,28,26,46,19,40,7,11,39,31,24,14,30,15,16,13,48,32,47,21,45,29],[17,35,34,23,49,1,19,33,44,27,26,37,10,9,5,11,21,29,43,45,14,2,46,4,41,3,20,16,25,12,13,47,28,7,39,36,50,40,18,8,31,48,42,32,30,6,24,38,22,15],[41,50,20,21,7,18,2,9,28,11,12,36,39,26,23,34,44,4,14,15,3,35,30,8,47,5,19,25,40,38,31,10,1,24,42,37,16,43,48,29,46,27,33,6,32,45,22,17,13,49],[9,19,40,15,10,42,3,34,35,6,8,24,41,38,16,22,1,33,2,46,18,49,26,17,48,43,30,50,32,31,14,25,5,37,21,45,13,29,4,36,7,20,47,39,11,44,23,27,12,28],[10,42,35,26,33,36,4,1,3,46,19,5,2,34,17,49,6,25,41,50,9,18,14,28,38,30,21,24,20,39,45,8,11,47,15,44,37,13,22,31,16,29,48,40,12,27,32,43,7,23],[25,10,42,47,36,9,43,41,2,38,34,26,50,5,18,6,33,22,35,40,4,17,12,1,20,27,44,14,46,15,37,49,3,21,16,28,32,8,30,24,48,13,45,31,19,29,39,11,23,7],[36,43,11,34,50,17,40,10,42,35,2,21,1,18,49,33,9,8,3,41,38,25,24,12,5,6,37,22,13,47,29,26,45,16,31,48,46,7,32,15,4,14,20,23,27,19,30,44,28,39],[37,11,32,31,2,5,27,49,43,14,3,34,21,50,13,1,36,45,19,9,46,28,29,44,30,25,33,17,4,6,41,7,35,23,10,39,18,42,15,47,38,26,24,22,20,8,48,12,16,40],[4,36,2,38,9,35,41,6,22,34,46,14,3,27,11,25,28,19,10,43,39,47,7,18,15,50,23,48,29,44,20,16,42,5,8,1,30,12,37,32,33,31,49,21,40,13,45,26,24,17],[5,27,24,43,37,21,11,42,4,3,28,2,45,41,35,14,13,36,25,29,30,12,18,31,22,46,49,38,19,20,10,50,9,48,47,7,34,26,33,17,6,23,32,15,44,40,1,8,39,16],[20,8,7,6,42,24,39,26,23,15,47,40,48,2,33,38,41,9,22,25,50,32,1,35,49,10,29,36,16,3,30,17,43,4,37,34,5,45,12,18,14,21,13,46,28,11,19,31,27,44],[12,40,27,44,17,28,6,37,11,18,4,20,36,22,32,10,8,48,50,14,5,38,13,21,9,42,7,35,45,23,25,29,46,39,3,15,41,33,49,34,2,1,30,26,43,16,31,24,47,19],[44,24,48,35,25,41,7,5,20,19,15,1,12,33,4,30,17,32,39,42,34,50,49,9,46,37,45,6,38,2,22,18,13,14,26,29,23,10,16,40,27,11,28,8,31,21,36,47,43,3],[28,48,47,50,38,33,15,22,31,44,39,45,17,6,46,26,18,40,7,16,41,20,9,19,24,13,2,49,5,36,42,1,10,32,29,43,3,14,34,30,25,37,21,35,23,12,11,4,8,27],[45,4,50,14,26,13,42,17,27,30,11,49,18,8,2,5,29,20,46,37,25,16,21,40,32,33,1,43,48,24,38,22,34,9,36,23,10,41,6,39,44,12,15,28,35,3,7,19,31,47],[50,9,18,36,20,3,34,4,10,28,1,13,25,45,27,41,22,38,33,49,42,29,2,47,17,11,6,32,30,5,19,40,44,15,35,12,31,48,7,37,24,39,23,16,21,43,8,46,14,26],[18,7,10,20,4,25,26,12,50,31,43,42,49,1,41,29,45,46,30,13,21,36,34,37,33,44,28,39,23,11,17,48,8,22,40,16,27,24,9,2,5,32,3,19,14,47,6,15,38,35],[8,39,12,3,40,45,23,29,24,16,32,33,28,14,36,42,37,13,26,38,1,48,47,20,35,18,34,5,2,19,15,21,50,49,46,30,9,25,17,6,41,22,27,44,10,31,4,7,11,43],[21,20,37,18,23,38,46,14,40,32,9,41,13,30,48,35,2,3,5,6,8,31,50,24,16,1,42,19,49,45,43,39,22,36,11,17,7,34,27,10,15,47,4,33,29,25,26,28,44,12],[13,45,26,30,12,10,8,20,18,37,50,44,4,25,42,46,19,16,29,21,7,34,15,3,40,14,39,27,36,1,28,31,24,6,32,47,48,23,38,33,11,43,2,41,5,35,49,22,17,9],[16,41,28,13,6,26,24,3,38,22,33,43,27,19,50,9,30,35,40,17,31,8,10,48,4,29,25,34,11,32,12,23,15,45,2,21,42,39,47,46,18,7,44,14,1,37,5,49,36,20],[29,16,8,22,45,20,32,19,7,47,36,17,37,44,21,3,5,24,12,34,28,4,25,13,2,39,38,23,14,35,6,33,18,30,49,31,11,9,1,27,26,10,41,43,50,48,15,40,46,42],[42,26,43,45,39,19,36,23,34,41,49,9,16,12,25,7,4,1,17,2,11,10,33,50,29,24,8,15,47,40,5,32,48,31,20,13,44,27,46,21,35,3,18,30,6,22,28,14,37,38],[40,15,16,2,5,29,31,48,26,50,21,18,14,17,34,47,46,37,32,39,13,24,44,45,36,49,41,10,8,27,1,11,6,20,43,9,33,30,25,22,12,28,19,7,3,23,38,42,35,4],[38,23,6,28,44,12,22,7,46,42,31,25,9,36,30,4,10,49,20,19,37,14,48,5,21,8,40,47,39,43,24,13,16,3,41,27,26,32,50,35,45,17,1,11,15,2,34,29,33,18],[48,31,25,19,14,6,20,30,21,39,7,32,23,46,8,40,24,47,34,1,49,41,17,16,13,15,10,44,3,26,18,2,29,35,45,38,22,50,28,12,42,5,43,27,33,36,37,9,4,11],[24,12,33,42,22,11,28,38,8,48,16,46,6,13,40,39,32,44,49,30,2,1,27,41,45,31,18,4,15,50,34,9,37,43,14,26,29,21,36,7,17,25,5,3,47,20,35,23,19,10],[6,47,31,11,35,4,38,21,14,23,27,29,15,28,9,36,49,17,1,33,12,30,20,25,34,7,13,26,43,42,2,41,40,19,24,32,45,44,5,3,8,16,37,48,39,50,46,10,18,22],[31,32,39,27,46,30,47,13,6,36,23,28,44,29,38,15,25,41,9,11,17,22,16,33,37,2,26,12,34,10,48,14,21,8,5,19,43,20,45,42,49,4,35,50,7,18,40,1,3,24],[39,1,45,17,13,23,49,35,16,8,48,27,32,47,24,37,15,31,21,5,40,19,3,29,11,34,43,33,9,46,7,30,14,41,50,10,2,18,44,26,22,42,12,4,38,28,25,36,20,6],[3,17,38,1,31,8,33,47,13,26,29,30,22,24,14,20,35,2,45,4,23,46,42,43,7,40,48,11,27,16,32,36,12,25,44,49,15,28,19,41,39,6,34,5,18,9,50,37,10,21],[43,21,44,10,8,27,16,46,48,5,24,19,11,35,29,45,20,28,18,22,15,40,31,32,42,36,47,37,1,33,3,34,17,26,38,2,14,6,39,9,23,50,7,12,13,4,41,25,49,30],[7,37,5,49,21,22,45,39,1,33,25,23,29,4,3,2,47,15,13,31,35,27,43,11,19,17,50,9,41,18,16,38,32,46,34,42,24,36,10,48,28,44,14,20,26,30,12,6,40,8],[15,38,23,41,19,39,13,28,47,4,17,12,7,20,37,16,14,30,31,32,44,26,45,10,50,48,9,2,35,49,40,6,27,34,25,18,8,5,21,11,1,33,22,24,36,42,43,3,29,46],[22,6,1,12,15,7,37,44,9,20,5,47,38,43,19,24,50,23,4,48,27,3,32,30,31,21,16,29,17,13,39,45,41,33,28,8,49,35,11,25,40,36,46,18,42,34,10,2,26,14],[35,49,19,29,30,14,48,15,32,1,40,6,46,11,22,18,16,12,24,47,43,33,23,27,10,26,31,28,7,9,21,44,2,17,13,25,38,37,8,50,3,41,36,34,4,39,42,20,5,45],[11,22,21,33,16,43,44,24,30,9,14,38,8,40,6,31,34,42,48,7,32,5,37,15,26,19,12,3,50,29,35,28,36,1,27,41,47,46,23,4,10,18,39,17,45,49,20,13,25,2],[32,28,15,46,27,16,12,45,39,7,13,48,24,49,26,44,40,14,23,36,29,37,5,2,18,4,11,31,22,21,8,20,47,10,33,35,19,1,42,43,50,30,9,25,17,38,3,34,6,41],[23,30,29,48,24,15,5,40,49,25,45,22,47,7,31,12,39,50,44,8,36,11,35,46,43,16,32,13,18,41,27,37,20,42,6,14,4,19,3,28,21,38,26,10,9,1,17,33,2,34],[26,25,49,40,32,47,9,11,45,24,41,10,31,23,15,8,7,39,16,20,48,42,4,34,27,12,3,1,21,22,36,43,33,29,18,50,28,2,14,38,19,35,6,37,46,17,44,5,30,13],[19,14,17,8,47,40,25,32,29,10,30,31,35,15,7,50,26,18,36,44,16,6,39,22,28,20,27,41,42,48,23,4,49,13,12,24,1,3,43,5,9,46,11,38,2,33,21,45,34,37],[14,5,30,9,11,48,29,8,33,40,37,16,43,32,45,23,31,34,28,12,24,21,19,6,44,47,4,42,26,17,49,3,7,27,22,46,35,38,41,20,13,2,10,36,25,15,18,39,1,50],[30,44,14,24,43,46,21,16,41,29,6,8,40,31,47,32,48,5,15,28,45,13,36,38,12,23,35,7,10,25,4,27,39,11,17,3,20,22,2,19,37,9,50,49,34,26,33,18,42,1],[46,13,22,25,28,44,14,43,15,12,38,11,30,39,10,48,42,21,47,3,20,45,8,26,1,32,24,18,31,34,33,19,23,50,9,6,40,4,29,16,36,49,17,2,37,7,27,35,41,5],[27,46,13,16,29,32,10,31,25,45,18,7,26,48,43,21,3,6,8,24,47,23,40,42,39,28,15,20,33,37,11,5,4,2,30,22,12,17,35,44,34,19,38,1,49,14,9,41,50,36],[47,29,46,32,48,31,30,27,17,13,22,15,5,16,39,28,23,7,37,35,19,43,11,14,3,45,36,21,24,8,44,12,38,18,4,40,6,49,26,1,20,34,25,42,41,10,2,50,9,33]]

I would like to know whether it is particularly random; that is, if I told you I generated it from an algorithm which generates Latin Squares of size 50 x 50 uniformly at random, how might you support or refute this claim?

Below is the result of running plt.matshow(latin_square) with plt.colorbar().

The result of running plt.matshow(latin_square) with plt.colorbar()




Aucun commentaire:

Enregistrer un commentaire