[D66] DFA: Deterministic State Machine 'AZTEKEN'

René Oudeweg roudeweg at gmail.com
Tue Jul 4 05:43:00 CEST 2023


L.S.

Heb een Deterministic Finite Automaton (DFA) geschreven in python, met 
hulp van onze vriend ChatGPT. De State Machine heeft de naam 'AZTEKEN'. 
Je zou het kunnen loslaten op een willekeurige binaire file en kijken 
wat voor DADA (bijv. PAPAMAMA roffels) onzin eruit komt...

TODO: Een fork van deze statemachine die de transitie C->D->M->X (CDMX) 
kent en 'hex symbols' als input accepteert.

R.O.


https://github.com/juggao/dfa


Dit is de output van
['0', '0', '0', '0', '0','0', '0', '0', '0', '0','0', '0', '0', '0', 
'0','0', '0', '0', '0', '0','0', '0', '0', '0', '0','0']


[reinold at fedora strings68]$  cd /home/reinold/strings68 ; /usr/bin/env 
/bin/python 
/home/reinold/.vscode/extensions/ms-python.python-2023.10.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher 
35563 -- /home/reinold/test/dfa.py
Transition from D --> E with symbol:  0
Transition from E --> F with symbol:  0
Transition from F --> G with symbol:  0
Transition from G --> H with symbol:  0
Transition from H --> I with symbol:  0
Transition from I --> J with symbol:  0
Transition from J --> K with symbol:  0
Transition from K --> L with symbol:  0
Transition from L --> M with symbol:  0
Transition from M --> N with symbol:  0
Transition from N --> O with symbol:  0
Transition from O --> P with symbol:  0
Transition from P --> Q with symbol:  0
Transition from Q --> R with symbol:  0
Transition from R --> S with symbol:  0
Transition from S --> T with symbol:  0
Transition from T --> U with symbol:  0
Transition from U --> V with symbol:  0
Transition from V --> W with symbol:  0
Transition from W --> X with symbol:  0
Transition from X --> Y with symbol:  0
Transition from Y --> Z with symbol:  0
Transition from Z --> A with symbol:  0
Transition from A --> B with symbol:  0
Transition from B --> C with symbol:  0
Transition from C --> D with symbol:  0
Input Accepted
[reinold at fedora strings68]$


Ref:

https://en.wikipedia.org/wiki/Deterministic_finite_automaton


More information about the D66 mailing list