# Grid bracing

In the mathematics of structural rigidity, grid bracing is a problem of adding cross bracing to a rectangular grid to make it into a rigid structure. If a two-dimensional grid structure is made with rigid rods, connected at their ends by flexible hinges, then it will be free to flex into positions in which the rods are no longer at right angles. Cross-bracing the structure by adding more rods across the diagonals of its rectangular or square cells can make it rigid.
The problem can be translated into graph theory by constructing a graph in which the graph vertices represent rows and columns of the grid, and each edge represents a cross-braced cell in a given row and column. The grid is rigid if and only if the resulting graph is a connected graph. Every minimal system of cross-braces that makes the grid rigid corresponds to a spanning tree of a complete bipartite graph.
The graph-theoretic solution to the grid bracing problem has been generalized to double bracing, in which the grid should remain rigid even if one cross-brace fails, and to tension bracing, in which the diagonals of a grid are braced by wires and strings that can crumple to a shorter length but cannot be stretched to be longer. For double bracing, the rigid solutions correspond to biconnected graphs; for tension bracing, they correspond to strongly connected graphs. In both cases, the minimal solutions correspond to Hamiltonian cycles.

## Problem statement

The problem considers a framework in the form of a rectangular grid or square grid, with $r$ rows and $c$ columns of rectangles or squares squares. The grid has $r(c+1)+(r+1)c$ edges, each of which has unit length and is considered to be a rigid rod, free to move continuously within the Euclidean plane but unable to change its length. These rods are attached to each other by flexible joints at the $(r+1)(c+1)$ vertices of the grid. A valid continuous motion of this framework is a way of continuously varying the placement of its edges and joints into the plane in such a way that they keep the same lengths and the same attachments, but without requiring them to stay at right angles. Instead, each cell of the grid may be deformed to form a parallelogram or rhombus, and the whole grid may form an irregular structure with a different shape for each of its faces, as shown in the figure.
Unlike squares, triangles made of rigid rods and flexible joints cannot change their shapes: any two triangles with sides of the same lengths must be congruent (this is the SSS postulate). If a rectangle or square is cross-braced by adding one of its diagonals as another rigid bar, the diagonal divides it into two triangles which similarly cannot change shape, so the square must remain square through any continuous motion of the cross-braced framework. (The same framework could also be placed in the plane in a different way, by folding its two triangles onto each other over their shared diagonal, but this folded placement cannot be obtained by a continuous motion.) Thus, if all cells of the given grid are cross-braced, the grid cannot change shape; its only continuous motions would be to rotate it or translate it as a single rigid body. However, this method of making the grid rigid, by adding cross-braces to all its cells, uses many more cross-braces than necessary. The grid bracing problem asks for a description of the minimal sets of cross-braces that have the same effect, of making the whole framework rigid.

## Graph theoretic solution

As Ethan Bolker and Henry Crapo (1977) originally observed, the grid bracing problem can be translated into a problem in graph theory by considering an undirected bipartite graph that has a vertex for each row and column of the given grid, and an edge for each cross-braced rectangle or square of the grid. They proved that the cross-braced grid is rigid if and only if this bipartite graph is connected. It follows that the minimal cross-bracings of the grid correspond to the trees connecting all vertices in the graph, and that they have exactly $r+c-1$ cross-braced squares. Any overbraced but rigid cross-bracing (with more than this number of cross-braced cells) can be reduced to a minimal cross-bracing by finding a spanning tree of its graph.
More generally, suppose that a cross-braced grid is not rigid. Then the number of degrees of freedom in its family of shapes equals the number of connected components of the bipartite graph, minus one. If a partially braced grid is to be made rigid by cross-bracing more cells, the minimum number of additional cells that need to be cross-braced is this number of degrees of freedom. A solution with this number of cells can be obtained by adding this number of edges to the bipartite graph, connecting pairs of its connected components so that after the addition there is only one remaining component.

## Variations
### Double bracing

Another version of the problem asks for a "double bracing", a set of cross-braces that is sufficiently redundant that it will stay rigid even if one of the diagonals is removed. This version allows both diagonals of a single square to be used, but it is not required to do so.
In the same bipartite graph view used to solve the bracing problem, a double bracing of a grid corresponds to an undirected bipartite multigraph that is connected and bridgeless, meaning that every edge belongs to at least one cycle. The minimum number of diagonals needed for a double bracing is $\min(2r,2c)$.
In the special case of grids with equal numbers of rows and columns, the only double bracings of this minimum size are Hamiltonian cycles. Hamiltonian cycles are easy to find in the complete bipartite graphs representing the bracing problem, but finding them in other bipartite graphs is NP-complete. Because of this, finding the smallest double braced subset of a larger bracing is NP-hard. However, it is possible to approximate this smallest double braced subset to within a constant approximation ratio.

### Tension bracing

An analogous theory, using directed graphs, was discovered by Jenny Baglivo and Jack Graver (1983) for tension bracing, in which squares are braced by wires or strings (which cannot expand past their initial length, but can bend or collapse to a shorter length) instead of by rigid rods. To make a single square rigid by tension bracing, it is necessary to brace both of its diagonals, instead of just one diagonal.
One can represent a tension bracing by a bipartite graph, which has an edge directed from a row vertex to a column vertex if the shared square of that row and column is braced by the positively-sloped diagonal, and an edge from a column vertex to a row vertex if the shared square is braced by the negatively-sloped diagonal. The braced structure is rigid if and only if the resulting graph is strongly connected. As for double bracing, the smallest tension bracings (equivalently, the strongly connected graphs with as few edges as possible) in grids with equally many rows and columns are Hamiltonian cycles. For grids in which exactly one of the two bracing options is available for each cell, a smallest bracing can be found in polynomial time.
If a given set of braces is insufficient, additional bracing needs to be added, corresponding in the graph view to adding edges that connect together the strongly connected components of a graph. In this way problem of finding a minimal set of additional braces to add can be seen as an instance of strong connectivity augmentation, and can be solved in linear time. According to Robbins' theorem, the undirected graphs that can be made strongly connected by directing their edges are exactly the bridgeless graphs; reinterpreting this theorem in terms of grid bracing, a bracing by rigid rods forms a double bracing if and only if each of its rods can be replaced by a single wire (possibly on the other diagonal of its square) to form a rigid tension bracing.