|
Automata
1.0
|
A nondeterministic Turing machine More...
Public Types | |
| enum | Direction { Direction.L, Direction.R, Direction.S } |
| The direction to move the tape More... | |
Public Member Functions | |
| TuringMachine (States q, Alphabet a, TapeAlphabet g, TuringTransitionFunction tf, State q0) | |
| bool | Run (IEnumerable< char > x, out char[] o) |
| Run the machine More... | |
| bool | Run (IEnumerable< char > x) |
| bool | Run (string x, out char[] o) |
| bool | Run (string x) |
Static Public Member Functions | |
| static string | BinEncode (int x) |
| static string | BinEncode (char x) |
| static string | BinEncode (char[] x) |
| static string | BinEncode (string x) |
| static string | UnaryEncode (uint n) |
| static string | BinEncode (TuringMachine t, char[] x=null) |
| Encode a turing machine More... | |
| static string | BinEncode (TuringTransition t, States s) |
| Encode a turing machine move More... | |
Static Public Attributes | |
| static new readonly AcceptingStates | AcceptingStates = new AcceptingStates(State.Ha) |
Protected Member Functions | |
| int | MoveTapeHead (int i, Direction d) |
Properties | |
| TapeAlphabet | TapeAlphabet [get, protected set] |
| The tape alphabet. More... | |
| new TuringTransitionFunction | Transitions [get] |
Properties inherited from System.Automata.Automaton | |
| States | States [get, protected set] |
| The set of states. More... | |
| AcceptingStates | AcceptingStates [get, protected set] |
| The set of accepting states. More... | |
| Alphabet | Alphabet [get, protected set] |
| The machine's alphabet. More... | |
| State | InitialState [get, protected set] |
| The initial state. More... | |
| TransitionFunction | Transitions [get, protected set] |
| The state transition mappings More... | |
A nondeterministic Turing machine
|
strong |
|
static |
| x | The number to encode |
32-bits with two's complement for negatives, without leading 0s
|
static |
| x | The character to encode |
|
static |
| x | The string to encode |
|
static |
| x | The string to encode |
|
static |
Encode a turing machine
| t | The turing machine to encode |
| x | The input to encode |
See BinEncode(TuringTransition) and BinEncode(char[]) for specific encodings.
|
static |
Encode a turing machine move
| t | The transition |
| s | The set of states |
| ArgumentException | If a state referenced is not contained in s |
| bool System.Automata.TuringMachine.Run | ( | IEnumerable< char > | x, |
| out char [] | o | ||
| ) |
Run the machine
| x | The input to run the machine on. |
| o | The completed tape contents |
The first move the machine makes is to fill the tape with the blank symbol followed by the input.
|
static |
| n | The number to encode |
|
getprotected set |
The tape alphabet.
1.8.14