ALGEBRAIC MODELS FOR ACCOUNTING SYSTEMS