{'fraction_non_alphanumeric': 0.024595410075889182, 'fraction_numerical': 0.0056688305751120055, 'mean_word_length': 4.436381709741551, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
The Visualization of the Road Coloring Algorithm in the package TESTAS

A synchronizing word of a deterministic automaton is a word in the alphabet of colors of its edges that maps the automaton to a single state. A coloring of edges of a directed graph is synchronizing if the coloring turns the graph into a deterministic finite automaton possessing a synchronizing word. The road coloring problem is the problem of synchronizing coloring of a directed finite strongly connected graph with constant outdegree of all its vertices if the greatest common divisor of the lengths of all its cycles is one. A polynomial time algorithm of the road coloring has been based on recent positive solution of this old famous problem. One can use our new visualization program for demonstration of the algorithm as well as for visualization of the transition graph of any finite automaton. The visual image presents some structure properties of the transition graph. This help tool is linear in the size of the automaton.


Introduction
Visualization has become essential in many application areas. The finite graphs and automata undoubtedly belong to such areas. A problem of a visual image of a directed finite graph has appeared in the study of the road coloring conjecture.
The road coloring conjecture [2], [1], [11] was stated about forty yeas ago for a complete strongly connected directed finite graph with constant outdegree of all its vertices where the greatest common divisor (gcd) of lengths of all its cycles is one. The edges of the graph being unlabelled, the task is to find a labelling turns the graph into a deterministic finite automaton possessing a synchronizing word.
The problem was belonged to the most fascinating problems in the theory of finite automata [12], [4] and was mentioned in the popular Internet Encyclopedia "Wikipedia" on the list of most interesting unsolved problems in mathematics. The solution of the road coloring problem [17], [18] is a basis of a polynomial time implemented algorithm of O(n 3 ) complexity in the most worst case.
The realization of the considered algorithm is demonstrated by a high-speed visualization program. Without doubt, the visibility of inner structure of a digraph is a matter of interest not only for road coloring, the range of the application may be significantly wider.
Crucial role in the visualization plays for us the correspondence of the layout to the human intuition, the perception of the structure properties of the graph and the rapidity of the appearance of the image. We use for this aim some known approaches [14], [19] together with some new productive ideas. The algorithm of the visualization is linear in the size of the automaton.
The visualization of the transition graph of the automaton is a help tool of the study of the automata. Thus the linearity of the algorithm is comfortably and important. Both the road coloring algorithm and the visualization algorithm are implemented in the package TESTAS (www.cs.biu.ac.il/∼trakht/syn.html).

Graphs, automata and visualization
As usual, we regard a directed graph with colors assigned to its edges as a finite automaton, whose input alphabet consists of these colors. The graph is called transition graph of the automaton.
An automaton is deterministic if no state has two outgoing edges of the same color. In complete automaton each state has outgoing edges of any color.
If there exists a path in an automaton from the state p to the state q and the edges of the path are consecutively labeled by σ 1 , ..., σ k ∈ Σ, then for s = σ 1 ...σ k ∈ Σ + let us write q = ps.
Let |P | denote the size of the subset P of states from an automaton (of vertices from a graph).
Let P s be the set of states ps for p ∈ P s ∈ Σ + . For the transition graph Γ of an automaton let Γ s denote the map of the set of states of the automaton.
A word s ∈ Σ + is called a k-synchronizing word of the automaton with transition graph Γ if both |Γ s| = k and for all words t ∈ Σ * holds |Γ t| ≥ k.
A coloring of a directed finite graph is k-synchronizing if the coloring turns the graph into a deterministic finite automaton possessing a k-synchronizing word and the value of k is minimal.
A pair of distinct states p, q of an automaton (of vertices of the transition graph) will be called synchronizing if ps = qs for some s ∈ Σ + .
A synchronizing pair of states p, q of an automaton is called stable if for every word u the pair pu, qu is also synchronizing [4], [?].
We call the set of all outgoing edges of a vertex a bunch if all these edges are incoming edges of only one vertex.
Imagine a map with roads which are colored in such a way that a fixed sequence of colors, called a synchronizing sequence, leads to a fixed place whatever be the starting point. Finding such a coloring is called road coloring problem. The roads of the map are considered as edges of a directed graph. The visual presentation of a road coloring algorithm is essentially based on the paths of the graph. The paths must be visible as well as cycles, bunches and other structure components of the graph. In particular, the notion of the bunch according to the following lemma plays some role in the road coloring algorithm.
Lemma 1 [18] If some vertex of graph Γ has two incoming bunches then there exists a stable pair by any coloring.
The role of the length of a path is also important.
Lemma 2 [18] Let any vertex of the graph Γ have no two incoming bunches. Then a subgraph of Γ of some color has maximal subtree.
The road coloring problem was stated for a strongly connected directed finite graph [2] because of the key role of the strongly connected components (SCC) of the graph for the problem. Therefore the visual image of SCC is highly important.

Visualization algorithm
Visualization has become an integral part in a wide array of application areas, and papers are solicited both for original visualization research and for the application of visualization towards the understanding of domain-specific data.
A crucial role in the visualization plays for us the correspondence of the layout to the human intuition, the perception of the structure properties of the graph and the rapidity of the appearance of the image. The graphical image created by computer must resemble the last one of a human being. The considered visualization is a help tool for any program dealing with transition graph of DF A and in particular for the road coloring algorithm.
Our main objective is the visual representation of the transition graph of a deterministic finite automaton on base of structure properties of the graph. Any deterministic finite automaton is accepted by the algorithm.
Among the important visual properties of a graph one can mention paths, cycles, strongly connected components, cliques, bunches etc. These important properties reflect the inner structure of the digraph. The special significance plays here the strongly connected components (SCC). Thus our first step is the eduction and selection of the SCC. We choose for placing of SCC a cycle approach [14], [19]. According to approach the vertices are placed at the periphery of a circle. Our modification of the approach considered two levels of circles, the first level consists of strongly connected components, the second level corresponds to the whole graph with SCC at the periphery of the circle. The visual placement is based on the structure of the graph considered as a union of the set of strongly connected components.
It is clear the curve edges (used, for instance, in the package GraphViz [7], [13]) hinder to recognize the cycles and paths Thus we use therefore only direct and desirably short edges. We have changed some priorities of the layout and, in particular, eliminate the goal of reducing the number of intersection of the edges as it was an important aim in some algorithms [15], [13]. The intersections of the edges are even not considered in our algorithm. Our main intent is only that the intersections not to stir to imagine the structure of the graph. In our algorithm the intersections are placed far from the vertices because of the circular approach [19], [14] we use. The area of vertices differs of the area of the majority of intersections.
The problem of the placing of the labels near corresponding edges is sometimes very complicated and frequently the connection between edge and its label is not clear. Our solution is to use colors on the edges instead of labels and exclude the placing of labels.
The quick linear algorithm for finding SCC [3] is implemented in the program. The vertices of every SCC belong to a cycle in the graph layout. So strongly connected components can be easily recognized by observer. All SCC are placed on the periphery of a big circle. So the pictorial diagram demonstrates the structure of the graph and the visualization can be considered as a kind of structure visualization.
The periphery of a circle of SCC is the most desirable area for placing the edges because the edges in this case are short. We choose the order of the vertices of the SCC on the circle according to this purpose. The length of some edges can be reduced in a such way. It also helps an observer to recognize paths and cycles on the screen.
The linearity of the algorithm ensures the momentary appearance of the layout. It is favorably also for educational purposes because the road coloring conjecture can be stated in simple terms and initial explorations can be done immediately. It can be understood by any student with a little experience in the graph theory. "The Road Coloring Conjecture makes a nice supplement to any discrete mathematics course" [9].
The complexity of the algorithm describes the following Proof. The algorithm for finding strongly connected components (SCC) of the graph is linear in the sum of states and edges [3]. One can find in a linear time the order of vertices on a SCC circle for to place just a little more edges on the periphery of the circle. The step for finding on the big circle of the graph the places for all SCC together with radius of the big circle is linear in the number of SCC. The placing of direct edge is defined only by its borders and does not change the complexity. The program uses only linear arrays. if there is more than one loop 19 define shifts for the placing of loops 20 end do 21 return image An example of the visualization is presented in the appendix below.
There are known some automata with the maximal length of minimal synchronizing word for n-state automaton found byČerny [5]: 1)the infinite sequence ofČerny, 2)eight single automata (see [8], [10], [16], [6]). These graphs are extremal in some sense and it explains our choice. The visualization program demonstrates these remarkable set of eight automata together with one automaton of size eight from theČerny sequence. The input of the program was a table of size 40X3 (Cayley graph of the set).