[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-504952-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-504952-en":131},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","modeling-and-solving-graph-synthesis-problems-using-sat-encoded-reachability-constraints-in-picat","Modeling and Solving Graph Synthesis Problems Using SAT-Encoded Reachability Constraints in Picat","","Many constraint satisfaction problems require synthesizing subgraphs that satisfy reachability requirements, such as connectivity through a Hamiltonian cycle or containment in a strongly connected component. This paper presents Picat programs for four LP/CP competition problems, illustrating how Picat’s modeling features express the graph constraints and how modern SAT solvers efficiently solve them via effective SAT encodings. The work also contrasts the Picat approach with ASP programs and reports experimental results.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/research-report/","Research & Report",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/modeling-and-solving-graph-synthesis-problems-using-sat-encoded-reachability-constraints-in-picat/504952/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/modeling-and-solving-graph-synthesis-problems-using-sat-encoded-reachability-constraints-in-picat/504952.png","ImageObject",300,407,{"name":42,"@type":43},"Danger Angel","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-07","2026-10-04",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",12,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What kinds of reachability constraints does the paper focus on?","Question",{"text":63,"@type":64},"It focuses on reachability constraints for synthesized subgraphs, including conditions ensuring Hamiltonian-cycle connectivity and conditions related to strongly connected components.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How does the paper solve the graph synthesis problems in Picat?",{"text":68,"@type":64},"It models the problems in Picat and then solves them using SAT by encoding the reachability constraints into SAT instances, leveraging modern SAT solver efficiency.",{"name":70,"@type":61,"acceptedAnswer":71},"Which competition problems are used to demonstrate the approach?",{"text":72,"@type":64},"The paper describes Picat programs for four problems: Roadrunner from the 2019 competition, and Masyu, Shingoki, and Tapa from the 2020 competition.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},504952,1791266299,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,106,111,115,120,123,127],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":102,"doc_module":4,"doc_module_name":25,"category_name":103,"show_sort_weight":104,"slug":105},6,"Technology",50,"technology",{"id":107,"doc_module":4,"doc_module_name":25,"category_name":108,"show_sort_weight":109,"slug":110},7,"Healthcare",40,"healthcare",{"id":112,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":113,"slug":114},8,30,"research-report",{"id":116,"doc_module":4,"doc_module_name":25,"category_name":117,"show_sort_weight":118,"slug":119},9,"Religion & Spirituality",20,"religion-spirituality",{"id":118,"doc_module":4,"doc_module_name":25,"category_name":121,"show_sort_weight":118,"slug":122},"World Cup","world-cup",{"id":124,"doc_module":4,"doc_module_name":25,"category_name":125,"show_sort_weight":124,"slug":126},10,"Lifestyle","lifestyle",{"id":128,"doc_module":4,"doc_module_name":25,"category_name":129,"show_sort_weight":97,"slug":130},19,"General","general",{"code":4,"msg":82,"data":132},{"doc_id":79,"user_id":133,"nickname":42,"user_avatar":134,"doc_module":4,"category_id":112,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":140,"language":141,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":142,"faqs":143,"seo_title":144,"seo_description":12,"update_tm":145,"read_time":146,"preview_page_count":33,"preview_urls":147},962090769052,"https://ap-avatar.wpscdn.com/davatar_9964176cb1d06d4a9deccf72a44ae3dc","Modeling and Solving Graph Synthesis Problems Using SAT-Encoded Reachability Constraints in Picat  \nNeng-Fa Zhou  \nCUNY Brooklyn College & Graduate Center  \n[zhou@sci.brooklyn.cuny.edu](zhou@sci.brooklyn.cuny.edu)  \nMany constraint satisfaction problems involve synthesizing subgraphs that satisfy certain reachability constraints. This paper presents programs in Picat for four problems selected from the recent LP/CP programming competitions. The programs demonstrate the modeling capabilities of the Picat language and the solving ef􀀂ciency of the cutting-edge SAT solvers empowered with effective encodings.  \n1 Introduction  \nPicat [27] is a Prolog-like language that takes many features from other languages, including patternmatching rules, functions, list/array comprehensions, loops, assignments, tabling for dynamic programming and planning, and constraint programming. These features make Picat a convenient modeling language for combinatorial problems, on a par with AMPL [8], OPL [9], and MiniZinc [17] . As a logic language, Picat can often offer solutions that are as concise and elegant as the ones in ASP [5] .  \nPicat supports constraint solving using different solvers, including CP (constraint programming), SAT (satis􀀂ability), MIP (mixed integer programming), and SMT (SAT Modulo Theories) . The last two decades have witnessed dramatic enhancement in SAT solvers’ performance, thanks to inventions of techniques, from con􀀃ict-driven clause learning, backjumping, variable and value selection heuristics, to random restarts [2, 4, 16] . With 􀀂ndings of effective encodings [12, 13, 15, 19, 21, 23, 26], SAT has become a strong contendant for solving a wide range of constraint satisfaction and optimization problems (CSP) .  \nMany CSPs involve synthesizing subgraphs that satisfy certain reachability constraints, including the constraint that ensures a cycle connecting all the vertices, as in the Hamiltonian cycle problem (HCP), and the constraint that ensures a strongly connected component. For that reason, CP systems provide graph constraints for easing the modeling and solving of these problems [1, 20] . This paper addresses modeling graph synthesis problems in Picat and solving them using SAT. It describes programs for four problems selected from the recent LP/CP programming competitions, including the Roadrunner problem from the 2019 competition, and the Masyu, Shingoki, and Tapa problems from the 2020 competition. It also compares the programs with ASP programs for these problems. The Picat programs demonstrate the modeling capabilities of the Picat language and the solving ef􀀂ciency of the cutting-edge SAT solvers empowered with effective encodings.  \nIn [7], programs in Picat are given for several Google Code Jam problems that utilize tabling and constraint programming. This paper can be considered as a sequel, which offers SAT-based solutions. The remainder of the paper is structured as follows: Section 2 brie􀀃y introduces constraint programming in Picat and describes the reachability constraints. Sections 3 through 6 give Picat programs for the four problems.1 Section 7 describes the SAT encodings of the reachability constraints implemented in Picat,  \n1 The complete programs are available at [https://github.com/nfzhou/lp-contest](https://github.com/nfzhou/lp-contest)  \nA. Formisano, Y.A Liu, et al. (Eds.): International Conference on Logic Programming (Technical Communications) 2021 (ICLP 2021) EPTCS 345, 2021, pp. 165–178, doi:10.4204/EPTCS.345.30  \n© N.F. Zhou  \nThis work is licensed under the Creative Commons Attribution License.  \n166 Modeling and Solving Graph Synthesis Problems  \nand presents the experimental results. Section 8 concludes the paper. The readers are assumed to be familiar with Picat. The overview chapter of the book [27] is a good quick start.  \n2 Picat and its Reachability Constraints  \nPicat provides four solver modules, cp, mip, sat, and smt, for modeling and solving CSPs. As a constraint programming ","cbCaibm0G7WRFdQK","https://ap.wps.com/l/cbCaibm0G7WRFdQK","pdf",194215,14,"English","# Introduction\n# Picat and its Reachability Constraints\n## hcp and scc constraints\n## Circuit and subcircuit constraints","[{\"question\":\"What kinds of reachability constraints does the paper focus on?\",\"answer\":\"It focuses on reachability constraints for synthesized subgraphs, including conditions ensuring Hamiltonian-cycle connectivity and conditions related to strongly connected components.\"},{\"question\":\"How does the paper solve the graph synthesis problems in Picat?\",\"answer\":\"It models the problems in Picat and then solves them using SAT by encoding the reachability constraints into SAT instances, leveraging modern SAT solver efficiency.\"},{\"question\":\"Which competition problems are used to demonstrate the approach?\",\"answer\":\"The paper describes Picat programs for four problems: Roadrunner from the 2019 competition, and Masyu, Shingoki, and Tapa from the 2020 competition.\"}]","Modeling and Solving Graph Synthesis Problems Using SAT-Encoded Reachability Constraints in Picat | PDF",1791080561,35,[148,152,156,160],{"page_no":22,"url":149,"width":150,"height":151},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/51136996794fc2b76a098e3e812d26f7.webp",983,1272,{"page_no":26,"url":153,"width":154,"height":155},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/215fd5cd1e0ed9c0590a18490066ec6a.webp",982,1270,{"page_no":30,"url":157,"width":158,"height":159},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/beae524679cca2dc77691029e1792bb0.webp",981,1269,{"page_no":33,"url":161,"width":162,"height":163},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/a120194cc477e71034df7af2e84e1da5.webp",980,1268]