Previous | Next | Contents | Home
[No more frustration]

Contents
Introduction
Overview
Definitions
Theorems 1-4
Theorems 1-4: discussion
Theorem 5
Theorem 5: discussion
Theorem 6; Law 1
Law 1: discussion
Law 2
Law 2: discussion
Law 3
Law 3: discussion
Conclusion
Printer-friendly version

[The line of destiny]

[www.EdmundKirwan.com]

Encapsulation theory fundamentals


Theorem 5: Discussion.

The equipoised potential structural complexity equation is hardly a pretty thing, is it?

s(G) = n([n over r] - 1 + (r - 1)vt)

It is, however, one of those treasures that researchers, mathematicians and scientists spend entire careers examining: it's a non-zero, U-shaped graph.

Mathematicians love U-shaped graphs because the lowest point at the bottom of the U is special: it shows a unique inflection point, at which an increasing X-value changes the Y-value from one direction to another. In other words, it shows a fundamental change in the relationship between the two variables; and this implies a fundamental change in the physical nature of the processes that those variables describe.

Let's plot the equipoised potential structural complexity equation, for an equipoised graph of 100 nodes, with vt=1. On the X-axis, we'll put r=1 to r=100, and the Y-axis will show s, the potential structural complexity. See figure 4.1.

Graph of structural complexity

Figure 4.1 - Potential structural complexity vs. num encapsulated regions for n=100.

Look at that gorgeous U-shape.

What does this graph show? It shows how 100 nodes (one of which is public to all other encapsulating regions) express potential structural complexity as r, the number of encapsulating regions, ranges from 1 to 100. Let's take a look at some specific values of r, and let's presume for the sake of argument that the 100 nodes are 100 classes in an object oriented system and that the encapsulated regions are subsystems.

When r is 1, the potential structural complexity of the 100 classes is (almost) 10,000. This is the potential structural complexity when all the system is encapsulated into just one subsystem, i.e., when there is no encapsulation whatsoever (as each class is consequtive with all others).

As the number of subsystems increases (to the right on the X-axis), the potential structural complexity initally drops dramatically, and keeps dropping until it reaches approximately 10. This means that the potential structural complexity of the system has fallen just by increasing the number of subsystems in the system (and remember: in an equipoised system - which is just a system accurately described by an equipoised graph - all the classes are equally distributed between subsystems).

Then, for values of r above 10, the potential structural complexity increases. Finally, the number of subsystems reaches 100, when the potential structural complexity has risen back to the intial high of (almost) 10,000. In other words, when the 100 classes are evenly distributed over 100 subsystems, the potential structural complexity is just as high as when they were all in one subsystem, essentially when there was no encapsulation.

That's the magic of the equipoised potential structural complexity equation.

Firstly, it shows that an equipoised system has a minimum potential structural complexity at a specific number of subsystems. This gives us the goal we were looking for: a mathematically derived, unarguable, inviolable number of name spaces that minimises potential system complexity.

Secondly, it shows that having one class in each subsystem is just as potentially structurally complex as having no encapsulation whatsoever. This is why no one would put just one class in all their subsystems, because the mathematics proves what they intuitively feel: that all those subsystems just add complexity, not reduce it.

This graph was, recall, drawn for vt=1. What happens as we increase vt, as we increase the mean number of public nodes per encapsulated region? Figure 4.2 shows two plots overlaid: the first for vt=1 as before, the second for vt=2, in other words, with two nodes on average per encapsulated region visible to all others.

Graph of potential structural complexity for two values of
the information-hiding violation tolerance

Figure 4.2 - Two plots for n=100: vt = 1 (lower) and vt = 2 (upper).

For higher vt it's clear that both the important values of r have decreased: the value for which the potential structural complexity is minimised has dropped below 10, and the value for which the number of encapsulated regions expresses as much potential structural complexity as no encapsulation at all has dropped dramatically. We will examine both in more detail later.

Note also that the value of the minimised potential structural complexity has risen: thus increasing the information-hiding violation tolerance increases the minimum possible potential structural complexity.

The final two laws here concern themselves with proving formulae for the two key values of r: the value for which the potential structural complexity is minimised, and the value for which it becomes the complexity horizon: the point at which encapsulation has failed to reduce potential structural complexity. Before these laws, however, we must first investigate the relationship between equipoised graphs and non-equipoised graphs from the point of view of potential structural complexity and try to justify the investigation into this rarity.

Previous | Next | Contents | Home

Copyright (C) Edmund Kirwan 2007. All rights reserved.