{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/model-enumeration-of-two-variable-logic-with","title":"Model Enumeration of Two-Variable Logic with Quadratic Delay Complexity","arxiv_id":"2505.19648","date":"2025-05-26","proceeding":null,"authors":["Qiaolan Meng","Juhua Pu","Hongting Niu","Yuyi Wang","Yuanhong Wang","Ondřej Kuželka"],"abstract":"We study the model enumeration problem of the function-free, finite domain fragment of first-order logic with two variables ($FO^2$). Specifically, given an $FO^2$ sentence $\\Gamma$ and a positive integer $n$, how can one enumerate all the models of $\\Gamma$ over a domain of size $n$? In this paper, we devise a novel algorithm to address this problem. The delay complexity, the time required between producing two consecutive models, of our algorithm is quadratic in the given domain size $n$ (up to logarithmic factors) when the sentence is fixed. This complexity is almost optimal since the interpretation of binary predicates in any model requires at least $\\Omega(n^2)$ bits to represent.","url_abs":"https://arxiv.org/abs/2505.19648v1","url_pdf":"https://arxiv.org/pdf/2505.19648v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"model-enumeration-of-two-variable-logic-with","repo_url":"https://github.com/mengqiaolan/model_enumeration_fo2","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":null}],"tasks":[{"task_slug":"sentence","task_name":"Sentence"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":null,"mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}