public static int[][] makeInitialSquare(
        Random  rand,
        int     n,
        boolean constrained,
        int     cRow,
        int     cCol)
    {
        int[][] square = new int[n][n];
        
        int nSquared     = n*n;
        int numPoolStart = 1;
        int numPoolSize  = nSquared;
        
        // constrained problem removes 1->9 as valid numbers 
        // for initial square population
        if(constrained)
        {
            numPoolStart = 10;
            numPoolSize  -= 9;
            
            // populate submatrix
            square[cRow][cCol]     = 1;
            square[cRow][cCol+1]   = 2;
            square[cRow][cCol+2]   = 3;
            square[cRow+1][cCol]   = 4;
            square[cRow+1][cCol+1] = 5;
            square[cRow+1][cCol+2] = 6;
            square[cRow+2][cCol]   = 7;
            square[cRow+2][cCol+1] = 8;
            square[cRow+2][cCol+2] = 9;
            
        }
        
        int numPoolIndex = 0;
        ArrayList<Integer> numPool = new ArrayList<Integer>(numPoolSize);
        
        for(int i=numPoolStart; i<=nSquared; i++)
        {
            numPool.add(numPoolIndex++, i);
        }
        
        for(int i=0; i<n; i++)
        {
            for(int j=0; j<n; j++)
            {
                if(0 == square[i][j])
                {
                    int indx     = rand.nextInt(numPool.size());
                    square[i][j] = numPool.get(indx);
                    
                    numPool.remove(indx);
                }
            }
        }
        
        return square;
    }