The simplest tree-rearrangement, known as nearest-neighbor interchange, exchanges the connectivity of four subtrees within the main tree. Because there are three possible ways of connecting four subtrees, and one is the original connectivity, each interchange creates two new trees. Exhaustively searching the possible nearest-neighbors for each possible set of subtrees is the slowest but most optimizing way of performing this search.
The simplest method for rearranging a tree structure, known as "nearest-neighbor interchange," swaps the connections of four subtrees within the main tree. This process creates two new trees for every swap. The most efficient way to find all possible arrangements is by exhaustively searching through all potential nearest neighbors for each set of subtrees.