## 2 Basics Theory
### Trans-Dimensional Bayesian Inversion Theory  
In Trans-D Bayesian inversions, both data and model parameters as well as model parameterization are considered as random variables. Let \(K\) represent a countable number set indexed by \(k\), for instance, the number of interfaces, which can also be considered as a random variable. For each \(k\), there is an associated \(M_{k}\)-dimensional parameter space \(\mathcal{M}_{k}\). For simplicity, we use \(\mathbf{m}\) to represent a model of variable dimensions, with \(M_{k}\) (or \(k\)) used  
Figure 1: A diagram of model partitioned into k layers. The depths of layer interfaces are bounded by the minimum depth \(z_{min}\) and the maximum depth \(z_{max}\). to specify the specific choice of the dimension. In Bayesian inversion, \(N\)-dimensional data \(\mathbf{d}\) and \(M_{k}\)-dimensional model \(\mathbf{m}\) are related by [PERSON] rule, as defined by  
\[P(\mathbf{m}|\mathbf{d})=\frac{P(\mathbf{m})P(\mathbf{d}|\mathbf{m})}{P( \mathbf{d})}=\frac{P(\mathbf{m})P(\mathbf{d}|\mathbf{m})}{\sum_{k\in\mathbb{K} \int_{\mathcal{M}_{k}}P(\mathbf{m})P(\mathbf{d}|\mathbf{m})\mathrm{d}\mathbf{m }}}, \tag{2}\]  
where \(p(\mathbf{m})\) is the prior information on model \(\mathbf{m}\), and \(p(\mathbf{d}|\mathbf{m})\) is the conditional data probability given model \(\mathbf{m}\). If the observation data \(\mathbf{d}\) are given, \(p(\mathbf{d}|\mathbf{m})\) can be interpreted as the likelihood function of \(\mathbf{m}\), \(L(\mathbf{m})\). \(p(\mathbf{d})\) is the total data evidence, a normalizing integral over the whole variable model space. \(p(\mathbf{m}|\mathbf{d})\) is the conditional probability of \(\mathbf{m}\) given observed or synthetic data, called the posterior probability density (PPD), defined over the trans-D model space, e.g., changes between different \(k\). The complete solution to a Bayesian inverse problem is defined by the trans-D PPD, with multi-dimensional integration typically required for a useful interpretation, for instance, the average conductivity, conductivity variance, and 1D marginal PPD of conductivity at depth \(z\) (the calculation for a sequence of \(z\) leads to the probability profile for conductivity), as defined by  
\[\sigma(z)=\sum_{k\in\mathbb{K}}\int_{\mathcal{M}_{k}}\sigma(\mathbf{m};z)P( \mathbf{m}|\mathbf{d})\mathrm{d}\mathbf{m}, \tag{3}\]  
\[var(\sigma(z))=\sum_{k\in\mathbb{K}}\int_{\mathcal{M}_{k}}\left(\sigma( \mathbf{m};z)-\bar{\sigma}(z)\right)^{2}P(\mathbf{m}|\mathbf{d})\mathrm{d} \mathbf{m}, \tag{4}\]  
\[P(\sigma(z)|\mathbf{d})=\sum_{k\in\mathbb{K}}\int_{\mathcal{M}_{k}}\delta( \sigma(\mathbf{m};z)-\sigma(z))P(\mathbf{m}|\mathbf{d})\mathrm{d}\mathbf{m}, \tag{5}\]  
where \(\sigma(z)\) is the conductivity parameter of interest at \(z\) depth, \(\sigma(\mathbf{m};z)\) is the \(\sigma(z)\) value in state \(\mathbf{m}\) with \(k\) interfaces, and \(\delta\) is the Dirac delta function. For general inverse problems, an analytical solution to the multi-dimensional integration as in Equations (3)-(5) is impossible. Alternatively, it is commonly evaluated numerically by trans-D sampling over different subspace \(\mathcal{M}_{k}\), such as the reversible-jump Markov-chain Monte Carlo sampling (rjMcMC; Green [37]) as used in this paper. To sample PPD in Equation (2), the Markov chain must keep the detailed balance requirement in order to transit in model space with variable dimensions [20].