SkarpSkarp

Chapter 2 of 11

Hebrew Letters as a Finite Alphabet and State Space

Twenty‑two letters stop being mere symbols and become a finite alphabet with ordering, metrics, and operations. In this module, the alef‑bet turns into a structured state space that can drive combinatorial and dynamical models.

15 min readen

From Sacred Script to Finite Alphabet

Goal of the Module

You will treat the 22 Hebrew letters as elements of a finite, structured set that can drive combinatorial and dynamical models, not just as mystical or linguistic symbols.

Connection to Previous Module

Previously, the Tree of Life became a graph with nodes and edges. Here, the alef-bet will be turned into a similar mathematical object: an ordered set with relations and distances.

Using Sefer Yetzirah

Sefer Yetzirah classifies letters into mother, double, and simple categories. In this module, you will treat that classification as data for building a state space, independent of belief or tradition.

Target Representations

By the end, you should be able to represent the letters as an indexed set, a partitioned set, a graph with adjacency, and a metric space with a defined distance function.

Step 1: Listing the 22-Letter Alphabet as a Set

The 22-Letter Alef-Bet

We work with the standard 22 Hebrew consonants, ignoring vowels and final forms: א, ב, ג, ד, ה, ו, ז, ח, ט, י, כ, ל, מ, נ, ס, ע, פ, צ, ק, ר, ש, ת.

Abstract Set Notation

Define the alphabet as a finite set A = {ℓ1, ℓ2, ..., ℓ22}, where each ℓi is an abstract element corresponding to a specific letter symbol like א or ב.

Index-to-Symbol Mapping

Keep a mapping from index to symbol: ℓ1 ↔ א, ℓ2 ↔ ב, ..., ℓ22 ↔ ת. This lets you work abstractly while still connecting back to the actual letters.

No Structure Yet

At this stage A is just a set. There is no concept of distance, adjacency, or ordering beyond the conventional listing we chose.

Step 2: Adding Order and Indices

Why Add Order?

A set alone cannot express sequences or direction. By imposing an order, you can talk about 'next' and 'previous' letters and define simple dynamics.

Index Function

Define index: A → {1,...,22} so that index(ℓi) = i. This makes the alphabet an ordered list compatible with dictionary order.

Successor and Predecessor

With indices, define succ(ℓi) = ℓ(i+1) for i < 22 and pred(ℓi) = ℓ(i−1) for i > 1. These give you a linear notion of 'next' and 'previous'.

Cyclic Order

For cyclic dynamics, set succcyclic(ℓ22) = ℓ1 and succcyclic(ℓi) = ℓ(i+1) for i < 22, turning the alphabet into a 22-state ring.

Step 3: Sefer Yetzirah Letter Classes as a Partition

Three Letter Classes

Sefer Yetzirah groups letters into 3 mothers (א, מ, ש), 7 doubles (ב, ג, ד, כ, פ, ר, ת), and 12 simples (the rest). Treat this as a classification, not a claim about sound change.

Partition of the Set A

Define subsets M, D, S of A: M = {א, מ, ש}, D = {ב, ג, ד, כ, פ, ר, ת}, and S = A minus M and D. These three subsets are disjoint and cover A.

Typed Alphabet

Now each letter has a type label: mother, double, or simple. This 'typed alphabet' lets you define rules that depend on which class a letter belongs to.

Why It Matters

The partition enables models where transitions, weights, or probabilities differ between classes, enriching the dynamics you can define on the 22 letters.

Step 4: Quick Classification Exercise

Use this short thought exercise to internalize the partition into mother, double, and simple letters.

  1. Mentally list the 3 mother letters. Check yourself: did you get א, מ, ש?
  2. Count how many doubles there are without looking: can you recall that there are 7?
  3. Consider the letter ל (Lamed). Based on the lists given:
  • Is it a mother, double, or simple letter?
  1. Imagine you are coloring nodes in a graph of 22 letters:
  • Mothers = red
  • Doubles = blue
  • Simples = green

How many nodes of each color will your graph have?

Reflect:

  • How could this 3-coloring help you quickly see patterns in a path that moves through letters?
  • If a dynamical rule says "you can only move from a simple letter to a double letter", what fraction of all possible pairs (letter1, letter2) are allowed? (Hint: you have 12 simples and 7 doubles.)

Step 5: Defining Adjacency Relations on Letters

Why Adjacency?

Adjacency turns the alphabet into a graph. It lets you define paths, neighborhoods, and graph-based dynamics on the 22 letters.

Index-Based Adjacency

Simplest choice: letters are adjacent if their indices differ by 1. You can use a line (1–22) or a cycle by also connecting 22 back to 1.

Class-Based Adjacency

You can connect letters within each class (mothers, doubles, simples) or only between specific classes, using the Sefer Yetzirah partition as structural data.

General Definition

Formally, adjacency is a set E of unordered pairs in A × A. Once you pick E, you have a graph G = (A, E) with 22 nodes representing the letters.

Step 6: Implementing a Simple Alphabet Graph in Python

Here you will see how to encode the 22-letter alphabet, the Sefer Yetzirah classes, and a simple adjacency in Python. You do not need to run this now, but reading it will help solidify the structures.

The example uses:

  • A list for ordered letters.
  • Sets for mother/double/simple classes.
  • An index-based cyclic adjacency.

```python

Step 6: Hebrew alphabet as a finite state space

1. Ordered list of 22 letters (Unicode strings)

letters = [

"א", "ב", "ג", "ד", "ה", "ו", "ז", "ח", "ט", "י",

"כ", "ל", "מ", "נ", "ס", "ע", "פ", "צ", "ק", "ר", "ש", "ת"

]

2. Index mapping: letter -> index (1-based for readability)

index = {letter: i + 1 for i, letter in enumerate(letters)}

3. Sefer Yetzirah classes as sets

mothers = {"א", "מ", "ש"}

doubles = {"ב", "ג", "ד", "כ", "פ", "ר", "ת"}

simples = set(letters) - mothers - doubles

4. Cyclic adjacency based on indices

Two letters are adjacent if their indices differ by 1 mod 22

from collections import defaultdict

adjacency = defaultdict(set)

n = len(letters) # 22

for i, letter in enumerate(letters):

neighbor indices in a cycle

left = (i - 1) % n

right = (i + 1) % n

adjacency[letter].add(letters[left])

adjacency[letter].add(letters[right])

Example: print neighbors of Alef

print("Neighbors of א:", adjacency["א"]) # expected: neighbors in cyclic order

5. A simple metric: graph distance in the cycle

def cyclic_distance(a, b):

"""Distance between letters a and b along the 22-cycle."""

ia, ib = index[a] - 1, index[b] - 1 # 0-based

diff = abs(ia - ib)

return min(diff, n - diff)

print("Distance between א and ב:", cyclic_distance("א", "ב"))

print("Distance between א and ת:", cyclic_distance("א", "ת"))

```

Step 7: Metrics on the Alphabet

What Is a Metric?

A metric d on A assigns a nonnegative distance to each pair of letters, is symmetric, zero only on identical letters, and satisfies the triangle inequality.

Index-Based Distance

d_index(ℓi, ℓj) = |i−j| measures separation along the ordered list. It ignores any cyclic wrap-around.

Cyclic Graph Distance

On a 22-cycle, distance is the length of the shortest path along the ring. Positions 1 and 22 are distance 1, not 21.

Class-Based Distance

A coarse metric: 0 if letters are equal, 1 if they share a class (mother/double/simple), 2 if they belong to different classes.

Step 8: Thought Experiment – How Metrics Change Behavior

Imagine a random walk on the 22 letters: at each step, you move from your current letter to a "neighbor".

  1. If neighbors are defined by cyclic adjacency (index ±1 mod 22):
  • Starting from א, list the first 4 possible positions you might visit.
  • How long (in steps) until you could reach any letter in principle?
  1. If neighbors are defined by class-based adjacency:
  • Suppose you only allow moves within the same class (no crossing between mother/double/simple classes).
  • Starting from א (a mother), which letters are reachable at all?
  1. If neighbors are defined by "distance ≤ 1" under the class metric from Step 7:
  • Which letters are in the 1-step neighborhood of א?
  • Compare this to the 1-step neighborhood under the cyclic metric.

Reflect:

  • How does your choice of metric or adjacency shape which states (letters) can influence which others over time?
  • If you were modeling a process where "sound similarity" matters more than order in the alphabet, which metric or adjacency would you try to design?

Step 9: Quick Check on Structure Choices

Answer this multiple-choice question to check your understanding of how different structures relate.

Which statement best describes the relationship between adjacency and a metric on the 22-letter alphabet?

  1. Once you choose an ordering of the letters, the adjacency and metric are completely fixed.
  2. Adjacency and metric are modeling choices: different reasonable choices can be made on the same 22-letter set, leading to different graphs and distances.
  3. The Sefer Yetzirah classification uniquely determines the only valid metric and adjacency on the letters.
Show Answer

Answer: B) Adjacency and metric are modeling choices: different reasonable choices can be made on the same 22-letter set, leading to different graphs and distances.

Adjacency and metrics are not uniquely determined by the alphabet. They are modeling choices. You can define multiple valid graphs and distance functions on the same 22-letter set depending on what properties you want to capture. The Sefer Yetzirah classes give one useful partition, but they do not force a single adjacency or metric.

Step 10: Key Term Review

Use these flashcards to review the main concepts from this module.

Finite alphabet (in this module)
A finite set A of 22 elements representing the Hebrew letters, typically equipped with an ordering, indices, and possibly extra structure such as partitions and adjacency.
Index function
A mapping index: A → {1,...,22} assigning each letter a position in an ordered list, enabling successor/predecessor operations.
Partition into classes
A division of A into disjoint subsets whose union is A. Here: mothers, doubles, and simples based on Sefer Yetzirah.
Adjacency relation
A set E of unordered pairs of letters indicating which letters are considered neighbors, turning (A, E) into a graph.
Metric on letters
A distance function d: A × A → ℝ≥0 satisfying non-negativity, identity of indiscernibles, symmetry, and the triangle inequality.
Cyclic order on the alphabet
An ordering where the last letter is considered adjacent to the first, forming a 22-state cycle useful for circular dynamics.

Key Terms

metric
A function that assigns distances between elements of a set and satisfies non-negativity, identity of indiscernibles, symmetry, and the triangle inequality.
partition
A collection of disjoint subsets of a set whose union equals the original set. Each element belongs to exactly one subset.
state space
The set of all possible states of a system, often with additional structure (such as a graph or metric) that governs transitions and dynamics.
cyclic order
An ordering of elements arranged in a loop, where the first and last elements are also considered adjacent.
graph distance
The length (number of edges) of the shortest path between two nodes in a graph.
index function
A function that assigns each element of a set a unique integer position, imposing an order on an otherwise unordered set.
finite alphabet
A finite set of symbols treated as basic units for constructing strings, graphs, or dynamical systems. Here, the 22 Hebrew letters.
adjacency relation
A specification of which pairs of elements in a set are considered neighbors, usually represented as edges in a graph.
Sefer Yetzirah classes
A traditional division of the Hebrew letters into 3 mother letters, 7 double letters, and 12 simple letters, used here as a structural classification.

Finished reading?

Test your understanding with a custom practice exam on this chapter.

Test yourself