Algebraic Expressions in Perimeter Formulae