Algebraic representation of size functions