\documentclass[a4paper,12pt]{article}
\usepackage{latexsym}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{wrapfig}
\pagestyle{plain}
\usepackage{fancybox}
\usepackage{bm}
\begin{document}
sign of $q$. Substituting each one of the values of $w_2$ and using the identities $\Gamma_e(qz)=\theta_p(z)\Gamma_e(z)$ and $\Gamma_e\big(pq^2z^{-1}\big)\Gamma_e(z)=\theta_p\big(q^{-1}z\big)$ we get
\begin{gather*}
\frac12 \frac{\Gamma_e(t^{-2})\Gamma_e\big(pq^3t^2A^{-2}B^2\big)\Gamma_e\big(q^{-1}t^{-2}B^{-2}\big)\Gamma_e\big(q^{-1}t^{-2}B^2\big)}
{\theta_p(pq^2t^4A^{-2}B^2)}\\
\quad{}\times\Gamma_e\big(q^{-1}t^{-2}A B^{-1}C^{\pm1}D^{\pm1}\big)\Gamma_e\big((pq)^\frac12 tA^{-1} D^{\pm1}u^{\pm1}\big)\Gamma_e\big((pq)^\frac12 t B D^{\pm1}u^{\pm1}\big)\\
\quad{}\times\Gamma_e\big(q^{-\frac12}A B^{-1}u^{\pm1}\big(q^\frac12 v\big)^{\pm1}\big)\Gamma_e\big((pq)^\frac12 q^\frac12 t B D^{\pm1}\big(q^\frac12 v\big)^{\pm1}\big)\Gamma_e\big((pq)^\frac12 q^\frac12 t A^{-1} C^{\pm1} \big(q^\frac12 v\big)^{\pm1}\big) \\
\quad{}\times\frac{\theta_p\big(q^{-1}t^{-4}AB^{-1}vu^{\pm1}\big)\theta_p\big((pq)^\frac12 q^{-1} t B^{-1}v^{-1}D^{\pm1}\big)\theta_p\big((pq)^\frac12 q^{-1}t A v^{-1} C^{\pm1}\big)}{\theta_p\big(t^{-4}v^2\big)\theta_p\big(v^2\big)}\\
+ \frac12 \frac{\Gamma_e(t^{-2})\Gamma_e\big(pq^3t^2A^{-2}B^2\big)\Gamma_e\big(q^{-1}t^{-2}B^{-2}\big)\Gamma_e\big(q^{-1}t^{-2}B^2\big)}
{\theta_p\big(pq^2t^4A^{-2}B^2\big)}\\
\quad{}\times\Gamma_e\big(q^{-1}t^{-2}A B^{-1}C^{\pm1}D^{\pm1}\big)\Gamma_e\big((pq)^\frac12 tA^{-1} D^{\pm1}u^{\pm1}\big)\Gamma_e\big((pq)^\frac12 t B D^{\pm1}u^{\pm1}\big)\\
\quad{}\times\Gamma_e\big(A B^{-1}u^{\pm1} v^{\pm1}\big)\Gamma_e\big((pq)^\frac12 q^\frac12 t B D^{\pm1}\big(q^\frac12 v\big)^{\pm1}\big)\Gamma_e\big((pq)^\frac12 q^\frac12 t A^{-1} C^{\pm1} \big(q^\frac12 v\big)^{\pm1}\big) \\
\quad{}\times\frac{\theta_p\big((pq)^\frac12 q^{-1} t^{-3} B^{-1}vD^{\pm1}\big)\theta_p\big((pq)^\frac12 q^{-1}t^{-3} A v C^{\pm1}\big)}
{\theta_p\big(t^{4}v^{-2}\big)\theta_p\big(v^2\big)} + \big\{v \leftrightarrow v^{-1} \big\} .
\end{gather*}
Adding the contribution of \eqref{c3} and taking away overall factors the final result is
\begin{gather}
T_{{\mathfrak J}_B, {\mathfrak J}_C,{\mathfrak J}_D}(w,u,v)\times_w C^{(1,0;AB^{-1})}_{{\mathfrak J}_B}(w)\nonumber\\
\sim\frac{\theta_p\big(pq^2t^2A^{-2}B^2\big)
\theta_p\big((pq)^{-1}q^{-1}t^{-4}A^2B^{-2}\big)}
{\theta_p(t^{-2})\theta_p\big(q^{-1}t^{-2}B^{-2}\big)\theta_p\big(q^{-1}t^{-2}A^2\big)\theta_p\big(pq^2t^4A^{-2}B^2\big)
\theta_p\big(q^{-1}t^{-2}AB^{-1}C^{\pm1}D^{\pm1}\big)}\nonumber\\
\quad{}\times\frac{\theta_p\big(q^{-1}t^{-4}AB^{-1}vu^{\pm1}\big)
\theta_p\big((pq)^\frac{1}{2}q^{-1}tB^{-1}v^{-1}D^{\pm1}\big)
\theta_p\big((pq)^\frac{1}{2}q^{-1}tAv^{-1}C^{\pm1}\big)}
{\theta_p\big(t^{-4}v^2\big)\theta\big(v^2\big)}\nonumber\\
\quad{}\times\Gamma_e\big(q^{-\frac{1}{2}}A B^{-1}u^{\pm1}\big(q^\frac{1}{2}v\big)^{\pm1}\big)
\Gamma_e\big((pq)^\frac{1}{2}q^\frac{1}{2}t B D^{\pm1}\big(q^\frac{1}{2}v\big)^{\pm1}\big)
\Gamma_e\big((pq)^{\frac{1}{2}}q^\frac{1}{2}tA^{-1}C^{\pm1}(q^\frac{1}{2}v)^{\pm1}\big)
\nonumber\\
\quad{}\times\Gamma_e\big((pq)^\frac{1}{2}tA^{-1}u^{\pm1}D^{\pm1}\big)
\Gamma_e\big((pq)^\frac{1}{2}t B u^{\pm1}C^{\pm1}\big)\nonumber\\
\quad{}+\frac{\theta_p\big(pq^2t^2A^{-2}B^2\big)
\theta_p\big((pq)^{-1}q^{-1}t^{-4}A^2B^{-2}\big)}
{\theta_p\big(t^{-2}\big)\theta_p\big(q^{-1}t^{-2}B^{-2}\big)\theta_p\big(q^{-1}t^{-2}A^2\big)\theta_p\big(pq^2t^4A^{-2}B^2\big)
\theta_p\big(q^{-1}t^{-2}AB^{-1}C^{\pm1}D^{\pm1}\big)}\nonumber\\
\quad{}\times\Gamma_e\big((pq)^\frac{1}{2}t A^{-1}u^{\pm1}D^{\pm1}\big)
\Gamma_e\big((pq)^\frac{1}{2}t B u^{\pm1}C^{\pm1}\big)
\nonumber\\
\quad{}\times\Gamma_e\big(AB^{-1}u^{\pm1}v^{\pm1}\big)\Gamma_e\big((pq)^\frac{1}{2}q^\frac{1}{2}t B D^{\pm1}\big(q^\frac{1}{2}v\big)^{\pm1}\big)
\Gamma_e\big((pq)^{\frac{1}{2}}q^\frac{1}{2}tA^{-1}C^{\pm1}\big(q^\frac{1}{2}v\big)^{\pm1}\big)
\nonumber\\
\quad{}\times\frac{\theta_p\big((pq)^\frac{1}{2}q^{-1}t^{-3}B^{-1}v D^{\pm1}\big)\theta_p\big((pq)^\frac{1}{2}q^{-1}t^{-3}A v C^{\pm1}\big)}
{\theta_p\big(v^2\big)\theta_p\big(t^4v^{-2}\big)}+\big\{v\leftrightarrow v^{-1}\big\}\nonumber\\
 \quad{}+\Gamma_e\big(A B^{-1}u^{\pm1}v^{\pm1}\big)\Gamma_e\big((pq)^{\frac{1}{2}}t B D^{\pm1}v^{\pm1}\big)
\Gamma_e\big((pq)^{\frac{1}{2}}t A^{-1}C^{\pm1}v^{\pm1}\big)\nonumber\\
\quad{}\times
\Gamma_e\big((pq)^\frac{1}{2}tA^{-1}u^{\pm1}D^{\pm1}\big)\Gamma_e\big((pq)^\frac{1}{2}t B u^{\pm1}C^{\pm1}\big).
\end{gather}
\end{document}


\documentclass[a4paper,12pt]{article}
\usepackage{latexsym}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{wrapfig}
\pagestyle{plain}
\usepackage{fancybox}
\usepackage{bm}
\begin{document}
Now we glue this as indicated in Fig.
\begin{gather*}
T_{{\mathfrak J}_D}(v)\times_v \big(\big(T_{{\mathfrak J}_B, {\mathfrak J}_C,{\mathfrak J}_D}(w,u,v)\times_w C^{(0,0;A^{-1}B)}_{{\mathfrak J}_B}(w)\big)\\
\quad{}\times_u\big(T_{{\mathfrak J}_B, {\mathfrak J}_C,{\mathfrak J}_D}(h,u,z)\times_h C^{(1,0;AB^{-1})}_{{\mathfrak J}_B}(h)\big)\big)\\
\sim \oint\frac{{\rm d}u}{4\pi i u} \frac{\Gamma_e\big((q p)^{\frac12 }t^{-1} A^{\pm1} D^{\pm1}u^{\pm1}\big)
\Gamma_e\big((q p)^{\frac12 }t^{-1} B^{\pm1} C^{\pm1}u^{\pm1}\big)}{\Gamma\big(u^{\pm2}\big)}\\
\quad{}\times\Gamma_e\big((pq)^\frac12 t B^{-1} C^{\pm1}u^{\pm1}\big)
\Gamma_e\big((pq)^\frac12 t A D^{\pm1}u^{\pm1}\big) \\
\quad{}\times\oint\frac{{\rm d}v}{4\pi i v} \frac{\Gamma_e\big((q p)^{\frac12 }t^{-1} A^{\pm1} C^{\pm1}v^{\pm1}\big)
\Gamma_e\big((q p)^{\frac12 }t^{-1} B^{\pm1} D^{\pm1}v^{\pm1}\big)}{\Gamma(v^{\pm2})}\\
\quad{}\times\Gamma_e\big( A^{-1}B u^{\pm1} v^{\pm1}\big)\Gamma_e\big((qp)^{\frac12}t B^{-1}D^{\pm1} v^{\pm1}\big)
\Gamma_e\big((q p)^{\frac12}t A C^{\pm1} v^{\pm1}\big)T_{{\mathfrak J}_D}(v)\\
\quad{}\times T_{{\mathfrak J}_B, {\mathfrak J}_C,{\mathfrak J}_D}(h,u,z)\times_h C^{(1,0;AB^{-1})}_{{\mathfrak J}_B}(h) .
\end{gather*}
Let's perform the computation for each term in \eqref{c7} separately. From the first term we get
\begin{gather*}
\frac{\theta_p\big(pq^2t^2A^{-2}B^2\big)
\theta_p\big((pq)^{-1}q^{-1}t^{-4}A^2B^{-2}\big)}
{\theta_p\big(t^{-2}\big)\theta_p\big(q^{-1}t^{-2}B^{-2}\big)\theta_p\big(q^{-1}t^{-2}A^2\big)\theta_p\big(pq^2t^4A^{-2}B^2\big)
\theta_p\big(q^{-1}t^{-2}AB^{-1}C^{\pm1}D^{\pm1}\big)}\\
\quad{}\times\oint\frac{{\rm d}u}{4\pi i u} \frac{\Gamma_e\big((q p)^{\frac12 }t^{-1} A^{\pm1} D^{\pm1}u^{\pm1}\big)
\Gamma_e\big((q p)^{\frac12 }t^{-1} B^{\pm1} C^{\pm1}u^{\pm1}\big)}{\Gamma\big(u^{\pm2}\big)}\\
\quad{}\times\Gamma_e\big((pq)^\frac12 t B^{-1} C^{\pm1}u^{\pm1}\big)
\Gamma_e\big((pq)^\frac12 t A D^{\pm1}u^{\pm1}\big)\nonumber\\
\quad{}\times\oint\frac{{\rm d}v}{4\pi i v} \frac{\Gamma_e\big((q p)^{\frac12 }t^{-1} A^{\pm1} C^{\pm1}v^{\pm1}\big)
\Gamma_e\big((q p)^{\frac12 }t^{-1} B^{\pm1} D^{\pm1}v^{\pm1}\big)}{\Gamma\big(v^{\pm2}\big)}\\
\quad{}\times\Gamma_e\big( A^{-1}B u^{\pm1} v^{\pm1}\big)\Gamma_e\big((qp)^{\frac12}t B^{-1}D^{\pm1} v^{\pm1}\big)
\Gamma_e\big((q p)^{\frac12}t A C^{\pm1} v^{\pm1}\big)T_{{\mathfrak J}_D}(v)\\
\quad{}\times\frac{\theta_p\big((pq)^\frac{1}{2}q^{-1}tB^{-1}z^{-1}D^{\pm1}\big)
\theta_p((pq)^\frac{1}{2}q^{-1}tAz^{-1}C^{\pm1})}
{\theta_p\big(t^{-4}z^2\big)\theta\big(z^2\big)}\\
\quad{}\times\Gamma_e\big(q^{-\frac{1}{2}}A B^{-1}u^{\pm1}\big(q^\frac{1}{2}z\big)^{\pm1}\big)
\Gamma_e\big((pq)^\frac{1}{2}q^\frac{1}{2}t B D^{\pm1}\big(q^\frac{1}{2}z\big)^{\pm1}\big)
\Gamma_e\big((pq)^{\frac{1}{2}}q^\frac{1}{2}tA^{-1}C^{\pm1}\big(q^\frac{1}{2}z\big)^{\pm1}\big)\\
\quad{}\times\Gamma_e\big(t^{-4}AB^{-1}zu^{\pm1}\big)\Gamma_e\big(pq^2 t^4 A^{-1}B z^{-1}u^{\pm1}\big)
\Gamma_e\big((pq)^\frac{1}{2}tA^{-1}u^{\pm1}D^{\pm1}\big)
\Gamma_e\big((pq)^\frac{1}{2}t B u^{\pm1}C^{\pm1}\big)\\
\quad{}+\big\{z\leftrightarrow z^{-1}\big\} .
\end{gather*}
Terms cancel and the integral over $u$ reduces to an integral over 6 gamma functions which can be evaluated as before using the elliptic beta integral
\end{document}


\documentclass[a4paper,12pt]{article}
\usepackage{latexsym}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{wrapfig}
\pagestyle{plain}
\usepackage{fancybox}
\usepackage{bm}
\begin{document}
\begin{gather*}
\frac{\theta_p(pq^2t^2A^{-2}B^2)\theta_p\big((pq)^{-1}q^{-1}t^{-4}A^2B^{-2}\big)}
{\theta_p\big(t^{-2}\big)\theta_p\big(q^{-1}t^{-2}B^{-2}\big)\theta_p\big(q^{-1}t^{-2}A^2\big)\theta_p\big(pq^2t^4A^{-2}B^2\big)
\theta_p\big(q^{-1}t^{-2}AB^{-1}C^{\pm1}D^{\pm1}\big)}\\
\times\frac{\theta_p\big((pq)^\frac{1}{2}q^{-1}tB^{-1}z^{-1}D^{\pm1}\big)
\theta_p\big((pq)^\frac{1}{2}q^{-1}tAz^{-1}C^{\pm1}\big)
\Gamma_e\big((pq)^\frac{1}{2}q^\frac{1}{2}t B D^{\pm1}\big(q^\frac{1}{2}z\big)^{\pm1}\big)}
{\theta_p\big(t^{-4}z^2\big)\theta\big(z^2\big)}\\
\times \frac{\Gamma_e\big((pq)^{\frac{1}{2}}q^\frac{1}{2}tA^{-1}C^{\pm1}\big(q^\frac{1}{2}z\big)^{\pm1}\big)\Gamma_e\big((q p)^{\frac12 }t^{-1} A^{\pm1} C^{\pm1}z^{\pm1}\big)
\Gamma_e\big((q p)^{\frac12 }t^{-1} B^{\pm1} D^{\pm1}z^{\pm1}\big)}{\Gamma\big(z^{\pm2}\big)}\\
\times\Gamma_e\big((qp)^{\frac12}t B^{-1}D^{\pm1} z^{\pm1}\big)
\Gamma_e\big((q p)^{\frac12}t A C^{\pm1} z^{\pm1}\big)
\Gamma_e\big(q^{-1}A^2B^{-2}\big)\Gamma_e\big(pq^2t^4\big)\Gamma_e\big(t^{-4}A^2B^{-2}z^2\big)\\
\times\Gamma_e\big(zz^{\pm1}\big)\Gamma_e\big(pqt^4z^{-2}\big)\Gamma_e\big(q^{-1}t^{-4}A^2B{-2}\big)\Gamma_e\big(q^{-1}z^{-1}z^{\pm1}\big)\\
\times\Gamma_e\big(pq^2\big)\Gamma_e\big(pq^2t^4A^{-2}B^2z^{-1}z^{\pm1}\big)\Gamma_e\big(t^{-4}zz^{\pm1}\big)
\Gamma_e\big(A^{-2}B^2\big)T_{{\mathfrak J}_D}(z)\\
+ \frac{\theta_p\big(pq^2t^2A^{-2}B^2\big)\theta_p\big((pq)^{-1}q^{-1}t^{-4}A^2B^{-2}\big)}
{\theta_p\big(t^{-2}\big)\theta_p\big(q^{-1}t^{-2}B^{-2}\big)\theta_p\big(q^{-1}t^{-2}A^2\big)\theta_p\big(pq^2t^4A^{-2}B^2\big)
\theta_p\big(q^{-1}t^{-2}AB^{-1}C^{\pm1}D^{\pm1}\big)}\\
\times\frac{\theta_p\big((pq)^\frac{1}{2}q^{-1}tB^{-1}z^{-1}D^{\pm1}\big)
\theta_p\big((pq)^\frac{1}{2}q^{-1}tAz^{-1}C^{\pm1}\big)
\Gamma_e\big((pq)^\frac{1}{2}q^\frac{1}{2}t B D^{\pm1}\big(q^\frac{1}{2}z\big)^{\pm1}\big)}
{\theta_p\big(t^{-4}z^2\big)\theta\big(z^2\big)}\\
\times\frac{\Gamma_e\big((pq)^{\frac{1}{2}}q^\frac{1}{2}tA^{-1}C^{\pm1}\big(q^\frac{1}{2}z\big)^{\pm1}\big)\Gamma_e\big((q p)^{\frac12 }t^{-1} A^{\pm1} C^{\pm1}(qz)^{\pm1}\big)\Gamma_e\big((q p)^{\frac12 }t^{-1} B^{\pm1} D^{\pm1}(qz)^{\pm1}\big)}{\Gamma\big((qz)^{\pm2}\big)}\\
\times\Gamma_e\big((qp)^{\frac12}t B^{-1}D^{\pm1} (qz)^{\pm1}\big)
\Gamma_e\big((q p)^{\frac12}t A C^{\pm1} (qz)^{\pm1}\big)\Gamma_e\big(q^{-1}A^2B^{-2}\big)\\
\times\Gamma_e\big(pq^2t^4\big)\Gamma_e\big(t^{-4}A^2B^{-2}z^2\big)\Gamma_e\big(z(qz)^{\pm1}\big)
\Gamma_e\big(pqt^4z^{-2}\big)\Gamma_e\big(q^{-1}t^{-4}A^2B^{-2}\big)\Gamma_e\big((qz)^{-1}(qz)^{\pm1}\big)\\
\times\Gamma_e\big(pq^2\big)\Gamma_e\big(pq^2t^4A^{-2}B^2z^{-1}(qz)^{\pm1}\big)\Gamma_e\big(t^{-4}z(qz)^{\pm1}\big)
\Gamma_e\big(A^{-2}B^2\big)T_{{\mathfrak J}_D}(qz) + \big\{z\leftrightarrow z^{-1}\big\},
\end{gather*}
which simplifies to
\begin{gather*}
\frac{\theta_p\big(pq^2t^2A^{-2}B^2\big)\theta_p\big((pq)^{-1}q^{-1}t^{-4}A^2B^{-2}\big)\Gamma_e\big(q^{-1}A^2B^{-2}\big)\Gamma_e\big(A^{-2}B^2\big)}
{\theta_p\big(t^{-2}\big)\theta_p\big(q^{-1}t^{-2}B^{-2}\big)\theta_p\big(q^{-1}t^{-2}A^2\big)\theta_p\big(pq^2t^4A^{-2}B^2\big)
\theta_p\big(q^{-1}t^{-2}AB^{-1}C^{\pm1}D^{\pm1}\big)}\\
\quad{}\times\frac{\theta_p\big((pq)^\frac{1}{2}t^{\pm1}BD^{\pm1}z\big)
\theta_p\big((pq)^\frac{1}{2}t^{\pm1}A^{-1}C^{\pm1}z\big)
\theta_p\big(q^{-1}t^{-4}\big)\theta_p\big(q^{-1}t^{-4}A^2B^{-2}z^2\big)}
{\theta_p\big(t^{-4}z^2\big)\theta_p\big(z^2\big)\theta_p\big(q^{-1}z^2\big)}T_{{\mathfrak J}_D}(z)\\
\quad{}+ \frac{\theta_p\big(pq^2t^2A^{-2}B^2\big)\theta_p\big((pq)^{-1}q^{-1}t^{-4}A^2B^{-2}\big)\Gamma_e\big(q^{-1}A^2B^{-2}\big)\Gamma_e\big(A^{-2}B^2\big)}
{\theta_p\big(t^{-2}\big)\theta_p\big(q^{-1}t^{-2}B^{-2}\big)\theta_p\big(q^{-1}t^{-2}A^2\big)
\theta_p\big(q^{-1}t^{-2}AB^{-1}C^{\pm1}D^{\pm1}\big)}\\
\quad{}\times\frac{\theta_p\big((pq)^\frac{1}{2}t^{-1}B^{\pm1}D^{\pm1}z\big)
\theta_p\big((pq)^\frac{1}{2}t^{-1}A^{\pm1}C^{\pm1}z\big)}
{\theta_p\big(qz^2\big)\theta\big(z^2\big)}T_{{\mathfrak J}_D}(qz) + \big\{z\leftrightarrow z^{-1}\big\} .
\end{gather*}
\end{document}


\documentclass[a4paper,12pt]{article}
\usepackage{latexsym}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{wrapfig}
\pagestyle{plain}
\usepackage{fancybox}
\usepackage{bm}
\begin{document}
From the second term of we get
\begin{gather*}
\frac{\theta_p\big(pq^2t^2A^{-2}B^2\big)\theta_p\big((pq)^{-1}q^{-1}t^{-4}A^2B^{-2}\big)}
{\theta_p\big(t^{-2}\big)\theta_p\big(q^{-1}t^{-2}B^{-2}\big)\theta_p\big(q^{-1}t^{-2}A^2\big)\theta_p\big(pq^2t^4A^{-2}B^2\big)
\theta_p\big(q^{-1}t^{-2}AB^{-1}C^{\pm1}D^{\pm1}\big)}\\
{}\times\oint\frac{{\rm d}u}{4\pi i u} \frac{\Gamma_e\big((q p)^{\frac12 }t^{-1} A^{\pm1} D^{\pm1}u^{\pm1}\big)
\Gamma_e\big((q p)^{\frac12 }t^{-1} B^{\pm1} C^{\pm1}u^{\pm1}\big)}{\Gamma\big(u^{\pm2}\big)}\\
{}\times\Gamma_e\big((pq)^\frac12 t B^{-1} C^{\pm1}u^{\pm1}\big) \Gamma_e\big((pq)^\frac12 t A D^{\pm1}u^{\pm1}\big)
\Gamma_e\big((pq)^\frac{1}{2}t A^{-1}u^{\pm1}D^{\pm1}\big)
\Gamma_e\big((pq)^\frac{1}{2}t B u^{\pm1}C^{\pm1}\big)\\
{}\times\Gamma_e\big(AB^{-1}u^{\pm1}z^{\pm1}\big)
\Gamma_e\big((pq)^\frac{1}{2}q^\frac{1}{2}t B D^{\pm1}\big(q^\frac{1}{2}z\big)^{\pm1}\big)
\Gamma_e\big((pq)^{\frac{1}{2}}q^\frac{1}{2}tA^{-1}C^{\pm1}\big(q^\frac{1}{2}z\big)^{\pm1}\big)\\
{}\times\oint\frac{{\rm d}v}{4\pi i v} \frac{\Gamma_e\big((q p)^{\frac12 }t^{-1} A^{\pm1} C^{\pm1}v^{\pm1}\big)
\Gamma_e\big((q p)^{\frac12 }t^{-1} B^{\pm1} D^{\pm1}v^{\pm1}\big)}{\Gamma\big(v^{\pm2}\big)}\\
{}\times\frac{\theta_p\big((pq)^\frac{1}{2}q^{-1}t^{-3}B^{-1}z D^{\pm1}\big)
\theta_p\big((pq)^\frac{1}{2}q^{-1}t^{-3}A z C^{\pm1}\big)}
{\theta_p\big(z^2\big)\theta_p\big(t^4z^{-2}\big)}\\
{}\times\Gamma_e\big( A^{-1}B u^{\pm1} v^{\pm1}\big)\Gamma_e\big((qp)^{\frac12}t B^{-1}D^{\pm1} v^{\pm1}\big)
\Gamma_e\big((q p)^{\frac12}t A C^{\pm1} v^{\pm1}\big)T_{{\mathfrak J}_D}(v) + \big\{z\leftrightarrow z^{-1}\big\} .
\end{gather*}
Terms cancel in the integral over $u$ and what is left can be evaluated using the inversion formula as before which sets $v=z$, after some cancelations we get
\begin{gather*}
\frac{\Gamma_e\big(\big(AB^{-1}\big)^2\big)	\theta_p\big(pq^2t^2A^{-2}B^2\big)
\theta_p\big((pq)^{-1}q^{-1}t^{-4}A^2B^{-2}\big)}
{\theta_p\big(t^{-2}\big)\theta_p\big(q^{-1}t^{-2}B^{-2}\big)\theta_p\big(q^{-1}t^{-2}A^2\big)\theta_p\big(pq^2t^4A^{-2}B^2\big)
\theta_p\big(q^{-1}t^{-2}AB^{-1}C^{\pm1}D^{\pm1}\big)}\\
{}\!\times\!\frac{\theta_p\big((q p)^{\frac12 }t A^{-1} C^{\pm1}z\big)
\theta_p\big((q p)^{\frac12 }t B D^{\pm1}z\big)
\theta_p\big((pq)^\frac{1}{2}q^{-1}t^{-3}B^{-1}z D^{\pm1}\big)
\theta_p\big((pq)^\frac{1}{2}q^{-1}t^{-3}A z C^{\pm1}\big)}{\theta_p\big(z^2\big)\theta_p\big(t^4z^{-2}\big)}\\
{}\!\times\! T_{{\mathfrak J}_D}(z)+ \big\{z\leftrightarrow z^{-1}\big\} .
\end{gather*}
We compute the contribution from the last term in \eqref{c7}
\begin{gather*}
\oint\frac{{\rm d}u}{4\pi i u} \frac{\Gamma_e\big((q p)^{\frac12 }t^{-1} A^{\pm1} D^{\pm1}u^{\pm1}\big)
\Gamma_e\big((q p)^{\frac12 }t^{-1} B^{\pm1} C^{\pm1}u^{\pm1}\big)}{\Gamma\big(u^{\pm2}\big)}\\
{}\times\Gamma_e\big((pq)^\frac12 t B^{-1} C^{\pm1}u^{\pm1}\big)
\Gamma_e\big((pq)^\frac12 t A D^{\pm1}u^{\pm1}\big)
\Gamma_e\big((pq)^\frac{1}{2}tA^{-1}u^{\pm1}D^{\pm1}\big)
\Gamma_e\big((pq)^\frac{1}{2}t B u^{\pm1}C^{\pm1}\big)\\
{}\times\Gamma_e\big(A B^{-1}u^{\pm1}z^{\pm1}\big)
\Gamma_e\big((pq)^{\frac{1}{2}}t B D^{\pm1}z^{\pm1}\big)
\Gamma_e\big((pq)^{\frac{1}{2}}t A^{-1}C^{\pm1}z^{\pm1}\big)\\
{}\times\oint\frac{{\rm d}v}{4\pi i v} \frac{\Gamma_e\big((q p)^{\frac12 }t^{-1} A^{\pm1} C^{\pm1}v^{\pm1}\big)
\Gamma_e\big((q p)^{\frac12 }t^{-1} B^{\pm1} D^{\pm1}v^{\pm1}\big)}{\Gamma\big(v^{\pm2}\big)}\\
{}\times\Gamma_e\big( A^{-1}B u^{\pm1} v^{\pm1}\big)\Gamma_e\big((qp)^{\frac12}t B^{-1}D^{\pm1} v^{\pm1}\big)
\Gamma_e\big((q p)^{\frac12}t A C^{\pm1} v^{\pm1}\big)T_{{\mathfrak J}_D}(v) .
\end{gather*}
Integrals can be evaluated using the inversion formula which sets $v=z$ almost everything cancel and we get
\begin{gather*}
\Gamma_e\big(\big(AB^{-1}\big)^2\big)T_{{\mathfrak J}_D}(z) .
\end{gather*}
\end{document}


\documentclass[a4paper,12pt]{article}
\usepackage{latexsym}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{wrapfig}
\pagestyle{plain}
\usepackage{fancybox}
\usepackage{bm}
\begin{document}
Dividing by this factor $\Gamma_e\big(\big(A B^{-1}\big)^2\big)$ and adding all contributions we get
\begin{gather*}
\frac{\theta_p\big(pq^2t^2A^{-2}B^2\big)
\theta_p\big((pq)^{-1}q^{-1}t^{-4}A^2B^{-2}\big)}
{\theta_p\big(t^{-2}\big)\theta_p\big(q^{-1}t^{-2}B^{-2}\big)\theta_p\big(q^{-1}t^{-2}A^2\big)
\theta_p\big(q^{-1}t^{-2}AB^{-1}C^{\pm1}D^{\pm1}\big)
\theta_p\big(q^{-1}A^2B^{-2}\big)}\\
{}\times \frac{\theta_p\big((pq)^\frac{1}{2}t^{-1}B^{\pm1}D^{\pm1}z\big)
\theta_p\big((pq)^\frac{1}{2}t^{-1}A^{\pm1}C^{\pm1}z\big)}{\theta_p\big(qz^2\big)\theta\big(z^2\big)}T_{{\mathfrak J}_D}(qz)\\
{}+ \frac{\theta_p\big(pq^2t^2A^{-2}B^2\big) \theta_p\big((pq)^{-1}q^{-1}t^{-4}A^2B^{-2}\big)}
{\theta_p\big(t^{-2}\big)\theta_p\big(q^{-1}t^{-2}B^{-2}\big)\theta_p\big(q^{-1}t^{-2}A^2\big)\theta_p\big(pq^2t^4A^{-2}B^2\big)
\theta_p\big(q^{-1}t^{-2}AB^{-1}C^{\pm1}D^{\pm1}\big)}\\
{}\times\frac{\theta_p\big((pq)^\frac{1}{2}t^{\pm1}BD^{\pm1}z\big)
\theta_p\big((pq)^\frac{1}{2}t^{\pm1}A^{-1}C^{\pm1}z\big)
\theta_p\big(q^{-1}t^{-4}\big)\theta_p\big(q^{-1}t^{-4}A^2B^{-2}z^2\big)}
{\theta_p\big(q^{-1}A^2B^{-2}\big)\theta_p\big(t^{-4}z^2\big)\theta_p\big(z^2\big)\theta_p\big(q^{-1}z^2\big)}T_{{\mathfrak J}_D}(z)\\
{}+ \frac{\theta_p\big(pq^2t^2A^{-2}B^2\big)
\theta_p\big((pq)^{-1}q^{-1}t^{-4}A^2B^{-2}\big)}
{\theta_p\big(t^{-2}\big)\theta_p\big(q^{-1}t^{-2}B^{-2}\big)\theta_p\big(q^{-1}t^{-2}A^2\big)\theta_p\big(pq^2t^4A^{-2}B^2\big)
\theta_p\big(q^{-1}t^{-2}AB^{-1}C^{\pm1}D^{\pm1}\big)}\\
{}\times\frac{\theta_p\big((q p)^{\frac12 }t A^{-1} C^{\pm1}z\big)
\theta_p\big((q p)^{\frac12 }t B D^{\pm1}z\big)
\theta_p\big((pq)^\frac{1}{2}t^3B D^{\pm1} z^{-1}\big)
\theta_p\big((pq)^\frac{1}{2}t^3 A^{-1} C^{\pm1} z^{-1}\big)}
{\theta_p\big(z^2\big)\theta_p\big(t^4z^{-2}\big)}\\
{}\times T_{{\mathfrak J}_D}(z)
+ \big\{z\leftrightarrow z^{-1}\big\} + T_{{\mathfrak J}_D}(z) .
\end{gather*}
Taking away overall factor of
\begin{gather*}
 \frac{\theta_p\big(pq^2t^2A^{-2}B^2\big)\theta_p\big((pq)^{-1}q^{-1}t^{-4}A^2B^{-2}\big)}
{\theta_p\big(t^{-2}\big)\theta_p\big(q^{-1}t^{-2}B^{-2}\big)\theta_p\big(q^{-1}t^{-2}A^2\big)
\theta_p\big(q^{-1}t^{-2}AB^{-1}C^{\pm1}D^{\pm1}\big) \theta_p\big(q^{-1}A^2B^{-2}\big)} ,
\end{gather*}
 we get
\begin{gather*}
\frac{\theta_p\big((pq)^\frac{1}{2}t^{-1}B^{\pm1}D^{\pm1}z\big)
\theta_p\big((pq)^\frac{1}{2}t^{-1}A^{\pm1}C^{\pm1}z\big)}
{\theta_p\big(qz^2\big)\theta\big(z^2\big)}T_{{\mathfrak J}_D}(qz)\\
{}+ \frac{\theta_p\big(q^{-1}t^{-4}\big)\theta_p\big(q^{-1}t^{-4}A^2B^{-2}z^2\big)
\theta_p\big((pq)^\frac{1}{2}t^{\pm1}BD^{\pm1}z\big)
\theta_p\big((pq)^\frac{1}{2}t^{\pm1}A^{-1}C^{\pm1}z\big)}{\theta_p\big(q^{-2}t^{-4}A^{2}B^{-2}\big)
\theta_p\big(t^{-4}z^2\big)\theta_p\big(z^2\big)\theta_p\big(q^{-1}z^2\big)}T_{{\mathfrak J}_D}(z)\\
{}+ \frac{\theta_p\big(q^{-1}A^2B^{-2}\big)\theta_p\big((pq)^\frac{1}{2}t^2B D^{\pm1} (t^{-1}z)^{\pm1}\big)
\theta_p\big((pq)^\frac{1}{2}t^2 A^{-1} C^{\pm1} (t^{-1}z)^{\pm1}\big)}
{\theta_p\big(q^{-2}t^{-4}A^{2}B^{-2}\big)\theta_p\big(z^2\big)\theta_p\big(t^4z^{-2}\big)}T_{{\mathfrak J}_D}(z)\\
{}+ \big\{z\leftrightarrow z^{-1}\big\}\nonumber\\
{}+ \frac{\theta_p\big(t^{-2}\big)\theta_p\big(q^{-1}t^{-2}B^{-2}\big)\theta_p\big(q^{-1}t^{-2}A^2\big)
\theta_p\big(q^{-1}t^{-2}AB^{-1}C^{\pm1}D^{\pm1}\big)
\theta_p\big(q^{-1}A^2B^{-2}\big)} {\theta_p\big(pq^2t^2A^{-2}B^2\big)
\theta_p\big((pq)^{-1}q^{-1}t^{-4}A^2B^{-2}\big)} T_{{\mathfrak J}_D}(z) .
\end{gather*}
To summarize, we have shown that
\begin{gather*}
T_{{\mathfrak J}_D}(v)\times_v \big(\big(T_{{\mathfrak J}_B, {\mathfrak J}_C,{\mathfrak J}_D}(w,u,v)\times_w C^{(0,0;A^{-1}B)}_{{\mathfrak J}_B}(w)\big)\\
\qquad{} \times_u\big(T_{{\mathfrak J}_B, {\mathfrak J}_C,{\mathfrak J}_D}(h,u,z)\times_h C^{(1,0;AB^{-1})}_{{\mathfrak J}_B}(h)\big)\big) ,
\end{gather*}
\end{document}


\documentclass[a4paper,12pt]{article}
\usepackage{latexsym}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{wrapfig}
\pagestyle{plain}
\usepackage{fancybox}
\usepackage{bm}
\begin{document}
is proportional to
\begin{gather*}
 {\mathfrak D}_{{\mathfrak J}_D}^{{\mathfrak J}_B,(1,0;AB^{-1})} T_{{\mathfrak J}_D}(z) ,
\end{gather*}
where ${\mathfrak D}_{{\mathfrak J}_D}^{{\mathfrak J}_B,(1,0;AB^{-1})}$ is given by~().
\section{Koornwinder limit of the trinion}
We compute here the index of the three punctured sphere in the Koornwinder limit. The only subtle issue is the evaluation of the integrals in the function~$H$~\eqref{gff}. The integral can be interpreted as index of two coupled ${\rm SU}(2)$ gauge theories with five flavors. The integrand does not have a good limit however by manipulating it using Seiberg dualities we can show that the limit is well defined and evaluate all the integrals. We will discuss the evaluation of this function here.
To evaluate $H$ we first perform Seiberg duality on $w_2$ splitting to five flavors in particular way, leading to ${\rm SU}(3)$ theory with five flavors
\begin{gather*}
\big((qp)^{\frac14}A^{-\frac12} t b z_1^{\pm1} , (qp)^{\frac14} A^{\frac12} a^{-1} t v_1^{\pm1} , (q p)^{\frac14} A^{-\frac12} b^{-1} z_2^{-1}\big) , \\
\big((q p)^{\frac12}\frac1{t^2} w_1^{\pm1} , (q p)^{\frac14} A^{\frac12}a v_2^{\pm1} , (q p)^{\frac14}A^{-\frac12}b^{-1} z_2\big) ,
\end{gather*} which leads to no $w_2$ flavors having negative powers of $p$. We have the mesons
\begin{gather*}
(q p)^{\frac34}A^{-\frac12}t^{-1} b z_1^{\pm1}w_1^{\pm1} , \ (q p)^{\frac34} A^{\frac12} a^{-1} t^{-1} w_1^{\pm1}v_1^{\pm1} , \ (q p)^{\frac34} t^{-2} A^{-\frac12} b^{-1} z_2^{-1} w_1^{\pm1} , \\
 (q p)^{\frac12} b a t z_1^{\pm1} v_2^{\pm1} , \ (q p)^{\frac12} t A v_2^{\pm1} v_1^{\pm1} , \ (q p)^{\frac12} A^{-1} b^{-2} , \\
 (q p) ^{\frac12} A^{-1} z_2 t z_1^{\pm1} , \ (q p)^{\frac12} a b^{-1} v_2^{\pm1} z_2 ^{-1} , \ (q p)^{\frac12} t b^{-1} a^{-1} z_2 v_1^{\pm1} , \end{gather*}
and the new charged fields are
\begin{gather*}
\square_{{\rm SU}(3)_{w_2}} \colon \ (p q)^{\frac16}A^{\frac13}b^{-\frac23} t^{\frac13}a^{-\frac23} z_2^{-\frac13} z_1^{\pm1} , \ (p q)^{\frac16}A^{-\frac23}b^{\frac13} t^{\frac13}a^{\frac13} z_2^{-\frac13} v_1^{\pm1} , \
( q p)^{\frac16} A^{\frac13} b^{\frac43} t^{\frac43} a^{-\frac23} z_2^{\frac23} , \\
\overline \square _{{\rm SU}(3)_{w_2 } } \colon \ (q p)^{\frac1{ 1 2} } t^{\frac23}A^{\frac16}a^{\frac23} b^{-\frac13}z_2^{\frac13}w_1^{\pm1} , \
(q p) ^{\frac13} A^{-\frac13} b^{-\frac13} t^{-\frac43} a^{-\frac13} z_2^{\frac13} v_2^{\pm1} , \ ( q p )^{\frac13} A^{\frac23} b^{\frac23} t^{-\frac43} a^{\frac23} z_2^{-\frac23} ,
\end{gather*}
 and all of these fields have a good limit when $p$ goes to zero and the fugacities are scaled. We note that some of the mesons charged under $w_1$ form mass terms with some of the quarks and after the first Seiberg duality we have four flavors of $w_1$
\begin{gather*}
 \big( (q p )^{\frac14} A^{\frac12}b z_2 , (q p) ^{\frac1{ 1 2 }} A^{\frac16} t^{\frac23} a^{\frac23} b^{-\frac13} z_2^{\frac13} \big(w_2^j\big)^{-1} \big) , \\
 \big((q p)^{\frac14} A^{\frac12} b z_2^{-1} , (q p)^{\frac14} A^{-\frac12} a^{-1} v_2^{\pm1} , (q p)^{\frac34} A^{-\frac12} t^{-2} b^{-1} z_2^{-1} \big) ,
\end{gather*}
\end{document}


\documentclass[preprint,authoryear]{elsarticle}
\usepackage{amssymb}
\journal{}%Mathematical Biosciences}
\usepackage{graphicx}
\usepackage{amsmath,amssymb,amsfonts,latexsym}
\usepackage{color}
\usepackage{eucal}%    caligraphic-euler fonts: \mathcal{ }
\usepackage{xspace}
\usepackage{hyperref}
\usepackage{bm}
\usepackage[title]{appendix}
\newtheorem{proposition}{Proposition}
\newtheorem{proof}{Proof}
\usepackage[round]{natbib}
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}
\DeclareMathOperator*{\argmax}{argmax} % no space, limits underneath in displays
\DeclareMathOperator*{\argmin}{argmin} % no space, limits underneath in displays
\begin{document}
questioning the presence of  $(i,j)$ in each structure.
By construction, the distribution of $X_{i,j}$ is given by the base pairing probability
$\mathbb{P}(X_{i,j}(s)=1)=p_{i,j}$.
Any base pair, $(i,j)$, has an \emph{entropy}, defined by the information entropy of
$X_{i,j}$, i.e.
\[
H(X_{i,j})=-p_{i,j}  \log_2 p_{i,j}  -(1-p_{i,j} )  \log_2 (1-p_{i,j} ),
\]
where the units of $H$ are in bits. The entropy $H(X_{i,j}) $ measures the uncertainty of  the base
pair $(i,j)$ in $\Omega$ . When a base pair $(i,j)$  is certain to either exist or not, its entropy
$H(X_{i,j})$ is $0$. However, in case $p_{i,j} $ is closer to $1/2$, $H(X_{i,j})$ becomes larger.
The r.v. $X_{i,j}$ partitions the space $\Omega$ into two disjoint sub-spaces $\Omega_0$ and
$\Omega_1$, where  $ \Omega_k=\{s\in  \Omega :X_{i,j}(s)=k\}$ ($k=0,1$),
and the induced distributions are given by
\[
p_0(s)=\frac{p(s)}{1-p_{i,j}} \quad \text{ for } s\in  \Omega_0,\qquad
p_1(s)=\frac{p(s)}{p_{i,j}} \quad \text{ for } s\in  \Omega_1.
\]
Intuitively, $H(X_{i,j}) $ quantifies the average bits of information
we would expect to gain about the ensemble when querying a   base pair $(i,j)$
This motivates  us to consider the \emph{maximum entropy base pairs}, the base pair $(i_0,j_0)$
having  maximum entropy among all base pairs in $\Omega$, i.e.
\[
(i_0,j_0)= \argmax_{(i,j)}  H(X_{i,j}).
\]
As we shall prove in Section, $X_{i_0,j_0}$ produces maximally balanced
splits.

\subsection{The ensemble tree}
Equipped with the notion of ensemble and bit query (i.e.~the respective maximum entropy base pairs),
we proceed by describing our strategy to identify the target structure as specified in Problem.
The first step consists in having a closer look at the space of ensemble reductions.
Each split obtained by partitioning the ensemble $\Omega$ using r.v. $X_{i,j}$, can in turn be
bipartitioned itself via any of its maximum entropy base pairs. This recursive splitting induces the
{\it ensemble  tree}, $T(\Omega)$, whose vertices are sub-samples and in which its $k$-th layer represents
a partition of the original ensemble into $2^k$ blocks. $T(\Omega)$, is a rooted binary tree, in which
\begin{align*}
\epsilon_{i,j}((x_1,\dots, x_j),(y_1,\dots,y_m)) & =  (y_1,\dots,y_{i-1},x_1,\dots,x_j,y_{i+1},\dots y_m)\\
\xi_{i,j}(x_1,\dots,x_{n}) & =  ((x_i,\dots,x_{j}),(x_1,\dots,x_{i-1},x_{j+1},\dots,x_{n})).
\end{align*}
To quantify to what extent modularity can discriminate base pairs, % hypothesis
we perform computational experiments on random sequences via splittings. For each sequence, we consider
its MFE structure $s$ computed via \textsf{ViennaRNA}~\citep{Lorenz:11}.
Given two positions $i$ and $j$, we cut the entire sequence $\mathbf{x}$  into two fragments,
$\mathbf{x}_{i,j}$ and the remainder  $\bar{\mathbf{x}}_{i,j}$,
	i.e., $ \xi_{i,j}(\mathbf{x})=(\mathbf{x}_{i,j},\bar{\mathbf{x}}_{i,j})$.
Subsequently, the two fragments $\mathbf{x}_{i,j}$ and  $\bar{\mathbf{x}}_{i,j}$ refold
into their MFE structures $s_{i,j}$  and   $\bar{s}_{i,j}$, respectively,
which are combined into a structure $\epsilon_{i,j}(s_{i,j}, \bar{s}_{i,j})$.
If bases $i$ and $j$ are paired in $s$
\end{document}


\documentclass[preprint,authoryear]{elsarticle}
\usepackage{amssymb}
\journal{}%Mathematical Biosciences}
\usepackage{graphicx}
\usepackage{amsmath,amssymb,amsfonts,latexsym}
\usepackage{color}
\usepackage{eucal}%    caligraphic-euler fonts: \mathcal{ }
\usepackage{xspace}
\usepackage{hyperref}
\usepackage{bm}
\usepackage[title]{appendix}
\newtheorem{proposition}{Proposition}
\newtheorem{proof}{Proof}
\usepackage[round]{natbib}
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}
\DeclareMathOperator*{\argmax}{argmax} % no space, limits underneath in displays
\DeclareMathOperator*{\argmin}{argmin} % no space, limits underneath in displays
\begin{document}
such a splitting is referred to as \emph{modular}
In our R\'{e}nyi-Ulam game variation, the expected values of FDR and FOR are the error rates $e_1$
and $e_0$ in case the truthful answer being yes and no, respectively.
Fig. displays the error rates $e_0$ and $e_1$ as functions of $\theta$.
For $\theta=31$, we compute $e_0\approx 0.052$ and $e_1 \approx 0.007$, i.e. ~we have an error rate
of $ 0.052$ for rejecting and an error rate of $0.007$ for confirming a base pair.
\subsection{Entropy}
To quantify the uncertainty of an ensemble, we define
the \emph{structural entropy} of an ensemble, $\Omega$, of an RNA sequence, $\mathbf{x}$,
as the Shannon entropy
\begin{equation*}
H(\Omega) = -\sum_{s\in \Omega} p(s) \log_2 p(s),
\end{equation*}
Proposition implies that a sample with small structural entropy contains a
distinguished structure and a proof is given in .
We refer to a sample having a distinguished structure of probability at least $\lambda$ as
being \emph{$\lambda$-distinguished}.

Next we quantify the reduction of a bit query on an ensemble.
Recall that the associated r.v. $X_{i,j}$  of a base pair $(i,j)$
partitions the sample $\Omega$ into two disjoint sub-samples $\Omega_0$ and
$\Omega_1$, where  $ \Omega_k=\{s\in  \Omega :X_{i,j}(s)=k\}$ ($k=0,1$).
The \emph{conditional entropy}, $H(\Omega|X_{i,j})$,
represents
the expected value of the entropies of the conditional distributions on $\Omega$,
averaged over the conditioning r.v. $X_{i,j}$ and can be
computed by
\begin{equation*}
H(\Omega|X_{i,j})= (1-p_{i,j}) H(\Omega_0)+ p_{i,j} H(\Omega_1).
\end{equation*}
Then the \emph{entropy reduction} $R(\Omega,X_{i,j})$ of  $X_{i,j}$ on $\Omega$
is the difference between the \textit{a priori} Shannon entropy $H(\Omega)$ and the conditional
entropy $H(\Omega|X_{i,j}) $, i.e.
\begin{equation*}
R(\Omega,X_{i,j})= H(\Omega)-H(\Omega|X_{i,j}).
\end{equation*}
$\mathbb{P}(s\in \Omega^* )=(1-e_0)^{l_0} (1-e_1)^{l_1}$,
where $l_0$ and  $l_1$ denote the number of No-/Yes-answers to queried base pairs along the path,
respectively.
Fig. displays the distribution of $l_1$. We observe that $l_1$ has
a mean around $5$,
i.e., the probabilities of queried base pairs being confirmed and being rejected
are roughly equal.
For $l_0=l_1=5$,  we have a theoretical estimate  $\mathbb{P}(s\in \Omega^* )\approx 0.736$.
In Fig.  we present  that $\mathbb{P}(s\in \Omega^* )$ decreases
as  the error rate $e_0$ increases, for fixed $e_1=0.01$.
\section{Information theory}
As the Boltzmann ensemble is a particular type of discrete probability spaces,
the information-theoretic results on the ensemble trees will be stated in the more general setup.
Let  $\Omega=(\mathcal{S},\mathcal{P}(\mathcal{S}),p)$ be a discrete probability space
consisting of the sample space $\mathcal{S}$, its power set $\mathcal{P}(\mathcal{S})$ as the $\sigma$-algebra
and the probability measure $p$.
The \emph{Shannon entropy} of $\Omega$ is given by
\begin{equation*}
H(\Omega) = -\sum_{s\in \mathcal{S}} p(s) \log_2 p(s),
\end{equation*}
\end{document}


\documentclass[preprint,authoryear]{elsarticle}
\usepackage{amssymb}
\journal{}%Mathematical Biosciences}
\usepackage{graphicx}
\usepackage{amsmath,amssymb,amsfonts,latexsym}
\usepackage{color}
\usepackage{eucal}%    caligraphic-euler fonts: \mathcal{ }
\usepackage{xspace}
\usepackage{hyperref}
\usepackage{bm}
\usepackage[title]{appendix}
\newtheorem{proposition}{Proposition}
\newtheorem{proof}{Proof}
\usepackage[round]{natbib}
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}
\DeclareMathOperator*{\argmax}{argmax} % no space, limits underneath in displays
\DeclareMathOperator*{\argmin}{argmin} % no space, limits underneath in displays
\begin{document}
where the units of $H$ are
in bits.
A \emph{feature} $X$ is a discrete random variable defined on $\Omega$.
Assume that $X$ has a finite number of values $x_1,x_2,\ldots,x_k$. Set $q_i=\mathbb{P}(X=x_i)$.
The \emph{Shannon entropy} $H(X)$  of the feature $X$ is given by
\begin{equation*}
H(X) = -\sum_{i} q_i \log_2 q_i.
\end{equation*}
In particular, the values of $X$ define a partition of  $ \mathcal{S}$ %training set data
into disjoint subsets $ \mathcal{S}_i=\{s\in  \mathcal{S}:X(s)=x_i\}$, for $1\leq i \leq k$.
This further induces $k$ spaces $\Omega_i=(\mathcal{S}_i,\mathcal{P}(\mathcal{S}_i),p_i)$,
where the induced distribution is given by
\[
p_i(s)=\frac{p(s)}{q_i} \quad \text{ for } s\in  \mathcal{S}_i,
\]
and $q_i$ denotes the probability of $X$ having value $x_i$ and is given by
\begin{equation*}
q_i =\mathbb{P}(X=x_i)= \sum_{s\in  \mathcal{S}_i} p(s).
\end{equation*}
Let $H(\Omega|X) $ denote the \emph{conditional entropy} of $\Omega$ given the value of feature $X$.
The entropy $H(\Omega|X) $ gives the expected value of the entropies of the conditional distributions on $\Omega$,
averaged over the conditioning feature $X$ and  can be computed by
\begin{equation*}
H(\Omega|X)= \sum_i q_i H(\Omega_i).
\end{equation*}
Then the \emph{entropy reduction} %(or information gain)
$R(\Omega,X)$ of $\Omega$ for feature $X$
is the difference between the \textit{a priori} Shannon entropy $H(\Omega)$ and the conditional entropy $H(\Omega|X) $, i.e.
\begin{equation*}
R(\Omega,X)= H(\Omega)-H(\Omega|X).
\end{equation*}
The entropy reduction indicates the change on average in information entropy from a prior state to a state that takes some information as given.
Now we prove Propositions and. % i.e.  $R(\Omega,X)=H(X)$.
Given two features $X_1$ and $X_2$, we can  partition $\Omega$ either   first by $X_1$ and  subsequently  by  $X_2$,
or  first by $X_2$ and then  by  $X_1$, or just by  a pair of features $(X_1,X_2)$.
In the following, we will show that all three approaches provide the same entropy reduction of $\Omega$.
Before the proof, we define some notations.
The joint probability distribution of  a pair of features $(X_1,X_2)$ is given by
$q_{i_1,i_2}= \mathbb{P}(X_1=x^{(1)}_{i_1},X_2=x^{(2)}_{i_2})$,
and the marginal probability distributions are given by
$q^{(1)}_{i_1}=\mathbb{P}(X_1=x^{(1)}_{i_1})$ and $q^{(2)}_{i_2}=\mathbb{P}(X_2=x^{(2)}_{i_2})$.
Clearly, $\sum_{i_1}q_{i_1,i_2}=q^{(2)}_{i_2} $ and $\sum_{i_2}q_{i_1,i_2}=q^{(1)}_{i_1} $.
The \emph{joint entropy} $H (X_1,X_2) $ of a pair  $(X_1,X_2)$ is defined as
\begin{equation*}
H (X_1,X_2)= -\sum_{i_1} \sum_{i_2}  q_{i_1,i_2}  \log_2 q_{i_1,i_2}.
\end{equation*}
The \emph{conditional entropy} $H(X_2|X_1)$ of a feature $X_2$ given $X_1$ is
defined as the expected value of  the entropies of  the conditional distributions $X_2$,
averaged
\end{document}


\documentclass[preprint,authoryear]{elsarticle}
\usepackage{amssymb}
\journal{}%Mathematical Biosciences}
\usepackage{graphicx}
\usepackage{amsmath,amssymb,amsfonts,latexsym}
\usepackage{color}
\usepackage{eucal}%    caligraphic-euler fonts: \mathcal{ }
\usepackage{xspace}
\usepackage{hyperref}
\usepackage{bm}
\usepackage[title]{appendix}
\newtheorem{proposition}{Proposition}
\newtheorem{proof}{Proof}
\usepackage[round]{natbib}
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}
\DeclareMathOperator*{\argmax}{argmax} % no space, limits underneath in displays
\DeclareMathOperator*{\argmin}{argmin} % no space, limits underneath in displays
\begin{document}
over the conditioning feature $X_1$, i.e.
\begin{equation*}
H(X_2|X_1)= \sum_{i_1}  \mathbb{P}(X_1=x^{(1)}_{i_1})  H(X_2|X_1=x^{(1)}_{i_1}).
\end{equation*}
\begin{proposition}[Chain rule,]
	\begin{equation}
	H(X_1,X_2)=H(X_1)+ H(X_2|X_1).
	\end{equation}
\end{proposition}
\begin{proposition}
	Let  $R(\Omega,X_1,X_2)$ denote   the \emph{entropy reduction} of $\Omega$ first by the feature $X_1$ and then by the feature $X_2$,
	and $R(\Omega,(X_1,X_2))$ denote   the \emph{entropy reduction} of $\Omega$  by a pair of features $(X_1,X_2)$. Then
	\begin{equation}
	R(\Omega,X_1,X_2) = R(\Omega,(X_1,X_2)).
	\end{equation}
\end{proposition}
The maximum entropy of an arbitrary feature is achieved when all  its outcomes   occur with equal probability,
and this maximum value is proportional to the logarithm of the number of  possible outcomes  to the base $2$.
Thus Proposition  implies that the more possible outcomes  a feature has,
the higher  entropy reduction it could possibly lead to.
Meanwhile,  a feature with an arbitrary number of outcomes can be viewed as a combination of  \emph{binary features},
the ones with two possible outcomes.
Even though the entropy of the combination of two features is greater than  each of them,
Proposition shows that partitioning the space  subsequently  by two features has the same entropy reduction
as partitioning by their combination.
Therefore, instead of considering features with outcomes as many as possible, we
focus on binary features.
\section{Query repeats}
Here we assess the improvement of the error rates  by repeating the same query  twice.
Let $Y$ (or $N$) denote the event of the queried base pair  existing (or not) in the target structure.
Let $y$ (or $n$) denote the event of the experiment confirming (or rejecting) the base pair.
Let $nn$ denote the event of two independent experiments both rejecting the base pair.
Similarly, we have $yy$ and $y n$.
Utilizing the same sequences and structures as described in  Fig.,
we estimate the conditional probabilities $	\mathbb{P}(n|N)\approx 0.993$ and $	\mathbb{P}(n|Y)\approx 0.055$.
The \emph{prior probability} $\mathbb{P}(Y)$ can be computed via the expected number  $l_1$
of confirmed queried base pairs on the path,
divided by the number of queries in each sample.
Fig. displays the distribution of $l_1$ having mean around $5$.
Thus we adopt
$\mathbb{P}(Y)= \mathbb{P}(N)=0.5$.
By Bayes' theorem, we calculate the \emph{posterior}
\[
\mathbb{P}(N|nn)=\frac{\mathbb{P}(nn|N) \mathbb{P}(N)}{\mathbb{P}(nn)}=\frac{\mathbb{P}(n|N)^2 \mathbb{P}(N)}{\mathbb{P}(n|N)^2 \mathbb{P}(N) +\mathbb{P}(n|Y)^2\mathbb{P}(Y)},
\]
where $\mathbb{P}(nn)=\mathbb{P}(nn|N) \mathbb{P}(N) + \mathbb{P}(nn|Y) \mathbb{P}(Y)$.
we have $\mathbb{P}(nn|N) =\mathbb{P}(n|N)^2$ and $\mathbb{P}(nn|Y) =\mathbb{P}(n|Y)^2$.
Similarly, we compute $\mathbb{P}(Y|nn)$, $\mathbb{P}(Y|yy)$ and $\mathbb{P}(Y|yn)$
\end{document}