Advanced Topics · Lesson 11
Cross-Borders
From one word to a pair
So far we studied borders of a single word. Many arguments — especially counting arguments — need the same idea between two words.
A border of a single word is the special case where the two ends belong to the same word; a cross-border is a shared bridge between the end of the first word and the start of the second.
The cross-borders are "ab". The shortest is "ab".
Here ab is a cross-border of (abab, abba): it ends abab and it begins abba. The word ab is also a border of abab — cross-borders reuse the suffix/prefix machinery you already know.
The shortest cross-border
The cross-borders are "001". The shortest is "001".
Both 0 and 001 are cross-borders of (001001, 00111). The shortest is 0.
Just as the shortest border of a single word has special structure, the shortest cross-border is always unbordered — it can never be “bridged again” from within.
A guided proof
The following theorem is the standard reason the shortest cross-border is useful: it gives a canonical, primitive bridge between two words.
Let’s prove it step by step. Suppose is the shortest cross-border of .
Theorem: The shortest cross-border of a pair (u, v) is unbordered.
- Step 1
Suppose, for contradiction, that x is bordered. Let y be a nonempty proper border of x. Where does y sit inside x?
- Step 2
- Step 3
- Step 4
- Step 5
This argument is the template for several counting proofs: whenever two words share a shortest bridge, that bridge is primitive, and counting can treat it as an irreducible atom.
Counting pairs with no cross-border
Cross-borders matter most in counting. Let be the number of ordered pairs of length- words over a -letter alphabet with no cross-border.
There are pairs in total. To subtract the pairs that do have a cross-border, classify each such pair by its shortest cross-border , which the theorem above guarantees is unbordered.
Fix an unbordered word of length . Write and , leaving free positions, so pairs have as a cross-border. Crucially, every such pair has shortest cross-border exactly : a cross-border shorter than would lie entirely inside and would be a border of , which is impossible because is unbordered. So the shortest cross-border partitions the pairs with a cross-border, and
where counts the unbordered words of length (Nielsen recurrence). For binary words:
The formula works only because the classification uses the shortest cross-border. Classifying by an arbitrary cross-border would overcount: a pair with several cross-borders would be counted once per cross-border, and a non-shortest cross-border need not be unbordered, so the clean decomposition would break down. The shortest cross-border is the canonical, primitive bridge — exactly why we proved it is unbordered.
Practice
Order the borders
Arrange the borders of 1111 in increasing length. Pick each in order.
Classify unbordered words
Classify each word: unbordered or bordered?
Select the shortest border
Select the shortest border of 11101 on the word below.
Count the pairs with no cross-border
How many ordered pairs (u, v) of length 7 over a 2-letter
alphabet have no cross-border?
Practice this topic →Every quiz from this lesson, at four difficulties.