Markov Chains and Egyptian Tombs: Generating “Egyptian” Tablet Weaving Designs Using Mean-Reverting Processes
Year: 2021 Authors: Joshua Holden
Core claim
Mean-reverting Markov chains can successfully generate Egyptian Diagonals tablet weaving designs while balancing thread twist.
Topics
tablet weaving, Markov chains, mean reversion, Egyptian Diagonals
Domains
stochastic processes, Markov chains, recurrence time, generating functions, textile design, craft weaving, pattern generation
Methods
Ehrenfest model, random pattern generation, generating-function analysis, comparative design study
Media
tablet cards, warp and weft threads, woven fabric, loom
Paper text
The text below is the locally extracted OCR/Markdown version of the paper. Raw PDF files remain local and are not published here.
Markov Chains and Egyptian Tombs: Generating “Egyptian” Tablet Weaving Designs Using Mean-Reverting Processes
Joshua Holden
Department of Mathematics, Rose-Hulman Institute of Technology; holden@rose-hulman.edu
Abstract
Tablet weaving, also known as card weaving, is a method of making strips of fabric that has been used from ancient times in many parts of the world. Unlike in most other sorts of weaving, in tablet weaving the warp threads are twisted around each other as the cloth is produced. Since different design elements produce different directions of twist, it is desirable for this twist to be balanced along the length of the weaving. This feature inspired the use in previous work of a mean-reverting Markov process known as the Ehrenfest model to randomly generate tablet weaving patterns. In this paper we apply the process to the technique known as “Egyptian Diagonals”. The result successfully reflects the traditional design aesthetics of this technique, although the process was more difficult than in previous work.
Introduction
The craft of weaving has been studied mathematically for many decades, but (to my knowledge) the particular technique known as tablet weaving or card weaving was first studied mathematically by the author [3]. We quickly review the introduction of that work. Like other types of weaving, tablet weaving uses vertical (warp) and horizontal (weft threads). The warp threads are passed through holes in tablets or cards, as shown in Figure 1a, and are held under tension by a very simple system such as the loom shown in Figure 2a. The cards separate the warp threads into two batches with a space, called the shed, between them. The weft thread is passed through the shed (Figure 1b), after which the cards are turned. The cards may all be turned in the same direction, or some cards may turn in the opposite direction from others. Weavers often offset some cards in order to keep track of which direction they are turning, as in Figure 4b. The weft thread is then passed back through the shed in the other direction, the turning directions of the cards are adjusted if desired, and the cards are turned again. More details on the history and techniques of tablet weaving may be found in the author’s previous work or in standard references [1, 2].
One commonly encountered type of tablet weaving pattern is called “Egyptian Diagonals” [6], or more generically, “Broad Diagonals” [2, p. 98]. These patterns resemble pictures of fabrics found in Egyptian tombs, although there is no conclusive evidence that this or any other tablet technique was used in ancient Egypt [1, p. 109; 2, p. 11; 6, p. 3]. The pattern was first associated with ancient Egypt in the early twentieth century, based on the similarities of the designs to those found in statuary and paintings and on the observation of the so-called “girdle of Ramses III”. Further investigation of the structure of the girdle revealed that the girdle could not have been woven using tablets, however [1, p. 304]. (The girdle also seems never to have been owned by Ramses III [1, p. 301].)
In Egyptian Diagonals, two colors of warp threads are used, which I will call arbitrarily call color A and color B. A pack of square cards is threaded with two adjacent threads of color A and two adjacent threads of color B in each card. The cards are set up such that the first card has color A in the top two holes, the second card has color A rotated 90 degrees, and so on. This produces warp colors staggered as shown in Figure 2b.Depending on which direction the cards are turned, the colors make diagonal stripes in either the Z (lower left to upper right, like a “forward slash”) or the S (lower right to upper left, like a “backslash”)
Holden
direction across a 2 by 2 block of threads, as shown in Figure 2c. The characteristic design element of this technique is an angled boundary between areas with stripes in the Z direction and areas with stripes in the S direction [1, p. 109]. The boundaries between these areas are shown with red lines in Figure 2c; readers are invited to imagine similar lines in Figures 3a and 3b. Note that this is not a reversible technique, as one can see in Figure 3c. The back of the fabric shows a similar pattern in reversed colors from the front but the diagonal lines are not as smooth, as can be predicted from a close examination of Figure 2b.
(a)
(b)
Figure 1: (a) A pack of tablet weaving cards. (Note that there are additional threads through holes and to secure the cards for photography.) (b) The weft thread being passed between the warp threads.
(a)
Figure 2: (a) A tablet weaving loom. (b) Schematic of the warp and weft threads. (Courtesy of Lana Holden.) (c) Stripes in the S and Z directions.
(b)
(c)
The Basic Model
One difference between tablet weaving and other types of weaving is that the threads from each card are twisted around each other as the piece is woven, as shown in Figure 2b. If the equipment is not specifically designed to account for this, the twist can build up (Figure 4a) until it gets in the way of turning the cards, as
Markov Chains and Egyptian Tombs: Generating “Egyptian” Tablet Weaving
Designs Using Mean-Reverting Processes
in Figure 4b. To avoid this, it is important to design patterns so that the twist is more or less balanced. This inspired the idea of using a mean-reverting random process to generate random tablet weaving designs. In previous work [3] it was shown that “Coptic Diamond” tablet weaving patterns can be modeled with Markov chains, which are random processes where the probability of each event (in this case, the choice between a clockwise or a counter-clockwise twist) depends only on a discrete parameter describing the system (in this case, the total amount of twist).
(a)
(b)
(c)
(d)
Figure 3: (a) Simple Egyptian Diagonals pattern. (b) Egyptian-style pattern with diamonds. (c) Reverse side of (b). (d) Woven version of Figure 5b, in. detail.
(a)
(b)
Figure 4: (a) Twist building up in the warp threads. (b) Built-up twist has the potential to interfere with turning the cards. (c) Woven version of Figure 6c, in. pictured design size.
(c)
Similarly to the Coptic Diamonds, we will start by modeling an individual card using a simple mean-reverting Markov chain known as the Ehrenfest model. This model can be used to model the motion of a
particle traveling randomly but influenced by an elastic force [5]. If the particle is at the origin, it has an equal chance of traveling one step to the left or one step to the right. If it is not at the origin, however, it will move back towards the origin with probability
(1)
where is the distance from the origin and is the maximum allowable distance. Otherwise, it will move away from the origin. Since the particle is more likely to move towards the origin than away, the process tends to revert towards the mean. For our application, the position of the particle represents the total amount of twist built up by the card. When the particle is at the origin, there is no twist in the threads.
For Egyptian Diagonals, the direction of twist is determined by whether the diagonal is in the Z or S direction. Therefore, it is important to keep the number of Z diagonals and S diagonals roughly equal for each thread. Unlike for Coptic Diamonds, we also need to produce the characteristic angled boundaries between the different regions. In order to achieve this, the pattern area was divided into columns whose borders did not strictly follow the warp threads. Instead, each column was divided into a series of half-diamond shapes, as shown in Figure 5a. As the pattern proceeds vertically, the turning direction of the diagonal is updated independently at each new half-diamond according to the model. This allows for both horizontal and angled boundaries, both of which can be seen in designs such as Figures 3a and 3b.
0.2 Results
The author has written a computer program (available at [4]) in the Processing language to generate random patterns according to the procedure defined above. The program takes advantage of the object-oriented nature of Processing by making each column of half-diamonds an object, which has methods for construction, updating the twist, calculating the position of the next block, and drawing the next block. Since the Markov chain only “remembers” the total amount of twist from one step to the next, the only variables associated with each object are the total twist, the step number (not strictly necessary but convenient for several of the routines), the position of the block, and the colors. This simplifies the program and reduces the amount of memory used. It also has the interesting effect that once a pattern is drawn, the only record of the pattern is on the computer screen itself; there is no data structure representing the pattern as a whole.
It was originally hoped that the mean-reversion property would frequently result in all columns achieving balanced twist simultaneously after a reasonable amount of time. In fact, it is known [5] that the average first time for one column to return to balanced twist is , which is approximately . We can follow a similar method to show that the average first time for all of the columns to return to balanced twist is , which is approximately . The proof of this, and a discussion of the standard deviation of this time, may be found in the Appendix.
Experiments with the computer program showed that waiting for balance to appear spontaneously was not entirely satisfactory. With columns and maximum twist, that would require an average of half-diamonds (with a standard deviation of ), each of which corresponds to four turns of the cards. This might correspond to an approximately 3.6-inch pattern repeat using a typical weight of thread. This is not unreasonable, but patterns with maximum twist seem to have insufficient variety for a repeat this long. On the other hand, columns and maximum twist would require an average of approximately 33 half-diamonds (with a standard deviation of ), or approximately 9.6 inches before the pattern repeats. This is certainly not impossible, but following such a long pattern would be quite taxing for the average weaver. Of course, the large standard deviations mean that some much shorter patterns will appear, as well as some much longer ones.
Markov Chains and Egyptian Tombs: Generating “Egyptian” Tablet Weaving
Designs Using Mean-Reverting Processes
In lieu of waiting for balance to appear, the program reverses direction after a specified number of steps and generates the mirror image of the original pattern. In this way, the program generates designs that can be repeated along a strip of fabric without building up twist. Since many tablet weaving patterns also have a line of symmetry along the length of the band, the pattern was additionally mirrored across this line, as shown in Figures 5b, 5c, and 5d. As previously mentioned, there is no data structure representing the pattern as a whole, so this symmetry is achieved by drawing all four quadrants of the pattern simultaneously, from the ends into the middle.
(a)
(b) Randomly generated pattern with maximum twist . (c) Randomly generated pattern with maximum twist . (d) Randomly generated pattern with maximum twist .
(b)
Figure 5: (a) Egyptian diagonals pattern with columns shown by color and half-diamonds drawn.
(c)
(d)
I wove a number of variations of the pattern in Figure 5b in order to see how it looked as a physical object and how difficult it was to weave. The most challenging part turned out to be making sure I had the correct number of turns before I changed the turning directions of the cards. It took longer to develop a good weaving rhythm than with the patterns of Figures 3a and 3b, but once I had a good rhythm the actual weaving was not too difficult.
More Advanced Models
Another way to spontaneously achieve balanced twist within a reasonable number of steps would be a time-dependent system where the mean-reverting tendency grew stronger as the length of the pattern increased. I modified my program to replace the standard Ehrenfest probability with a formula depending on the current time and the desired pattern length . There were two different versions of this formula:
and
Both of these formulas interpolate between the Ehrenfest formula (1), when , and either 0 or 1 (depending on the sign of ), when .
My initial fear was that this would introduce a fundamental asymmetry which would be displeasing. However, this does not seem to have been the case, at least for relatively short patterns with somewhat limited
Holden
maximum twist. Both of these equations produce aesthetically pleasing patterns which can be repeated indefinitely without building up twist. There does not seem to be any strong reason to prefer one over the other, although more testing may reveal something. Selected examples using each equation are shown in Figures 6a-6d; each shows slightly less than two complete repeats of the pattern. A physically woven example of Figure 6c is shown in Figure 4c; this amount of pattern took about 20 minutes of weaving time, which I would estimate is a little more per inch than Figure 3d and approximately 1.5 times as much as patterns like Figures 3a and 3b.
(a)
(b)
(c)
(d)
Figure 6: (a) and (b) Randomly generated patterns using (2) with and . (c) and (d) Randomly generated patterns using (3) with and .
Discussion and Future Work
It still seems reasonable that a different model could spontaneously achieve balanced twist without time-dependence. One idea is to “couple” nearby columns (or even all of the columns) so that if any of them were far from balance they would all be pulled more strongly towards it. An attempt was made to do this using a neighborhood of three columns, similar to an elementary cellular automaton. Unfortunately, this did not seem to achieve the desired effect. After a reasonable number of steps the system reached a state where each column was nearly in balance, but getting them all exactly into balance simultaneously still took longer than desired. More investigation into this idea seems warranted, perhaps using the theory of probabilistic cellular automata.
Another possibility for future work would be generalizing the Markov chain to a process where the probabilities of the events depend on the amounts of twist during the past time steps for some finite number . This might be helpful to “lock in” situations which are oscillating near balance, such as those described in the previous paragraph. In addition, adding this sort of memory to the Markov chain might be useful for
Markov Chains and Egyptian Tombs: Generating “Egyptian” Tablet Weaving Designs Using Mean-Reverting Processes
emphasizing the stripe patterns characteristic of Egyptian Diagonals.
Finally, there are many more types of tablet-weaving patterns yet to be explored beyond Coptic Diamonds and Egyptian Diagonals. These vary in the colors and patterns with which the cards are threaded, the numbers of holes in the cards, and the design aesthetics.
Appendix: Mathematical Proofs
Mark Kac [5] first computed the explicit probability that a particle in the Ehrenfest model starting in position will be in position after steps, using the eigenvalues of a stochastic matrix associated with the Ehrenfest process. He then used a generating function associated with to implicitly compute , the probability that the particle starting in position will be in position for the first time after steps, in the form of a generating function. He finally uses this generating function to get an explicit formula for the average amount of time it takes a particle in position to return to that position for the first time. We will follow the same outline to calculate the average first time for Ehrenfest processes to simultaneously return to a starting point.
Modeling our notation on that of [5], we let be the probability that the twist in every column is after steps, given that every column started with twist . Similarly, let be the probability that the twist in every column is for the first time simultaneously after steps, given that every column started with twist . Equation (62) of [5] gives the explicit formula for :
where is the coefficient of in . (For example, if is even and 0 otherwise.) Since we are treating the columns as independent Ehrenfest processes, we have
We expand this using the multinomial theorem to get
where is a composition of into nonnegative pieces, is the multinomial symbol, and the summation is over all such .
Given this, we can form the generating functions
and the average number of steps to return for the first time to simultaneous twist , starting at simultaneous twist , is
Holden
From Equation (62) of [5], we have
reflecting the fact that in order to reach a state you reach it the first time and then zero or more times after that. This is equivalent to
Using the multinomial theorem, we can show that
The denominator on the right is zero if and only if , which happens exactly when for and is even. Thus
where is a rational function which is finite at . Then
where . In particular, . Using Stirling’s approximation for the factorial, the average first time for columns to return is .
Kac noted that the variance and standard deviation of the recurrence time can also be calculated from the generating function by first calculating the second moment. In our case, we find that the second moment of the recurrence time is . Unfortunately, I have not been able to find a closed form formula for , although the values can be calculated numerically. The variance is then calculated from the second moment with the results given earlier in the paper.
References
[1] P. Collingwood. The Techniques of Tablet Weaving. Echo Point Books & Media, 2015. [2] C. Crockett. Card Weaving, Rev. ed. Interweave, 1991. [3] Joshua Holden, Markov Chains, Coptic Bananas, and Egyptian Tombs: Generating Tablet Weaving Designs Using Mean-Reverting Processes, Proceedings of Bridges 2020: Mathematics, Art, Music, Architecture, Education, Culture, 2020, pp. 419-422. [4] J. Holden. Tablet weaving patterns using Egyptian diagonals, 2020. https://github.com/joshuarbholden/egyptian_diagonals. [5] M. Kac. “Random Walk and the Theory of Brownian Motion.” The American Mathematical Monthly, vol. 54, no. 7, 1947, pp. 369–391. [6] J. Mullarkey. Tablet Weaving: Egyptian Diagonals. Malarky Crafts, 2013.