Unrooted binary tree enumeration problem on unrooted binary trees is to count the number of trees with "n" labeled leaves and unlabeled internal nodes. An unrooted binary tree on "n" labeled leaves can be formed by connecting the "n"th leaf to a new node in the middle of any of the edges of an unrooted binary tree on "n" − 1 labeled leaves. There are 2"n" − 5 edges at which the "n"th node can be attached; therefore, the number of trees on "n" leaves is larger than the number of trees on "n" − 1 leaves by a factor of 2"n" −
Binary GCD algorithm Binary GCD algorithm The binary GCD algorithm, also known as Stein's algorithm, is an algorithm that computes the greatest common divisor of two nonnegative integers. Stein's algorithm uses simpler arithmetic operations than the conventional Euclidean algorithm; it replaces division with arithmetic shifts, comparisons, and subtraction. Although the algorithm was first published by the Israeli physicist and programmer Josef Stein in 1967, it may have been known in 1st-century China. The algorithm reduces the problem of finding the GCD by repeatedly applying these identities: The algorithm requires O(n) worst-case time, where n is the number of bits in the larger of