In mathematics, the Young–Fibonacci graph and Young–Fibonacci lattice, named after Alfred Young and Leonardo Fibonacci, are two closely related structures involving sequences of the digits 1 and 2. Any digit sequence of this type can be assigned a "rank", the sum of its digits: for instance, the rank of 11212 is 1 + 1 + 2 + 1 + 2 = 7. As was already known in ancient India, the number of sequences with a given rank is a Fibonacci number. The Young–Fibonacci lattice is an infinite modular lattice having these digit sequences as its elements, compatible with this rank structure. The Young–Fibonacci graph is the graph of this lattice, and has a vertex for each digit sequence. As the graph of a modular lattice, it is a modular graph.
The Young–Fibonacci graph and the Young–Fibonacci lattice were both initially studied in two papers by and . They are named after the closely related Young's lattice and after the Fibonacci number of their elements at any given rank.
Digit sequences with a given rank.
A digit sequence with rank "r" may be formed either by adding the digit 2 to a sequence with rank "r" − 2, or by adding the digit 1 to a sequence with rank "r" − 1. If "f" is the function that maps "r" to the number of different digit sequences of that rank, therefore, "f" satisfies the recurrence relation "f" ("r") = "f" ("r" − 2) + "f" ("r" − 1) defining the Fibonacci numbers, but with slightly different initial conditions: "f" (0) = "f" (1) = 1 (there is one rank-0 string, the empty string, and one rank-1 string, consisting of the single digit 1). These initial conditions cause the sequence of values of "f" to be shifted by one position from the Fibonacci numbers: "f" ("r") = "F""r" +1.
In the ancient Indian study of prosody, the Fibonacci numbers were used to count the number of different sequences of short and long syllables with a given total length; if the digit 1 corresponds to a short syllable, and the digit 2 corresponds to a long syllable, the rank of a digit sequence measures the total length of the corresponding sequence of syllables. See the Fibonacci number article for details.
Graphs of digit sequences.
The Young–Fibonacci graph is an infinite graph, with a vertex for each string of the digits "1" and "2" (including the empty string). The neighbors of a string "s" are the strings formed from "s" by one of the following operations:
It is straightforward to verify that each operation can be inverted: operations 1 and 3 are inverse to each other, as are operations 2 and 4. Therefore, the resulting graph may be considered to be undirected. However, it is usually considered to be a directed acyclic graph in which each edge connects from a vertex of lower rank to a vertex of higher rank.
As both and observe, this graph has the following properties:
 calls a graph with these properties a "Y"-graph; calls a graph with a weaker version of these properties (in which the numbers of common predecessors and common successors of any pair of nodes must be equal but may be greater than one) the graph of a differential poset.
Partial order and lattice structure.
The transitive closure of the Young–Fibonacci graph is a partial order. As shows, any two vertices "x" and "y" have a unique greatest common predecessor in this order (their "meet") and a unique least common successor (their "join"); thus, this order is a lattice, called the Young–Fibonacci lattice.
To find the meet of x and y, one may first test whether one of x and y is a predecessor of the other. A string x is a predecessor of another string y in this order exactly when the number of "2" digits remaining in y, after removing the longest common suffix of x and y, is at least as large as the number of all digits remaining in x after removing the common suffix. If x is a predecessor of y according to this test, then their meet is x, and similarly if y is a predecessor of x then their meet is y. In a second case, if neither x nor y is the predecessor of the other, but one or both of them begins with a "1" digit, the meet is unchanged if these initial digits are removed. And finally, if both x and y begin with the digit "2", the meet of x and y may be found by removing this digit from both of them, finding the meet of the resulting suffixes, and adding the "2" back to the start.
A common successor of x and y (though not necessarily the least common successor) may be found by taking a string of "2" digits with length equal to the longer of x and y. The least common successor is then the meet of the finitely many strings that are common successors of x and y and predecessors of this string of "2"s.
As further observes, the Young–Fibonacci lattice is modular. incorrectly claims that it is distributive; however, the sublattice formed by the strings {21, 22, 121, 211, 221} forms a diamond sublattice, forbidden in distributive lattices.