Counting the number of inequivalent arithmetic expressions on $n$ variables
Abstract
An expression is any mathematical formula that contains certain formal variables and operations to be executed in a specified order. In computer science, it is usually convenient to represent each expression in the form of an expression tree. Here, we consider only arithmetic expressions, i.e., those that contain only the four standard arithmetic operations: addition, subtraction, multiplication and division, alongside additive inversion. We first provide certain theoretical results concerning the equivalence of such expressions and then disclose a $\Theta(n^2)$ algorithm that computes the number of inequivalent arithmetic expressions on $n$ distinct variables.
- Publication:
-
arXiv e-prints
- Pub Date:
- May 2024
- DOI:
- 10.48550/arXiv.2405.13928
- arXiv:
- arXiv:2405.13928
- Bibcode:
- 2024arXiv240513928S
- Keywords:
-
- Computer Science - Discrete Mathematics;
- Mathematics - Combinatorics;
- Mathematics - Number Theory;
- 68R05;
- 05A15;
- 05A19;
- 11C08