View full-text article in PMC Entropy (Basel). 2024 Feb 20;26(3):178. doi: 10.3390/e26030178 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). PMC Copyright notice Algorithm 1: Computing channel capacity Input: p(y|x), maximum iterations N, threshold ϵ>0; Initialization: q0(x)>0, ϵ0>ϵ, n=0; while n<N and ϵn>ϵ do ( ( n←n+1; Qn=Q[qn−1] using Equation (5); qn=q[Qn] using Equation (7); C(qn,Qn)=ln∑xexp{d[Qn](x)} using Equations (8) and (4); ϵn=maxx{d[Qn](x)−lnqn−1(x)}−C(qn,Qn) using Equation (4); end Output: qn(x), Qn(x|y), C(qn,Qn)