Class TuringMachine<S,T>
java.lang.Object
org.episteme.core.mathematics.discrete.TuringMachine<S,T>
Turing Machine (TM).
A TM is defined by M = (Q, Γ, b, Σ, δ, q₀, F) where:
- Q is a finite set of states
- Γ is the tape alphabet
- b ∈ Γ is the blank symbol
- Σ ⊆Γ \ {b} is the input alphabet
- δ: Q × Γ → Q × Γ × {L, R} is the transition function
- q₀ ∈ Q is the initial state
- F ⊆Q is the set of accepting states
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumclass -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
TuringMachine
-
-
Method Details
-
addState
-
addTransition
public void addTransition(S fromState, T readSymbol, S toState, T writeSymbol, TuringMachine.Direction move) -
run
Simulates the Turing Machine on the given input. Warning: May not terminate (halting problem).- Parameters:
input- initial tape contentmaxSteps- maximum steps to prevent infinite loops- Returns:
- true if accepted, false if rejected or max steps reached
-