Keywords

1 Calculating Spatial Partitions

“Though leaves are many, the root is one”

(W.B. Yeats, 1865–1939, “The coming of wisdom with time”)

Evidently, there are nn possible map configurations of n-colored squares over a square map with size n. Consider for instance a 2 × 2 map. This map has n = 4 square cells and therefore the number of all possible color map configurations that can be created from it is nn = 44 = 256. How to identify them? A starting point is to determine the possible classes of these configurations and can be found in number theory, by making use of partition functions. A partition function is a function returning for every positive integer n the number of possible forms by which this n can be “partitioned”, that is how many possible sums add up to n, or otherwise stated, how many entropy classes are possible. For instance, the partition function for n = 5 gives the following P(5)=7 possible partitions:

figure a

Essentially, the partition function gives the number of possible ways that a number can be “decomposed” (not to be confused with factoring). As a further example, consider the partitions of n = 4:

figure b

Translating these figures to maps of square cells, it is easy to see how a sum of possible map configurations corresponds to each one of these partitions of a square map of 4 cells. To identify these configurations, we need to allow as many as n colors on the map, so the maximum number of colors is n = 4. All the possible map configurations per partition of 4 for the partitions 4, 3 + 1, 2 + 2 and 1 + 1 + 1 + 1 are given in Figs. 10.1, 10.2, 10.3 and 10.4 and in summary in Table 10.1.

Fig. 10.1
figure 1

The possible map configurations of a 4-colored 2 × 2 map for the partitions 4 = 4 and 4 = 3 + 1 (4 and 48 partitions respectively)

Fig. 10.2
figure 2

The possible map configurations of a 4-colored 2 × 2 map corresponding to the partition 4 = 2 + 2

Fig. 10.3
figure 3

The 144 possible configurations of a 4-colored 2 × 2 map corresponding to the partition 4 = 2 + 1 + 1

Fig. 10.4
figure 4

The 24 possible configurations of a 4-colored 2 × 2 map corresponding to the partition 4 = 1 + 1 + 1 + 1

Table 10.1 Number of possible map configurations N(n) per partition class for n = 4 square multi-colored maps. The sum total of all possible configurations is nn = 44 = 256

It was the Fibonacci sequence that was first used to determine the number of partitions P(n) of a number n:

$$P(n) = \frac{1}{\sqrt 5 }\left( {\left[ {\frac{1 + \sqrt 5 }{2}} \right]^{n + 1} - \left[ {\frac{1 - \sqrt 5 }{2}} \right]^{n + 1} } \right) = \sum\limits_{k = 0}^{n/2} {\left( {\begin{array}{*{20}c} {n - k} \\ k \\ \end{array} } \right)}$$
(10.1)

This “old” formula encapsulates the golden ratio, since

$$\mathop {\lim }\limits_{n \to \infty } \frac{P(n)}{{P(n - 1)}} = \left[ {\frac{1 + \sqrt 5 }{2}} \right] = 1.61803...$$
(10.2)

Most commonly however, the Hardy and Ramanujan formula is used to calculate the partitions of any positive integer (Hardy and Ramanujan 1918) which provides an asymptotic solution of P with respect to n:

$$P\left( n \right) \approx \frac{1}{4n\sqrt 3 }{\text{e}}^{{\pi \sqrt {2n/3} }}$$
(10.3)

The same formula was also independently discovered by Uspensky (1920); the reader may refer to Hardy and Wright (1979) and to Hardy (1999).

Some values of the partition function for some small quadratic maps, per map size, are given in Table 10.2: the ratio P(n)/N(n) diminishes close to zero, even for small n.

Table 10.2 Values of the partition function P(n) for small map sizes, numbers of possible map configurations N(n) and P(n)/N(n) ratios respectively. Notice how quickly the ratio attains extremely small values

Later, Rademacher (1937) obtained an exact convergent series solution which includes the Hardy-Ramanujan formula (Rademacher 1932, 1937, 1943):

$$P\left( n \right) = \frac{1}{{\pi \sqrt 2 }}\sum\limits_{{k = 1}}^{\infty } {A_{k} (n)} \sqrt k \frac{{\text{d}}}{{{\text{d}}n}}\left[ {\frac{{\sinh \left( {\frac{\pi }{k}\sqrt {\frac{2}{3}} \left( {n - \frac{1}{{24}}} \right)} \right)}}{{n - \frac{1}{{24}}}}} \right]$$
(10.4)

with the sequence Ak(n) expressed as a Kloosterman sum (an exponential sum involving natural numbers):

$$A_{k} \left( n \right) = \sum\limits_{h = 1}^{k} {\delta_{GCD(h,k)} \exp \left[ {\pi i\sum\limits_{j = 1}^{k - 1} {\frac{j}{k}\left( {\frac{hj}{k} - \left\lfloor \frac{hj}{k} \right\rfloor - \frac{1}{2}} \right) - \frac{2\pi ihn}{k}} } \right]}$$
(10.5)

where δmn is the Kronecker delta (Hardy 1999).

The Kloosterman sum is defined on the concept of “relative primes” of integers: Two integers n, m are “relatively prime” if they share no common positive factors (divisors) except 1. If h takes values over a set of residues relative to prime to n and

$$\hat{h}h = 1\left( {\bmod \,n} \right),$$
(10.6)

then a Kloosterman sum is:

$$S\left( {u,v,n} \right) \equiv \sum\limits_{h} {\exp \left[ {\frac{{2\pi i\left( {uh + v\hat{h}} \right)}}{n}} \right].}$$
(10.7)

For further information the reader may consider the relevant literature of number theory (Kloosterman 1926, 1946; Hardy and Wright 1979; Katz 1987; Apostol 1976; Hardy 1999).

A more recent formula for partitions is given by Bruinier and Ono (2011):

$$P\left( n \right) = 2\pi \left( {24n - 1} \right)^{{ - \frac{3}{4}}} \sum\limits_{k = 1}^{\infty } {\frac{{A_{k} (n)}}{k}} I_{\frac{3}{2}} \left[ {\frac{{\pi \sqrt {24n - 1} }}{6k}} \right]$$
(10.8)

where I3/2 stands for the modified Bessel function of the first kind and Ak(n) is the Kloosterman sum.

The modified Bessel function of the first kind In(z) is defined as an integral

$$I_{n} (z) = \frac{1}{2i\pi }\oint {e^{{\frac{z}{2}\left( {1 + \frac{1}{t}} \right)}} } t^{ - 1 - n} {\text{d}}t$$
(10.9)

or, in terms of the gamma function

$$I_{n} \left( z \right) = \left( \frac{z}{2} \right)^{n} \sum\limits_{k = 0}^{\infty } {\frac{{\left( {\frac{{z^{2} }}{4}} \right)^{k} }}{k!\Gamma (n + k + 1)}}$$
(10.10)

and appears as a solution of the second-order modified Bessel differential equation:

$$x^{2} \frac{{{\text{d}}^{2} y}}{{{\text{d}}x^{2} }} + x\frac{{{\text{d}}y}}{{{\text{d}}x}} - \left( {x^{2} + n^{2} } \right)y = 0$$
(10.11)

This formula for P(n) is given as a finite sum of algebraic numbers:

$$P\left( n \right) = \frac{Tr(n)}{{24n - 1}}$$
(10.12)

where the trace Tr(n) is defined as

$$Tr\left( n \right) = \sum\limits_{{Q \in Q_{n} }} {R\left( {\alpha_{Q} } \right)} .$$
(10.13)

R(z) stands for a function:

$$R\left( z \right) = - \left( {\frac{1}{2\pi i}\frac{{\text{d}}}{{{\text{d}}z}} + \frac{1}{2\pi y}} \right)f\left( z \right),$$
(10.14)

where z = x + iy and Qn is any set of representatives of the equivalence classes of the integral binary quadratic form

$$Q(x,y) = ax^{2} + bxy + cy^{2}$$
(10.15)

with a > 0 and b = 1 mod(12), with the property that for each Q(x, y), we let aQ be “CM point” in the upper half-plane, for which Q(aQ, 1) = 0, recalling that a point is CM if its corresponding elliptic curve has complex multiplication.

The function f(z) is the weight-2 meromorphic modular form entailing Eisenstein series and Dedekind eta functions:

$$\begin{aligned} F\left( z \right) & = \frac{1}{2}\frac{{E_{2} (z) - 2E_{2} (2z) - 3E_{3} (3z) + 6E_{2} (6z)}}{{\eta^{2} (z)\eta^{2} (2z)\eta^{2} (3z)\eta^{3} (6z)}} \\ & = q^{ - 1} - 10 - 29q - 104q^{3} - 273q^{3} ... \\ \end{aligned}$$
(10.16)

where \(q = {\text{e}}^{2\pi iz}\) is the nome, Ε2(q) are Eisenstein series, and η(q) are Dedekind eta functions.

The Eisenstein series is defined as:

$$G_{r} (\tau ) = \sum\limits_{m = - \infty }^{\infty } {\sum\limits_{m = - \infty }^{\infty } {\frac{1}{{(m + n\tau )^{r} }}} }$$
(10.17)

where r > 2 is an integer, τ > 0 and the sums exclude m = n = 0, while satisfying the following relationship in terms of Riemann zeta functions:

$$G_{2k} (\tau ) = 2\zeta (2k) + \left[ {\frac{{\left( {\sum\limits_{n = 1}^{\infty } {\sigma_{2k - 1} (n)e^{2\pi in\tau } } } \right)\left( {2(2\pi i)^{2k} } \right)}}{(2k - 1)!}} \right]$$
(10.18)

for n > 1, with ζ(s) the Riemann zeta function and σk(n) the divisor function.

With an elliptic modulus k and a nome q = eiπτ, the first values of the Eisenstein series E2n(q) are (Apostol 1976):

$$E_{2} \left( q \right) = 1 - 24\sum\limits_{k = 1}^{\infty } {\sigma_{1} \left( k \right)q^{2k} }$$
(10.19)
$$E_{4} \left( q \right) = 1 + 240\sum\limits_{k = 1}^{\infty } {\sigma_{3} \left( k \right)q^{2k} }$$
(10.20)
$$E_{6} \left( q \right) = 1 - 504\sum\limits_{k = 1}^{\infty } {\sigma_{5} \left( k \right)q^{2k} }$$
(10.21)

Also, the Eisenstein series is defined as:

$$\begin{aligned} & \sum\limits_{k = - \infty }^{\infty } {\sum\limits_{j = - \infty }^{\infty } {\left[ {\begin{array}{*{20}c} {(j + k\tau )^{ - 2n} } & {j^{2} + k^{2} \ne 0} \\ 0 & {otherwise} \\ \end{array} } \right]} } \\ & \quad = 2\zeta (2n) + \frac{{\left( {\sum\limits_{k = 1}^{\infty } {\sigma_{2n - 1} (k)e^{2\pi ik\tau } } } \right)\left( {2(2\pi i)^{2n} } \right)}}{(2n - 1)!} \\ \end{aligned}$$
(10.22)

for n > 1, with ζ(s) the Riemann zeta function and σk(n) the divisor function.

The Dedekind eta function is a modular form defined over the upper half-plane {I(τ) > 0} by the formula:

$$\eta \left( \tau \right) = \left( {\overline{q} } \right)^{\frac{1}{24}} \sum\limits_{n = - \infty }^{\infty } {\left( { - 1} \right)^{n} } \left( {\overline{q} } \right)^{{ - n\frac{(3n - 1)}{2}}} = \left( {\overline{q} } \right)^{\frac{1}{24}} \left( {1 - \left( {\overline{q} } \right)^{2} + \left( {\overline{q} } \right)^{5} + \left( {\overline{q} } \right)^{7} - \left( {\overline{q} } \right)^{12} - \cdots } \right)$$
(10.23)

where \(\left( {\overline{q} } \right) = {\text{e}}^{2\pi i\tau }\) is the square “nome” q and τ is the half-period ratio (Atkin and Morain 1993; Berndt 1994) eventually transforming the Dedekind eta function to the form:

$$\eta \left( \tau \right) = {\text{e}}^{{\frac{\pi i\tau }{{12}}}} \prod\limits_{k = 1}^{\infty } {\left( {1 - {\text{e}}^{2\pi ik\tau } } \right)}$$
(10.24)

For some values, it relates to other known functions such as the Jacobi theta functions, the gamma function etc. For instance, for theta functions with zero argument:

$$\vartheta ._{3} \left( {0,{\text{e}}^{i\pi \tau } } \right) = \frac{{\eta^{2} \left( {\frac{\tau + 1}{2}} \right)}}{\eta (\tau + 1)}$$
(10.25)

and with the gamma function

$$\eta (i) = \frac{{\Gamma \left( \frac{1}{4} \right)}}{{2\pi^{\frac{3}{4}} }}$$
(10.26)

The Eisenstein series E2 is related to partitions P(n) as follows:

$$E_{2} \left( z \right) = 1 - 24\sum\limits_{n = 1}^{\infty } {\sum\limits_{d/n} {d\left( {P\left( n \right)} \right)^{n} } } .$$
(10.27)

The nome q is defined on Jacobi theta functions as (Borwein and Borwein 1987):

$$q = {\text{e}}^{{\frac{{i\pi K\sqrt {1 - k^{2} } }}{K(k)}}}$$
(10.28)

with τ the half-period ratio, K(ke) the complete elliptic integral of the first kind, k the elliptic modulus and the elliptic integral of the first kind has the general form

$$F(\varphi ,k) = \int\limits_{0}^{\tan \varphi } {\frac{dv}{{\sqrt {(1 + v^{2} )((1 + (1 - k)^{2} v^{2} )} }}}$$
(10.29)

where v = tanθ (Abramowitz and Stegun 1972).

Hence, the divisor function and the Jacobi theta functions enter in the calculation of the Dedekind eta function and for the Eisenstein series.

The divisor function of an integer n is the sum of k-th powers of the positive integer divisors of n:

$$\sigma_{k} (n) = \sum\limits_{d/n} {d^{k} }$$
(10.30)

and relates to the Riemann zeta function, by means of Ramanujan’s formula (Wilson 1923):

$$\sum\limits_{n = 1}^{\infty } {\left( {\frac{{\sigma_{a} (n)\sigma_{b} (n)}}{{n^{s} }}} \right)} = \frac{\zeta (s)\zeta (s - a)\zeta (\sigma - b)\zeta (s - a - b)}{{\zeta (2s - 1 - b)}}$$
(10.31)

while also satisfying

$$\mathop {\lim }\limits_{n \to \infty } \left( {\frac{\sigma (n)}{{n\ln \ln n}}} \right) = e^{{\upgamma }}$$
(10.32)

where γ is the Euler-Mascheroni constant.

The Jacobi theta functions are quasi-periodic, expressed in terms of the nome q, given in the form \(\vartheta ._{n} (z,q)\) where q is defined in terms of a quasi-period τ as:

$$q = {\text{e}}^{2\pi i\tau } .$$
(10.33)

Setting thus the nome, leads to different Jacobi forms for successively higher n, i.e.:

$$\vartheta ._{1} \left( {z,q} \right) = \sum\limits_{n = - \infty }^{n = \infty } {\left( { - 1} \right)^{{n - \frac{1}{2}}} } q^{{\left( {n + \frac{1}{2}} \right)^{2} }} {\text{e}}^{(2n + 1)iz}$$
(10.34)
$$\vartheta ._{2} \left( {z,q} \right) = \sum\limits_{n = - \infty }^{n = \infty } {q^{{\left( {n + \frac{1}{2}} \right)^{2} }} } {\text{e}}^{(2n + 1)iz}$$
(10.35)
$$\vartheta ._{3} \left( {z,q} \right) = \sum\limits_{n = - \infty }^{n = \infty } {q^{{\left( n \right)^{2} }} {\text{e}}^{2niz} }$$
(10.36)

Elliptic integrals of the 1st kind are expressed in terms of Jacobi functions and an elliptic modulus, which can be expressed in terms of Jacobi theta functions:

$$k = \frac{{\vartheta_{2}^{2} (0,q)}}{{\vartheta_{3}^{2} (0,q)}}.$$
(10.37)

The Jacobi theta functions with z = 0 relate to the gamma function for some values of the nome, i.e.

$$\vartheta ._{3} \left( {0,{\text{e}}^{ - \pi } } \right) = \frac{{\sqrt[4]{\pi }}}{{\Gamma \left( \frac{3}{4} \right)}}$$
(10.38)

2 Entropy Class

...and either the white becomes black, or the black becomes white…

“…καὶ γὰρ εἰ λευκὸν ὑπάρχον μελαίνοιτο καὶ εἰ μέλαν λευκαίνοιτο”

(Galen, 129–199 A.D., “On the Natural Faculties”, 1.2)

The possible spatial partitions define entropy. In place of Shannon’s formula for entropy H, a simpler measure will be used here instead and will hereafter be named “entropy class” (r). This is the number of colored cells in a map (Fig. 10.5) and assumes only integer values. In a binary map, the colored cells are the “black” ones and are considered to be those that constitute the second largest population after the population bearing the dominant color (the whites in the case of binary maps). If, for instance, a binary 3 × 3 map is dominantly white, then the black cells can not be more than 4, that is r = (n − 1)/2, where n is the total number of cells (n = 9 in this case). If the binary map is even-numbered, then the number of colored cells cannot be higher than r = n/2.

Fig. 10.5
figure 5

Entropy class r is defined here as the total number of colored cells (red in this case) in the binary map. Some 3 × 3 binary maps with “entropy classes” r = 1, 2, 3 and 4 are shown

Obviously, all binary maps of the same entropy class also have the same Shannon entropy. The higher the number of black cells, the higher the entropy class and this applies up to the maximum entropy class of the square binary map. Notice however, that that Shannon entropy H reflects the percentage of the relative participation of each map type on the map and it is independent of observation scale. Contrary to this, the entropy class r is scale-dependent, representing the number of colored cells in a binary map for a precise size and resolution (Fig. 10.6). This difference makes r more advantageous to Shannon entropy for the analysis of the spatial complexity of square maps, also due to the fact that it assumes only integer values.

Fig. 10.6
figure 6

The difference between Shannon entropy H and entropy class r consists in the fact that r is scale-dependent. These two maps have both the same entropy H, but their entropy classes differ: the map on the left has r = 4, while the map on the right has r = 16. Thus, by using r instead of H, map analysis becomes scale-dependent, which is essential for the assessment of spatial complexity

3 Generic Maps and Symmetry

“Et plutard un Ange, entr’ ouvrant les portes,

viendra ranimer, fidèle et joyeux les mirroirs ternis”

(Charles Baudelaire, 1821–1867, “La mort des amants”)

Partitioning a space is equivalent to the identification of possible “entropy classes” in it. But partitioning alone is inadequate to determine all possible map configurations for a certain entropy class. We thus arrive at the next step in the process of generation of spatially complex square maps: the creation of symmetric replications.

The typical symmetry operations on the square are: rotation 90° clockwise about the centre, rotation 180° clockwise around, rotation 270° clockwise around, reflection through the horizontal centre line, reflection through the vertical centre line, reflection through the main diagonal (upper-left to bottom-right vertex) and reflection through the other diagonal (bottom-left to upper-right vertex). These symmetric operations are possible because the square has four lines of symmetry (Fig. 10.7): the two axes and the two lines y = x and y = −x. Further, by rotating the square by 90°, 180° or 270°, new symmetric configurations are received.

Fig. 10.7
figure 7

Symmetry axes of the square

These seven symmetries together with the identity (no rotation, or “trivial symmetry) create the group of symmetries of the square (8 in total).

Specifically, the operations are:

VS:

= Reflection through the vertical

HS:

= Reflection through the horizontal

DS:

= Reflection through the diagonal D1

D’S:

= Reflection through the diagonal D2

IS:

= identity (no rotation)

R90:

= rotation 90° clockwise about the center

R180:

= rotation 180° clockwise about the center

R270:

= rotation 270° clockwise about the center.

In this way, any new positions of cells are calculated from the multiplication table (Table 10.3):

Table 10.3 Multiplication table showing the results of multiplication of possible symmetries of the square

The number of map configurations corresponding to each symmetry operation is given by the “Burnside lemma” (alternatively referred to as the “Burnside–Polya theorem”), which can be used to endow square partitions with topologically inequivalent positions, along with their associated symmetries. It yields configurations of symmetry-dependent maps, but the full set of map configurations is received only after the application of symmetry operations is applied to them.

Let G be a group of elements that permute vertices of objects. Two colorings are considered indistinguishable with respect to G if there is some element g belonging to G, such that g sends one coloring to another. Letting ψ(g) be the number of colorings which are unchanged when affected by g and Ng the number of generic maps, then Burnside’s lemma computes the number of generic maps Ng as:

$$N_{g} = \frac{1}{\left| G \right|}\sum\limits_{g \in G} {\psi (g)}$$
(10.39)

For instance, for a 2 × 2 map with three colors the number of generic 2 × 2 square maps with three colors (Fig. 10.8) is (Table 10.4):

Fig. 10.8
figure 8

The 21 symmetric 2 × 2 squares with 3 colors

Table 10.4 Calculation of symmetries of 2 × 2 squares with 3 colors
$$\begin{aligned} N_{g} & = \frac{1}{{\left| G \right|}}\sum\limits_{{g \in G}} {\psi (g)} = \frac{1}{8}\left( {3^{4} + 3^{1} + 3^{2} + 3^{1} + 3^{2} + 3^{2} + 3^{3} + 3^{3} } \right) \\ & = \frac{{168}}{8} = 21 \\ \end{aligned}$$
(10.40)

Increasing the number of colors by one, the formula yields more possible map configurations for 2 × 2 maps with 4-colors, the total number of which is (Fig. 10.9):

Fig. 10.9
figure 9

The 53 possible 2 × 2 square maps with all possible combinations of 4 colors

$$\begin{aligned} N_{g} & = \frac{1}{\left| G \right|}\sum\limits_{g \in G} {\psi (g)} \\ & = \frac{1}{8}\left( {4^{4} + 4^{1} + 4^{1} + 4^{2} + 4^{2} + 4^{3} + 4^{3} + 4^{3} } \right) \\ & = \frac{424}{8} = 53 \\ \end{aligned}$$
(10.41)

4 Calculating Binary Map Configurations

“Nature is indeed a sum, but not a whole”

(Gilles Deleuze 2012, p. 304)

Given the partitions of space acting on square maps, entropy classes can be defined next. In fact, no more black cells need to be allocated on a map after attaining the maximum entropy class, since after exceeding the maximum entropy threshold, all binary map configurations repeat themselves as black-and-white mirror reflections of the configurations which were derived prior to attaining maximum entropy class. This is because for entropy classes higher than r = n/2 (if n = even) or r = (n − 1)/2 (if n = odd), the resulting binary map configurations are mirror-like repetitions of their n-r counterparts. So a simple replacement of black by white cells (or white by black cells) at the same positions of the map produces identical spatial complexity values (simple replacements of black cells by white cells yields exactly the same cell positions on each map and this symmetry applies to all possible configurations). Hence, the central question is how to determine the number of possible map configurations up to maximum entropy class. It thus suffices to examine the spatial complexity of different configurations, depending on whether r = n/2 (if n = even) or r = (n − 1)/2 (if n = odd) and hence, the formula giving the total number of possible square binary map configurations N(n) per map size n up to maximum entropy class is:

$$N(n) = \sum\limits_{r = 1}^{r} {\frac{n!}{{r!(n - r)!}}}$$
(10.42)

An application can be seen in the case of 2 × 2 binary maps (Fig. 10.10). The configurations with r = 3 are mirror-symmetric of those with r = 1. It suffices therefore to consider configurations only up to rmax = 2 (in the case of 2 × 2 maps). As n = even, so r = 2 and hence the number of possible configurations N(n) up to maximum entropy class (r = 2) is:

Fig. 10.10
figure 10

All the possible configurations of 2 x 2 binary maps. When more than half of the cells are black, then the map configurations repeat themselves as exactly reversed, therefore without contributing any more to complexity beyond the state of maximum entropy, which is attained at the entropy class r = 2 for this map size

$$N(4)_{r = 2} = \sum\limits_{r = 1}^{2} {\frac{4!}{{r!(4 - r)!}}} = \frac{4!}{{1!3!}} + \frac{4!}{{2!2!}} = 10$$
(10.43)

Similarly, the number of all possible 3 × 3 binary maps configurations from r = 1 up to the maximum entropy class (which is r = 4) is 255:

$$\begin{gathered} N = \sum\limits_{r = 1}^{{r = \frac{n - 1}{2}}} {\left( \begin{gathered} n \hfill \\ r \hfill \\ \end{gathered} \right)} = \sum\limits_{r = 1}^{{r = \frac{9 - 1}{2} = 4}} {\left( \begin{gathered} 9 \hfill \\ 4 \hfill \\ \end{gathered} \right)} = \left( \begin{gathered} 9 \hfill \\ 1 \hfill \\ \end{gathered} \right) + \left( \begin{gathered} 9 \hfill \\ 2 \hfill \\ \end{gathered} \right) + \left( {\begin{array}{*{20}c} 9 \\ 3 \\ \end{array} } \right) + \left( \begin{gathered} 9 \hfill \\ 4 \hfill \\ \end{gathered} \right) = 255 \hfill \\ \hfill \\ \end{gathered}$$
(10.44)

The number of possible configurations N(n) up to maximum entropy class, depends on whether the total number of cells (n) is an even or an odd number:

$$N(n) = \sum\limits_{r = 1}^{r} {\frac{n!}{{r!(n - r)!}}} = \left\{ {\begin{array}{*{20}c} {\sum\limits_{r = 1}^{r = (n - 1)/2} {\frac{n!}{{k!(n - r)!}}} } & {n = odd} \\ {\sum\limits_{r = 1}^{r = n/2} {\frac{n!}{{r!(n - r)!}}} } & {n = even} \\ \end{array} } \right\}$$
(10.45)

For n = odd, we simply have:

$$N(n) = \sum\limits_{r = 1}^{{r = \frac{(n - 1)}{2}}} {\frac{n!}{{r!(n - r)!}}} = 2^{n - 1} - 1$$
(10.46)

For r = n/2 (case where n = even), the calculation of N(n) is carried out by employing the Gaussian hypergeometric function 2F1, so the formula giving the total N(n) of binary maps configurations is:

$$\begin{aligned} N\left( n \right) & = r\sum\limits_{k = 1}^{r = n/2} {\frac{n!}{{r!(n - r)!}}} \\ & = 2^{n} - 1 - \frac{{n!{}_{2}F_{1} \left( {1,1 - \frac{n}{2},2 + \frac{n}{2}, - 1} \right)}}{{\left( {\frac{n - 2}{2}!} \right)\left( {\frac{n + 2}{2}!} \right)}} \\ \end{aligned}$$
(10.47)

and therefore,

$$N(n) = \left\{ {\begin{array}{*{20}c} {2^{n - 1} - 1} & {n = odd} \\ {2^{n} - 1 - \frac{{n!{}_{2}F_{1} \left( {1,1 - \frac{n}{2},2 + \frac{n}{2}, - 1} \right)}}{{\left( {\frac{n - 2}{2}!} \right)\left( {\frac{n + 2}{2}!} \right)}}} & {n = even} \\ \end{array} } \right\}$$
(10.48)

To get a glimpse of the “combinatorial explosion” of the number of possible binary map configurations N(n) with increasing map size n, it suffices to consider the values of N(n) with respect to n even only for some low values of n (Table 10.5). Hence, when embarking to carry out spatial analyses of any kind by using square binary maps with increasing map size, it always has to be considered that the number of possible configurations will increase very fast and so the computational complexity for examining the spatial complexity of all these configurations rapidly spirals out of computational control.

Table 10.5 Even in small binary maps (from 2 × 2 to 6 × 6 shown here), as the map size (n) increases, the sum of possible square binary map configurations N(n) “explodes”