Editing
Automata Theory
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== <span style="color: #FFFFFF;">Applying</span> == '''Modeling 'The Vending Machine' (A simple Finite State Automaton):''' <syntaxhighlight lang="python"> class VendingMachine: def __init__(self): self.state = "IDLE" self.balance = 0 def insert_coin(self, amount): self.balance += amount if self.balance >= 100: self.state = "READY" print("State: READY to dispense.") else: print(f"State: WAITING. Balance: {self.balance}") def push_button(self): if self.state == "READY": print("ACTION: DISPENSING SODA.") self.balance = 0 self.state = "IDLE" else: print("ACTION: NOTHING. Insert more coins.") # Run the Automaton vm = VendingMachine() vm.insert_coin(50) vm.push_button() vm.insert_coin(50) vm.push_button() </syntaxhighlight> ; Automata Landmarks : '''The 'Turing-Church' Thesis''' β The hypothesis that "Everything we call 'Calculation' is just a Turing Machine." If this is true, "Human Thinking" might just be a very complex Automaton. : '''Regular Expressions (Regex)''' β The tool used by every programmer to "Find patterns" in text. Regex is the practical application of "Finite Automata." : '''Compilers''' β The software that "Translates" C++ or Python into machine code. It uses the "Chomsky Hierarchy" to "Parse" your code. : '''Cellular Automata (Conwayβs Game of Life)''' β A "Grid" of cells that follow "Simple rules" (e.g., 'If you have 3 neighbors, stay alive'). It proved that "Complex Life-like Patterns" can emerge from "Dead Logic." </div> <div style="background-color: #8B4500; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;">
Summary:
Please note that all contributions to BloomWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BloomWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information