We are given two rooted trees $T_1, T_2$ which have the same depth $d$, and for each leaf there is a path to it of length $d$ from the root. Also, assume the number of children for each node is bounded by $n$. For each level of the tree $i\in \{1,\dots,d\}$ and possible number of children $j\in\{1\dots,n\}$ we draw a number $a_{i,j}\sim U([0,1])$, where all the draws are independent.
Let $P_1$ and $P_2$ be the sets of all paths from leaves to root for $T_1$ and $T_2$ respectively. We compute the following number:
$C_1 = \sum_{\{v_1,\dots,v_d\}\in P_1} \prod_{v_i \in \{v_1,\dots,v_d\}} a_{i,\text{deg}(v_i)}~,$
and we define $C_2$ similarly. In words, we sum all the possible paths from the root to the leaves, and for each path we multiply the numbers $a_{i,j}$ which corresponds to the nodes in the path, where $i$ is the depth of the node and $j$ is its number of children.
I want to show that if the trees $T_1$ and $T_2$ are different (i.e. non-isomorphic), then with probability $1$ over the draws of $a_{i,j}$ also $C_1\neq C_2$.
My take on this is that if in some layer $i$ there is a node $v$ in $T_1$ of degree $j$ and there is no node of degree $j$ in layer $i$ in $T_2$, then certainly $C_1\neq C_2$. This is because the draws are independent, hence conditioning on all the draws except for $a_{i,j}$, we are given that $C_1 = a_{i,j} \cdot c_1 + c_2$ where $c_1$ and $c_2$ are some non-zero constants (w.p 1), and also $C_2$ is a constant, hence $C_1\neq C_2$ w.p 1. My problem is when there is no such node with a different degree.
The following two trees $T_1$ and $T_2$ will always have $C_1 = C_2$, because the sets of paths they have, as identified by the degrees of the vertices, are identical. Specifically, there are $6$ paths of type $(2,2,3,0)$ and $4$ paths of type $(2,2,2,0)$, where a path of type $(k_1,k_2,k_3,k_4)$ means that the $i^{\text{th}}$ node visited has $k_i$ children.
(I think this means that $C_1 = C_2 = 6 a_{1,2} a_{2,2} a_{3,3} + 4 a_{1,2} a_{2,2}, a_{3,2}$ but I am not quite sure of the notation.)
However, these two trees are not isomorphic; they can be distinguished by the distance between the two nodes which have $3$ children.