View full-text article in PMC Entropy (Basel). 2023 Jan 30;25(2):251. doi: 10.3390/e25020251 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2023 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 2 Extended Dynamic Programming Algorithm JN(xN′,xN)←hN(xN′,xN) fork=N−1to 0 do for all (xk′,xk)∈Sk′×Sk do Jk(xk′,xk)←maxuk′∈Uk′(xk′)Ewk{maxuk∈Uk(xk′,xk)Emk{hk(xk,uk,mk) +Jk+1(vk(xk′,uk′,wk),fk(xk,uk,mk))}} μk*(xk′,xk)←uk* μk′*(xk′)←uk′* end for end for