# Configuration Spaces and Histories

Before we dive into versioned filesystem design and implementation details, let's first take a look at the concepts we're talking about. We'll begin by discussing what a configuration management system actually operates on.

*N.B.*: Although the following text uses mathematical concepts and notation, it's not intended to be a rigorous dissertation on configuration theory. We'll often make statements and draw conclusions without providing proof. Therefore, dear reader, you can either trust we're right, or do your own homework to prove (or disprove) our assertions. We will, however, try to conscientiously flagβ all leaps of faith in the text.

**Definition:** A *data configuration* is a unique pattern of data that can be represented as exactly one distinct sequence of binary digits.

The representation of the

*empty configuration*π is the zero-length sequence.The

*size*,*S*_{c}, of a configuration c is the length of its representative sequence of binary digits.

**Definition:** A *data configuration space* is a metric space (πΉ, πΉ) where:

- πΉ is the set of all data configurations;
- πΉ: πΉ Γ πΉ βΆ β is a metric on πΉ.

**Definition:** A *configuration history* is a sequence of elements of πΉ; in other words, it is a *curve* in (πΉ, πΉ).

## Defining the Metric

We'll now show that we can indeed define a metric for πΉ. One example is the *Levenshtein distance*,

π: πΉ Γ πΉ βΆ β

^{0}

applied to the binary-digit sequence representation of data configurations. It is easy to showβ that π has all the required properties of a metric. In addition, it has the following properties:

- The minimum distance between any two distinct configurations is 1.
The maximum distance between any two distinct configurations is the greater of their sizes: βa,b β πΉ: π(a, b) β€ max(

*S*_{a},*S*_{b});from wich it follows that: βc β πΉ: π(π, c) =

*S*_{c}.

- All distances are non-negative integers.

In the rest of this text, we'll specifically talk about (πΉ, π) β that is, the data configuration space with a Levenshtein distance metric; also referred to as *edit distance*. Even though the term "edit distance" is less precise in general, it fits the concept of *edits* (or *edit transformations*), which we'll discuss later on.