{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,5,26]],"date-time":"2026-05-26T23:05:58Z","timestamp":1779836758637,"version":"3.53.1"},"reference-count":18,"publisher":"Cambridge University Press (CUP)","license":[{"start":{"date-parts":[[2023,12,12]],"date-time":"2023-12-12T00:00:00Z","timestamp":1702339200000},"content-version":"unspecified","delay-in-days":345,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["cambridge.org"],"crossmark-restriction":true},"short-container-title":["J. Funct. Prog."],"published-print":{"date-parts":[[2023]]},"abstract":"<jats:title>Abstract<\/jats:title>\n                  <jats:p>\n                    This paper describes a purely functional library for computing level-\n                    <jats:italic>p<\/jats:italic>\n                    -complexity of Boolean functions and applies it to two-level iterated majority. Boolean functions are simply functions from\n                    <jats:italic>n<\/jats:italic>\n                    bits to one bit, and they can describe digital circuits, voting systems, etc. An example of a Boolean function is majority, which returns the value that has majority among the\n                    <jats:italic>n<\/jats:italic>\n                    input bits for odd\n                    <jats:italic>n<\/jats:italic>\n                    . The complexity of a Boolean function\n                    <jats:italic>f<\/jats:italic>\n                    measures the\n                    <jats:italic>cost<\/jats:italic>\n                    of evaluating it: how many bits of the input are needed to be certain about the result of\n                    <jats:italic>f<\/jats:italic>\n                    . There are many competing complexity measures, but we focus on level-\n                    <jats:italic>p<\/jats:italic>\n                    -complexity \u2014 a function of the probability\n                    <jats:italic>p<\/jats:italic>\n                    that a bit is 1. The level-\n                    <jats:italic>p<\/jats:italic>\n                    -complexity\n                    <jats:inline-formula>\n                      <jats:alternatives>\n                        <jats:inline-graphic xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\" mime-subtype=\"png\" xlink:href=\"S0956796823000102_inline1.png\"\/>\n                        <jats:tex-math>$D_p(f)$<\/jats:tex-math>\n                      <\/jats:alternatives>\n                    <\/jats:inline-formula>\n                    is the minimum expected cost when the input bits are independent and identically distributed with Bernoulli(\n                    <jats:italic>p<\/jats:italic>\n                    ) distribution. We specify the problem as choosing the minimum expected cost of all possible decision trees \u2014 which directly translates to a clearly correct, but very inefficient implementation. The library uses thinning and memoization for efficiency and type classes for separation of concerns. The complexity is represented using (sets of) polynomials, and the order relation used for thinning is implemented using polynomial factorization and root counting. Finally, we compute the complexity for two-level iterated majority and improve on an earlier result by J. Jansson.\n                  <\/jats:p>","DOI":"10.1017\/s0956796823000102","type":"journal-article","created":{"date-parts":[[2023,12,12]],"date-time":"2023-12-12T05:22:39Z","timestamp":1702358559000},"update-policy":"https:\/\/doi.org\/10.1017\/policypage","source":"Crossref","is-referenced-by-count":0,"title":["Level-p-complexity of Boolean functions using thinning, memoization, and polynomials"],"prefix":"10.1017","volume":"33","author":[{"ORCID":"https:\/\/orcid.org\/0000-0001-7876-9651","authenticated-orcid":false,"given":"JULIA","family":"JANSSON","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-3078-1437","authenticated-orcid":false,"given":"PATRIK","family":"JANSSON","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"56","published-online":{"date-parts":[[2023,12,12]]},"reference":[{"key":"S0956796823000102_ref5","doi-asserted-by":"publisher","DOI":"10.1017\/CBO9781139924160"},{"key":"S0956796823000102_ref1","volume-title":"Algebra of Programming","author":"Bird","year":"1997"},{"key":"S0956796823000102_ref7","unstructured":"Jansson, J. (2022) Level-p-complexity of Boolean Functions. Master\u2019s thesis. Chalmers University of Technology. Available at: https:\/\/hdl.handle.net\/20.500.12380\/304584."},{"key":"S0956796823000102_ref12","doi-asserted-by":"publisher","DOI":"10.1002\/rsa.20598"},{"key":"S0956796823000102_ref10","unstructured":"Landau, I. , Nachmias, A. , Peres, Y. & Vanniasegaram, S. (2006) The lower bound for evaluating a recursive ternary majority function: an entropy-free proof. Undergraduate Research Reports, Department of Statistics, University of California, Berkeley."},{"key":"S0956796823000102_ref15","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796822000065"},{"key":"S0956796823000102_ref18","doi-asserted-by":"publisher","DOI":"10.1145\/800205.806320"},{"key":"S0956796823000102_ref6","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796800003713"},{"key":"S0956796823000102_ref17","volume-title":"The Complexity of Boolean Functions","author":"Wegener","year":"1987"},{"key":"S0956796823000102_ref9","volume-title":"The Art of Computer Programming, Volume 4A: Combinatorial Algorithms, Part 1","author":"Knuth","year":"2012"},{"key":"S0956796823000102_ref16","doi-asserted-by":"publisher","DOI":"10.1145\/3547636"},{"key":"S0956796823000102_ref2","doi-asserted-by":"publisher","DOI":"10.1017\/9781108869041"},{"key":"S0956796823000102_ref4","doi-asserted-by":"publisher","DOI":"10.1016\/S0304-3975(01)00144-X"},{"key":"S0956796823000102_ref14","doi-asserted-by":"publisher","DOI":"10.1017\/CBO9781139814782"},{"key":"S0956796823000102_ref3","doi-asserted-by":"publisher","DOI":"10.1109\/TC.1986.1676819"},{"key":"S0956796823000102_ref13","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796809007345"},{"key":"S0956796823000102_ref8","volume-title":"Domain-Specific Languages of Mathematics","volume":"24","author":"Jansson","year":"2022"},{"key":"S0956796823000102_ref11","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-39206-1_59"}],"container-title":["Journal of Functional Programming"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.cambridge.org\/core\/services\/aop-cambridge-core\/content\/view\/S0956796823000102","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,5,26]],"date-time":"2026-05-26T22:37:01Z","timestamp":1779835021000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.cambridge.org\/core\/product\/identifier\/S0956796823000102\/type\/journal_article"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023]]},"references-count":18,"alternative-id":["S0956796823000102"],"URL":"https:\/\/doi.org\/10.1017\/s0956796823000102","relation":{},"ISSN":["0956-7968","1469-7653"],"issn-type":[{"value":"0956-7968","type":"print"},{"value":"1469-7653","type":"electronic"}],"subject":[],"published":{"date-parts":[[2023]]},"assertion":[{"value":"\u00a9 The Author(s), 2023. Published by Cambridge University Press","name":"copyright","label":"Copyright","group":{"name":"copyright_and_licensing","label":"Copyright and Licensing"}},{"value":"This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https:\/\/creativecommons.org\/licenses\/by\/4.0\/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.","name":"license","label":"License","group":{"name":"copyright_and_licensing","label":"Copyright and Licensing"}},{"value":"This content has been made available to all.","name":"free","label":"Free to read"}],"article-number":"e13"}}