Description
Partition declared states into states with a path to acceptance and dead states without such a path.
A deterministic transition maps a state and one literal alphabet symbol to at most one next state. A partial table may leave some pairs undefined; a complete table defines every state/symbol pair. Tracing one word, exploring all graph paths and changing the accepting set are distinct operations. IDs and symbols use exact string identity.
Partition declared states into states with a path to acceptance and dead states without such a path.
When to use this tool
Use the dead-state partition to distinguish states with any path to acceptance from those without one.
How to use the tool and how it works
- Enter transitionsJson, states, alphabet, accepting using the definitions below. Serialize JSON text fields in the decoded shape shown below.
- Run the operation. Resolve input-format errors before interpreting an output.
- Read result.coaccessible, result.dead, using the stated boundary, ordering, sign and absence conventions.
Validate the deterministic partial table and accepting-state membership. Traverse transitions in reverse from the accepting states to find coaccessible states, then report all other declared states as dead.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| transitionsJson | JSON array of {from,symbol,to} literal string records, preserving transition indexes. Determinism is checked or audited as described above. | Text, at most 8,192 UTF-16 code units; narrower grammar/range rules also apply. |
| states | Distinct literal declared state IDs in bank order; full automaton operations require at least one. | Dense list of at most 128 literal strings, each at most 8,192 UTF-16 units. |
| alphabet | Distinct literal alphabet symbols in bank order; an empty alphabet is allowed. | Dense list of at most 128 literal strings, each at most 8,192 UTF-16 units. |
| accepting | Explicit literal accepting-state IDs; full automaton operations require membership in states. | Dense list of at most 128 literal strings, each at most 8,192 UTF-16 units. |
These decoded structures show the examples inside JSON text fields. Supply their serialized JSON strings as input.
{
"transitionsJson": [
{
"from": "a",
"symbol": "x",
"to": "b"
},
{
"from": "b",
"symbol": "x",
"to": "b"
}
]
} | Output field | Interpretation |
|---|---|
| result | Object containing the fields below. |
| result.coaccessible | States with a graph path to an accepting state, in reverse breadth-first discovery order. |
| result.dead | Declared states with no graph path to acceptance, in bank order. |
{
"input": {
"transitionsJson": "[{\"from\": \"a\", \"symbol\": \"x\", \"to\": \"b\"}, {\"from\": \"b\", \"symbol\": \"x\", \"to\": \"b\"}]",
"states": [
"a",
"b",
"c"
],
"alphabet": [
"x"
],
"accepting": [
"b"
]
},
"output": {
"result": {
"coaccessible": [
"b",
"a"
],
"dead": [
"c"
]
}
}
} Limitations and assumptions
- Dead means no graph path to a supplied accepting state. Coaccessible states follow reverse breadth-first discovery; dead states retain declared bank order. This is not a minimal-state partition.
- Transition JSON is an array of {from,symbol,to} string records. Tools requiring a declared automaton use a nonempty distinct state bank and distinct alphabet, validate endpoints and symbols, and reject duplicate [from,symbol] keys. Trace-only tools validate keys without inferring a declared universe. No normalization or implicit sink is provided.
- Every declared outer field is required and unknown outer fields are rejected. Strings and JSON text have size limits, lists are bounded to 128 entries, and JSON nesting/node counts are bounded. Tighter operation-specific bounds stated above take precedence.
- Numeric outputs must remain finite and within safe-integer magnitude. Original record indexes and cell coordinates are zero-based; stated half-open ranges exclude their end.
Alternative or Complementary methods
Use endpoint and duplicate-key audits before transformations. Check completeness before complementing an accepting set, and preserve the declared alphabet, start-state convention and acceptance policy with exported tables.
References
Similar or alternative tools
- DFA Coaccessible State Inventory
List automaton states with a graph path to a supplied accepting state.
- DFA Unreachable State Partitioner
Partition declared automaton states into states reachable from start and the remaining unreachable states.