Page 1

# Abstract

This paper investigates the phenomenon of the anomalous minimised configuration, that is the configuration of a non-uniformly distributed encapsulated set whose potential coupling is less than that of the equivalent uniformly distributed encapsulated set. The paper aims to demonstrate that the existence of anomalous minimised configurations does not threaten the validity of the isoledensal configuration efficiency.

# Keywords

Encapsulation theory, encapsulation, potential coupling, anomalous minimised configuration.

# 1. Introduction

Proposition 1.11 in [2] proves that, given an encapsulated set subject to the constraint that its violational elements are uniformly distributed over its disjoint primary sets, this set will express a minimum potential coupling when its information-hidden elements are also uniformly distributed over its disjoint primary sets. It is natural then to ask: does there exist an encapsulated set, non-uniformly distributed in both information-hidden and violational elements, whose potential coupling is lower than that of the equivalent uniformly distributed set?

Actually this question was also answered in [2] which showed an example of an anomalous minimised configuration (A.M.C.), i.e., a non-uniformly-distributed encapsulated set whose potential coupling is lower than that of the equivalent, uniformly-distributed set, see table 1. This A.M.C. was, however, stumbled upon accidentally; we seek here to understand why A.M.C.s exist at all.

# Private program units

# Public program units

Subsystem 1

33

12

Subsystem 2

5

50

Table 1: The first A.M.C.

Let us show the A.M.C. of table 1 in the presentation format described in [3], see (A).

n=100, r=2, d=31 (A)

= 45(44 + 50) = 4230

= 55(54 + 12) = 3630

= 4230 + 3630 = 7860

The set in (A) has a potential coupling, s(G), of 7860 but its uniform potential coupling, su(G), is 8000, hence the set is by definition an A.M.C.

Before engaging in a systematic study of the A.M.C., we must ask why A.M.C.s matter; the answer is that they are, though theoretically interesting, a slight inconvenience to encapsulation theory. The immediate problem is not the high value of the uniform potential coupling itself, but the high value of the set's isoledensal potential coupling,; in (A), for example, the isoledensal potential coupling is 7935, which is also greater than its potential coupling of 7860. Recall that one of encapsulation theory's analytical tools is the isoledensal configuration efficiency, ce, the measure of that proportion of potential coupling a set expresses over and above its isoledensal potential coupling, the defining equation being:

The isoledensal configuration efficiency is defined to range between 0 and 1, an unencapsulated set having an isoledensal configuration efficiency of 0, a perfectly encapsulated set having an isoledensal configuration efficiency of 1. This isoledensal configuration efficiency thus offers a concise evaluation of the degree to which a (for example) software system is encapsulated.

If, however, the isoledensal potential coupling is greater than a set's actual potential coupling, as is possibly (though not necessarily) the case for an A.M.C., then ce will yield a value of greater than 1, which is ambiguous. There thus exist sets for which the equations of encapsulation theory yield ambiguous results: hence the inconvenience.

We could simply redefine the configuration efficiency in terms of the A.M.C.'s minimum potential coupling, but this proves to be slightly laborious when compared with the definition in terms of the isoledensal configuration efficiency, so we shall keep our definition as is and attempt to show that even when a conflict arises the consequences are not significant.

Given, then, that A.M.C.s exist, we would like to define the parameters within which the simple tools of encapsulation theory yields sensible results, thus alerting practitioners to those cases to which more sophisticated tools should be applied. This gives rise to the following two goals.

Goal 1: We need to understand why A.M.C.s exist. We need to understand how the distribution of elements within an encapsulated set contributes to the emergence of an A.M.C. and why this distribution lowers the potential coupling below that of a uniformly-distributed set. To satisfy these demands we must derive the equation for the lowest potential coupling that an A.M.C. can express.

Goal 2: We note that we already have a means of identifying an encapsulated set as an A.M.C.: we simply calculate its uniform potential coupling, su(G), and its potential coupling, samc(G); then we calculate the difference between them, which we shall define as the A.M.C. difference, sdiff(G)=su(G)-samc(G). If sdiff(G) is greater than 0, then we know that the set is an A.M.C. and we can treat our calculations with appropriate caution.

That a set is an A.M.C., however, is not catastrophic but a matter of degree.

If a set is an A.M.C. and its A.M.C. difference is predicted to be 50% of its maximum potential coupling, then we can intuitively expect our isoledensal configuration efficiency to be ambiguous by approximately +/-50%. This is catastrophic, as an error of this magnitude renders the isoledensal configuration efficiency worthless: this would imply that a software system with a reported configuration efficiency of 0.5, for example, would actually have a configuration efficiency of between 0.25 and 0.75, which is too wide a range to be useful.

If, on the other hand, the A.M.C. difference is only 1% of the maximum potential coupling, then we can expect that isoledensal configuration efficiency to be approximately 1% of the true minimum configuration efficiency; in this case, a software system could have a configuration efficiency of between 0.61 and 0.62, a range whose narrowness is entirely satisfactory.

The absolute A.M.C. difference is thus perhaps not as interesting as the ratio of the A.M.C. difference to the maximum potential coupling of a set, which we shall define as the A.M.C. ratio.

We would like to find an equation for this ratio.

We would like, furthermore, to express this ratio in as general a form as possible so that it might be applied unchanged to as many families of sets as possible. We specifically do not want this ratio in a form which depends explicitly on the size (i.e., the number of elements) of the set in question; instead, we would like it to take the form of a limit as a set grows indefinitely in size, a limit that all sets, no matter what their size, must then respect. In short, we seek the limiting A.M.C. ratio in the form:

The attempt to reach these goals is the purpose of rest of this paper.

This paper considers sets of absolute information-hiding only.

# 2. How configurations become A.M.C.s

## 2.1 Hidden migrations

Consider the simple set in (B).

n=70, r=2, d=20 (B)

= 35(34 + 20) = 1890

= 35(34 + 20) = 1890

= 1890 + 1890 = 3780

The encapsulated set in (B) is not an A.M.C. because its uniform potential coupling,, is not less than its potential coupling,; indeed, they are equal, as we expect for a uniformly-distributed set.

To gain insight into the nature of the A.M.C. we must ask: is there any way we can manipulate the distribution of elements within this set - without altering the total number of violational or information-hidden elements - that would reduce the set's potential coupling?

The two investigative tools we shall use to answer this question are the third and fourth transformation equations (see [4]).

Let us first attempt to manipulate the element distribution of (B) by re-distributing the information-hidden elements. The equation governing the moving of hidden-elements between regions is the fourth transformation equation, reproduced here:

Recall that:

: An encapsulated set

: The change of potential coupling of set G.

: Disjoint primary sets in set G. Ks is the source region from which elements are moved, Kt is the target region to which elements are moved.andare the number of elements in the source and target disjoint primary sets.

: The number of information-hiding violational elements in disjoint primary set Kx.

: the number of elements moved.

Let us arbitrarily move the 4 information-hidden elements from K2 to K1. Substituting these values into the transformation equation gives us:

This change in potential coupling is positive, that is, the set's potential coupling has risen by moving information-hidden elements from K2 to K1. This is unsurprising as we know, again by proposition 1.11 [2], that as (B) has its 40 violational elements uniformly distributed over both regions, then having its 30 information-hidden elements uniformly distributed guarantees that this configuration expresses the lowest possible potential coupling and so any attempt to concentrate information-hidden elements in either region is doomed to raise the system's potential coupling. In any case, the resulting configuration is shown in (C).

n=70, r=2, d=20 (C)

= 39(38 + 20) = 2262

= 31(30 + 20) = 1550

= 2262 + 1550 = 3812

## 2.2 Violational migrations

So our first experiment has failed: making the information-hidden elements non-uniformly distributed has not reduced our encapsulated set's potential coupling.

Let us now attempt to manipulate the element distribution of (B) by re-distributing the violational elements. The equation governing the moving of violational elements between regions is the third transformation equation, reproduced here:

Recall that:

: The number of information-hiding elements in disjoint primary set Kx.

Let us move 4 violational elements from K2 to K1. Substituting these values into the transformation equation gives us:

This transformation has had no effect on the potential coupling and again this is not surprising (see section 4.2.2 in [4]) ; the transformation has not reduced the set's potential coupling, see (D).

n=70, r=2, d=20 (D)

= 39(38 + 16) = 2106

= 31(30 + 24) = 1674

= 2106 + 1674 = 3780

So our second experiment has failed: making the violational elements non-uniformly distributed has not reduced our set's potential coupling.

## 2.3 The A.M.C. conjecture

Before trying any more experiments, let us take a closer look at the fourth transformation equation:

As noted above, in order for a transformation to reduce the potential coupling of a set, then the change in potential coupling must be negative, or:

Let us use this inequality to guide our experimentation.

The fourth equation above is written in terms of the total number of elements per region and the violational elements per region, but it is possible to re-write this equation in terms of both the information-hidden and violational elements (see Proposition 5.1) which is slightly easier to work with:

This form of the inequality gives us the precise requirements for reducing potential coupling by translating information-hidden elements: the terms on the left must be lower than the terms on the right.

The terms on the left are the number of violational elements in the target region minus the number of violational elements in the source region. To make these terms less than those on the right, we must make this value maximally negative; to do this, we must choose our region to have as many violational elements as possible and our target region to have as few violational elements as possible.

The terms on the right - if we ignore, for a moment, the 2m term - are the number of information-hidden elements in the source region minus the number of information-hidden elements in the target region (all multiplied by 2). To make these terms more than those on the left, we must make this value maximally positive; to do this, we must chose our source region to have as many information-hidden elements as possible and our target region to have as few information-hidden elements as possible.

Following both these guidelines, we hope be able to reduce the potential coupling of a uniformly-distributed set.

As we have already seen, however, starting with the uniformly-distributed set does not seem to help us in this task, as transforming the uniformly-distributed set into non-uniformly distributed in either information-hidden or violational elements does not reduce the set's potential coupling. So instead, let us first move all free violational elements into K1, a translation that does not change the set's potential coupling, see (E):

n=70, r=2, d=20 (E)

= 54(53 + 1) = 2916

= 16(15 + 39) = 864

= 2916 + 864 = 3780

If we now move a single information-hidden element from K1 to K2, we seem to satisfy the first guideline, namely that an information-hidden element is being moved from a source region with more violational elements than the target region. The second guideline - again ignoring the 2m term - seems not to be satisfied, as the number of information-hidden elements before the translation is the same in both source and target region; nevertheless we hope that the left-hand-side terms may be negative, and so still less than the zero of the right. Substituting these values into the information-hiding transformation equation gives us:

Here at last we see that a transformation of the set has resulted in a reduction of its potential coupling to some value below that of its uniformly distributed potential coupling.

We have manufactured our first A.M.C., see (F).

n=70, r=2, d=20 (F)

= 53(52 + 1) = 2809

= 17(16 + 39) = 935

= 2809 + 935 = 3744

Attempting to understand this insight into the A.M.C. we may ask whether moving two information-hidden elements from K1 to K2 would reduce the potential coupling of our set by more than moving just one information-hidden element. Or would moving three? Or all fifteen? To find out, let us use the information-hiding transformation equation to calculate the potential coupling changes of the configuration in (E), moving increasing numbers of information-hidden elements from K1 to K2, and plot the change of potential coupling against the number of information-hidden elements translated, see figure 1:

Figure 1: Change in potential coupling as information-hidden elements are moved from K1 to K2

From figure 1 we can see that there is a maximum negative change in potential coupling associated with the translating of a particular number of information-hidden elements, in this case moving between 8 and 10 information-hidden elements from K1 to K2 minimises the set's potential coupling. In fact the number of information-hidden elements, m, that we must move from K1 to K2 to maximise this reduction is given by (see proposition 5.18):

Substituting the values of (E) into this equation gives the exact number of elements to move as:

This equation holds when moving information-hidden elements from the source disjoint primary set to any particular target disjoint primary set. We note that, furthermore, that the transformation equation for information-hidden elements depends only on the two regions engaged in the transformation and is independent of all other regions and global parameters of the set. In our example the set contains only two disjoint primary sets, but of course most sets will contain more than two regions and so to minimise the potential coupling of the set, m information-hidden elements must be moved from the source to every other region in the set.

We thus seem to have arrived at the form of the A.M.C.: at minimum potential coupling, an encapsulated set will have all its violational elements concentrated in one source region (with all other regions containing the minimum 1 violational element), this source region will have fewer information-hiding elements than the uniformly distributed set (it may have none, depending on whether there were enough initially so cover moving m to every other region) and all the other regions will have a particular number of information-hiding elements which will be larger than the number in each region of the uniformly distributed set (the precise number is given in proposition 5.17 and is not dependent on the set's being uniformly distributed to begin with, as is m).

We have, however, arrived at this conclusion only through an informal analysis of the transformation equations; we have not proved that this form is the lowest possible configuration for any set. We offer this as a conjecture; specifically, it is the A.M.C. conjecture that the A.M.C. is the lowest potential coupling of any configuration of any encapsulated set, G, or:

(Note that this only applies where an A.M.C. can exist: for sets of specific information-hiding 1, for example, there are no free violational elements to move into the source region and so the uniformly distributed set will be the lowest possible.)

Given that the A.M.C. has this somewhat regular form, we can then derive the equation for its potential coupling (see proposition 5.15), thereby satisfying the first goal of this paper.

# 3. Depletion

In the previous section we saw the equation for the number of elements to move from the source disjoint primary set to every other disjoint primary set in order to minimise the potential coupling of a set and thus produce the A.M.C. There is a constraint, however, on the degree to which this equation can hold for a real set of elements, specifically that a real disjoint primary set must contain zero or more hidden elements: it may not contain a negative number of hidden elements.

Thus although the equation may specify the number of hidden elements to move from the source disjoint primary set to minimise potential coupling, there is no guarantee that the source disjoint primary set will have enough hidden elements to move precisely m into every other region.

If the source region does not contain enough hidden elements, then its potential coupling is minimised by taking all its hidden elements and evenly distributing them over the remaining regions, leaving the source region itself with zero hidden elements. We shall define an encapsulated set as non-depleting if its has enough hidden elements in its source disjoint primary set to move m hidden elements to all other regions and still have a non-zero number of hidden elements left in the source region after all the migrations; otherwise the encapsulated set is defined as depleting.

This categorisation will become important shortly.

# 5. Experiment revisited

## 4.1 A computer searches

We shall attempt to verify (or at least, falsify) our proposal that the A.M.C. configuration presented above is indeed the configuration with the minimum potential coupling.

Let us run an experiment similar to that performed in [2]: we shall take 15 violational and 20 hidden elements, distributed over 3 regions, and use a computer to generate all possible configurations that those elements can realise. Given the usual constraint that 1 violational element must always exist in each region, we might have 32 elements as elements in the first region and only 1 violational element in each of the other two regions, or 5 violation elements in each of the 3 regions, 10 hidden elements in the first region and 5 hidden elements each in the other two, etc.; the point being, we shall find them all, exhaustively1 and record their potential couplings.

When this experiment was run, the configuration which yielded the lowest potential coupling is that shown in (H).

n=35, r=3, d=5 (H)

= 16(15 + 2) = 272

= 10(9 + 14) = 230

= 9(8 + 14) = 198

= 272 + 230 + 198 = 700

We see in (H) that the lowest configuration for the given number of violational elements, hidden elements and regions is in striking agreement with that of the A.M.C. In particular:

1. All the free violational elements reside in one source region.

2. The source region has fewer hidden elements than any other region.

3. The non-source regions share approximately the same same number of hidden elements.

Point 3 may look suspicious, as the non-source regions do not contain exactly the same number of hidden elements, as the A.M.C. conjecture stipulates, but this is merely an artifact of quantization in that regions can only contain whole-numbers of elements, not fractional numbers. The number of hidden elementsin each of the non-source regions of a (non-depleting) A.M.C. is given by (see proposition 5.17):

Calculatingfor (H) above gives a value of 8.6 and the closest our 3-region set can approach to this is realising 9 hidden elements in one region and 8 in the other.

As mentioned in the introduction, we are interested not in the absolute potential coupling of this A.M.C. but rather a measure by which any A.M.C.'s potential coupling is lower than the potential coupling of a set had it been uniformly distributed: we seek the A.M.C. ratio, the ratio of the A.M.C. difference to the maximum potential coupling of a set, as given by:

The question then arises: what families of configurations can we discuss? To make our evaluations as general as possible, we would like to parameterize our families of configurations using as few variables as possible. It would be ideal, for example, to use a single variable, so that we could pronounce, "All configurations of parameter X will have only 5% lower potential coupling when realised as an A.M.C. rather than uniformly distributed."

It has been found, however, that two parameters are necessary: the number of disjoint primary sets and the hidden density. The hidden density is the total number of hidden elements in a set divided by the total number of elements in the set, and is denoted by the symbol. Thus our observations will take the form, "All sets of r disjoint primary sets and with a hidden density ofwill have a maximum A.M.C. ratio of X." (It is often convenient to multiply the A.M.C. ratio by 100 to express it as a percentage.)

Taking our example A.M.C. in (H) above, we find that it has a hidden density of 0.57 and an of 23.3. The maximum potential coupling of this set (see proposition 1.1 in [2]) is 1190, therefore the A.M.C. ratio expressed as a percentage is:

We can thus say that, given this particular set of three regions with a hidden density of 0.57, the potential coupling of the set if it were uniformly distributed in both violational and hidden elements would be at most 1.9% higher than the minimum possible potential coupling. As noted in the introduction, such a small percentage as a configuration efficiency precision tolerance is useful. The question is: does this tolerance hold for all sets of three regions and of hidden density 0.57?

Let us double the number of elements in the example set, keeping the number of regions and hidden density unchanged; this implies that there must now be 70 elements, 30 violational and 40 hidden. We shall perform the same experiment as before, using a computer to perform a brute-force search of all possible combinations of these 70 elements spread across 3 disjoint primary sets. When this program was run, the configuration with the lowest potential coupling was found to be that shown in (I).

n=70, r=3, d=10 (I)

= 34(33 + 2) = 1190

= 18(17 + 29) = 828

= 18(17 + 29) = 828

= 1190 + 828 + 828 = 2846

Again, the minimum potential coupling set is clearly an A.M.C., but this time its A.M.C. ratio expressed as a percentage is:

This A.M.C. ratio of a set of 70 elements is clearly higher than that of the set of 35 elements, despite both having the same number of regions and the same hidden density. This would seem to cast doubt upon our ability to make any statements about limits of the precision of the potential coupling of a set based solely on its number of regions and hidden density.

## 4.2 Ointment

All is not lost, however.

Let us perform an extended experiment. Instead of doubling the number of elements and using a brute force search of all possible combinations of the violational and hidden elements to find the set with the lowest potential coupling, let us generate successive sets by doubling the number of elements each time, holding the number of regions at 3 and the information-hiding at 0.57, and let us force the set's configuration into that of an A.M.C. then record its A.M.C. ratio expressed as a percentage. The results are shown below in figure 2.

Figure 2: A.M.C. ratio expressed as a percentage as a set grows in elements over 3 regions with a constant hidden density of 0.57.

We can see from figure 2 that the A.M.C. ratio expressed as a percentage initially rises sharply as more elements are added to the set while holding its hidden density and number of regions constant. It quickly appears to plateau, however, and asymptotically approach some value, which we can read from the figure as approximately 3. Thus we seem to be able to make the claim that the uniform potential coupling of all sets of 3 regions and hidden density 0.57 will always be within approximately 3% of the absolute minimum, no matter how big the set is (i.e., no matter how many elements it contains).

Let us examine a new set, say of 5 disjoint primary sets and composed of 25 violational elements and 80 hidden elements, thus yielding and hidden density of 0.76. If we again record the A.M.C. ratio expressed as a percentage and successively double the number of elements in the set as in the previous experiment, the set of the potential coupling difference percentage is shown in figure 3.

Figure 3: A.M.C. ratio expressed as a percentage as a set grows in elements over 5 regions with a constant hidden density of 0.76.

Figure 3 shows that, again, the A.M.C. ratio expressed as a percentage initially rises sharply and then plateaus, in this instance to slightly more than 1%.

Recall that we should like to find an equation for the A.M.C. ratio that is independent of the number of elements in a set and instead expressed as a limit as the number of elements increases indefinitely, thereby providing an upper limit which sets of all sizes must respect. Both figures 2 and 3 show us that this is precisely the form that the A.M.C. ratio appears to naturally take, asymptotically approaching some value as the set grows indefinitely large while constrained to a particular number of regions and hidden density.

Indeed just such a limiting A.M.C. ratio equation has been derived (see proposition 5.34) and takes the form:

For our set in figure 2, there were 3 disjoint primary sets (r=3) and the hidden density was 0.57 (=0.57); the equation yields an A.M.C. ratio of 0.03, which, expressed as a percentage, gives the 3% seen in figure 2.

For our set in figure 3, there were 5 disjoint primary sets (r=5) and the hidden density was 0.76 (=0.76); the equation yields a A.M.C. ratio of 0.012, which, expressed as a percentage, gives the 1.2% seen in figure 3.

There is, however, a slight complication.

## 4.3 Fly

Take another set, in some sense the, "Encapsulative inverse," of that used for figure 3: this encapsulated set will have 5 disjoint primary sets, 80 violational elements and 25 hidden elements, thus yielding a hidden density of 0.24. Plotting as before A.M.C. ratio percentage against increasing numbers of elements gives us figure 4.

Figure 4: A.M.C. ratio expressed as a percentage as a set grows in elements over 5 regions with a constant hidden density of 0.24.

We can see from figure 4 that the set plateaus at approximately 3.5%. Yet plugging the number of regions and hidden density into the equation above gives us:

This value of 0.012 corresponds to a percentage of 1.2%, yet figure 4 clearly shows that the plateau much greater than this.

The problem here is that the figures 2 and 3 are of non-depleting sets whereas figure 4 is of a depleting set: the limiting A.M.C. ratio equation above describes only non-depleting sets.

## 4.4 Swat

Recall that an encapsulated set is non-depleting if its has enough hidden elements in its source disjoint primary set to move m hidden elements to all other regions and still have a non-zero number of hidden elements left in the source region after all the migrations. The A.M.C. shown in (I), used for figure 2, clearly retains elements in the source disjoint primary set (K1). If we look at the set from which figure 4 is extrapolated, we see that this set is depleting because it has no hidden elements in its source disjoint primary set when in the A.M.C. configuration, see (J).

n=105, r=5, d=16 (J)

= 76(75 + 4) = 6004

= 8(7 + 79) = 688

= 7(6 + 79) = 595

= 7(6 + 79) = 595

= 7(6 + 79) = 595

= 6004 + 688 + 595 + 595 + 595 = 8477

As the set in (J) is a depleting set, then we must use the depleting set equation to find its plateau. This limiting A.M.C. ratio equation for a depleting set is (see proposition 5.33):

For our (J) set in figure 4 there were 5 disjoint primary sets (r=5) and the hidden density was 0.24 (=0.24); the equation yields a ratio of 0.034, which, expressed as a percentage, gives the 3.4% seen in figure 4.

In deriving the two limiting A.M.C. ratio equations, we have succeeded in reaching this paper's second goal.

## 4.5 A depletion test

We would like, of course, to know which limiting A.M.C. ratio equation to use; in other words, we would like to know whether a set is depleting or non-depleting before it is configured as an A.M.C. There is, fortunately, a simple equation which defines the hidden density at which a set transitions from being depleting to non-depleting. The depleting transition density equation is (see proposition 5.35):

If the hidden density is less than this value then the encapsulated set is a depleting set, if more, it is non-depleting. Note that this equation is based only on the number of regions in a set. For all 5-region sets, this value is 0.6; the 5-region set plotted in figure 3 had a hidden density of 0.76 and so is a non-depleting set, whereas the 5-region set of (J) has a hidden density of 0.24 and so is a depleting set.

Plotting this depleting transition density for increasing numbers of disjoint primary sets yields some practical considerations, see figure 5.

Figure 5: The depleting transition density versus number of disjoint primary sets.

Figure 5 shows that as the number of disjoint primary sets in a set increases the value of the hidden density required to make the set transition from depleting to non-depleting rises sharply. Reading loosely from the figure, we see that sets with 20 or more disjoint primary sets require a hidden density of 0.9 or higher to make them non-depleting; a hidden density of 0.9 means that 90% of the elements of the set must be information-hidden, which - when considered in the context of software development - is quite difficult in practice, so much so that we can expect almost all non-trivial computer systems to be depleting.

It is not always even possible, furthermore, to achieve the depleting transition density. It turns out that there is a maximum number of regions into which a set may be encapsulated, above which it is impossible to reach the depleting transition density. This equation takes the form (see proposition 5.37):

Thus we can say that a Java system of, say, 1000 classes cannot be configured as a non-depleting A.M.C. if it is encapsulated into more than 44 packages.

Recall that a non-depleting set can achieve the lowest potential coupling theoretically possible but a depleting set (being limited in the number of hidden elements it can migrate from its source region) cannot, thus, although perhaps not so important for computer software, the building of sets that remain non-depleting may be important and in such cases the above equation is an upper-limit.

## 5. Is the isoledensal configuration efficiency safe?

Finally, we can take a look at a plot of the limiting A.M.C. ratio equation for depleting sets with a hidden density of (for example) 0.5 as the number of disjoint primary sets increases, see figure 6.

Figure 6: A.M.C. ratio as a set grows in regions with a constant hidden density of 0.5

Though figure 6 reveals the trend of the A.M.C. ratio for the specific hidden density of 0.5, all hidden densities show somewhat similar trends: a peak in the difference between uniform and A.M.C. potential coupling as a proportion of the maximum potential coupling(in this case around 0.04 or 4%) trailing off as the number of regions increases. This peak is slightly higher for lower hidden-densities: for a hidden density of 0.2 the peak is around 6%.

We are therefore justified in saying that, for large computer systems, with a large number of program units and subsystems, the isoledensal configuration efficiency is an accurate reflection of the proportion of potential coupling a set expresses over and above its isoledensal potential coupling, not significantly distorted by the presence of A.M.C.s.

# 6. Conclusions

This paper proposes the A.M.C. conjecture that the A.M.C. is the lowest potential coupling of any configuration of any encapsulated set, and shows that there exist two forms of the A.M.C.: the depleting and the non-depleting.

Equations for the limiting A.M.C. ratios of both forms are derived and used to show that, for large systems at least, A.M.C.s do not significantly distort the isoledensal configuration efficiency as a measure of the proportion of potential coupling a set expresses over and above its isoledensal potential coupling.

# 7. Appendix A

## 7.1 Definitions

Note that in these definitions thesymbol means, "Maps to."

[D5.1] Given an encapsulated set G of n elements and r disjoint primary sets, where the sth disjoint primary set Ks is arbitrarily chosen as the source disjoint primary set, the A.M.C. configuration of this set is defined by the following constraints:

1. Except for the source disjoint primary set, the information-hiding violation of each region is 1, that is:

2. Except for the source disjoint primary set, the information-hiding of each region is, that is:

Thus G will take the following form:

1. Let TAMC(G) be the transformation which maps G into the configuration defined in (ii), that is:

2. An encapsulated set G is depleting if, under the transformation TAMC(G), no information-hidden elements remain in the source disjoint primary set, that is:

3. An encapsulated set G is non-depleting if it is not depleting.

[D5.2] Given an encapsulated set G subject to the constraints specified in [D5.1], for convenience, let:

[D5.3] Given an encapsulated set G of n elements and a information-hiding of, the hidden density,, is defined as the number of information-hidden elements divided by the total number of elements, and is given by:

## 7.2 Propositions

The propositions are organised as follows.

Propositions 5.3 - 5.8 establish some basic properties of the A.M.C., such as the number of hidden and violational elements in the source and target regions (each region that is not a source region is considered a target region and each target region contains the same number of hidden and violational elements).

Propositions 5.9 - 5.11 establish the potential coupling of the source region.

Propositions 5.12 - 5.14 establish the potential coupling of each target region.

Proposition 5.15 establishes the potential coupling of the A.M.C. in terms of the number of hidden elements in the source region. Proposition 5.16 establishes the potential coupling of the A.M.C. in terms of the number of violational elements in the source region. Proposition 5.15 is the simpler form that is used throughout the rest of the propositions but proposition 5.16 is needed to derive the number of hidden elements in the target regions that minimises the potential coupling.

Propositions 5.17 and 5.18 are based on 5.16 and derive the number of hidden elements in the target regions that minimises the potential coupling and the number of elements to be moved into each target region if starting with a uniformly distributed set.

Proposition 5.19 establishes the uniform potential coupling in terms of the number of hidden elements in the source and target regions.

Proposition 5.20 establishes the equation for the difference between the potential coupling of a set uniformly distributed and when configured as an A.M.C. As the equations can grow unwieldy, this the equation is broken down into,andcomponents. Many of the remaining propositions just try to find the limit of these components divided the maximum potential coupling as the number of elements increases without bound while the number of regions and the hidden density remain constant. Propositions 5.22, 5.24 and 5.25 find this limit for. Propositions 5.26 - 5.28 find this limit for. Propositions 5.29 and 5.30 find this limit for.

Propositions 5.32 and 5.34 bring together all the components and find the limit for for a non-depleting set.

Proposition 5.33 brings together all the components and find the limit forfor a depleting set.

Proposition 5.23 is a crucial equation find the limit of the number hidden elements in the source region divided by the number of elements. This is used in most of the limit equations above.

Propositions 5.35 - 5.37, finally, just establish some interesting observations concerning the hidden density.

## Proposition 5.1

Given the encapsulated set G the equation which yields a reduction in the potential coupling of G by moving of m information-hidden elements from a particular source disjoint primary set Ks to a different target disjoint primary set Kt is given by:

Proof:

By proposition 3.19 in [4]:

(i)

By definition [D.3.6] in [4]:

(ii)

Substituting (ii) into (i) gives:

= (iii)

For a transformation of G to reduce the potential coupling of G then:

(iv)

Substituting (iv) into (iii) gives:

QED

## Proposition 5.2

Given an encapsulated set G of r disjoint primary sets and of information-hiding violation, and given that the ith disjoint primary set Ki containselements and has an information-hiding violation of v(K), the potential coupling of Ki is given by the equation:

Proof:

By proposition 1.3.16 in [2]:

(i)

By proposition 1.2 in [2]:

(ii)

By proposition 1.4 in [2]:

(iii)

Substituting (ii) and (iii) into (i) gives:

=

QED

## Proposition 5.3

Given an encapsulated set G subject to the constraints defined in [D5.1], the number of elements in Ki whereis given by the equation:

Proof:

By definition [D3.6] in [4]:

(i)

By item (i) in definition [D5.1]:

(ii)

By item (ii) in definition [D5.1]:

(iii)

Substituting (ii) and (iii) into (i) gives:

QED

## Proposition 5.4

Given an encapsulated set G subject to the constraints defined in [D5.1], the number of elements in Ks is given by the equation:

Proof:

By definition [D8] in [2]:

=

Therefore:

(i)

By proposition 5.3:

(ii)

Substituting (ii) into (i) gives:

= (iv)

By item (i) of definition [D5.2]:

(v)

Substituting (v) into (iv) gives:

=

QED

## Proposition 5.5

Given an encapsulated set G subject to the constraints defined in [D5.1], the information-hiding violation of G is given by the equation:

Proof:

By definition [D3.6] in [4]:

And so:

(i)

By proposition 5.8:

(ii)

Substituting (ii) into (i) gives:

QED

## Proposition 5.6

Given an encapsulated set G subject to the constraints defined in [D5.1], the information-hiding of Ks is given by the equation:

Proof:

By definition [D3.6] in [4]:

(i)

By proposition 5.7:

(ii)

By proposition 5.8:

(iii)

Substituting (ii) and (iii) into (i) gives:

And so:

QED

## Proposition 5.7

Given an encapsulated set G subject to the constraints defined in [D5.1], the number of information-hiding violational elements of G is given by the equation:

Proof:

By proposition 1.3.6 in [2]:

= (i)

By item (i) of definition [D5.1], except for the source disjoint primary set, the information-hiding violation of each region is 1, that is:

(ii)

Substituting (ii) into (i) gives:

= (iii)

By item (i) of definition [D5.2]:

(iv)

Substituting (iv) into (iii) gives:

QED

## Proposition 5.8

Given an encapsulated set G subject to the constraints defined in [D5.1], the number of information-hidden elements of G is given by the equation:

Proof:

By proposition 1.3.8 in [2]:

= (i)

By item (ii) of definition [D5.1], except for the source disjoint primary set, the information-hiding of each region is, that is:

(ii)

Substituting (ii) into (i) gives:

= (iii)

By item (i) of definition [D5.2]:

(iv)

Substituting (iv) into (iii) gives:

QED

## Proposition 5.9

Given an encapsulated set G subject to the constraints defined in [D5.1], the internal potential coupling of Ks is given by the equation:

Proof:

By proposition 1.2 in [2]:

(i)

By proposition 5.4:

(ii)

Substituting (ii) into (i) gives:

=

QED

## Proposition 5.10

Given an encapsulated set G subject to the constraints defined in [D5.1], the external potential coupling of Ks is given by the equation:

Proof:

By proposition 1.4 in [2]:

(i)

By proposition 5.7:

(ii)

By proposition 5.4:

(iii)

Substituting (ii) and (iii) into (i) gives:

=

=

QED

## Proposition 5.11

Given an encapsulated set G subject to the constraints defined in [D5.1], the potential coupling of Ks is given by the equation:

Proof:

By proposition 1.3.16 in [2]:

(i)

By proposition 5.9:

(ii)

By proposition 5.10:

(iii)

Substituting (ii) and (iii) into (i) gives:

=

QED

## Proposition 5.12

Given an encapsulated set G subject to the constraints defined in [D5.1], the internal potential coupling of Kt whereis given by the equation:

Proof:

By proposition 1.2 in [2]:

(i)

By proposition 5.3:

(ii)

Substituting (ii) into (i) gives:

=

QED

## Proposition 5.13

Given an encapsulated set G subject to the constraints defined in [D5.1], the external potential coupling of Kt whereis given by the equation:

Proof:

By proposition 1.4 in [2]:

(i)

By proposition 5.3:

(ii)

By (i) in definition [D5.1]:

(iii)

By proposition [5.5]:

(iv)

Substituting (ii), (iii) and (iv) into (i) gives:

=

QED

## Proposition 5.14

Given an encapsulated set G subject to the constraints defined in [D5.1], the potential coupling of Kt whereis given by the equation:

Proof:

By proposition 1.3.16 in [2]:

(i)

By proposition 5.12:

(ii)

By proposition 5.13:

(iii)

Substituting (ii) and (iii) into (i) gives:

=

QED

## Proposition 5.15

Given an encapsulated set G subject to the constraints defined in [D5.1], the potential coupling of G is given by the equation:

Proof:

By the proposition 1.3.19 in [2]:

= (i)

By proposition 5.11:

(ii)

By proposition 5.14:

(iii)

Substituting (ii) and (iii) into (i) gives:

(iv)

As the sum in (iv) is taken over all r whereand as all the terms of the sum are constants or dependent only on the sth disjoint primary set, then (iv) can be re-written:

=

=

QED

## Proposition 5.16

Given an encapsulated set G subject to the constraints defined in [D5.1], the potential coupling of G is given by the equation:

Proof:

By proposition 5.15:

(i)

By proposition 5.6:

(ii)

Substituting (ii) into (i) gives:

=

=

QED

## Proposition 5.17

Given an encapsulated set G subject to the constraints defined in [D5.1], the value forwhich minimises the set's potential coupling is given by:

Proof:

By proposition 5.16:

(i)

To find the value ofwhich minimises (i) we must differentiate with respect to, set to zero and solve. Thus:

=

=

Therefore:

(iv)

By item (i) in definition [D5.2]:

(v)

Substituting (v) into (iv) gives:

= (vi)

By proposition 5.7:

= (vii)

Substituting (vii) into (vi) gives:

= (viii)

By definition [D3.6] in [4]:

(ix)

Substituting (ix) into (viii) gives:

=

QED

## Proposition 5.18

Given a uniformly distributed, set G, of n elements and r disjoint primary sets, if all possible information-hiding violational elements are moved into an arbitrarily-chosen source disjoint primary set, then the number of information-hidden elements to move from the source disjoint primary set to any target disjoint primary set which minimises the set's potential coupling is given by:

Proof:

As G is uniformly distributed in information-hidden elements, then number of information-hidden elements in the ith disjoint primary set is by definition:

(i)

By proposition 5.17, the number of information-hidden elements in a target disjoint primary set, Kt, when the set is subject to the constraints defined in [D5.1], is given by:

(ii)

Therefore the number of information-hidden elements, m, moved into the target disjoint primary set must be the difference between (i) and (ii), that is:

=

= (iii)

By definition [D3.6] in [4]:

And so:

(iv)

Substituting (iv) into (iii) gives:

QED

## Proposition 5.19

Given an encapsulated set G subject to the constraints defined in [D5.1], the uniform potential couplingis given by:

Proof:

By proposition 1.8 in [2]:

(i)

For convenience letand substitute this into (i) to give:

= (ii)

By definition [D1.14] in [2]:

(iii)

By proposition 5.5:

(iv)

Substituting (iv) into (iii) gives:

(v)

Substituting (v) into (ii) gives:

=

=

QED

## Proposition 5.20

Given an encapsulated set G subject to the constraints defined in [D5.1], the differencebetween the uniform potential coupling and the anomalous minimised configuration potential coupling of theis given by:

Proof:

By proposition 5.15:

(i)

By proposition 5.19:

(ii)

Let us define the quantityas the difference between the uniform potential coupling of G and the anomalous minimised configuration potential coupling of G:

(iii)

Substituting (i) and (ii) into (iii) gives:

=

=

=

=

=

=

= (iv)

By item (ii) in definition [D5.2]:

(v)

By item (v) in definition [D5.2]:

(vi)

Substituting (v) and (vi) into (iv) gives:

QED

## Proposition 5.21

Given an encapsulated set G subject to the constraints defined in [D5.1], theterm defined in definition [D5.2] can be written as:

Proof:

By item (ii) of definition [D5.2]:

(i)

By proposition 5.8:

(ii)

Substituting (ii) into (i) gives:

= (iii)

By item (iii) in definition [D5.2]:

(iv)

By item (iv) in definition [D5.2]:

(v)

Substituting (iv) and (v) into (iii) gives:

QED

## Proposition 5.22

Given an encapsulated set G subject to the constraints defined in [D5.1], theterm defined in definition [D5.2] can be written as:

Proof:

By item (iii) in definition [D5.2]:

(i)

By proposition 5.8:

(ii)

Substituting this into (i) gives:

=

= (iii)

By definition [D5.3]:

(iv)

Substituting (iv) into (iii) gives:

=

QED

## Proposition 5.23

Given an encapsulated set G subject to the constraints defined in [D5.1], the limit of the number of information-hidden elements in Ks divided by the total number of elements in G as G grows indefinitely large given the hidden density, can be written as:

Proof:

By proposition 5.8:

(i)

By item (i) of definition [D5.2]:

(ii)

Substituting (ii) into (i) gives:

(iii)

Dividing (iii) by n gives:

(iv)

By proposition 5.17:

(v)

Substituting (v) into (iv) gives:

=

= (vi)

By definition [D5.3],

(vii)

Substituting (vii) into (vi) gives:

(viii)

Taking the limit of (viii) as n tends to infinity gives:

=

=

= (ix)

By item (vi) of definition [D5.2]:

(x)

Substituting (x) into (ix) gives:

QED

## Proposition 5.24

Given an encapsulated set G subject to the constraints defined in [D5.1], the limit as G grows indefinitely large given the hidden density, of theterm defined in definition [D5.2] divided by the maximum potential coupling of G is given by:

Proof:

By proposition 5.22:

(i)

By proposition 1.1 in [2]:

(ii)

Dividing (i) by (ii) gives:

= (iii)

Dividing (iii) above and below by the highest power of n gives:

(iv)

Taking the limit of (iv) as n tends to infinity gives:

(v)

By proposition 5.23:

(vi)

Substituting (vi) into (v) gives:

QED

## Proposition 5.25

Given an encapsulated set G subject to the constraints defined in [D5.1], the limit as G grows indefinitely large in elements given the hidden density, of theterm defined in definition [D5.2] divided by the maximum potential coupling of G is given by:

Proof:

By proposition 5.24:

(i)

By item (i) in definition [D5.2]:

(ii)

Substituting (ii) into (i) gives:

=

=

QED

## Proposition 5.26

Given an encapsulated set G subject to the constraints defined in [D5.1], theterm defined in definition [D5.2] can be written as:

Proof:

By item (iv) of definition [D5.2],

(i)

By proposition 5.8:

(ii)

Substituting this into (i) gives:

=

= (iii)

By definition [D5.3]:

(iv)

Substituting (iv) into (iii) gives:

=

QED

## Proposition 5.27

Given an encapsulated set G subject to the constraints defined in [D5.1], the limit as G grows indefinitely large given the hidden density, of theterm defined in definition [D5.2] divided by the maximum potential coupling of G is given by:

Proof:

By proposition 5.26,

(i)

By proposition 1.1 in [2]:

(ii)

Dividing (i) by (ii) gives:

= (iii)

Dividing (iii) above and below by the highest power of n gives:

= (iv)

Taking the limit of (iv) as n tends to infinity gives:

= (v)

By proposition 5.23:

(vi)

Substituting (vi) into (v) gives:

=

=

QED

## Proposition 5.28

Given an encapsulated set G subject to the constraints defined in [D5.1], the limit as G grows indefinitely large given the hidden density, of theterm defined in definition [D5.2] divided by the maximum potential coupling of G is given by:

Proof:

By proposition 5.27:

(i)

By item (i) in definition [D5.2]:

(ii)

Substituting (ii) into (i) gives:

=

=

QED

## Proposition 5.29

Given an encapsulated set G subject to the constraints defined in [D5.1], the limit as G grows indefinitely large given the hidden density, of theterm defined in definition [D5.2] divided by the maximum potential coupling of G is given by:

Proof:

By item (v) in definition [D5.2]:

= (i)

By proposition 1.1 in [2]:

(ii)

Dividing (i) by (ii) gives:

= (iii)

Dividing (iii) above and below by the highest power of n gives:

(iv)

Taking the limit of (iv) as n tends to infinity gives:

(v)

By proposition 5.23:

(vi)

Substituting (vi) into (v) gives:

QED

## Proposition 5.30

Given an encapsulated set G subject to the constraints defined in [D5.1], the limit as G grows indefinitely large given the hidden density, of theterm defined in definition [D5.2] divided by the maximum potential coupling of G is given by:

Proof:

By proposition 5.29:

(i)

By item (i) in definition [D5.2]:

(ii)

Substituting (ii) into (i) gives:

QED

## Proposition 5.31

Given an encapsulated set G subject to the constraints defined in [D5.1], the limit as G grows indefinitely large given the hidden density, of theandterm defined in definition [D5.2] divided by the maximum potential coupling of G is given by:

Proof:

By proposition 5.28:

(i)

By proposition 5.30:

(ii)

=

=

=

=

=

QED

## Proposition 5.32

Given an encapsulated set G subject to the constraints defined in [D5.1], the limit as G grows indefinitely large given the hidden density, of the difference sdiff(G) between the uniform potential coupling su(G) and the anomalous minimised configuration potential coupling of the samc(G) divided by the maximum potential coupling of G is given by:

Proof:

By proposition 5.20 and the definitions in [D5.2]:

= (i)

By proposition 5.21 and the the definitions in [D5.2]:

(ii)

Substituting (ii) into (i) gives:

(iii)

The limit of sdiff(G) divided by the maximum potential coupling of G is therefore given by:

By proposition 5.25:

(iv)

By proposition 5.31

(v)

=

= (vi)

By item (vi) of definition [D5.2]:

(vii)

Substituting (vii) into (vi) gives:

=

=

=

QED

## Proposition 5.33

Given a depleting set G subject to the constraints defined in [D5.1], the limit as G grows indefinitely large given the hidden density, of the difference sdiff(G) between the uniform potential coupling su(G) and the anomalous minimised configuration potential coupling of the samc(G) divided by the maximum potential coupling of G is given by:

Proof:

By proposition 5.32:

= (i)

By proposition 5.23:

(ii)

By item (iv) of definition [D5.1], the number of information-hidden elements in the source disjoint primary set of a depleting set in A.M.C. configuration is 0, or:

(iii)

Substituting (iii) into (ii) gives:

(iv)

Substituting (iv) into (i) gives:

=

QED

## Proposition 5.34

Given an encapsulated set G subject to the constraints defined in [D5.1], the limit as G grows indefinitely large given the hidden density, of the difference sdiff(G) between the uniform potential coupling su(G) and the anomalous minimised configuration potential coupling of the samc(G) divided by the maximum potential coupling of G is given by:

Proof:

By proposition 5.32:

(i)

By item (vi) of definition [D5.2]:

(ii)

Substituting (ii) into (i) gives:

=

=

=

=

=

=

=

QED

## Proposition 5.35

Given an encapsulated set G of n elements and r disjoint primary sets and with the hidden density, the depleting transition density at which G transitions between depleting and non-depleting is given by:

Proof:

By item (vi) of definition [D5.1], G is depleting if, under the transformation TAMC(G) item (iii) of definition [D5.1], no information-hidden elements remain in the source disjoint primary set, that is:

(i)

Diving both of (i) sizes by n and taking the limit as n goes to infinity gives:

(ii)

By proposition 5.23:

(iii)

Substituting (iii) into (ii) gives:

QED

## Proposition 5.36

Given an encapsulated set G of n elements and r disjoint primary sets and with the hidden density, the maximum possible hidden density of G is given by:

Proof:

By definition [D5.3], the hidden density is given by:

(i)

Given any fixed n, the hidden density is therefore maximised by maximising. By definition (i) of [D3.6] in [4]:

(ii)

Thus, given any fixed n, the hidden density is maximised by minimising the information-hiding violation function,. By proposition 1.3.6 in [2]:

(iii)

By definition any region of G must contain at least one violational element or else it may not be considered part of G;is therefore minimised when each region has only one violational element, or:

(iv)

Substituting (iv) into (iii) gives:

= (v)

Substituting (v) into (iii) gives:

(vi)

Substituting (vi) into (i) gives:

QED

## Proposition 5.37

Given an encapsulated set G of n elements and with the hidden density, the maximum possible number of regions, r, that G may have and still be capable of being configured as a non-depleting A.M.C. is given by:

Proof:

By proposition 5.35, the depleting transition density at which G transitions between depleting and non-depleting is given by:

(i)

By proposition 5.36, the maximum possible hidden density of G is given by:

(ii)

Therefore the maximum possible depleting transition density occurs when the depleting transition density equals the maximum possible hidden density, or:

(iii)

Substituting (i) and (ii) into (iii) gives:

(iv)

Taking the positive root in (iv) gives:

QED

# 8 References

[1] "Encapsulation theory: an investigation into the anomalous minimised configuration," Ed Kirwan, www.EdmundKirwan.com/pub/paper5.pdf

[2] "Encapsulation theory fundamentals," Ed Kirwan, www.EdmundKirwan.com/pub/paper1.pdf

[3] "Encapsulation theory: a format for exercises," Ed Kirwan, www.EdmundKirwan.com/pub/paper4.pdf

[4] "Encapsulation theory: the transformation equations of absolute information-hiding," Ed Kirwan, www.EdmundKirwan.com/pub/paper3.pdf

*© Edmund Kirwan 2009. Revision 1.4 January 5th 2010. (Original revision 1.0 written June 7th 2009.) arXiv.org is granted a non-exclusive and irrevocable licence to distribute this article; all other entities may republish, but not for profit, all or part of this material provided reference is made to the author and the title of this paper. The latest version of this paper is available at [1].

1Program available on request from the author.