[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-81503-en":3,"doc-seo-81503-105":29,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":13,"seo_description":14,"update_tm":27,"read_time":28},81503,1099513958762,"Logic","https://ap-avatar.wpscdn.com/avatar/1000023916a998db790?x-image-process=image/resize,m_fixed,w_180,h_180&k=1784791008015729253",8,"Research & Report","Eulerian Orientations and Hadamard Codes: A Novel Connection via Counting","This work establishes a new relationship between Eulerian orientations and Hadamard codes through the problem of counting Eulerian orientations (#EO) under vertex-local constraint functions. Two inductively defined tractable families of constraint functions are introduced, along with a chain reaction algorithm. For each family in isolation, the corresponding #EO counting problem is solvable in polynomial time. The base case of these families is characterized exactly by the Hadamard code, linking graph counting to coding theory. When constraints from both families co-occur, the problem becomes #P-hard.","arXiv :2411 .026 12v 3 [ cs .CC] 10 Jul 2026  \nEulerian orientations and Hadamard codes:  \nA novel connection via counting⋆  \nShuai Shao 1,∗  \nSchool of Computer Science and Technology & Hefei National Laboratory, University of Science and Technology of China, Hefei, China Zhuxiao Tang2  \nDepartment of Computer Sciences, University of Wisconsin-Madison, Madison, U.S.A.  \nAbstract  \nWe discover a novel connection between two classical mathematical concepts—Eulerian orientations and Hadamard codes, by studying the counting problem of Eulerian orientations (\\#EO) with local constraint functions imposed on vertices. We present two special classes of constraint functions and a chain reaction algorithm, and show that the \\#EO problem defined by each class alone is polynomial-time solvable by the algorithm. These tractable classes of functions are defined inductively, and quite remarkably, the base level of these classes is characterized precisely by the well-known Hadamard code. Thus, we establish a novel connection between counting Eulerian orientations and coding theory. We also prove a \\#P-hardness result for the \\#EO problem when constraint functions from the two tractable classes appear together.  \nKeywords: Eulerian orientations, Hadamard codes, Counting problems, Tractable classes  \n1. Introduction  \nThe notion of Eulerian orientations arises from the historically notable Seven Bridges of Königsberg problem, whose solution by Euler in 1736 [2] is considered one of the first result of graph theory. Given an undirected graph G, an Eulerian orientation of G is an assignment of a direction to each edge of G such that at each vertex v, the number of incoming edges is equal to the number of outgoing edges. A connected graph has an Eulerian orientation, called an Eulerian graph if and only if every vertex has even degree. This is  \n⋆ An extended abstract of this paper appeared in the Proceedings of the 16th Innovations in Theoretical Computer Science (ITCS 2025) [1], [https://doi.org/10.4230/LIPIcs.ITCS.2025.86](https://doi.org/10.4230/LIPIcs.ITCS.2025.86) .  \n∗ Corresponding author  \nEmail addresses: [shao10@ustc.edu.cn](shao10@ustc.edu.cn) (Shuai Shao), [zztang@wisc.edu](zztang@wisc.edu) (Zhuxiao Tang)  \n1 Supported by the Quantum Science and Technology − National Science and Technology Major Project (QNMP), 2021ZD0302901, and the National Natural Science Foundation of China, No. 62572452.  \n2 This work was done while the second author was an undergraduate student in the School of the Gifted Young, University of Science and Technology of China, under the support by QNMP 2021ZD0302901 .  \nthe well-known Euler’s theorem, whose first complete proof was given back in the 1800s [3] . In terms of computational complexity, Euler’s theorem implies that the decision problem of determining whether a graph has an Eulerian orientation is polynomial-time solvable (tractable) . While for the counting problem, Mihail and Winkler showed that counting the number of Eulerian orientations of an undirected graph is \\#P-complete in 1996 [4]—over a century after Euler’s theorem. However, the counting problem becomes tractable when certain particular restrictions are imposed on edges. An intriguing example of such tractable problems comes from computing the partition function of the six-vertex model [5 , 6 , 7], oneof the most intensively studied models in statistical physics. In this example, the graphs are 4 regular and on each vertex exactly one edge incident to it is restricted to take the direction coming into the vertex. Then counting the number of Eulerian orientations obeying restrictions on these edges is shown to be tractable [8] .  \nIn this paper, we further study the counting restricted Eulerian orientations (\\#EO) problem, defined by constraint functions placed at each vertex that represent restrictions on edges incident to the vertex. We consider which classes of constraint functions make the \\#EO problem tractable. Before we formally defi","cbCaihSAddDjfiHp","https://ap.wps.com/l/cbCaihSAddDjfiHp","pdf",521959,1,25,"English","en",105,"# Introduction\n## Eulerian orientations and computational complexity\n## Counting restricted Eulerian orientations\n## Hadamard code as a bridge to tractability\n# Problem definition\n## Local constraint functions and #EO(F)","[{\"question\":\"What is the main connection established in the paper between Eulerian orientations and Hadamard codes?\",\"answer\":\"The paper connects counting Eulerian orientations (#EO) with Hadamard codes by showing that the base level of certain inductively defined tractable constraint families is characterized precisely by the Hadamard code.\"},{\"question\":\"How does the paper define the counting problem #EO?\",\"answer\":\"It defines #EO(F) by assigning to each vertex a signature (a 0-1 constraint function) that restricts the orientations of incident edges, and it counts assignments that satisfy the Eulerian orientation condition under those local constraints.\"},{\"question\":\"Under what conditions is the #EO problem polynomial-time solvable, and when does it become hard?\",\"answer\":\"For each of the two tractable families of constraint functions used alone, #EO is polynomial-time solvable via the chain reaction algorithm. If constraint functions from both families appear together, the paper proves a #P-hardness result.\"}]",1784173848,63,{"code":4,"msg":30,"data":31},"ok",{"site_id":24,"language":23,"slug":32,"title":13,"keywords":33,"description":14,"schema_data":34,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":27},"eulerian-orientations-and-hadamard-codes-a-novel-connection-via-counting","",{"@graph":35,"@context":85},[36,53,68],{"@type":37,"itemListElement":38},"BreadcrumbList",[39,43,47,50],{"item":40,"name":41,"@type":42,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":44,"name":45,"@type":42,"position":46},"https://docshare.wps.com/document/","Document",2,{"item":48,"name":12,"@type":42,"position":49},"https://docshare.wps.com/document/research-report/",3,{"item":51,"name":13,"@type":42,"position":52},"https://docshare.wps.com/document/eulerian-orientations-and-hadamard-codes-a-novel-connection-via-counting/81503/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":23,"description":14,"dateModified":61,"datePublished":62,"encodingFormat":60,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":40,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-17","2026-07-16",true,{"@type":65,"interactionType":66,"userInteractionCount":20},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"What is the main connection established in the paper between Eulerian orientations and Hadamard codes?","Question",{"text":75,"@type":76},"The paper connects counting Eulerian orientations (#EO) with Hadamard codes by showing that the base level of certain inductively defined tractable constraint families is characterized precisely by the Hadamard code.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"How does the paper define the counting problem #EO?",{"text":80,"@type":76},"It defines #EO(F) by assigning to each vertex a signature (a 0-1 constraint function) that restricts the orientations of incident edges, and it counts assignments that satisfy the Eulerian orientation condition under those local constraints.",{"name":82,"@type":73,"acceptedAnswer":83},"Under what conditions is the #EO problem polynomial-time solvable, and when does it become hard?",{"text":84,"@type":76},"For each of the two tractable families of constraint functions used alone, #EO is polynomial-time solvable via the chain reaction algorithm. If constraint functions from both families appear together, the paper proves a #P-hardness result.","https://schema.org",{"og:url":51,"og:type":87,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":89,"canonical":51},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":92},[93,97,101,105,110,115,120,123,128,131,135],{"id":20,"doc_module":4,"doc_module_name":45,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":46,"doc_module":4,"doc_module_name":45,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":45,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":45,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":111,"doc_module":4,"doc_module_name":45,"category_name":112,"show_sort_weight":113,"slug":114},6,"Technology",50,"technology",{"id":116,"doc_module":4,"doc_module_name":45,"category_name":117,"show_sort_weight":118,"slug":119},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":45,"category_name":12,"show_sort_weight":121,"slug":122},30,"research-report",{"id":124,"doc_module":4,"doc_module_name":45,"category_name":125,"show_sort_weight":126,"slug":127},9,"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":45,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":132,"doc_module":4,"doc_module_name":45,"category_name":133,"show_sort_weight":132,"slug":134},10,"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":45,"category_name":137,"show_sort_weight":106,"slug":138},19,"General","general"]