{"id":20409706,"url":"https://github.com/sleekpanther/3-sat-certifier","last_synced_at":"2025-10-12T03:43:26.470Z","repository":{"id":115108616,"uuid":"89862770","full_name":"SleekPanther/3-sat-certifier","owner":"SleekPanther","description":"A Certifier algorithm to check a particular solution to the NP-Complete 3-Sat problem","archived":false,"fork":false,"pushed_at":"2017-05-18T22:39:39.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-15T13:08:07.079Z","etag":null,"topics":["3-sat","3-satisfiability","3sat","certificate","certifier-algorithm","circuit-satisfiability","clause","cnf","compound-boolean","computational-instability","conjunctive-normal-form","exp","literals","negation","np","np-complete","np-hard","p","sat","satisfiability"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SleekPanther.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-30T16:29:40.000Z","updated_at":"2022-02-22T22:19:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"a49bd10b-cf70-45c7-86bc-ba363a9fdacc","html_url":"https://github.com/SleekPanther/3-sat-certifier","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SleekPanther%2F3-sat-certifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SleekPanther%2F3-sat-certifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SleekPanther%2F3-sat-certifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SleekPanther%2F3-sat-certifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SleekPanther","download_url":"https://codeload.github.com/SleekPanther/3-sat-certifier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241955039,"owners_count":20048405,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3-sat","3-satisfiability","3sat","certificate","certifier-algorithm","circuit-satisfiability","clause","cnf","compound-boolean","computational-instability","conjunctive-normal-form","exp","literals","negation","np","np-complete","np-hard","p","sat","satisfiability"],"created_at":"2024-11-15T05:43:01.526Z","updated_at":"2025-10-12T03:43:26.364Z","avatar_url":"https://github.com/SleekPanther.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 3-SAT Certifier (3 Satisfiability Problem)\nA certifier algorithm for the NP-Complete 3-Satisfiability Problem\n\n## Problem Statement\n**Given a Conjunctive Normal Form formula, is there a satisfying truth assignment so that it evaluates to true?**  \n![](images/cnf.png)  \n- Each clause must have the same number of literals (literals are X\u003csub\u003e1\u003c/sub\u003e, X\u003csub\u003e2\u003c/sub\u003e, X\u003csub\u003e3\u003c/sub\u003e, etc.)  \nThis is the 3-SAT problem so each clause has **exactly 3 literals**  \n**But the code is generic enough to work on ANY NUMBER OF LITERALS in a clause (given that each clause has the same number)**\n- The literals in a clauses can have their value flipped using **NOT, boolean negation**\n- In each clause, literals (or their negation) are combined with **compound boolean OR**\n- All clauses are combined with **compound boolean AND**\n- The final result of the CNF is either `1` or `0` (`true` or `false`)\n- **The 3-SAT problem asks if this result for all clauses is `true`**\n\n## Certifier Algorithm\nThis 3-SAT problem is NP-Complete, this not a solution to the problem\n**Instead, given a certificate of truth assignments, does the CNF evaluate to true?**  \n\n## Code Details\n- Literals must be **\"X\u003csub\u003ei\u003c/sub\u003e\" where i is an integer** \n- Input for the CNF formula is a String with **\"AND\"** and **\"OR\"** spelled out\n- String parsing is **case-INsensitive**\n- Input for certificates a `String` array. Each one in the form:\n  - `(x1=1, x2=1, x3=0, x4=1)`\n\n## Sample Certificates\nThe program parses the following strings to check if they're valid certificates to the CNF  \n`(NOT x1 OR X2 OR x3) AND (x1 OR NOT x2 OR x3) AND (x1 OR x2 OR x4) AND (NOT x1 OR NOT x3 OR NOT x4)`\n1. `(x1=1, x2=1, x3=0, x4=1)` **valid**\n2. `(x1=1, x2=1, x3=1, x4=1)` **INVALID**\n3. `(x1=0, x2=0, x3=0, x4=1)` **valid**\n4. `(x1=0, x2=1, x3=0, x4=1)` **INVALID**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsleekpanther%2F3-sat-certifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsleekpanther%2F3-sat-certifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsleekpanther%2F3-sat-certifier/lists"}