Version: 4 (current) | Updated: 11/12/2025, 10:32:50 PM
Added description
Each script is accompanied by inline comments and documentation strings that explain the theoretical background and usage instructions. No additional ancillary files (e.g., test cases, datasets) are present.
@automata_theory_code_collection:document {title: "Automata Theory Code Collection", created: @date_2023, language: "en", subjects: ["Automata Theory","Finite Automata","NFA","DFA","Turing Machines","Computational Theory"]}
@file_pinax:document {type: "Metadata (PINAX)", creator: "Unknown", institution: "test", refers_to: @automata_theory_code_collection}
@file_nfa_check_py:document {language: "Python", defines: [@nfa_accepts:function, @nfa:concept], tests: @nfa_test_strings:document}
@file_nfa_check_py -> defines -> @nfa_accepts:function
@file_nfa_check_py -> defines -> @nfa:concept
@nfa_accepts:function {description: "Checks whether an input string is accepted by a given NFA"}
@nfa:concept {type: "non-deterministic finite automaton"}
@nfa_test_strings:document {example_strings: ["", "0", "1", "000", "111", "0101", "0011", "1100", "1010", "1110", "0110", "010", "0010", "00010", "1000", "1100", "10000", "10100", "10010", "00", "11", "10", "100", "111", "1000", "011", "110"]}
@file_nfa_to_dfa_py:document {language: "Python", defines: [@epsilon_closure:function, @get_transitions:function, @all_subsets:function, @nfa_to_dfa:function, @nfa:concept, @dfa:concept]}
@file_nfa_to_dfa_py -> defines -> @epsilon_closure:function
@file_nfa_to_dfa_py -> defines -> @get_transitions:function
@file_nfa_to_dfa_py -> defines -> @all_subsets:function
@file_nfa_to_dfa_py -> defines -> @nfa_to_dfa:function
@file_nfa_to_dfa_py -> defines -> @nfa:concept
@file_nfa_to_dfa_py -> defines -> @dfa:concept
@epsilon_closure:function {description: "Computes the ε‑closure of a set of NFA states"}
@get_transitions:function {description: "Returns the set of states reachable from a set of states on a given input symbol"}
@all_subsets:function {description: "Generates all subsets of a given set of states"}
@nfa_to_dfa:function {description: "Converts an NFA to an equivalent DFA using the subset construction method"}
@dfa:concept {type: "deterministic finite automaton"}
@file_dfa_check_py:document {language: "Python", defines: [@dfa_accepts:function, @dfa:concept], tests: @dfa_test_strings:document}
@file_dfa_check_py -> defines -> @dfa_accepts:function
@file_dfa_check_py -> defines -> @dfa:concept
@dfa_accepts:function {description: "Checks whether an input string is accepted by a given DFA"}
@dfa_test_strings:document {example_strings: ["", "1", "11", "101", "010", "110", "1001", "1111"]}
@file_dfa_dfa_prime_py:document {language: "Python", defines: [@DFA:class, @construct_D_prime:function, @dfa:concept]}
@file_dfa_dfa_prime_py -> defines -> @DFA:class
@file_dfa_dfa_prime_py -> defines -> @construct_D_prime:function
@file_dfa_dfa_prime_py -> defines -> @dfa:concept
@DFA:class {description: "Object‑oriented representation of a deterministic finite automaton"}
@construct_D_prime:function {description: "Constructs a new DFA D' whose accepting states are those that can reach an original accepting state"}
@file_turing_machine_py:document {language: "Python", defines: [@TuringMachine:class, @turing_machine:concept], tests: @turing_machine_test_tapes:document}
@file_turing_machine_py -> defines -> @TuringMachine:class
@file_turing_machine_py -> defines -> @turing_machine:concept
@TuringMachine:class {description: "Simulates a single‑tape Turing machine with configurable transition function"}
@turing_machine:concept {type: "single‑tape Turing machine"}
@turing_machine_test_tapes:document {generated_up_to_length: 10, count: 1023, sample_tapes: ["0B","1B","00B","01B","10B","11B"]}
@automata_theory_code_collection -> contains -> [@file_nfa_check_py, @file_nfa_to_dfa_py, @file_dfa_check_py, @file_dfa_dfa_prime_py, @file_turing_machine_py]{
"error": "Failed to fetch: Unexpected token 'd', \"def dfa_ac\"... is not valid JSON"
}{
"error": "Failed to fetch: Unexpected token 'c', \"class DFA:\"... is not valid JSON"
}{
"error": "Failed to fetch: Unexpected token 'd', \"def nfa_ac\"... is not valid JSON"
}{
"error": "Failed to fetch: Unexpected token 'r', \"from iterto\"... is not valid JSON"
}{
"error": "Failed to fetch: Unexpected token 'c', \"class Turi\"... is not valid JSON"
}No children (leaf entity)