Generating key points…
Answers are grounded in this paper and cite their sources.
Jun Yan asked for the total weight of even-\(k\) Motzkin paths when each maximal run of \(2k\)-steps receives a weight determined by its length. The answer is a single formal series equation and a finite coefficient formula, valid for every positive even integer \(k\), every size \(n≥ 0\) and every function \(f: Z>0→ C\). Yan, §6, Question 6.1 (published p. 13) A path of size \(n\) starts and ends at height zero, stays at nonnegative heights and takes \((k+1)n\) steps with increments \(2k\), \(k-1\) or \(-2\). Write \(A,B,D\) for these three steps. The path weight is the product of \(f()\) over its maximal consecutive runs of \(A\) of length \(\), with empty product 1. Let \(W_n\) be the sum of these weights and set \(F(u)=1+∑≥ 1f()u^\). Each nonempty path ends in \(D\), so every run can be grouped with the step that ends it. This gives blocks \(A^ B\) and \(A^ D\) for \(≥ 0\), weighted by \(f()\) with \(f(0)=1\). Checking nonnegativity at the block endpoints suffices because the internal \(A\)-steps all rise. The only block with negative net increment is a bare \(D\), which is forbidden at heights 0 and 1. Thus the arbitrary run weights enter through \(F\) while the boundary restriction still involves only two heights. With \(x\) marking individual steps and \(y\) marking height, the block kernel is \(y^2-x(1+yᵏ⁺¹)F(xy²ᵏ)\). At \(x=t^2\), its two formal roots with zero constant term are \(Y(t)\) and \(Y(-t)\), where \(Y(t)\) has leading term \(t\). Their product gives \(∑n≥ 0W_n t²⁽ᵏ⁺¹⁾ⁿ=-Y(t)Y(-t)/t^2\). Writing \(Y(t)=tV(tᵏ⁺¹)\) and using that \(k+1\) is odd gives the size generating function \(G(q)=∑n≥ 0W_nq^n\) in terms of the unique formal series \(V(z)\) with \(V(0)=1\): \[V(z)^2=(1+zV(z)ᵏ⁺¹)F(z^2V(z)²ᵏ), G(z^2)=V(z)V(-z). \] For a direct calculation, write \([z^m]\) for coefficient extraction and set \(v_m=[z^m]V(z)\). For integers \(m≥ 0\) and \(0≤ j≤ m/2\), put \(am,j=1+(k+1)m-2j\). Then \[v_m=∑ⱼ₌₀m/2{1}{am,j}{am,j/2}{m-2j}[u^j]F(u)^{am,j/2}, W_n=∑ᵢ₌₀²ⁿ(-1)^i v_i v₂ₙ₋ᵢ. \] Here \((1+h)^α=∑r≥ 0{α}{r}h^r\) for a series \(h\) of zero constant term, with \({α}{0}=1\) and \({α}{r}=α(α-1)⋯(α-r+1)/r!\) for \(r≥ 1\). The formulas are formal and also apply over any commutative \( Q\)-algebra. A calculation at size \(n\) needs only \(f(1),…,f(n)\). Keeping these as independent variables gives a polynomial whose monomial exponents record the number of runs of each length. Yan's unweighted enumeration in §5.2, Theorem 5.3, is recovered by setting every \(f()=1\). Then \(F(u)=(1-u)⁻¹\), the root equation becomes \(Y^2=t^2(1+Yᵏ⁺¹+Y²ᵏ⁺²)\), and \(v_m=1/1+(k+1)m[u^m](1+u+u^2)(1+(k+1)m)/2\). These are the coefficients of the earlier unweighted convolution.
No takes yet. Share an insight, caveat, or question.
Zixuan He (2026) studied this question.
Synapse has enriched 8 closely related papers on similar clinical questions. Consider them for comparative context: