Mathews's Algorithm

This web application is based on Harry Mathews, "Mathew's Algorithm" in Oulipo: A Primer of Potential Literature, ed. and trans. Warren F. Motte Jr. (Normal, IL: Dalkey Archive Press, 1998), pp. 126-139. It offers the reader an opportunity to discover duplicities in texts and to "[track] down this otherness in language (and, perhaps, in what language talks about)".

The procedure Mathews describes is relatively simple:

  1. Materials: Several--at least Two--Sets of Heterogeneous Elements Are Required

    Comment: The heterogeneity can sometimes be minimal, but it is nonetheless essential for the proper functioning of the algorithm. The less it is respected, the more likely the machine will simply reproduce replicas of the original sets. In theory, to avoid any chance of this happening, the rule is that in a table of n elements, n2 - (n - 2) elements must be different. (Example: in a table of 4 sets of 4 elements, 14 of the 16 elements must differ.) In practice, however, it is often possible to lower this level of heterogeneity.

  2. Arrangement

    1. All sets must contain the same number of elements.

    2. Each element in a set must have a function equivalent to or consistent with the corresponding elements of the other sets. (If, for instance, the elements are words, the equivalence will be one of grammaical function.) In other words, the elements of each set must be arranged in the same order. (Not a1b1c1d1 and c2a2d2b2 but a1b1c1d1 and a2b2c2d2.)

    3. The sets are superimposed one above the other to form a table consisting of rows (the sets) and columns (the corresponding elements). Here is a table of 4 sets of 4 elements:

      1  a1b1c1d1
      2  a2b2c2d2
      3  a3b3c3d3
      4  a4b4c4d4

      Comment: In all the examples, the number of elements in each set equals the number of sets. This is a convenience, not a requirement.

  3. Operation

    1. Shift each set n - 1 places left. (In other words, shift the second set one place left, the third two places, etc.)

      1  a1b1c1d1
      2  b2c2d2a2
      3  c3d3a3b3
      4  d4a4b4c4
    2. Read the columns downward starting with the initial elements (a) of the sets. Four new sets results:

         a1b2c3d4
         a4b1c2d3
         a3b4c1d2
         a2b3c4d1
    3. Perform the same manipulation with a shift right:

      1  a1b1c1d1
      2  d2a2b2c2
      3  c3d3a3b3
      4  b4c4d4a4
    4. Read the results upward, still beginning with the initial elements (a) of the original sets:

         a1b2c3d4
         a2b1c4d3
         a3b2c1d4
         a4b3c2d1

      In this way, from n sets 2n sets can be obtained.


You can observe how the algorithm works with a subset of Raymond Queneau's Exercices de Style.


You can also paste elements from your own texts, beginning with the form below.

How many texts are you working with?

How many elements are in each text?