Solution (source code)

= Solution

Set $T=1/(2\pi\alpha')$ and take the closed-string spatial coordinate periodic with period $2\pi$. One convenient Lorentzian convention for the <conformal gauge> action is
$$
\boxed{I=\frac1{4\pi\alpha'}\int d\tau\,d\sigma\left(\dot X^m\dot X_m-X'^mX'_m\right)
+\frac{i}{2\pi}\int d\tau\,d\sigma\left[b(\partial_\tau-\partial_\sigma)c+\widetilde b(\partial_\tau+\partial_\sigma)\widetilde c\right].}
$$
The two anticommuting <bc ghost systems> are the <Faddeev-Popov ghosts> of the <worldsheet> metric <gauge fixing>. Their fields have conformal weights $2$ and $-1$. Ghost normalizations can be rescaled without changing the algebra. After a <Wick rotation> the two terms become the familiar holomorphic and antiholomorphic $b\bar\partial c$ and $\widetilde b\partial\widetilde c$ actions.

Let $\mathcal L_n$ and $\widetilde{\mathcal L}_n$ include both matter and ghost contributions. With the conventional plane normalization of the zero mode, their <Virasoro algebra> is
$$
\boxed{[\mathcal L_m,\mathcal L_n]=(m-n)\mathcal L_{m+n}+\frac{D-26}{12}(m^3-m)\delta_{m+n,0},}
$$
$$
\boxed{[\widetilde{\mathcal L}_m,\widetilde{\mathcal L}_n]=(m-n)\widetilde{\mathcal L}_{m+n}+\frac{D-26}{12}(m^3-m)\delta_{m+n,0},\qquad[\mathcal L_m,\widetilde{\mathcal L}_n]=0.}
$$
Each free coordinate boson contributes <central charge> $1$, including the timelike coordinate after the usual analytic continuation. The weight-$(2,-1)$ <bc ghost system> contributes $-26$ in each chiral sector. Thus the total <central charge> is $D-26$.

The <Virasoro constraints> originate in a gauge symmetry. A nonzero central term is a quantum obstruction to realizing that gauge symmetry without an anomaly; equivalently, the <BRST charge> fails to be nilpotent. Cancellation of the <worldsheet Weyl anomaly> therefore requires
$$
\boxed{D=26.}
$$
This is the <critical dimension of the bosonic string>. The accompanying physical-state normal-ordering condition gives the usual matter intercept $1$ in each sector. A shift of the zero-mode convention changes the linear term in the central polynomial, but cannot change the required cancellation of its cubic coefficient.