Keywords

1 Definition and Disambiguation

The end is in the beginning and yet you go on

(Samuel Beckett, 1906-1989, “Endgame”, 1957)

Plainly put, “spatial complexity” is exactly what its two constituent words suggest: the complexity of a spatial object.

Any spatial object, be it two-dimensional (i.e. a surface) or three-dimensional, or even n-dimensional, large or small in size, on a plane or on a curved surface, compact or with holes, rugged or smooth, can be more or less complex in comparison to another.

In terms of “spatial science”, the most characteristic cases of spatially complex objects or settings can be identified from the perception of geographical spaces or outdoor environments (i.e. landscapes), or even from representations of spaces by maps, photographs etc. To other sscientists, a machine constituting in many parts, the shapes and colors of a garment, a painting, and innumerable other objects and surfaces may be spatially complex.

Let us consider what comes to mind when we think that some object of the real world is “complex”, in contrast to another one that is “simple”. If something is more “complex”, it means that it is more difficult to understand, to learn how it works, to break down in pieces, to re-create from its basic constituents, to explain to ourselves and to others. All these difficulties are summarized by the word “complexity” and if the “complex” object is spatial, then we talk about “spatial complexity”, that is the complexity of a spatial object.

Let us consider these in a practical way: A room is certainly more complex than another, if there are more objects in it (might as well be so for several other reasons, as will be examined later). Contrast, for instance, the simplicity of a zen monk’s room with one of the royal halls of the palace of Versailles. Certainly, the fewer items or any other categories of distinct objects are confined within a spatial extent, the simpler the space is. For instance, the floor of a 30 m2 room with three chairs on it is more complex than if only one chair was there, and even more complex than if the room had been completely empty. Carrying on along the same line of thought, the fewer items or any other categories of different classes of objects are found within a strictly confined spatial extent, the simpler this spatial extent will be: if, in addition to the three chairs, the floor of the same room had a table, a sofa and nineteen books on it (that is 24 objects belonging to 4 different categories), then it would be more complex than if it had all its objects belonging to the same category, i.e. 24 books or 24 chairs.

Intuitively also, we understand that some space is more complex, if the objects in it are in a state of disorder. As we all know, disorder increases the difficulty of understanding something. If there were only 24 books in the room and they were all packed together as a single stack, then the room would simply consist in two halves: the area of the room covered by the books (the stack) and the uncovered area. If the 24 books were scattered all over, then the rooms’ tenant would need to brace herself to “arrange” the place, or “put things in order”. But what if these 24 books were not placed disorderly on the floor? What if they were all stacked together on a table instead? Then the room would have an area of low complexity (where there are no tables, books, chairs, or sofas) and an area where there is a table with a heap of books thrown randomly on it. What would the complexity of that room be then? While complexity may be localized and concentrated within a restricted area of space, it may as well be absent in other areas.

Hence, spatial complexity is the degree of difficulty to describe (computationally, linguistically) or to code (i.e. algorithmically) a spatial object, surface, arrangement, assortment, or piece of space containing objects or surfaces. As such, its study is part of the study of “complexity” as it has been developed in mathematics and computer science over the last decades, with the peculiarity that it is focused on the complexity of spatial entities only, without any restriction as to the nature, the physical or chemical constitution or functions of these spatial entities. Whatever their nature may be, we need tools to evaluate the spatial complexity of ordinary objects: the spatial complexity of a balloon, of a landscape, of one square centimetre of one’s skin etc.

Some notices of disambiguation are due here.

  1. (i)

    Objects, sets of objects or systems that behave in a complex manner are beyond the scope of the present book. Complex behaviors, processes and dynamics constitute the research subject of the already fairly advanced discipline of “complex systems”, which studies phenomena such as chaos, bifurcations, unpredictability etc.

  2. (ii)

    Spatial complexity” should be clearly distinguished from the term “space complexity” that is used in informatics to denote the amount of space resources required for the computation of a problem’s solution. Consequently, the complexity of processes, behaviors, situations, relationships, temporal changes, of any process that presents changes in time or changes in contexts other than spatial, or can not be brought into spatial form only, lies beyond the scope of “spatial complexity”.

  3. (iii)

    The notion of “topological complexity” only partly relates to spatial complexity, because it means quite different things in different scientific contexts, and, as such it can not replace the significance of the term “spatial complexity”, nor should it be confused with it. It was defined by Farber (2003, 2004) as the complexity of the problem of constructing a motion planning algorithm in the 3d space. This term has been adopted mainly in robotics, and particularly in the study of the complexity of trajectories and motion planning (Grant 2007), but it has also appeared in various contexts in other domains also: by Finkel et al. (2006), in the context of diffeomorphisms of 2-dimensional manifolds, by Martensen (2003) and Godefroy et al. (2001) in the context of Banach spaces, by Grigoriev (2000) and by Souvaine and Yap (1995) in range searching. Besides these, it is also encountered in biology and DNA analysis (Hertling 1996; Martin-Parras et al. 1998), and in neural networks (Chapline 1997). It seems that in all these cases the second component of the term (“complexity”) was apparently unrelated to any other domain of complexity analysis (i.e. algorithmic complexity).

  4. (iv)

    Spatial complexity is a much wider concept than “shape complexity” for which the reader may consult the relevant literature (e.g. Chazelle and Incerpi 1984; Catrakis and Dimotakis 1998; Rossignac 2005; Joshi and Ravi 2010; Chambers et al. 2016). The term “shape complexity” has so far been poorly related to algorithmic complexity and there are no methods from algorithmic complexity theory to calculate it, nor is there a universally accepted measure of “shape complexity”. Furthermore, spatial complexity refers not only to complexity of shapes (outlines/forms), but also to the spatial allocation and/or distribution of colors/covers/classes/types/categories over surfaces or spatial objects; it therefore also heavily relies on entropy and probabilities of distributions (while “shape complexity” does not).

  5. (v)

    Conforming with the common understanding of the word “space”, a two-dimensional space is the least-dimensional space that can, without any doubt, be considered as a “space”; as points and lines alone can not be considered as “spaces” in the broad non-mathematical sense of the word “space”. This convention is followed here, and therefore the examination of strictly-less-than-two-dimensional cases is beyond the scope of “spatial complexity” , unless they form indispensable constituents of spatial complexity. Spatial complexity is encountered in innumerable forms, in two, three and higher spatial dimensions, although it can be generated by objects with dimensions lower than two (i.e. lines). While mathematicians normally deal with “spaces” of dimension strictly less than two also, the 0-and-1-dimensional spaces do not conform with what most people call “space” (lines and points are not “spaces” in the non-mathematical sense) and, as spatial complexity is a fundamentally inter-disciplinary subject, the common meaning attributed to the word “space” is respected, so here we mean the complexity of objects and surfaces of (at least) two dimensions.

Spatial complexity may be charmingly beautiful, puzzling, or even disdainful (often infuriatingly so). It can be a source of frustration (i.e. to scientists and engineers who seek simplicity and efficiency) and a source of inspiration to philosophers and artists. Whatever the attitude towards it, all living beings have to cope with it in different forms, time and again, from their birth until their passing away. Bees seek flowers among the plants’ leaves, predatory animals assess every tiny change in a small or large spatial area in order to spot and stalk their prey. Humans seek to conquer and understand the entirety of space that is available to them on the surface of this planet and to expand their quest for complex forms of existence in the outer space.

Distinguishing the interesting from the uninteresting, the useful from the useless, the certain from the uncertain, eventually involves taking snap decisions that are based on one’s spatial perception. Taking decisions on whether to stay or leave a particular location in space, evaluating the aesthetic appeal of an image, deciding whether a shape in space is purposeful or not, all these and countless more decisions inevitably involve some kind of assessment of spatial complexity. Quite often, processing such assessments quickly can be a matter of life and death. Generally, the more complex the spatial area or spatial object surveyed, the more difficult it is to reach a decision about it. Some successful professionals however, are often able, with admirable effectiveness, to assess the complexity of spatial arrangements and take correct snap decisions accordingly (i.e. some military officers). Others still (i.e. visual artists), are able to create pleasant forms, by masterly exploiting the aesthetic characteristics of spatial forms, by either enhancing or downsizing spatial complexity in their artworks. And then, there are scientists (mathematicians, geologists, ecologists, engineers among many others), who seek to understand how spatially complex a two-dimensional surface (such as a map or an image) or even three-dimensional object may be and why. As a general rule, the more advanced a life form is, the more complex its internal structure.

Aside of the complexity of bodily functions and operations, the human body organs, tissues and cells display increasingly complex forms if examined at finer spatial scales. Furthermore, the rise of increasingly more spatially complex forms throughout the earth’s history is manifested not only biologically, but also geologically (in the separation of landmass from the oceans and then the breaking up of Pangea into several pieces and continents). The incessant processes of spatial complexification are difficult to grasp in their immensity and multiplicity, as we possess only limited tools to investigate them to their full breadth and depth. But striking differences of spatial simplicity vs. complexity are all around us. Given this, it should be rather easy to start grasping the basics of spatial complexity by using common knowledge and everyday experience, as will be seen in the following section.

2 Disorder, Asymmetry, Inequality

He had brought a large map representing the sea,

without the least vestige of land: and the crew were much pleased

when they found it to be. A map they could all understand…

Other maps are such shapes, with their islands and capes!

but we’ve got our brave captain to thank that he’s brought us the best:

a perfect and absolute blank!

(Lewis Carroll, “The Hunting of the Snark”, 1876)

Let us see some examples of spatial complexity, as contrasted to spatial simplicity. A barren landscape bearing no plants, no water and virtually no life is spatially less complex than a landscape in which many different plant species cover its surface (Fig. 1.1).

Fig. 1.1
figure 1

Part of a dry and desert-like landscape, which can not bear vegetation (left) contrasted to a complex landscape (right) that is endowed with many kinds of different plants within a small area

A two-dimensional object, such as a photograph of the sky may have almost zero variability among its cells (and thus low spatial complexity), while another may display a great diversity in its color palette (Fig. 1.2). In the animal kingdom, genetic rules prescribe remarkable differences in the spatial complexities of the appearances of living beings of the same species (Fig. 1.3). Expectedly, a piece of space is more difficult to understand, if the objects in it are in a state of disorder (Fig. 1.4).

Fig. 1.2
figure 2

A sky with only one color contrasted to a sky with many colors: more colors, higher spatial complexity

Fig. 1.3
figure 3

Two stray cats (left and middle) that the author used to take care of. On the right, one of the author’s cats, Flashy, enjoying getting herself entangled in complex spatial settings. Notice the varying levels of spatial complexity on the cats’ fur: an entirely black one (less complex), a black-and-white (more complex), and a multicolored one (even more complex). Having closely observed these three cats’ characters, the author has concluded that the more spatially complex their appearance, the more complex their behaviors also (an observation that applied to these particular ones only!)

Fig. 1.4
figure 4

An ordered space (left) requires less effort to describe it and therefore has lower spatial complexity in comparison to a space that hosts disorder (right)

Besides disorder, also characteristic is the absence of symmetries that would qualify the space as ordered. Spaces with asymmetries are more difficult to decode and require more spatial information than spaces endowed with symmetric or repetitive patterns (Fig. 1.5). Yet, as often happens, order may occur side by side with asymmetries within the same space (Fig. 1.6).

Fig. 1.5
figure 5

Symmetries in space (left) are indicators of lower spatial complexity, in contrast to asymmetries (right) that (most probably) imply higher spatial complexity

Fig. 1.6
figure 6

The symmetric design of a building, contrasted with the spontaneously spreading branches of a tree

Obviously, the whole problematic of spatial complexity can easily spiral out of any possible computational control and this compels us to seek as simple approaches to it as possible. That is why, in so many cases, we need to reduce spatial complexity. Simplifying details in either geometric features or categories of spatial elements (i.e. colors) in a spatial object results in reducing its complexity. For instance, a regular hexagon is a more complex form than a square. Similarly, an irregular hexagon is even more complex than a regular hexagon (Fig. 1.7). This is because the hexagon has more sides and angles than the square and the irregular hexagon has different angles and side lengths than the regular hexagon.

Fig. 1.7
figure 7

Three shapes compared with respect to their spatial complexity: A regular hexagon is more complex than a square and an irregular hexagon is more complex than a regular hexagon

Simplicity does not only depend on order, symmetry and shape. It has to do with numbers of objects and shapes also: quantity matters for complexity. It is easier to draw a square (either by hand or with the aid of a computer), than to draw 439 squares of the same side length. One step further: it is easier to perceive 439 equal-sized squares than 9 such squares. And, eventually, it is easier to perceive 9 squares of the same size than 9 squares of unequal sizes (spatial inequalities increase spatial complexity). To make things even more “complex”, it is easier to perceive 39 equal-sized squares all red than 39 squares of unequal size and of different color each (can anyone easily figure out 39 different colors in 39 unequal squares?). So same class (represented i.e. by the same color), same size, and same geometry mean lower spatial complexity. Plainly put, spatial dissimilarities increase spatial complexity. Besides geometric simplification however, thematic simplification is commonly applied in order to reduce the spatial complexity of an image. In Fig. 1.8 for instance, while the original picture requires 545 kbytes memory, the simplified one needs only 4 kbytes.

Fig. 1.8
figure 8

A photograph of the skyline of Rio de Janeiro (above) and a simplification of this picture (below). The geometric features (points, lines, areas) of the original picture have been regrouped, so as to become as simple as possible and the same was done with the colors. Simplification in either geometric features or spatial elements reduces spatial complexity: the original photograph (above) requires 545 kb memory while the simplified (below) only 4 kb

3 Spatial Complexity in Three Dimensions

“Complex” is a transition that comes

with a reversal or an adventure, or both

“Πεπλεγμένην δὲ ἐξ ἧς μετὰ ἀναγνωρισμοῦ

ἢ περιπετείας ἢ ἀμφοῖν ἡ μετάβασίς ἐστιν”

(Aristotle, 384-322b.C.,”Poetics”, 1452a)

While 2d square cells constitute the basic spatial element for the analysis of 2d surfaces in Z2, voxels (a composite word from volume and pixel) are the 3d equivalent of pixels in the digital topology Z3. A 3d surface (even curved surface) can be voxelized in the same way that a 2d surface is pixelized (Fig. 1.9) and thus, voxelized landscapes can be created to model the surface of a 3d object or its internal structure. Although several algorithms have been devised for voxelization, the calculation of the complexity of voxelized spatial forms remains rather poorly studied to date.

Fig. 1.9
figure 9

Voxeliation of a cube (left) and of an irregular surface (right)

And yet, surfaces and objects may not appear straightly stretched in space: they can be knotted, linked, braided, writhed (Fig. 1.10) and topological differences among knots can help us understand whether an object in 3d space is more complex than another (Fig. 1.11). A central question in knot theory is whether and how a knot can be untied (would Alexander the Great be able to solve the Gordian knot if he lived in the twenty-first century without eventually cutting it off?).

Fig. 1.10
figure 10

The “unknot” (that is a trivial knot, homeomorphic to the circle, on the left) and two knots made from rubber that can easily be transformed to the unknot on the left

Fig. 1.11
figure 11

Increasing surface complexity in the 3d space is reflected by knotting and linking: it is the same rubber strand that is simple (left) or increasingly complex (middle and right)

Beyond the third dimension, the equivalent of the voxel is the “doxel” in the 4d space (dynamic voxel), for which we are still short of satisfactorily efficient algorithms for complexity estimates. Unsurprisingly, as regards spaces of even higher dimensions (fifth and higher), although our knowledge from topology is fairly advanced, our methods for estimating spatial complexity are still very poor. Yet, and as will be explained in the next chapters, severe difficulties are encountered in encoding, decoding, measuring and perceiving spatial complexity even in two dimensions only and even in cases of simple small binary maps.

4 Computational Complexity Classes

“A short piece of work means as much to me as a long piece of work”

(Harold Pinter, 1930–2008)

No doubt, many problems of spatial complexity involve some kind of computation. Eventually, the complexity of a spatial object reflects the effort or resources (measured in terms of time, energy, computational power, either consumed by a human or a machine) required to fully decipher an object by using a sequence of symbols or operations. Whether these computations are easy, difficult or even impossible to carry out is a question that falls in the field of “computational complexity”. The “computational complexity” of a problem concerns the computational difficulty of solving a certain problem or a class of problems. For further information, the reader may consult anyone of the classic texts on this subject (i.e. Garey and Johnson 1979; Lawler et al. 1985; Rayward-Smith 1986; Papadimitriou 1994; Van Leeuwen 1998). Although several “computational complexity classes” have been identified, some categories will be briefly presented next, as they sporadically appear in assessments of spatial complexity. The complexity class “P” contains all problems that can be solved by a polynomial algorithm (one such is to determine whether a given number is a prime or not). The class PSPACE is the set of decision problems that can be solved in polynomial space and a polynomial number of bits of space or memory (to by used/occupied) are used in any number of time steps. The nondeterministic variant of PSPACE is NPSPACE and the equivalence between the two is guarranteed by Savitch’s theorem (Savitch 1970). For other interesting equivalences of PSPACE, the reader is referred to Immerman (1988) and Szelepcsényi (1988). The class EXPTIME is the set of problems that are solvable in exponential time, that is by an order of magnitude O(2p(n)) time, where p(n) is a polynomial function of n, and much alike them, EXPSPACE is the set of problems that are solvable by an order of magnitude O(2p(n)) space, where p(n) is a polynomial function of n.The often-encountered class “NP” contains all problems of which the solution can be verified by a polynomial algorithm (i.e. the problem of deciding whether two graphs are the same). The class “NP-complete” contains all those “difficult” problems, which nevertheless have the characteristic that if one of them could be solved, then all the other ones of the same class might as well. A known example of this class from the spatial sciences is the problem of deciding whether it is possible to color any map of different regions (i.e. countries) with three colors only, in a way that that no two adjacent countries are assigned the same color. Finally, the problems of the “NP-hard” class are even more difficult to solve and most often involve some optimisation. Also from the spatial sciences, a typical such is problem is the “travelling salesman”, that consists in finding an optimal route between points without repeating any part of the itinerary. Despite the fact that many problems of 2d spatial analysis such as those involving raster image analysis (analysis of imagery on the basis of orthogonal grids) are expected to be NP-hard, our knowledge of their computational complexity remains restricted (Coeurjolly et al. 2008; Sivignon and Coeurjolly 2009).

5 Perceiving and Creating Spatial Complexity

“The transcendental topography of the mind”

(Georg Lukacs 1994, p. 29)

Understanding the way we perceive spatial complexity is an issue of its own. As repeatedly proven experimentally with the use of various strings of symbols, the perception of randomness by humans is skewed and hardly (seldom) accurate (e.g. Brugger 1997; Falk and Konold 1997; Kahneman and Tversky 1972; Kareev 1992; Lopes and Oden 1987; Nickerson 2002). This is partly due to the fact that the theoretical concepts of probability may not coincide with subjective views of what is random and what is regular (see Beltrami 1999), to the extent that the term “subjective complexity” (Falk and Konold 1997) has been proposed, while the “qualitative complexity” (Papadimitriou 2010) refers to the meanings conveyed and the semantics associated with the spatial complexity of a spatial object (Papadimitriou 2012).

Plausibly, a deceivingly innocent question emerges (which, as will be seen later, presents enormous difficulties to answer): what kind of properties a two-dimensional object has that make it to be perceived as more complex than another? Take, for instance, two images (Fig. 1.12), both of the same size (367 × 375 pixels). On the left side, the photograph of a floor with its orderly arrangement of square tiles contrasts the dense branches of a natural Mediterranean bush (Spartium junceum) displayed at the photograph on the right. The latter picture displays a very high spatial complexity (at least as perceived visualy) that is created by the curved, interwoven thin branches of the bush. It would be hard to believe that, as a matter of fact, the image on the right rquires only twice (394 kb) the memory required for the storage of the picture on the left (193 kb). So kilobytes of computer memory are not always suggestive of spatial complexity of the object examined, particularly the perceived spatial complexity. To make this point more explicit, consider yet another pair of imagery (Fig. 1.13), in which a tree is contrasted to a shop selling pottery. In this case, both images are of the same size (367 × 375) and require the same storage memory also (334 kb). The point here is to observe the context associated to this difference in computer memory requirements for each image: the fact alone that the shop’s picture is more complex (and hence, it requires more memory) coincides with the meaning it conveys to the viewer. Evidently, there is a huge difference associated to meanings conveyed by these two images: the natural order of the orientation of the tree’s branches may be a false assurance of low complexity, while the shop’s facade is an example of diversity, asymmetry and disorder. And yet, both images require exactly the same memory storage capacity. Hence, bytes of information are not always suggestive of the meanings associated to what the images display. In fact, memory sizes derived from the application of the lossless compression method png on each image do not constitute a spatial complexity measure on its own: a compression process or method is not necessarily a measure of complexity and, as a matter of fact, several compression methods exist. The difference between any two such images is in memory bytes. But memory bytes measure information; not complexity (although information may serve as an estimator of complexity of an image lacking other appropriate measures). And here enter psychology and art theory to explain what is the difference between visual complexity and the spatial determinants that define the spatial complexity of an image, object or setting.

Fig. 1.12
figure 12

Two images of the same size (367 × 375). A floor (a) and dense branches of Spartium junceum (b). Image b requires only the double (393 kb) of the storage memory required by image a (194 kb), although it is visually a lot more complex

Fig. 1.13
figure 13

Two snapshots of the same size (367 × 375). A tree (a) and the façade of a shop (b). Although both images require the same storage memory (334 kb), image a gives a sense of “natural order” as all branches lean towards the same direction) while image b gives a sense of disorder

Yet, nothing precludes the possibility that spatial complexity be concealed right before our eyes. This is because the mathematical proof of existence of spatial complexity and its visual perception can be poorly related with these being two almost completely disjoint processes. Consider, for instance, the image of Fig. 1.14: all odd-numbered rows have 6 colored cells each, all even-numbered 8 and all columns have 7 colored cells. Despite this mathematical regularity however, there is no easily discernible pattern in it.

Fig. 1.14
figure 14

Spatial complexity may be concealed or misperceived. This map has some remarkably simple regularities, which nevertheless evade the reader’s attention at first sight (unless one is told how to unveil them): all odd-numbered rows have 6 dark cells each, all even-numbered ones have 8, while each and all columns have 7 colored cells