public void permutation2( int[][] board ){
        int n_permutation = 2 * DIGITS;
        int perm = g.nextInt(n_permutation);
        System.out.println( perm );
        boolean horz_perm = (perm >= DIGITS);
        perm %= DIGITS;
        int group = perm / SQRT_DIGITS;
        perm %= SQRT_DIGITS;
        int x=0, y=1;
        switch( perm ){
          case 0:
            x = 0;
            y = 1;
          break;
          case 1:
            x = 0;
            y = 2;
          break;
          case 2:
            x = 1;
            y = 2;
          break;
        }
        x += group*SQRT_DIGITS;
        y += group*SQRT_DIGITS;
        if( horz_perm ){
            for (int k = 0; k < DIGITS; k++) {
                int temp = board[x][k];
                board[x][k] = board[y][k];
                board[y][k] = temp;
            }
        }else{
            for (int k = 0; k < DIGITS; k++) {
                int temp = board[k][x];
                board[k][x] = board[k][y];
                board[k][y] = temp;
            }
        }
    }