Problem H
Deterministic Finite Automata - Kleene Star
You are given a deterministic finite automaton that accepts
the language
Input
The input contains the description of a deterministic finite automaton.
The first line contains four positive integers
Each state is an integer between
Output
Output any deterministic finite automaton representing the
Kleene star of the input automata. Your output is subject to
the same format and restrictions as the input, except it may be
larger, allowing
You may assume that there exists a non-deterministic finite
automata accepting
Sample Input 1 | Sample Output 1 |
---|---|
3 2 1 1 ab 2 2 3 3 2 3 3 |
3 2 2 2 ab 2 3 1 1 3 1 3 3 |
Sample Input 2 | Sample Output 2 |
---|---|
1 4 1 1 acgt 1 1 1 1 1 |
1 4 1 1 acgt 1 1 1 1 1 |