{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,5,2]],"date-time":"2026-05-02T06:09:39Z","timestamp":1777702179228,"version":"3.51.4"},"reference-count":42,"publisher":"MDPI AG","issue":"10","license":[{"start":{"date-parts":[[2019,10,21]],"date-time":"2019-10-21T00:00:00Z","timestamp":1571616000000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Entropy"],"abstract":"<jats:p>Ordinal patterns are the common basis of various techniques used in the study of dynamical systems and nonlinear time series analysis. The present article focusses on the computational problem of turning time series into sequences of ordinal patterns. In a first step, a numerical encoding scheme for ordinal patterns is proposed. Utilising the classical Lehmer code, it enumerates ordinal patterns by consecutive non-negative integers, starting from zero. This compact representation considerably simplifies working with ordinal patterns in the digital domain. Subsequently, three algorithms for the efficient extraction of ordinal patterns from time series are discussed, including previously published approaches that can be adapted to the Lehmer code. The respective strengths and weaknesses of those algorithms are discussed, and further substantiated by benchmark results. One of the algorithms stands out in terms of scalability: its run-time increases linearly with both the pattern order and the sequence length, while its memory footprint is practically negligible. These properties enable the study of high-dimensional pattern spaces at low computational cost. In summary, the tools described herein may improve the efficiency of virtually any ordinal pattern-based analysis method, among them quantitative measures like permutation entropy and symbolic transfer entropy, but also techniques like forbidden pattern identification. Moreover, the concepts presented may allow for putting ideas into practice that up to now had been hindered by computational burden. To enable smooth evaluation, a function library written in the C programming language, as well as language bindings and native implementations for various numerical computation environments are provided in the supplements.<\/jats:p>","DOI":"10.3390\/e21101023","type":"journal-article","created":{"date-parts":[[2019,10,21]],"date-time":"2019-10-21T11:37:55Z","timestamp":1571657875000},"page":"1023","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":25,"title":["Teaching Ordinal Patterns to a Computer: Efficient Encoding Algorithms Based on the Lehmer Code"],"prefix":"10.3390","volume":"21","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-2682-2040","authenticated-orcid":false,"given":"Sebastian","family":"Berger","sequence":"first","affiliation":[{"name":"Department of Anaesthesiology and Intensive Care, Klinikum rechts der Isar der Technischen Universit\u00e4t M\u00fcnchen, 81675 Munich, Germany"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-8845-1647","authenticated-orcid":false,"given":"Andrii","family":"Kravtsiv","sequence":"additional","affiliation":[{"name":"Department of Anaesthesiology and Intensive Care, Klinikum rechts der Isar der Technischen Universit\u00e4t M\u00fcnchen, 81675 Munich, Germany"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Gerhard","family":"Schneider","sequence":"additional","affiliation":[{"name":"Department of Anaesthesiology and Intensive Care, Klinikum rechts der Isar der Technischen Universit\u00e4t M\u00fcnchen, 81675 Munich, Germany"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Denis","family":"Jordan","sequence":"additional","affiliation":[{"name":"Institute of Geomatics Engineering, University of Applied Sciences and Arts Northwestern Switzerland, 4132 Muttenz, Switzerland"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"1968","published-online":{"date-parts":[[2019,10,21]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","first-page":"174102","DOI":"10.1103\/PhysRevLett.88.174102","article-title":"Permutation Entropy: A Natural Complexity Measure for Time Series","volume":"88","author":"Bandt","year":"2002","journal-title":"Phys. Rev. Lett."},{"key":"ref_2","doi-asserted-by":"crossref","first-page":"379","DOI":"10.1002\/j.1538-7305.1948.tb01338.x","article-title":"A Mathematical Theory of Communication","volume":"27","author":"Shannon","year":"1948","journal-title":"Bell Syst. Tech. J."},{"key":"ref_3","doi-asserted-by":"crossref","first-page":"623","DOI":"10.1002\/j.1538-7305.1948.tb00917.x","article-title":"A Mathematical Theory of Communication","volume":"27","author":"Shannon","year":"1948","journal-title":"Bell Syst. Tech. J."},{"key":"ref_4","doi-asserted-by":"crossref","first-page":"1553","DOI":"10.3390\/e14081553","article-title":"Permutation Entropy and Its Main Biomedical and Econophysics Applications: A Review","volume":"14","author":"Zanin","year":"2012","journal-title":"Entropy"},{"key":"ref_5","first-page":"241","article-title":"Recent Progress in Symbolic Dynamics and Permutation Complexity","volume":"222","author":"Keller","year":"2013","journal-title":"Eur. Phys. J. Spec. Top."},{"key":"ref_6","first-page":"20140091","article-title":"Ordinal symbolic analysis and its application to biomedical recordings","volume":"373","author":"Keller","year":"2014","journal-title":"Philos. Trans. R. Soc. A Math. Phys. Eng. Sci."},{"key":"ref_7","doi-asserted-by":"crossref","first-page":"022911","DOI":"10.1103\/PhysRevE.87.022911","article-title":"Weighted-permutation entropy: A complexity measure for time series incorporating amplitude information","volume":"87","author":"Fadlallah","year":"2013","journal-title":"Phys. Rev. E"},{"key":"ref_8","doi-asserted-by":"crossref","first-page":"046010","DOI":"10.1088\/1741-2560\/7\/4\/046010","article-title":"Multiscale permutation entropy analysis of EEG recordings during sevoflurane anesthesia","volume":"7","author":"Li","year":"2010","journal-title":"J. Neural Eng."},{"key":"ref_9","doi-asserted-by":"crossref","first-page":"1186","DOI":"10.3390\/e14071186","article-title":"Multivariate Multi-Scale Permutation Entropy for Complexity Analysis of Alzheimer\u2019s Disease EEG","volume":"14","author":"Morabito","year":"2012","journal-title":"Entropy"},{"key":"ref_10","doi-asserted-by":"crossref","first-page":"40","DOI":"10.1016\/j.cmpb.2016.02.008","article-title":"Amplitude-aware permutation entropy: Illustration in spike detection and signal segmentation","volume":"128","author":"Azami","year":"2016","journal-title":"Comput. Methods Programs Biomed."},{"key":"ref_11","doi-asserted-by":"crossref","first-page":"94","DOI":"10.1016\/j.physd.2013.11.015","article-title":"Conditional entropy of ordinal patterns","volume":"269","author":"Unakafov","year":"2014","journal-title":"Phys. D Nonlinear Phenom."},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"1914","DOI":"10.1016\/j.cub.2013.07.075","article-title":"Information sharing in the brain indexes consciousness in noncommunicative patients","volume":"23","author":"King","year":"2013","journal-title":"Curr. Biol."},{"key":"ref_13","doi-asserted-by":"crossref","first-page":"461","DOI":"10.1103\/PhysRevLett.85.461","article-title":"Measuring Information Transfer","volume":"85","author":"Schreiber","year":"2000","journal-title":"Phys. Rev. Lett."},{"key":"ref_14","doi-asserted-by":"crossref","first-page":"158101","DOI":"10.1103\/PhysRevLett.100.158101","article-title":"Symbolic Transfer Entropy","volume":"100","author":"Staniek","year":"2008","journal-title":"Phys. Rev. Lett."},{"key":"ref_15","doi-asserted-by":"crossref","first-page":"046220","DOI":"10.1103\/PhysRevE.72.046220","article-title":"Visualization of coupling in time series by order recurrence plots","volume":"72","author":"Groth","year":"2005","journal-title":"Phys. Rev. E"},{"key":"ref_16","doi-asserted-by":"crossref","first-page":"646","DOI":"10.1111\/j.1467-9892.2007.00528.x","article-title":"Order patterns in time series","volume":"28","author":"Bandt","year":"2007","journal-title":"J. Time Ser. Anal."},{"key":"ref_17","doi-asserted-by":"crossref","first-page":"247","DOI":"10.1142\/S0219493707002025","article-title":"Time Series From the Ordinal Viewpoint","volume":"7","author":"Keller","year":"2007","journal-title":"Stochastics Dyn."},{"key":"ref_18","doi-asserted-by":"crossref","unstructured":"Amig\u00f3, J.M. (2010). Permutation Complexity in Dynamical Systems, Springer.","DOI":"10.1007\/978-3-642-04084-9"},{"key":"ref_19","doi-asserted-by":"crossref","first-page":"046217","DOI":"10.1103\/PhysRevE.70.046217","article-title":"Detecting dynamical changes in time series using the permutation entropy","volume":"70","author":"Cao","year":"2004","journal-title":"Phys. Rev. E"},{"key":"ref_20","doi-asserted-by":"crossref","first-page":"179","DOI":"10.1007\/s11517-005-0015-z","article-title":"Permutation entropy improves fetal behavioural state classification based on heart rate analysis from biomagnetic recordings in near term fetuses","volume":"44","author":"Frank","year":"2006","journal-title":"Med. Biol. Eng. Comput."},{"key":"ref_21","doi-asserted-by":"crossref","first-page":"4392","DOI":"10.3390\/e15104392","article-title":"Efficiently Measuring Complexity on the Basis of Real-World Data","volume":"15","author":"Unakafova","year":"2013","journal-title":"Entropy"},{"key":"ref_22","doi-asserted-by":"crossref","first-page":"1883","DOI":"10.1016\/j.physleta.2017.03.052","article-title":"Permutation entropy based time series analysis: Equalities in the input signal can lead to false conclusions","volume":"381","author":"Zunino","year":"2017","journal-title":"Phys. Lett. A"},{"key":"ref_23","doi-asserted-by":"crossref","first-page":"062706","DOI":"10.1103\/PhysRevE.90.062706","article-title":"Identifying delayed directional couplings with symbolic transfer entropy","volume":"90","author":"Dickten","year":"2014","journal-title":"Phys. Rev. E"},{"key":"ref_24","doi-asserted-by":"crossref","unstructured":"Unakafov, A.M., and Keller, K. (2018). Change-Point Detection Using the Conditional Entropy of Ordinal Patterns. Entropy, 20.","DOI":"10.3390\/e20090709"},{"key":"ref_25","doi-asserted-by":"crossref","first-page":"43","DOI":"10.1016\/S0167-2789(02)00432-3","article-title":"Information transfer in continuous processes","volume":"166","author":"Kaiser","year":"2002","journal-title":"Phys. D Nonlinear Phenom."},{"key":"ref_26","doi-asserted-by":"crossref","first-page":"3729","DOI":"10.1142\/S0218127407019652","article-title":"Parameter selection for permutation entropy measurements","volume":"17","author":"Staniek","year":"2007","journal-title":"Int. J. Bifurc. Chaos"},{"key":"ref_27","doi-asserted-by":"crossref","first-page":"27","DOI":"10.1016\/j.physleta.2006.01.093","article-title":"Order patterns and chaos","volume":"355","author":"Kocarev","year":"2006","journal-title":"Phys. Lett. A"},{"key":"ref_28","doi-asserted-by":"crossref","first-page":"50001","DOI":"10.1209\/0295-5075\/79\/50001","article-title":"True and false forbidden patterns in deterministic and random dynamics","volume":"79","author":"Zambrano","year":"2007","journal-title":"Europhys. Lett."},{"key":"ref_29","doi-asserted-by":"crossref","first-page":"249","DOI":"10.1140\/epjst\/e2013-01862-7","article-title":"Practical considerations of permutation entropy","volume":"222","author":"Riedl","year":"2013","journal-title":"Eur. Phys. J. Spec. Top."},{"key":"ref_30","doi-asserted-by":"crossref","unstructured":"Iverson, K.E. (1962). A Programming Language, Wiley.","DOI":"10.1145\/1460833.1460872"},{"key":"ref_31","doi-asserted-by":"crossref","first-page":"403","DOI":"10.1080\/00029890.1992.11995869","article-title":"Two Notes on Notation","volume":"99","author":"Knuth","year":"1992","journal-title":"Am. Math. Mon."},{"key":"ref_32","doi-asserted-by":"crossref","first-page":"176","DOI":"10.24033\/bsmf.378","article-title":"Sur la num\u00e9ration factorielle, application aux permutations","volume":"16","author":"Laisant","year":"1888","journal-title":"Bull. la Soci\u00e9t\u00e9 Math\u00e9matique Fr."},{"key":"ref_33","doi-asserted-by":"crossref","first-page":"179","DOI":"10.1090\/psapm\/010\/0113289","article-title":"Teaching combinatorial tricks to a computer","volume":"Volume 10","author":"Bellman","year":"1960","journal-title":"Proceedings of Symposia in Applied Mathematics"},{"key":"ref_34","doi-asserted-by":"crossref","first-page":"1433","DOI":"10.1016\/j.jprocont.2012.04.006","article-title":"GNU Octave and reproducible research","volume":"22","author":"Eaton","year":"2012","journal-title":"J. Process Control"},{"key":"ref_35","doi-asserted-by":"crossref","first-page":"10","DOI":"10.1109\/MCSE.2007.58","article-title":"Python for Scientific Computing","volume":"9","author":"Oliphant","year":"2007","journal-title":"Comput. Sci. Eng."},{"key":"ref_36","unstructured":"(1985). IEEE 754-1985: IEEE Standard for Binary Floating-Point Arithmetic, IEEE Computer Society."},{"key":"ref_37","unstructured":"(2008). IEEE 754-2008: IEEE Standard for Floating-Point Arithmetic, IEEE Computer Society."},{"key":"ref_38","doi-asserted-by":"crossref","first-page":"5","DOI":"10.1145\/103162.103163","article-title":"What every computer scientist should know about floating-point arithmetic","volume":"23","author":"Goldberg","year":"1991","journal-title":"ACM Comput. Surv."},{"key":"ref_39","doi-asserted-by":"crossref","first-page":"1","DOI":"10.18637\/jss.v008.i14","article-title":"Xorshift RNGs","volume":"8","author":"Marsaglia","year":"2003","journal-title":"J. Stat. Softw."},{"key":"ref_40","doi-asserted-by":"crossref","unstructured":"Berger, S., Schneider, G., Kochs, E.F., and Jordan, D. (2017). Permutation Entropy: Too Complex a Measure for EEG Time Series?. Entropy, 19.","DOI":"10.3390\/e19120692"},{"key":"ref_41","doi-asserted-by":"crossref","unstructured":"St. Denis, T., and Rose, G. (2006). BigNum Math: Implementing Cryptographic Multiple Precision Arithmetic, Syngress Publishing.","DOI":"10.1016\/B978-159749112-9\/50005-8"},{"key":"ref_42","doi-asserted-by":"crossref","unstructured":"Brent, R.P., and Zimmermann, P. (2010). Modern Computer Arithmetic, Cambridge University Press.","DOI":"10.1017\/CBO9780511921698"}],"container-title":["Entropy"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1099-4300\/21\/10\/1023\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,11]],"date-time":"2025-10-11T13:28:12Z","timestamp":1760189292000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1099-4300\/21\/10\/1023"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2019,10,21]]},"references-count":42,"journal-issue":{"issue":"10","published-online":{"date-parts":[[2019,10]]}},"alternative-id":["e21101023"],"URL":"https:\/\/doi.org\/10.3390\/e21101023","relation":{},"ISSN":["1099-4300"],"issn-type":[{"value":"1099-4300","type":"electronic"}],"subject":[],"published":{"date-parts":[[2019,10,21]]}}}