Constructing algebraic expressions