---
title: "Factoring Synchronous Grammars by Sorting — Gildea 2006"
description: "Factoring Synchronous Grammars by Sorting shows how to split translation rules into smaller equivalent rules and find the lowest possible rank."
canonical: "https://research.elamur.ai/free/en/papers/gildea-2006-factoring-synchronous-grammars-sorting/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/gildea-2006-factoring-synchronous-grammars-sorting/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2006](https://md.research.elamur.ai/free/en/papers/2006/) / Factoring Synchronous Grammars by Sorting

# Factoring Synchronous Grammars by Sorting

Paper · 2006 · Daniel Gildea, Giorgio Satta and Hao Zhang

**Authors:** [Daniel Gildea](https://md.research.elamur.ai/free/en/authors/daniel-gildea/), [Giorgio Satta](https://md.research.elamur.ai/free/en/authors/giorgio-satta/) and [Hao Zhang](https://md.research.elamur.ai/free/en/authors/hao-zhang/) · **Year:** 2006 · **Venue:** Proceedings of the COLING/ACL 2006 Main Conference Poster Sessions · **Licence:** [CC BY-NC-SA 3.0 (ACL Anthology, before 2016)](https://creativecommons.org/licenses/by-nc-sa/3.0/)

[**13** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W2156430494) · [Proceedings of the COLING/ACL 2006 Main Conference Poster Sessions](https://aclanthology.org/volumes/P06-2/) · [licence](https://creativecommons.org/licenses/by-nc-sa/3.0/)

- [Publisher's page](https://aclanthology.org/P06-2036/)
- [PDF](https://aclanthology.org/P06-2036.pdf)
- [DOI 10.3115/1273073.1273109](https://doi.org/10.3115/1273073.1273109)
- [OpenAlex](https://openalex.org/W2156430494)

Citations: OpenAlex, 2026-10-14.

## Summary

A grammar for [machine translation](https://md.research.elamur.ai/free/en/topics/machine-translation/) can specify how several pieces of a sentence change order between languages. The more pieces a single rule connects, the more boundaries a parser may have to consider together. Daniel Gildea, Giorgio Satta and Hao Zhang ask when a large rule can be replaced by smaller rules that generate the same pairs of strings. Their answer depends on where the pieces land in each language. Pieces that stay together on both sides can be treated as a unit, even when their internal order changes. Some reorderings leave very few opportunities to make such groups.

The paper studies synchronous grammars, which extend [context-free grammars](https://md.research.elamur.ai/free/en/concepts/context-free-grammar/) by linking the steps that generate the two strings. The authors represent the links in a rule as a permutation and build a tree of groups that occupy uninterrupted spans in both orders. Each internal node becomes a grammar rule. The largest number of children at any node determines the largest rank among the replacement rules, where rank counts the linked nonterminal occurrences on one side. The algorithm finds a tree that makes this largest rank as small as possible.

The search borrows the organization of mergesort. It starts with individual positions and combines neighboring ranges, looking for groups that cross each new boundary. Instead of testing every pair of endpoints, it expands a candidate only when the permutation forces it to include another position. It also skips over groups already built. The resulting running time is O(n log n) per rule of rank n, regardless of the rank of the largest replacement rule. In a worked example, the method replaces a rule of rank 8 with a tree whose largest node has arity 5. It also settles the paper’s question about whether irreducible permutations can be recognized in subquadratic time.

The benefit for parsing is a theoretical bound. For the strategy discussed in the paper, the exponent on the maximum input length changes from n+4 to k+4 when factorization lowers the grammar’s rank from n to k. The worked examples show how that reduction can arise and why some groups remain large. The paper leaves open how to find an optimal parsing strategy when intermediate states can occupy discontinuous spans in both strings.

## Deep dive: Factoring Synchronous Grammars by Sorting

Factoring Synchronous Grammars by Sorting shows how to split translation rules into smaller equivalent rules and find the lowest possible rank. · about 32 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### A grammar that rewrites both strings together

An ordinary context-free grammar generates a string by replacing a category with a sequence of words, other categories, or both. A category that can still be expanded is a nonterminal. A terminal is a symbol that appears directly in the final string. A synchronous context-free grammar, or SCFG, rewrites a pair of strings together. Its rules say what goes on each side and which occurrences of unfinished categories must be expanded together. That makes it possible for a phrase on one side to correspond to a phrase elsewhere on the other side, while keeping those two expansions associated throughout the derivation.

The links are between occurrences. If the same category appears several times in a rule, each appearance can have a different partner. Category names alone therefore cannot determine the reordering. Imagine that a rule allows a subject, a verb and an object to be expanded further. The rule can place the subject before the verb on one side and after it on the other, while keeping the subject expansions linked. The name of each category describes what can fill its position. The pattern of links describes how those positions correspond.

The paper treats an SCFG as a specification of a translation relation. A derivation produces two strings together, and all the pairs the grammar can derive make up the relation. Its immediate computational concern is [parsing](https://md.research.elamur.ai/free/en/concepts/parsing/) a pair of strings under that grammar. A parser must account for the arrangement of pieces in both strings and for the synchronous rules that connect them. A large rule can require the parser to consider many locations at once, even if the material produced by each linked occurrence is straightforward to analyze on its own.

#### Why the size of a rule matters

The authors call the number of right-hand-side nonterminal occurrences on one side of a rule its rank. The ranks on the two sides agree because the links are one-to-one and cover every nonterminal occurrence. The grammar’s rank is the largest rule rank. The distinction between rank and the length of the written rule matters. A rule can contain literal words, but it is the linked occurrences that create recursive choices about how the input strings are divided.

A standard way to simplify an ordinary context-free rule is to introduce intermediate categories. A rule with a long right-hand side can delegate a group of its children to a new category and refer to that group as a single item. A synchronous grammar can use the same construction when that group occupies a single stretch in each string. The new category has to stand for both stretches at once. If an unrelated piece intervenes on either side, a single occurrence of the new category has no way to leave a slot for the intervening piece. The ordering of the links constrains where that kind of factorization is possible.

This constraint makes rank reduction a problem about the particular grammar. The authors cite Aho and Ullman’s result that SCFGs in general do not admit a normal form with a fixed rank bound. That leaves a useful question about each rule: how much can its rank be reduced while preserving the pairs the rule can generate? A rule may contain several compatible groups, or it may need to retain much of its original arity. The objective is to find the smallest achievable rank, including for rules that cannot be made binary.

The practical motivation comes from the form of the parsing bounds. Rank affects an exponent on input length in the upper bound the authors discuss. Introducing intermediate rules increases grammar size, but reducing rank can lower that exponent. The paper therefore separates the work of finding the factorization, which can be done on the grammar in advance, from the work of using the resulting grammar to analyze an input pair. The former pays for inspecting and rearranging rule structure. The latter can take advantage of smaller rule applications.

#### Earlier approaches

The paper traces the synchronous formalism to syntax-directed translation schemata and identifies several ways earlier work adapted the idea. [Inversion Transduction Grammars](https://md.research.elamur.ai/free/en/papers/wu-1997-stochastic-inversion-transduction-grammars-bilingual/) restrict rules to binary combinations. Chiang’s synchronous grammars use a single nonterminal symbol. Melamed’s Multi-text Grammars allow independent rewriting. The authors also mention tree-based approaches, including [Yamada and Knight’s syntax-based translation work](https://md.research.elamur.ai/free/en/papers/yamada-2001-syntax-based-statistical-translation-model/) and work by Galley and colleagues. These examples establish the range of synchronous and tree-based approaches in use. The factoring problem studied here concerns a specific property of SCFG rules: the order of their links.

The most direct predecessor is [Synchronous Binarization for Machine Translation](https://md.research.elamur.ai/free/en/papers/zhang-2006-synchronous-binarization-machine-translation/). Its goal is to recast suitable rules with rank k = 2. Binarization is especially useful when it succeeds, because each local operation combines only a pair of children. For a rule whose reordering prevents that, the present paper asks what larger rank is necessary. The authors give O(n²) as the running time of a hypothetical generalization of the earlier method to arbitrary k. This is the algorithmic comparison behind their decision to organize the search around merging and scanning.

The paper also draws on [Some Computational Complexity Results for Synchronous Context-Free Grammars](https://md.research.elamur.ai/free/en/papers/satta-2005-some-computational-complexity-results-synchronous/) in discussing how parsing strategies handle spans. Some strategies maintain an uninterrupted span on one side. Others allow an intermediate state to represent separated pieces on both sides. The second kind can change which combinations are possible during parsing, and the cost still depends on the rule’s permutation. The factorization studied here changes the grammar by introducing ordinary synchronous rules. The broader problem of choosing intermediate parsing states remains distinct.

There is a corresponding question in the study of permutations. A permutation is called simple, or irreducible in the paper’s terminology, when it has no proper group of multiple positions that stays together in both orders. The whole permutation can always be taken as a group, so it gives no evidence of a useful split. Albert and colleagues had asked whether recognizing these permutations could be done in less than quadratic time. A procedure that constructs the tree of permissible groups also answers that recognition question. For a simple permutation, the tree has no proper internal group to put between the root and its leaves.

### The method, step by step

#### From links to a permutation

The algorithm begins with the arrangement of nonterminal occurrences in one input rule. Number the occurrences in order on one side, then read those labels in the order in which their partners occur on the other. The resulting sequence contains each label exactly once. It records the correspondence that matters to factorization, while leaving category identities and literal material available for constructing the replacement rules later.

In the paper’s first grammar example, one side has the occurrences A through H in alphabetical order. The other begins with B followed by A, keeps C followed by D, and puts the remaining four occurrences in the order G, E, H, F. The A and B occurrences can be packaged together because they are neighbors on both sides. Their order inside the package is reversed on the second side. C and D also form a package, with their internal order preserved. Those packages can themselves be combined because they form one continuous region on each side.

The occurrences E through H form another group. Taken together they occupy a whole stretch in either order, although the order G, E, H, F gives no way to split them further into proper groups that stay together on both sides. The tree therefore records two kinds of structure: the places where small children can be combined, and the places where several children must still be joined in one rule. A large node in this tree represents a local obstruction to reducing the rank.

The routine operates on the permutation rather than the letters A through H. Throughout the numerical examples, a horizontal position is an index in the input permutation and a vertical position is the label at that index. Treating the pair as a point provides the picture of a permutation matrix, with one occupied cell per row and column. The implementation needs only the mappings between positions. It avoids building a square matrix of cells.

From synchronous rule links to a factored grammar The steps in order.

#### What a valid group looks like

A candidate group begins as a consecutive range of positions along the input permutation. That gives it continuity on the horizontal axis immediately. For the group to be usable, its labels must also fill a consecutive range on the vertical axis. Because each label appears once, the authors can check the second condition from the smallest and largest labels and the number of elements between the chosen horizontal boundaries.

```
max(S) − min(S) = |S| − 1
```

Here S denotes the labels in the candidate span. The functions max and min return its largest and smallest labels. The bars in |S| give the number of elements in the span. The minus signs express subtraction, and the equality says that the distance between the extreme labels is one less than the number of elements. The 1 accounts for including both endpoints when counting positions.

The paper uses the values (7, 5, 8, 6) to illustrate the test. The suffix (5, 8, 6) reaches from a minimum of 5 to a maximum of 8. The paper gives 3 for that distance and 2 for the length of the suffix minus one. The unequal quantities reflect a gap: the value 7 lies outside the proposed suffix. Using the entire group brings in that value. The same extreme labels then bound a fully occupied vertical interval, allowing the span to be reduced to a node of arity 4.

In the matrix picture, the test asks whether all the points from a run of columns occupy a run of rows without holes. A diagonal arrangement, a reversed arrangement and a more complicated internal rearrangement can all pass. The condition is about which rows the points occupy, irrespective of their order within the rectangle. That independence is what lets one replacement rule handle the ordering between groups while another handles ordering within a group.

Reducing a span means remembering its internal ordering as a subtree and treating the completed subtree as a single child in later combinations. The number of original positions in a span and the arity of the node that represents it can therefore differ. A parent may cover a long range of original positions while combining relatively few children, because some of those children already contain several positions. The rank objective is concerned with the largest such combination anywhere in the tree.

#### Why the search starts with small ranges

The outer routine, called KARIZE, follows a mergesort schedule. It begins with ranges that contain an individual position and combines neighboring ranges in successive passes. Every previously processed range already has the subtrees that can be built entirely within it. When two ranges are joined, any new group must cross the boundary between them. A group lying wholly to one side would already have been dealt with during that side’s processing.

The split point is that boundary. At a merge, the search initially considers the nearest positions on either side of it. Every valid group crossing the split must include those positions. This gives the search a starting candidate that is contained in every possible solution for that split. It then expands the candidate only as required by the correspondence between the two orders.

The authors justify committing a group when the search finds it by drawing on the structure of permutation trees. They describe the decomposition as determined up to different associations of consecutive binary rules of the same orientation. A straight binary combination preserves the order of its two children on the other side. An inverted combination reverses them. When a chain of combinations uses the same orientation, alternative bracketings can give the same leaf permutation. The authors say any such chain can be normalized afterward, for example by choosing a consistent left-branching arrangement. The paper relies on this structural property to support greedy reduction and omits its proof.

The merge schedule and the eventual tree have different purposes. The schedule determines when the algorithm examines a range. The tree records groups that meet the condition in both orders. A boundary in the merge schedule can fall inside a group of any permissible size. The scanner starts near that boundary and grows until the group closes or until the current merge range proves insufficient. The schedule therefore does not constrain the tree to follow the same divisions as mergesort.

The invariant makes the local work add up to the full construction. At the smallest ranges there is nothing to build beyond the leaves. At a larger range, the earlier work accounts for groups within either half, and the current search accounts for groups crossing the split. After the final merge, every group needed by the factorization is within the range under consideration. No position of the input rule lies outside that last search.

#### Sorting the current range without losing the original labels

The paper uses two arrays to move between horizontal and vertical positions. The array h lists horizontal indices in the order obtained by sorting their input labels within the current range. The array v is its inverse within that range: given a horizontal index, it gives the corresponding vertical position in the locally sorted order. They let a scan start on either axis and locate the corresponding coordinate on the other.

```
v[h[i]] = i
```

The index i denotes a position in the locally sorted order. The brackets indicate array lookup. The entry h[i] is the horizontal position at that sorted index, and v gives the sorted index of a horizontal position. The equality expresses the inverse relationship. The input permutation itself is written π, with π at a given horizontal index supplying the original label used for sorting.

There are two vertical orders to keep track of during a partial merge. The original labels retain their positions in the full permutation. The local sorted order packs together only the points whose horizontal positions belong to the current range. Two labels that are neighbors in this packed order can be separated by a missing label in the full permutation. A group must be continuous in the original order, so the algorithm keeps access to the original labels even while using local indices to scan efficiently.

The distinction is important for both the test and its cost. The local arrays allow the scan to enumerate just the points present in the range. The original labels allow it to detect a gap between the points that bound the candidate vertically. If the original distance is larger than the distance in the local order, at least one required point is outside the entire current range. Enlarging the candidate within that range cannot bring it in. A later merge can reconsider the relevant positions once the range has grown.

At each merge the two neighboring portions of h are already sorted by original label. They can be merged in linear time in the size of the combined range. The block information associated with each entry follows it during this merge, and a pass over the merged order establishes the inverse map and vertical block limits. In this sense, sorting serves two purposes. It organizes the progression through horizontal ranges, and it supplies the vertical order inside each range so the search can visit the right positions directly.

#### Extending only when a point forces an extension

The routine called SCAN keeps left and right boundaries in the horizontal order and bottom and top boundaries in the vertical order. The horizontal scan first visits the points covered by the candidate’s current horizontal interval. The lowest and highest of their vertical positions tell the search how far it has to reach on that axis. Any group containing the horizontal interval must contain those vertical positions. It must also include the positions between them, because the group is supposed to fill a continuous vertical span.

The vertical scan then visits the points in that vertical interval. Some may lie outside the candidate’s horizontal boundaries. When they do, the search moves those boundaries to include them. This can add columns whose points reach farther vertically, in which case the horizontal scan runs again. The requirement is reciprocal. All points in the selected columns must fit within the selected rows, and all points in the selected rows must fit within the selected columns.

Each extension is forced by a position that any valid group containing the starting candidate would have to include. That is what allows the scan to bypass the enumeration of candidate endpoint pairs. If a point seen in the vertical scan lies farther to the left, testing a smaller left extension cannot succeed. The point would still be missing. The search moves directly to the boundary that includes it and then checks what that change requires on the other axis.

The scan can end in two ways. If the vertical range requires an original label absent from the current merge range, it reports that there is no reduction there at this stage. Otherwise, the alternating passes eventually stop changing the boundaries. At that point, every point required by either interval belongs to both intervals, and the check against the original labels establishes that they are consecutive. The scanner has found the smallest valid group enclosing its starting boundary. A larger group can still surround it, which is why the merge continues after recording a reduction.

#### Recording a reduction and looking for the next group

When a scan succeeds, REDUCE records the span as a subtree. The algorithm keeps four auxiliary arrays to track the largest reduced block containing each point. The horizontal limits are held in hmin and hmax, which are accessed in the locally sorted order. The vertical limits are held in vmin and vmax, which are accessed in horizontal order. The limits give the block’s full extent along the relevant axis. Later scans can account for it as a unit and move past its interior.

The first successful reduction at a merge may cover only part of the combined range. Any additional reduction needed at that merge also crosses the original split. Once the first group has been built, a larger such group has to reach past at least one of its edges. The merge routine therefore continues by scanning at the new left and right boundaries. When both sides offer a reduction, it gives priority to the smaller one. Each successful reduction updates the block limits, and the routine continues until it finds no further group to record at that merge.

This design uses two forms of skipping. Within one scan, a boundary extension exposes fresh positions. The forward progress of the scan counters lets the next pass examine those new positions without walking through the interior again. Across scans in the same merge, a block that has already become a subtree can be skipped using its stored limits. The first mechanism exploits the growth of one candidate rectangle. The second exploits the tree structure built by earlier searches.

A completed block still conveys its full boundaries. Skipping preserves the constraints that the block imposes on a larger candidate. For example, a larger candidate that includes such a block has to accommodate the block’s vertical extent, even when the search need not inspect its individual points again. The arrays are what turn the idea of treating a subtree as a single child into a way of traversing the permutation.

#### The complete walk through a worked permutation

The paper traces the permutation (7, 1, 4, 6, 3, 5, 8, 2) through the routine. It starts with each position in its own block. In the first pass the positions are combined into ranges of length 2. The local order within each range is obtained by sorting its labels. For instance, π[7] = 8 and π[8] = 2, so the entry for horizontal position 8 precedes the entry for position 7 in the sorted order of that pair. These two positions have become neighbors in the local order even though their original labels are far apart. None of the examined pairs has consecutive labels, so that pass records no reductions.

The next pass creates ranges of length 4. At each new split, the scanner can consider candidates containing more than the original pair of positions. The allowed range still limits which points it can include. The paper records no reduction in either range of length 4. The absence of a subtree at this stage tells the routine that the eventual internal group, if there is one, has to extend across the remaining split.

In the final pass, the two halves are combined into a range of length 8. The split lies between positions 4 and 5. The labels there are 6 and 3, respectively, so the first horizontal scan sets bottom and top to 3 and 6. In the full permutation the labels between those limits correspond, in vertical order, to horizontal positions 5, 3, 6 and 4. The vertical scan therefore extends the horizontal interval to run from 3 to 6.

The new horizontal interval contains positions 4 and 5, which the scan has just visited. It only needs to inspect the newly included positions 3 and 6. Their labels leave the bottom and top boundaries where they were. Both axes now give a span of length 4, and the original labels in that span are consecutive. The algorithm records the group as an internal node. The horizontal block limits for its points now refer to positions 3 and 6.

The ensuing search treats that node as a block. The final reduction covers the whole input, with the completed group as one of the root’s children. The example gives an internal node of arity 4 and a root of arity 5. The latter controls the rank of the factored rule. This example shows why the procedure has to support larger combinations alongside binary ones. The useful smaller group occurs inside a permutation whose remaining pieces still have to be combined at a larger node.

#### Converting the tree back to rules

The permutation tree records the ordering of leaves on both sides and the local ordering of each node’s immediate children. To recover a grammar, the root keeps the original rule’s left-hand-side categories. Each internal group below it receives a fresh nonterminal. The rule at a node refers to that node’s children in their respective orders on the two sides. A child that is itself an internal group is represented by its new nonterminal, and a child that is a leaf retains the original linked occurrence.

Expanding all the new nonterminals reproduces the paired right-hand sides of the original rule. The leaves also retain the original correspondence, so any subsequent synchronous expansions of those leaves can still take place in their original pairings. In the other direction, the fresh categories serve as intermediates for this construction. Collapsing their steps recovers the original substitution. The property being preserved is the relation between generated strings, while the form of a derivation changes to include the intermediate categories.

The example with A through H illustrates the reconstruction. The top rule combines the A-through-D region with the E-through-H region. A rule below the first child combines the A-and-B group with the C-and-D group. Separate rules account for the reversed order of B and A and the straight order of C and D. The other child keeps a rule of arity 4 to express its internal ordering. The tree describes exactly which work is handled by each of the smaller rules.

For a stochastic grammar, the original probability is placed on the root rule. The new rules introduced for its internal groups carry probability 1. Their contribution to the product of rule probabilities therefore leaves the original rule’s weight intact. These probabilities are carried over from the input grammar. There is no parameter fitting or corpus extraction step in the procedure. The data it needs are the rules and their links, and it processes each rule independently.

#### Where the time bound comes from

Testing all combinations of possible left and right endpoints would already require quadratic work in the worst case for a single merge. The closure scan avoids that search. Within a call to SCAN, the boundaries only move outward. The counters advance past the regions that earlier passes have visited. A position newly covered on one axis is examined when it is reached, and the separate scan on the other axis also proceeds through its newly exposed portions. The authors use this accounting to bound the work of one scan linearly in the current range.

Bounding a whole merge requires more than bounding one scan, because a merge may call SCAN repeatedly. The authors use the block limits for that second argument. A scan following a reduction can cross a previously completed block without revisiting all of its contents. Their accounting allows a point to be scanned at most twice during a merge, corresponding to searches across a new reduction’s left and right boundaries. That is the reason for maintaining boundary information along both axes.

Sorting and initializing the arrays at a merge also take linear work in the current range. At any one pass the ranges are disjoint, so the total work across them is linear in the input size. The number of passes grows logarithmically as the combined ranges grow. The entire factorization has the following bound.

```
O(n log n)
```

Here n is the number of linked nonterminal occurrences on either side of the input rule, or equivalently the length of its permutation. The logarithm, log n, accounts for the number of levels in the merge schedule. The multiplication indicated by juxtaposition gives the bound on total work, and O denotes an asymptotic upper bound. The maximum arity of the output tree does not enter this expression. The same organization applies when the original permutation is irreducible and the output root retains the full input rank.

### Experiments and results

#### The numerical examples and what they measure

The paper presents a construction and a complexity analysis, accompanied by worked permutations. It reports no training corpus, development or test split, translation score, or measured runtime. The numerical inputs are individual rules used to show the factorization and the behavior of the scan. The main outcome for such an input is the largest rule rank after factoring. The natural comparison is the rank of the original rule, which applies the entire permutation in one step.

The permutation (7, 1, 4, 6, 3, 5, 8, 2) makes that comparison particularly easy to read. Before factoring, a single rule combines all 8 linked occurrences. After factoring, the tree combines the middle span at an internal node of arity 4 and combines the resulting block with the remaining children at a root of arity 5. The chart measures maximum rank for that individual input. Its factored value comes from the largest node, instead of the size of the first reduction found.

Maximum rule rank for the worked permutation of length 8 Grouping the middle span lowers the largest number of children combined by a rule.

**The numbers**

| System or setting | maximum rule rank |
| --- | --- |
| Original rule | 8 |
| Factored rules (this paper) | 5 |

The alphabetical example puts the obstacle in a different place. Its original rule also has 8 linked occurrences. Several of the resulting rules are binary, while the E-through-H group requires a rule of arity 4. Once the other groups have been built, the root can combine its two children in a binary rule. The largest rank therefore comes from the rule inside the tree for E through H. In the charted example it comes from the root. Looking only at a tree’s outermost combination would miss the bottleneck in the alphabetical example.

The same distinction applies when interpreting the sequence of scanner events. Early passes in the charted example produce no reductions, but the final pass still finds a proper internal group. A failure to reduce at a partial merge means the needed group cannot be formed within that range. It says nothing by itself about a range that includes additional positions. At the final merge there is no larger range to consider, so a root with unreduced children gives the final rank for that permutation.

#### The theoretical comparisons

The algorithmic baseline discussed in the introduction is a generalization of the earlier binarization procedure. The authors give O(n²) for that hypothetical generalization, with n denoting rule rank. They also discuss a direct search that tries all left and right boundaries for a merge, which would take Ω(n²) for a single merge in the worst case, with n here denoting the size of the range being combined. In these expressions, O is an upper bound and Ω is a lower bound on asymptotic growth. The two quadratic comparisons concern different operations. One concerns a potential whole rule factorizer. The other concerns the cost of one combination if boundary pairs are enumerated.

For parsing, the authors give an upper bound for a dynamic program that keeps continuous spans in one dimension. They state it first for the input grammar.

```
O(|G| N^(n+4))
```

Here G is the input SCFG and |G| denotes its size. The maximum length of either string in the pair is N. The original grammar rank is n. The caret and parentheses indicate that N is raised to the exponent n+4, with the plus sign adding the fixed term in the paper’s bound. The grammar size multiplies that power, and O gives an asymptotic upper bound.

The introduction bounds the size of the replacement grammar by 2 · |G|, where 2 is the stated constant factor and the centered dot denotes multiplication. With the factored grammar the same kind of parsing strategy gives the following upper bound.

```
O(|G| N^(k+4))
```

The symbols |G| and N again denote the size of the original grammar and the maximum input string length. The constant-factor size allowance is absorbed into O. The symbol k is the largest rule rank in the replacement grammar. The exponent has the same fixed term 4 and uses k in place of n. The conclusion also gives the dependence on input length alone as O(N^(k+4)).

For unfavorable permutations, the paper compares this upper bound with a lower bound cited for parsing strategies that allow discontinuous spans along both dimensions.

```
Ω(|G| N^(c√n))
```

Here Ω denotes an asymptotic lower bound in the setting described by the paper. The symbols |G|, N and n again refer to grammar size, maximum input length and rank. The square-root sign applies to n, and c is a constant multiplying that square root in the exponent of N. The cited result gives context for why difficult permutations matter even when a parsing strategy allows discontinuous intermediate spans. It is separate from the upper bound derived by applying the continuous-span strategy to the new grammar.

For readers comparing the numerical example with the complexity claims, these are different sorts of evidence. The example exposes the construction’s intermediate states and gives the rank attained for one input. The running-time argument counts the work of the procedure as rule rank grows. The parsing bound applies to a strategy using a grammar of the resulting rank. None of those quantities is a measurement of elapsed parser time on the worked permutation.

### What the ablations show

The paper has no experimental ablations. Its worked examples and complexity arguments instead isolate what the continuity test, the merge schedule and the two kinds of skipping contribute.

#### A group that fails and the larger group that passes

The comparison between (5, 8, 6) and (7, 5, 8, 6) holds the extreme labels fixed. The smaller candidate occupies an uninterrupted set of horizontal positions, and its vertical extent includes a missing point. Including the preceding horizontal position fills that gap. This shows why looking only at the endpoints, or only at the fact that the proposed children appear next to each other on one side, is insufficient. It is the set of linked occurrences inside both intervals that determines whether a group can become a reusable category.

The same example explains why an unsuccessful local check can be informative. When an intermediate label is missing, its horizontal position identifies where the candidate has to grow if the point is present in the current range. The search can advance to that position directly. If the point lies beyond the range being merged, the missing label gives a reason to stop that call. Both outcomes follow from the same requirement. A completed group has to include every position between its two extreme labels.

The walkthrough of the permutation of length 8 adds a comparison across merge stages. The local sorting that establishes adjacency in a short range can put widely separated original labels next to one another. Preserving access to the input permutation prevents those locally adjacent entries from being accepted as a genuine group. In the final merge, the necessary labels are present and the scan can close the middle span. The local order provides the efficient path through available positions, while the original order decides whether those positions suffice.

#### Two forms of repeated work

Within a scan, consider what happens after the vertical pass extends the horizontal boundaries in the worked example. The search has already visited the central positions 4 and 5. The only new horizontal positions are 3 and 6. Inspecting those is enough to find out whether the previous vertical limits still hold. This is the concrete case behind the paper’s claim that repeated changes to the candidate do not require repeated passes through the same interior.

Across scans, the same example presents a different situation. Once the middle span has been reduced, the search for the enclosing group starts another scan. Its results still depend on the reduced middle group, but its internal points are already summarized by block limits. This use of a completed subtree is what the authors invoke to bound the work across a whole merge. The fact that a single scan is linear would leave open the possibility of spending linear time again for every candidate examined at that merge.

The examples also clarify why the sorted arrays alone would be insufficient. Sorting makes points accessible in vertical order and exposes gaps when compared with the original labels. It says nothing by itself about which spans have already become subtrees. The auxiliary block limits preserve that information across calls. Those limits allow the search for larger groups to use the work done for smaller groups while still accounting for their entire extent.

#### Where the rank reduction comes from

Comparing the two trees also shows how factorization changes the location of the largest operation. In the alphabetical example, the method can separate a group whose internal permutation requires arity 4 from the simpler left portion of the tree. The difficult reordering remains local. In the other example, the group of arity 4 can be separated, but the remaining arrangement forces a root of arity 5. Producing a proper group is enough to reduce the rank in these examples. It does not imply that every resulting operation is binary.

These comparisons explain why the result is phrased as minimizing the largest rule size. The tree can contain a mixture of arities, and the rank is determined by its largest node wherever that node occurs. Counting the binary nodes, counting reductions, or reporting only the first group found would describe aspects of the tree without answering the optimization question. The paper’s construction makes the hierarchical grouping explicit so the arity of each remaining operation can be read from its immediate children.

The discussion of alternative bracketings provides a limited comparison of trees that realize the same permutation. Changing how consecutive straight binary combinations are associated can change the tree’s shape. The same holds for consecutive inverted binary combinations. The arity of those local operations stays binary. For the rank objective, that kind of ambiguity can be resolved by a normalization convention after the search. The paper does not evaluate whether tree shape within that equivalence matters for an actual parser.

### Limitations

#### Limits stated by the authors

The authors state that arbitrary SCFGs do not have a fixed rank normal form. The factorization guarantees the smallest available rank for the construction, and that rank may be the original one. A rule whose permutation has no proper interval common to both orders has no smaller group to delegate to a fresh nonterminal. In that case, the procedure can certify the lack of a useful split, while the rule’s largest operation remains the same size.

They also distinguish the factored grammar from the optimal strategy for parsing it. The upper bound for the factored grammar uses a dynamic program that maintains continuous spans in one dimension. For a given permutation, the authors note that an optimal parser might instead use intermediate states with discontinuous spans along both axes. They leave open whether such optimal strategies can be found efficiently. The rank result applies to the equivalence-preserving grouping of synchronous rules, and the open question concerns the space of parsing strategies.

The paper explicitly omits the proof of the structural claim used to justify greedy reduction. It explains why the search only expands when a point makes expansion necessary and why the first completed group at a split is the smallest available there. The larger argument for committing that group depends on the stated property of permutation trees: the meaningful decomposition is determined up to the binary reassociations described by the authors. A reader can follow the operation of the scanner from the paper, with the tree property serving as a premise of the optimality argument.

#### Limits of the evidence and the objective

The numerical demonstrations concern particular permutations. They cannot establish how frequently the factorization lowers rank in a grammar drawn from translation data, what maximum rank would remain in such a grammar, or how large the reduction would be in practice. Because grammar rank is a maximum, splitting many rules successfully can still leave the grammar at its original rank if a highest-rank rule is irreducible. The worked trees explain what happens to their own input rules. The paper supplies no distribution of rule ranks or reorderings for estimating the effect across a grammar.

The asymptotic bound describes the growth of work with rule rank. It does not give wall-clock costs for the arrays, the scans or grammar reconstruction. The parsing bound likewise gives the exponent for the dynamic program under discussion. It does not establish actual decoding speed, memory use for a real grammar, or performance on a translation benchmark. Those measurements would require a parser and an evaluation setting beyond the examples in the paper. The stated preservation of string pairs addresses grammar equivalence, which is a different question from how a particular decoder behaves under search limits.

There is also a detail to keep in view when reading the complexity argument. The pseudocode describes writing the new boundary values over the spans covered by a reduction. The surrounding linear-time explanation concentrates on skipping points during scans. In a direct implementation, repeated writes over nested ranges need their own accounting, because a point skipped by the scanner can still lie in a range being updated. The paper gives more detail on why scan visits are bounded than on how cumulative boundary-update work is charged. This matters when translating the presentation into code that is intended to realize the stated running time.

The method processes rules independently. Its guarantee is about factoring the given synchronous rules into smaller synchronous rules, and it builds intermediates that reproduce each rule’s expansion. The paper does not establish an optimum over all grammars that happen to generate the same translation relation through other derivations. That broader objective could involve changing how several original rules interact. The independent permutation problems specify what is minimized here and what can be inferred from the resulting rank.

Finally, a rank-minimizing tree optimizes the size of the largest individual combination. The paper does not use a cost function that also scores branching shape, the number of times a rule is used, or how different rules compete during a search. The authors’ probability assignment preserves the contribution of the original rule across the new derivation steps. It gives no empirical comparison of the behavior of different permissible trees. The demonstrated benefit is the structural reduction in rule rank and the resulting change to the stated parsing bound when the maximum rank falls.

### What came after

#### Linear time for synchronous context-free factorization

The 2007 follow-up [Factorization of Synchronous Context-Free Grammars in Linear Time](https://md.research.elamur.ai/free/en/papers/zhang-2007-factorization-synchronous-context-free-grammars/) returns to the same grammatical formalism and advances the running-time question. The sorting paper ties its bound to a succession of merge levels, with a linear amount of work across the ranges at each level. The later work’s stated target is linear time for SCFG factorization itself. It continues the line of investigation in which the decomposition is a computational problem in its own right, with the time spent finding the groups treated separately from the time spent parsing with the resulting grammar.

That connection matters because the original sorting method already removes much of the redundant search for boundaries. It uses forced extensions to find a group and block limits to reuse work within a merge. A linear-time result addresses the overall accounting across the input. The later title identifies the formalism and the stronger time bound. It gives no basis for attributing a particular data structure, a change to the scanner, or an empirical speedup to the follow-up.

#### Optimal arity in a synchronous tree formalism

The 2008 work [Optimal k-arization of Synchronous Tree-Adjoining Grammar](https://md.research.elamur.ai/free/en/papers/nesson-2008-optimal-k-arization-synchronous-tree/) takes up the arity objective in a different grammar formalism. In the sorting paper, k is the smallest achievable bound on how many children a rule needs to combine after factoring the supplied SCFG. The later work places optimal k-arization in synchronous tree-adjoining grammar. The continuity between the papers lies in asking for a principled bound on the size of local combinations, with the target arity treated as an optimization problem.

The change of formalism is important to the scope of that connection. The sorting paper’s particular closure test relies on an SCFG rule’s one-to-one links and the requirement that a new nonterminal occupy a continuous span on each side. The later work’s title establishes that it studies optimal arity for synchronous tree-adjoining grammar. It does not establish that the SCFG interval test, the same permutation tree, or the sorting routine transfers unchanged. Together, the follow-ups show two directions in which the original question continued: improving the cost of factorization within SCFGs and studying the best attainable arity in another synchronous grammar formalism.

## Cite

Cite as Daniel Gildea, Giorgio Satta and Hao Zhang. 2006. Factoring Synchronous Grammars by Sorting. Proceedings of the COLING/ACL 2006 Main Conference Poster Sessions.

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@inproceedings{gildea2006factoring,
  title = {{Factoring Synchronous Grammars by Sorting}},
  author = {Daniel Gildea, Giorgio Satta and Hao Zhang},
  booktitle = {Proceedings of the COLING/ACL 2006 Main Conference Poster Sessions},
  year = {2006},
  doi = {10.3115/1273073.1273109},
  url = {https://doi.org/10.3115/1273073.1273109}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
