{"id":18081182,"url":"https://github.com/thundergolfer/sudkamp-langs-machines-python","last_synced_at":"2025-10-19T18:19:00.001Z","repository":{"id":73463575,"uuid":"62432750","full_name":"thundergolfer/sudkamp-langs-machines-python","owner":"thundergolfer","description":"Algorithms from Sudkamps' Languages and Machines - implemented in Python 3","archived":false,"fork":false,"pushed_at":"2017-05-22T09:22:07.000Z","size":1519,"stargazers_count":8,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-14T03:26:05.021Z","etag":null,"topics":["algorithm","computer-science","computer-science-algorithms","textbook"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thundergolfer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2016-07-02T03:47:32.000Z","updated_at":"2024-02-05T02:07:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"484a68ca-0673-4036-8898-9c98cc7866eb","html_url":"https://github.com/thundergolfer/sudkamp-langs-machines-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thundergolfer/sudkamp-langs-machines-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thundergolfer%2Fsudkamp-langs-machines-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thundergolfer%2Fsudkamp-langs-machines-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thundergolfer%2Fsudkamp-langs-machines-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thundergolfer%2Fsudkamp-langs-machines-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thundergolfer","download_url":"https://codeload.github.com/thundergolfer/sudkamp-langs-machines-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thundergolfer%2Fsudkamp-langs-machines-python/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267962058,"owners_count":24172559,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["algorithm","computer-science","computer-science-algorithms","textbook"],"created_at":"2024-10-31T13:13:23.294Z","updated_at":"2025-10-19T18:18:54.980Z","avatar_url":"https://github.com/thundergolfer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/repo_header_python.png\"\u003e\n\u003c/p\u003e\n\n# Sudkamp Languages And Machines - Python 3\n\nAll the algorithms from Sudkamp's [Languages and Machines](http://www.amazon.com/Languages-Machines-Introduction-Computer-Science/dp/0321322215) implemented in *Python 3*.\n\n**Note:** If you prefer *Java*, the same work is being done in that language over in [thundergolfer/sudkamp-langs-machines-java](https://github.com/thundergolfer/sudkamp-langs-machines-java).\n\n## Contributing\n\nYou are welcome to fork this repo in order to complete unimplemented algorithms or to improve on the existing ones. Please try to stick as close to the pseudo-code from the book.\n\n### Index of Algorithms\n\n| **Page** | **Number** | **Name (in 3\u003csup\u003erd\u003c/sup\u003e edition)** | **Name (in repository)** | **File**   |\n|:----------|:-----------|:-------------------------------------|:-------------------------|:-----------|\n| 108       | 4.2.1      | Construction of Set of Nullable Vars | constructSetOfNullableVars()                          |    [contextFree.py](/sudkampPython/grammars/contextFree.py)    |\n| 114\t      | 4.3.1      | Construction of the Set CHAIN(A)     | chain(A) | [contextFree.py](/sudkampPython/grammars/contextFree.py) |\n| 117       | 4.4.2      | Constr. of Set of Vars that Derive Terminal Strings | getVariablesThatDeriveTerminalStrings() | [contextFree.py](/sudkampPython/grammars/contextFree.py) |\n| 119       | 4.4.4      | Contruction of Set of Reachable Vars. | constructSetOfReachableVars() | [contextFree.py](/sudkampPython/grammars/contextFree.py)] |\n| 126       | 4.6.1      | CYK Algorithm | CYK() | [cyk.py](/sudkampPython/cyk.py) |\n| 172       | 5.6.3      | Contruction of DM, a DFA Equiv. to NFA M | | |\n| 179       | 5.7.2      | Determination of Equivalent States of DFA | determineEquivelantStatesOfDFA() | [finiteAutomaton.py](/sudkampPython/finiteAutomaton.py) |\n| 194       | 6.2.2      | Construction of a Regular Expression from a Finite Automaton | | |\n| 543       | 17.4.3     | Recursive Simulation of NonDeterministic Turing Machine | | |\n| 558       | 18.2.1     | Breadth-First Top-Down Parser | | |\n| 564       | 18.4.1     | Breadth-First Bottom-Up Parser |  | |\n| 581       | 19.4.1     | Construction of FIRST\u003csub\u003ek\u003c/sup\u003e Sets | | |\n| 583       | 19.5.1     | Construction of FOLLOW\u003csub\u003ek\u003c/sup\u003e Sets | | |\n| 588       | 19.7.1     | Deterministic Parser for a Strong LL(k) Grammar | | |\n| 591       | 19.8.3     | Deterministic Parser for an LL(k) Grammar | | |\n| 600       | 20.2.1     | Parser for an LR(0) Grammar | | |\n| 604       | 20.3.3     | Parser Utilizing the Deterministic LR(0) Machine | | |\n| 618       | 20.5.4     | Parser for an LR(1) Grammar |  | |\n\n\n### Index Of Related Algorithms Not Provided In The Textbook\n\n| **Name**                      | **Name (In Repository)**        | **File**         |\n|:-------------------------------|:---------------------------------|:---------------|\n|  Calculate null closure of finite automaton | nullClosure() | [finiteAutomaton.py](sudkampPython/finiteAutomaton.py)                |\n|                                |                                  |                |\n\n### Credits\n\n* Credit to [tyarkoni](https://github.com/tyarkoni) for his [work on finite state machines](https://github.com/tyarkoni/transitions) that formed the foundation for my work in that area.\n\n* Credit to [Sebastian Sardina](https://sites.google.com/site/ssardina/) for being an awesome *Computing Theory* teacher.\n\n## License\n\n[![CC0](http://i.creativecommons.org/p/zero/1.0/88x31.png)](http://creativecommons.org/publicdomain/zero/1.0/)\n\nTo the extent possible under law, [Thundergolfer](http://www.jonathonbelotti.com) has waived all copyright and related or neighboring rights to this work.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthundergolfer%2Fsudkamp-langs-machines-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthundergolfer%2Fsudkamp-langs-machines-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthundergolfer%2Fsudkamp-langs-machines-python/lists"}