#### Generating Random Automatons

Use the following command to generate a random deterministic finite automaton:

$ ./test -o `out_file` -i `random_seed` [ -C `VAL` ] `num_in_sig` `num_out_sig` `num_states`

This command creates a file `out_file` containing the description of a deterministic finite automaton produced using seed `random_seed`.
The automaton has specified numbers of input signals, output signals, and states.
If a random seed not specified, the program uses a standard fixed random seed.
The first output signal has spur increment 1, and all other output signals have spur increment 0.

If the program receives the option `-C ``VAL`, and `VAL` is not 0, the automaton has its state graph connected.
If `VAL` is positive, the automaton has not more than `VAL` cycles in the graph.
In this case, the program finds the best cycle in the graph.
Continuous repeating the best cycle supplies the maximum amount of spur to the system.
If `VAL` is relatively small, the program may not generate the automaton at one push.
If an attempt to generate the automaton fails, the program prints a warning message and makes another attempt.
If `VAL` is relatively large, an attempt to generate the automaton may take a long time, so the impression can be that the program has hung.

The special option argument `VAL`=‘`c`’ makes the program provide state graph connectivity and find the best cycle in the graph using an algorithm analogous to Viterbi one.
The special option argument `VAL`=‘`cs`’ makes the program provide state graph connectivity, simplify the state graph by a method also used when `VAL` is positive, and find the best cycle in the graph by an algorithm analogous to Viterbi one.

The program writes a random seed value to comment lines before the first empty line in `out_file`.
If the option `-C ``VAL` has a non-zero `VAL`, the program also writes to those comment lines information on the best cycle in the state graph:

- – best cycle length as the number of cycle steps;
- – an increment in spur the system receives on repeating the best cycle;
- – average spur increment per step of the best cycle;
- – a list of steps of the best cycle;
a description of each step contains a step index
`stp`, an automaton state index `stt`, an input signal `inp` received when the automaton was in this state, an output signal `out` emitted, and a spur increment `spr` corresponding to the output signal.