Binary parenthesization

ID: binary-parenthesization

A binary parenthesization specifies the order of binary operations on a fixed ordered list of operands, combining exactly two existing expressions at each step. It has a full binary tree as its expression structure: operands are leaves and operations are internal vertices. For four operands , the five possibilities are , , , , and .
A binary parenthesization of operands contains binary operations. At the last operation, its left expression can contain operations and its right expression . The Catalan recurrence therefore gives possible evaluation structures. The order of operands stays fixed; this is not a count of their permutations. Even for an associative operation whose result is unchanged, different structures can have different evaluation costs, as in the matrix-chain multiplication problem.[ref]

New to topics? Read the docs here!