Taxonomy/1. Quality/02. Models
Models, abstraction, structure - what have these to do with each other?
A →model of a →thing is a physical or mathematical object that represents some of our knowledge about that thing. Colloquially: an object that "mimicks" some aspects of the thing.
Models are used as a source of insight or a means of communication. A model usually represents some knowledge but not all and does not completely correspond to the real thing. A good understanding of the relation between model and modelled thing is essential.
The thing depicted here shall serve as running example throughout this chapter: an audio installation intended to please the listener in his living room with music.
Actually, this picture itself already is a model: it mimicks the looks of a thing under frontal view, at a smaller scale and with a certain resolution. We can use this model to share knowledge about how the real thing looks. You can use it to decide whether the real thing will blend with your furniture. |
Inhoud
Different kinds of models
Physical models
Physical models not only are useful in communication, they can also serve as objects for experiments when the real thing is too large, too small, too fast, too slow, too complex, too expensive or otherwise unaccessible. In medical research and training, for example, mice and pigs are used as models for homo sapiens.
Obviously, physical models have many properties that do not correspond to the modelled thing at all. Mice have tails. Cardboard models of buildings may have the same proportions and possibly the same colours as the buildings themselves, but the statical reasons that they do not collapse are completely different from those of bildings of brick and mortar, with "weight-carrying" elements just painted on the surface. They mimick the looks of a building and are completely wrong w.r.t. other aspects. Eise Eisinga's planetarium mimicks the movement of our planets in real time, but at a scale that the solar system fits in a 18th century living room. Sun and planets hang on strings from the ceiling, impossible in the real planetary system. Before Eise Eisinga started to build its wooden mechanism, he used drawings as graphical models for this mechanism's parts. They mimick in two dimensions how the wooden mechanism fits in three-dimensional space.
Physical models can be sources of confusion unless we understand which of their properties are wrong w.r.t. the real thing.
Three physical models for different properties of the same thing:
|
Diagrams
Some diagrams, like this drawing by Eise Eisinga, are two-dimensional physical models.
A diagram in the instruction booklet of the audio installation that shows how receiver, cd player, and loudspeakers have to be connected looks similar to the real thing with real cables. Such diagrams are often used to explain how physical components of an →artefact have to be →assembled. |
Some such diagrams can at the same time be understood as two-dimensional notations for mathematical formulae. When they are syntactically correct they have well-defined mathematical semantics. They could be replaced by formulae, but some mathematical structures, for example state transition graphs of automata, are much more comprehensible when represented as a diagram.
Others, like the state diagrams of automata, have no physical correspondence; they are nothing but the graphical representation of a mathematical object.
Mathematical models
Well chosen mathematical models abstract from everything that is not essential. The clay bricks of a building are not replaced by cardboard, they are not there at all. Only their shape and stability is included in the mathematical model.
We can make mathemathical models corespond to the things modelled as closely as we like. To keep them small, we usually apply simplifyfications and idealisations.
Mathematical models often introduce →theories: mathematical structures which are not inherent to the thing itself but support reasoning about it.
Four worlds
The Rationality Square distinguishes between objects (at the bottom) and their descriptions (at the top). If we want to give mathematical models a place we also have to distinguish between natural and mathematical objects and descriptions. This gives rise to four worlds.
One, "down to the earth", is physical reality, the world of matter, things, observable phenomena, and causality. Other than some philosophers, we assume that it exists and that empirical observations – measurements – can give us pieces of objective knowledge about it. In the sequel, we shall not be interested in phenomena and properties that cannot be expressed in terms of such observables.
Another world is the one of mathematical models. The reader may also think of data structures. Objects of this world can only be imagined, not seen or touched. They can, however, be visualised: a computer can produce a physical model of them on a screen. We are interested in mathematical objects that are models of physical objects and their properties.
A third world is that of formal language, exactly describing those mathematical objects. The reader may think of formulae, declarations of data types, etc. They support reasoning by textual transformation. This is the world of formal and computer aided verification.
A fourth world is that of natural language, including all kinds of informal and semi-formal notations. In daily life nobody works entirely formal, not even mathematicians, scientists, and engineers. We successfully use natural language, sloppy mathematical expressions and diagrams of dubious syntax. But mathematically trained people have a very good feeling for when their statements and conclusions could be completely formalised if it was necessary to take the effort. When they feel they reason exactly, they are approximating the unreachable ideal of full formality. In the sequel we shall focus on this kind of exact reasoning. We will talk about about the ideal: "formal" descriptions and "formal" reasoning in the "mathematical" world. The reader may read the word "formal" as "as exact, unambiguous and complete as necessary so that no errors and misunderstandings can slip in."
|
|
|
|
The square above ca be drawn for both the structure and the properties of things. The Rationality Square actually is the front of a Rationality Cube! Seen from the side we see the four worlds.
We want to have certainty about physical phenomena. Formal, reproducible, verifiable deduction can only take place in the world of formal languages. It can never deal with physical phenomena, only with their mathematical models. This drawback is also a benefit: mathematical models allow considerable reduction of complexity without introducing new problems, as physical models invariably would.
Managing complexity
Physical reality is hopelessly complex. Huge numbers of elementary particles, each in one of many possible states, interact with each other, in principle across unlimited distance. In the world of information technology the same holds, mutatis mutandis, for the bits of the "machine code" of, for example, Windows.
Nature produced complex structures with powerful properties by means of evolution. Some artefacts also are developed evolutionary: little changes are made to existing artefacts in the hope to make them more adequate. Technology investigates "evolutionary development" in order to learn from nature. But what if we do not have the time and resources to wait until a "fit" artefact evolves? What if we cannot afford less fit specimens to die out? Then, a rational approach is necessary.
Humans, however, have difficulties to oversee more than seven different objects; they get lost when more than two implications are nested; they cannot remember more tan a few intermediate steps of a proof. When we reason about reality, we have to reduce conceptual complexity to reasonable proportions. Ideally, until insight is possible.
There are five ways to deal with complexity:
Abstraction: leaving away the irrelevant
Abstraction occurs at the transition from physical reality to the domain of reasoning. In other words: when we replace reality by a mathematical model. We incorporate some aspects of reality in in this model and abstract from others.
To keeps models simple without making them unrealistic we have to find the right abstractions. There are good reasons for omitting or simplifying most aspects of reality, as long as we are aware of what we abstract from and why. Whe can learn from physics, the science where far-going abstractions are very succesful. Remember, for example, that planet positions are predicted accurately on the basis of a few simple formulae and a couple of orbit parameters of each planet.
There is one pitfall, however. What is unknown cannot be modelled. But that something is unknown does not automatically make it irrelevant. If we abstract from it we must take care that what remains is still a valid model of reality. A lot of work in software engineering, intended to be machine-independent, abtracted from word lengths and limitations of machine arithmetic by pretending there was no max int. Several accidents resulted when this work was put into practice without understandig that reality was less ideal than the models. Similarly, Karl Marx contructed a beautiful theory of society but abstracted from some essential built-in properties of homo sapiens. As we all know, the success of his theory was rather limited.
We can distinguish three reasonable forms of abstraction.
Simplification - omit irrelevant qualities
For the administration of the tax office, the colour of the eyes of tax payers is completely irrelevant. Eye colour has nothing to do with the amount of tax one has to pay, and nobody assumes that it will ever have. When data types for tax office computers are designed, they will capture name, address, date of birth, salary, but not eye colour.
Idealisation - neglect small quantities
Physicists have developed a culture in which it is well-understood when a quantity is "negligible" so you better abstract from it, and when not. In many, but definitely not all areas of information technology, the durations of computation and communication can safely be neglected, so one better focuses on functional correctness. The execution mechanism will ensure that everything happens virtually instantaneous. Electrical engineering has successfully been constructing useful things with resistors of negligible capacity and inductivity, capacitors of negligible conductivity, and coils of negligible resistance and capacity. Models and reasoning can get considerably simpler if small values are treated as zero. But beware! Such abstractions may become useless, even misleading, when sizes of bodies become too large, computer programs become recursive, or frequencies become too high.
Separation of concerns - treat a problem under different views
For the same thing, different abstractions can support reasoning about different concerns. In electrical engineering, for example, resistors are bought painted in different colours. For their goal in electronic circuits, these colours are irrelevant. If they all were pink, they would work as well. Therefore, circuit diagrams mention resistance, not colour. The mathematical space of reasoning will comprise resistance, capacity, inductivity, but no colour. This is one view on circuits. Another view is their production and repair. The right elements have to be assembled in the right way by workers who do not have the time and knowlegde to find out which resistor has which resistance. Here the colours are relevant indeed, while at the time of production one can safely abstract from the electrical characteristics. Under yet another view, colour can also also have an esthetic function if the circuit is not hidden in a black box. Electronics, assembly, and esthetics are different views under which different people can reason about the same thing. Every view can have its own abstractions.
Eise Eisinga had to solve two design problems (see Taxonomy/1. Quality/1. Rationality). These can be treated in two diferent views. The diagram on the right shows a blueprint that abstracts from all issues but the number of teeth of all wheels, which of them form a gear and which share an axis.
We have seen earlier how different views of this audio installation are treated by different models. The model for "look and feel" is a physical one. But the really important properties of audio electronics are treated by means of mathematical models: decompressen and D/A conversion of sound, amplification and equalisation. |
→Theory: adding general knowledge
The result of abstraction should be embedded in a well-chosen mathematical space, where mathematical axioms, laws of nature, and transformation rules support reasoning about the desired classes of properties and decide which conclusions are valid. Physicists, for example, often use a four-dimensional time-space-continuum.
The "electronic" part of the theory needed for our example will, however, abstract completely from three-dimensional space. It will rather focus on digital and analog signal processing, where a signal is modelled as a function from time to voltage or air pressure. |
Hierarchical decomposition: using black boxes
Even if we focus on one view only and abstract from as much as possible, what remains can be too complex to deal with. Each transistor in a home cinema installation is vital, but there are so many of them. Nobody can oversee and understand a complete cicruit diagram.
Therefore, we impose a hierarchical structure on things when we reason about them. At each level of that hierarchy, understanding a thing means finding out and understanding how and why a relatively small number of well defined parts are working together. Although these parts can be fairly complex objects themselves, they are treated as →black boxes: at the level under discussion we consider their properties, but not their internal structure.
We consider an amplifier as something that amplifies a stereo signal. Its exact properties are specified in terms of dynamics, noise, linearity and the like. Whether the amplifier contains transistors or bulbs is, at this level, completely irrelevant. |
Al a lower level, we can decompose the parts (treat them as →glass boxes one by one, indepentendly from each other.
When we buy a house, the contract treats the building as a black box: it provides just enough information to identify the physical object but usually does not mention its properties nor its structure. This black box becomes a glass box when we look at the house and see that it consists of walls, floors, a roof, and windows. A plumber, however, looks at the same building under another view and "sees" a tree-like structure with one stem consisting of pipes and drains reaching vertically through all floors, with branches that hace sinks, dishwashers, washing machines, and washing basins attached. He then immediately knows where all the kitchens and bathrooms are (but not how they can be reached).
When we buy a modern window, we buy a black box with the description "window", some measurements and some quality criteria. It becomes a glass box when we identify frames, hinges, locks and, yes, glass. For a locksmith a hinge is constructed from at least three parts. And so forth.
In our audio example the first level of decomposition is the same as the composition of physical boxes and cables. This does not always need to be the case. In a ghetto blaster everything is contained in one and the same box. At the level of electronic circuits, the conceptual components (amplifiers, filters, equalisers, etc.) might even be printed indistinguishably intermixed on the same board. |
We see that, depending on our view and our knowledge, the same artefact can be mentally decomposed in different ways. Sometimes these can even be incompatible (particle and wave). Decomposition is hierarchical as each component can again be decomposed. At some levels of decomposition there is a switch in the necessary domain knowledge; think of architect, builder, carpenter, forester.
Going bottom-up we see that at each transition between glass box view (the structure of a component) and black box view (its specification) a reduction of conceptual complexity takes place, without losing what is essential. Detaild structural information is replaced by a simple indication of some properties.
Generalisation
Within the (mathematical) domain of reasoning, we can look for simple, general structures where details can be filled in later. In the example of machine arithmetic this means not to pretend that numbers are unlimited but introducing a variable max int and prove what has to be proved for that "general case". Note that in the culture of Lambda Calculus such generalisation is called "abstraction".
Usage of Tools
When efforts to reduce complexity do not lead to a structure so simple that insight lets us understand it, we can try to use computerised tools that help us not to get lost in the complexity of reasoning.
Formally defined mathematical models
Mathematical models are abstract. When the right abstraction is chosen, they model only what should be modelled and nothing else. Mathematical models can be based on powerful theories. This is why science prefers them above physical models.
Mathematical models can easily be made generic. They then model classes of similar things and support general reasoning about them. Physics has developed this to a high level.
If mathematical models are formally defined, they can be manipulated, simulated and even visualised by computers. Computer science has contributed a lot to this in areas like model checking, simulation, proof tools, visualisation, animation, rapid prototyping.
Languages, formulae, and objects
A model of a →thing is an object that represents some of our knowledge about that thing. A mathematical model is a mathematical object which resides in a mathematical space. It represents not only knowledge about that specific thing but also about theories suitable to reason about it. Mathematical objects and spaces can be defined semi-formally in natural language and some formulae. In fact, in traditional mathematics most of them are. A formally defined mathematical model is a mathematical model that is solely defined by a formula in some →formal language which provides rules for the formal manipulation of such objects. Definitions of formal models can be subject to formal reasoning and can be manipulated by computers.
A (formally defined, mathematical) model can be defined by different - semantically equivalent - formulae in the same formal language. Some will be easier to understand than others. The same model can even be defined by formulae in different formal languages. Sometimes users of two different languages are not aware whether their formulae denote the same mathematical model.
To make it worse, some texts are sloppy about the distinction between two of our four worlds: mathematical objects and the formulae defining them. A set of differential equations or finite automata diagrams is often called "a model of our system", while some readers understand that the model is the mathematical object defined by them and others do not. Often "formal model" occurs as a sloppy term for "formally defined mathematical model", equally often it can mean "a formula defining a mathematical model".
Tentative below this line. Je kunt beter nu niet verder lezen, want het gaat nog veranderen. |
Structure
In the top left of version of the Rationality Square for Engineering we find a →blueprint. If we want to formally reason about blueprints, we must write them as formulae defining a mathematical model that represents the structure we impose on the thing in the bottom left. Under a certain view, we sloppily call it "the structure of the thing", but we know that things have no inherent structure.
A source of confusion is the syntactical structure of the formula defining a model. It may and may not reflect a structure we wish to impose on the midelled thing.
With respect to structure we pragmatically distinguish between three classes of formal descriptions of mathermatical models.
0X-Specifications are intended to model properties of a thing but not the way it is composed from components.
This colour specification:
#CCCCFF
for example, is a mathematical model of the effect of the light reflected by Quinten Quist's iris on our retina. We call it a specification of his eye colour. It does not say anything, however, about the spectral composition of the colour itself or about the way it was made. The formula defining this colour has a certain structure, which gives some suggestion how such a colour could be made: by a certain RGB-pixel. But it is not intended that this structure has anything to do with the real thing.
When a formula defining a model is presented, it must always be clear of it is intended to model structure or only some property.
7X-Models model the structure of a thing consisting of at least two but not too many components, for example seven. The formula defining such a model reflects this structure and specifies each of the components separately. Examples are the structural formula of flowers of sulphur and the gear diagram of Eisinga's planetarium. Such models can be unterstood by humans, can be a source of insight, can be used to explain how something works, can be subject to a classcal mathematical proof with pen and paper and can be used as a blueprint to actually make the things they model.
∞X-Models model the structure of a thing with very many components – too many to be percieved by a human being. Examples are the triplets of Quinten Quist's DNA and the bits in the program memory of all computers of an international bank. In the latter case a relevant property is: it does not go mad at the beginning of a new millennium.
If anything can be deduced from such a model at all, this can only be achieved by computer support. Theoretical computer science tells us that it may be that computers can not help at all or that they will take much too long.
The Chinese Box Principle
A Russian Doll (матрёшка) is a rather dull doll: a thing which contains one similar, but smaller doll, and nothing else. That smaller doll is another Russian Doll or, usually after three or four levels, a solid doll.
A Chinese Box is a beautifully finished wooden box that contains a number of smaller boxes, which exactly fit together and fill the surrounding box completely. Each of these inner boxes might be a Chinese Box itself. The difference to a Russian Doll is that it contains more than one object at the same level, that these are of different sizes, and that the contents fits perfectly.
In the context of formal descriptions of structure we use the Chinese Box as a metaphor for a formally described mathematical model with the following properties:
- A →specification defines (a mathematical model of) the properties of a →thing;
- A →blueprint
- lists a not too large number of constituent →parts of the thing;
- gives, for each of these parts, a specification of its properties;
- provides information how the constituent parts are bound together;
- and all this in such a way that from the blueprint it can be proved that the overall thing has the specified properties.
Each such Chinese Box corresponds to a correctness theorem.
The →Chinese Box principle says that we should analyse and design things in terms of nested Chinese Boxes.