Thesis
Thesis
Thesis
Finite automata are one of the most known topics of (theoretical) computer
science. Their presentations by their graphs are well known and widely used. In this
thesis, these representations will be analyzed from a graph theoretical point of view.
In this way, the work is also related to graph theory and combinatorics. The finite
automata are used to accept formal languages and the accepted language class may
directed, Directed cycle, Bidirected cycle, Starred, and Floral automata, and their
constructions were studied from a graphical point of view. The class of languages
accepted by these automata was also studied by regular expressions. While keeping
the initial state constant, we vary each state of the automata to be the final state, and
using the elimination method, we obtain the regular expression these automata
automata that pass through all states of the automata. Then, we studied the
varying the final state. Properties of these Hamiltonian-like words, such as length,
iii
TABLE OF CONTENTS
ÖZ ...............................................................................................................................
iv
ACKNOWLEDGMENT ............................................................................................. v
1 INTRODUCTION .................................................................................................... 1
2 PRELIMINARIES .................................................................................................... 4
3 METHODOLOGY ................................................................................................. 25
vi
3.2.4 Starred 40
3.2.5 Floral 43
4 ANALYSIS...................................................................................................................................47
5 CONCLUSION............................................................................................................................53
REFERENCES................................................................................................................................54
vii
LIST OF TABLES
viii
LIST OF FIGURES
ix
Figure 24: Two-state looped line direct automata................................................................29
Figure 26: Two-state automata from three states looped line direct automata............29
Figure 28: Three-state GTG of four states looped line direct automata.........................30
Figure 29: Two-state GTG of four states looped line direct automata...........................31
x
Figure 49: Two-petal floral automata with seven states.....................................................44
xi
LIST OF SYMBOLS AND ABBREVIATIONS
Σ, ∆ Alphabet
Automaton
Empty Word
Regular Expression
Set of Edges
& Set of Regular Expression
Set of Vertices
ℎ Star Height
Starting State
xii
SCA Strongly Connected Automata
Transition Function
Word
xiii
Chapter 1
INTRODUCTION
with discrete input and output in computer science, mathematics, and engineering.
digital circuits are described and verified using finite automata. When data are stored
in a particular structure, it is necessary that these data are connected to help reduce
the time and space complexity of traversing these structures, no other concept help
Even though a lot of work has been done on strongly connected automata,
only a few have focused on the family of languages these automata accept, and close
to no research on the relation between the family of languages and the structure of
strongly connected automata, we employ graph theory. Graph theory, which is the
finite automata, with both having related concepts such as nodes in a graph as states
the very few prominent researchers to have adopted the concept of graph theory to
automata in this manner. Using existing definitions in graph theory and formal
1
Moreover, researching strongly connected automata can aid in system
context, strongly connected automata are particularly helpful since they offer a
Algorithms such as searching and sorting on data structures like trees, binary
trees, heaps, stacks, or queues will perform better as the connectedness of the
structure increases. It is possible that we want to perform a task (or reach a state) but
the task depends on every other task in the system, hence the need to traverse the
whole system before performing this task (or accepting a word). This is known as
automata that pass through all states of the automata. We will then define some five
accepted by these automata, while varying the final state. We will investigate
properties of these Hamiltonian-like words, such as their length, Kleene stars, and
cycles. This will help us gain a deeper understanding of the behavior of these
important implications for the performance of these systems. By analyzing the length of
these words, we can identify areas where the system may be unnecessarily complex or
redundant and simplify the design of the automaton to improve its performance.
Similarly, by studying the cycles in these words, we can gain insights into the
2
connectivity of the automaton and identify critical states that are essential to its
performance.
3
Chapter 2
PRELIMINARIES
The length of a word denoted as | | is the number of letters in , having each letter counted as many times as it
occurs. The empty word has a length of zero,
| |=0.
A subword of a word is also a word over Σ such that = # $ where # and $ are also words over Σ
and maybe empty words. If # = or $ = then is also called a prefix of or suffix of , respectively. It is worth
noticing that a word and are subwords, prefixes, and suffixes of itself called trivial, while every other
subword, prefix, or suffix is nontrivial.
4
We define a language over alphabet Σ as a set of words over Σ, denoting the empty language as ∅, and the universal
∗
language as Σ , which is the language consisting of all words over Σ. The cardinality of language is denoted by | |.
Two languages #, $ ⊆ Σ
∗
can be concatenated as
#$={#$| #∈# $∈ $}.
)* +
The power of a language denoted , for a positive integer ≥ 0 can be defined as
"
(i) ={ }.
+
(ii) = +,# , for > 0.
'
(iii) = ⋃-(.# (, Kleene plus.
∗
(iv) = ⋃-(." (, star or Kleene closure of a language.
A singleton language contains only one word, which can be used to denote
∗ ∗
the language if confusion is not made. is equivalent to { } { }, for , ∈ Σ and ⊆ Σ .
∗ ∗ ∗
A mapping ℎ: Σ ⟶ ∆ of two finite alphabets Σ and ∆ is called a morphism if ℎ( ) = ℎ( )ℎ( ) for all , ∈ Σ .
2.2 Finite Automata
formal language theory: acceptors and generators. The acceptors are finite automata
5
2.2.1 Deterministic Finite Automata
Deterministic finite automata are finite automata whose next state is always
uniquely determined by the current state and the current input symbol. We define a
deterministic finite automaton (DFA) # as a quintuple ( , Σ, , , ), where
is the finite set of states;
Σ is the input alphabet;
: × Σ → Q is the state transition function;
∈ is the starting state; and
⊆ is the set of final states.
The transition function : × Σ → Q shows how the automata accepts an input at the current state to transition to the next state.
/ /
Let us consider as an example, a DFA # that reads strings of 0 and 1 only, i.e. Σ = {0, 1}, with set of states Q = { " , #, $ }, if the initial
state = ", and the set of final states = { $}, then, we define the transition function as ( ", 0) = #, ( " , 1) = ", ( #, 0) = #,
( #, 1) = $, ( $, 0) = #, and ( $, 1) = ". The transition function can also be represented as a table and diagram as shown in Table 1 and Figure 1
respectively.
" # "
# # $
$ # "
6
Figure 1: Transition diagram of a three states DFA
A word is accepted by a DFA if it starts from the initial state and terminates in one
of the final states. The automata # accepts binary words that end in ‘01’. # is also referred to
as a complete DFA because its transition function is defined for every pair × Σ, even though
it is not a requirement for a deterministic finite automaton in general.
∗ ∗
An Extended transition function : × Σ → Q reads a string rather than a single symbol as the second argument to
∗ ∗ ∗ ∗
transit from one state to another, inductively as follows. We set ( , ) = and ( , ) = ( ( , ), ), for ∈ , ∈ Σ, and ∈ Σ .
∗ ∗
The language accepted by #, ( #), is the set of all words accepted by # represented as { ∈ Σ | ( , ) = for some ∈ }. If 012
denotes the collection of all languages that some DFA accept, then there is a complete DFA that accepts each ∈ 012. Also, 012 is closed
under union, intersection, and complementation. (Rozenberg G., 1997)
7
3
: × Σ → 2 is the state transition function;
∈ is the starting state; and
⊆ is the set of final states.
The transition function is the only difference between the definition of DFA and
NFA where the NFA with a single input can transition to more than one state represented as
3
the power set of , 2 .
/ /
Let us consider as an example, an NFA $ that reads strings of 0 and 1 only, i.e. Σ = {0, 1}, with set of states Q = { ", #, $}, if the initial state =
",and the set of final states = { $}, then, we define the transition function as ( ", 0) = { " , # }, ( " , 1) = { "}, ( #, 0) = ∅, ( #, 1) = { $}, ( $, 0) = { "},
and
( $, 1) = { "}. The transition function can also be represented as a table and diagram as shown in Table 2 and Figure 2 respectively.
# ∅ {$}
$ {"} {"}
3
The equivalence of DFA and NFA is as a result of considering elements of 2 or the value of the NFA transition function to be
either singleton or empty set.
8
∗ ∗ 3
For NFA, an Extended transition function : × Σ → 2 reads a string rather
than a single symbol as the second argument to transit from one state to a set of
states, similar to what was defined for DFA.
The language accepted by NFA $, ( $), is the set of all strings which are accepted by the automata.
∗ ∗
( $) = { ∈Σ | ( , )∩ ≠ ∅}
Automata that accept the same language are said to be equivalent. The DFA # represented by Figure 1, and the NFA $ of
Figure 2 accepts exactly the same language. If the family of languages accepted by the NFA is 412 and for DFA 012 then 012 = 412.
(Rozenberg G., 1997)
NFA can be further generalized to have -transitions. These are state
transitions without reading any input symbols.
We define a nondeterministic finite automaton with -transitions ( -NFA) 5 as a quintuple ( , Σ, , , ) having
3
, Σ, , as the same as an NFA and the transition function as : × (Σ ∪ { }) → 2 .
/ /
Let us consider an example of -NFA 5 that reads strings of 0 and 1 just like $, i.e. Σ = {0, 1}, with a set of states Q = { " , #,
$},if the initial state = ", and the set of final states = { $}, then, we define the transition function as
( ", 0) = { ", #}, ( ", 1) = { "}, ( #, 0) = ∅, ( #, 1) = { $}, ( #, ) = { $}, ( $, 0) = ∅, ( $, ) = { "}, and ( $, 1) = ∅. The transition
function can also be represented as a table and diagram as shown in Table 3 and Figure 3 respectively.
9
Table 3: Transition table of a λ-NFA
\Σ 0 1
# ∅ { $} ∅
$ ∅ ∅ { "}
The above -NFA accepts the same family of language as # and $ but
generally uses fewer transitions and easier to construct for users and to implement as
the structure might get more complex.
The language accepted by -NFA 5, ( 5), is the set of all strings which are accepted by the automata.
∗ ∗
( 5) = { ∈Σ | ( , )∩ ≠ ∅}
2.3 Regular Expressions
different forms. A DFA can be implemented using a case or switch statement and a
matrix can be used to express an NFA and manipulate it using matching matrix
operations. However, users cannot easily specify finite automata in any of the
10
finite automaton. For example, the language accepted by DFA # can be expressed as (0+1)*01, and
such expressions are called regular expressions.
A regular expression over an alphabet ∑ and the language ( ) it denotes, can be
define as follows:
(i) For language ( ) = ∅, = 0.
(ii) For language ( ) = { }, = .
(iii) For ∈ Σ, if language ( ) = { } then = .
If # and $ are regular expressions and ( #) and ( $) are the languages they represent, respectively. Then
(iv) =( # + $) denotes the language ( ) = ( #) ∪ ( $).
(v) = ( # ∙ $) denotes the language ( ) = ( #) ( $).
(vi) = # denotes the language e ( #)f∗.
∗
We suppose that * has precedence over the ∙ and +, and that ∙ has precedence over +. When omitting a
pair of parentheses won't lead to confusion, it can be done. Also, when writing regular expressions, we typically
omit the ∙ symbol.
Two regular expressions # and $ over ∑ are said to be equivalent, # = $, if ( #) = ( $). The languages that are
denoted by regular expressions are called regular languages and denote the family of regular languages as 678. (Rozenberg G.,
1997)
The star operator is arguably the most important of the three regular expression
operators. Without the star operator, regular expressions can only define finite
languages. The number of nested stars in an expression, also known as the star height of
the expression, is a natural way to gauge how complex the expression is. One of the most
intriguing issues in formal language theory is the question of star height. Some
11
open issues continue to draw researchers. Here, we will provide the fundamental
definition.
The star height of a regular expression over the alphabet Σ, denoted ℎ( ), is
a nonnegative integer defined recursively as follows:
(1) ℎ( ) = 0, if = ∅, , or for ∈ Σ.
(2) ℎ( ) = maxeℎ( #), ℎ( $)f, if = ( # + $), if = ( # $), where # and $ are
regular expressions over Σ
(3) ℎ( ) = ℎ( #) + 1, if = #∗ and # is a regular expression over Σ.
The star height of a regular language , denoted ℎ( ), is the least integer such that ℎ( ) = for some regular expression denoting . (Rozenberg G., 1997)
define (Kleene, 1951). A regular expression can be converted into an equivalent finite
automaton using a variety of procedures, and vice versa. The transformations from a
Regular expression can be converted into FA using the subset method in three
basic steps (John E. Hopcroft, Rajeev Motwani, & Jeffrey D. Ullman, 2006, p. 102).
i. Construct -NFA transition diagram
12
Figure 4: Transition diagram for = 1
ii. When a regular expression is the concatenation of two letters, = 01 then
∗
Figure 7: Transition diagram for = (0 + 1)
As the name implies, the subset method starts by constructing -NFA for the
Two popular methods for converting finite automata to regular expressions are
Arden’s method (Sakarovitch, 2009) and state elimination method (John E. Hopcroft,
13
Rajeev Motwani, & Jeffrey D. Ullman, 2006, p. 98). The later will be discussed here
Using the state elimination method, finite automata are first reduced to
extended finite automata by eliminating one state that is neither the starting state nor
part of the final states . The basic idea of the process is as follows.
If and are two states in , let :; be the transition between the two states. If we are to eliminate a state ∈ such that ≠ and ∉ , we
/ / / / / / ∗
denote the resulting EFA as = ( , Σ, , , ) where = − { }. For each pair of states , ∈ of an EFA ( , )= :<+ :; ;; ;<
This process is repeated until we are left with only two states, the initial state and the
/
final state and ( , ) is the regular expression equivalence of the finite automata.
14
For example, we try to convert the finite automata # in figure 1.2.1 to a regular expression. The initial state " has self-
/
loop, so we add a new state and set it as the initial state, and also the final state $ has an outgoing transition, so we add
/
a new state and set it to the final state, as it is shown in Figure 8.
We choose to eliminate the state # first as the elimination can be done in no particular order, followed by " and finally $, as
15
∗
The resulting regular expression can be simplified as (1 + 0) 01. Note that state elimination
method can be used in converting DFA, NFA and -NFA to regular expression since they are all
∗
extended finite automata. Figure 12 shows a generic two-state automaton and the regular expression
that represent the language accepted by this automaton when ∈ { ", #} is given by ", # respectively.
∗
Figure 12: A generic two-state
∗ ∗
automata
" = ( ∗ " + a"a# b#)
#= b "a"( # + b#b∗"a")∗
Since Finite automata can either be of two types: Deterministic Finite Automata (DFA)
or Non-Deterministic Finite automata (NFA), and if = ( 0, Σ, 0 , ", 0 ) is the DFA that is
/
constructed from NFA = ( 4, Σ, 4, { " }, 4) using the subset construction, we say ( ) = ( ) and
a language is accepted by some DFA if and only if is accepted by some NFA (John E. Hopcroft,
Rajeev Motwani, & Jeffrey D. Ullman, 2006, p. 64). For every language that is defined by these
regular expressions there is an automaton, and for every language that is accepted by an
automaton there is also a regular expression (John E. Hopcroft, Rajeev Motwani,
& Jeffrey D. Ullman, 2006, p. 92). For this reason, we consider Deterministic finite
automata (DFA) in this thesis and often mean DFA when referring to Finite automata
in general.
16
2.4 Graphs
17
The above definition of a graph can be more specified as a graph that has no multiple
edges between two vertex or a self-loop of a vertex to itself, hence called a simple
graph.
direction, then the graph is undirected, else if a graph has an arrow at one or both
18
Figure 15 is an example of a directed graph ( , ) with vertices = { # , $, 5, =} and edges = { #, $, 5 , = }.
The properties of a graph discussed up to this point apply to both directed and undirected graphs.
For a directed graph, the indegree of a vertex is the number of edges incident to
the vertex with direction oriented towards the vertex, while the outdegree is the number
of edges incident to the vertex with the edge direction oriented away from the vertex.
Vertex 5 in Figure 15 has an indegree of one and also an outdegree of one.
The diameter of a graph is the length of the shortest path between the most distant vertices. If can
be represented as the union of two subgraphs #, $ (each having at least one edge) such that #, and $ have
only one vertex in common, then is a cut vertex. If a vertex of graph is contained in every cycle of , then is
called pancyclic vertex. (Ádám, 1973)
If is a subgraph of a graph , and contains all the vertices (but possibly not all the edges)
of , then is an e-subgraph of . The subgraph of is called a p-subgraph if the following condition is
satisfied: whenever vertex # and $ are contained in and the edge of is incident to # and $, then is
contained in too. (Ádám, 1970)
starts and ends with a vertex, with each vertex except the last vertex been incident with
the edge that comes after and with each vertex (except the first vertex) being incident
with the edge that came before. If a walk starts with vertex and ends with vertex it can be
denoted as a -walk. The number of edges in a walk determines its length. If the start and
last vertices of a walk are the same, it is closed; otherwise, it is open. A path is a walk
with distinct vertices, whereas a trail is a walk with distinct edges. A circuit is a trail that
19
once but the first vertex appears exactly twice (at the beginning and the end). A cycle
having vertices is known as an -cycle. If is even, the cycle is even; if is odd, then the
cycle is odd. A path is always a trail because if a walk’s vertices are all different,
then its edges must also be unique. The opposite is not true, a trail does not have to
be a path. The number of cycles an edge belongs to is denoted by ( ), and ( ) for
the number of cycles in which vertex occurs. (Ádám, 1970)
In a pseudograph, an Eulerian circuit or Eulerian cycle is a circuit that
includes every vertex and every edge of the graph in the circuit. In other words, it is a
trail that reaches each graph edge exactly once. A pseudograph with an Eulerian
circuit. A B C D E F G H F A is a circuit but not Eulerian even though it has all vertices,
four edges were left out of the circuit, while the vertices B, C, D, E, F, G, H, F, are
referred to as inner vertices of the circuit. On the other hand, the circuit A B C D E F G
any two vertices. An example of connected pseudograph is Figure 16 that has a path
that is connected but not Eulerian, as vertex only has one edge incident to it. Any
20
circuit that uses the edge is trapped and can not continue without reusing the edge
again.
degree of the vertices also matters, as Figure 17 traps any circuit at vertex because it
has a degree of one. Every time we encounter a vertex (other than the one from
return, never crossing that loop again, or we leave on an edge different from the edge
by which we entered, crossing neither edge again. Therefore, it is possible to pair any
edge that is incident to a vertex in respect to the circuit flow, the edge that enters the
vertex and the edge that leaves, and also we can pair the edge that leaves our circuit
first vertex and the edge that enters the circuit last vertex. So, in addition to being
contrast, a connected graph with even degree vertices must be Eulerian. We can now
look at the connected graph in Figure 16 which has only even degree vertices, but the
A Hamiltonian cycle in a graph is a cycle that contains every vertex of the graph
and it visits every vertex exactly once except for maybe the first and last vertex.
21
A Hamiltonian graph is one with a Hamiltonian cycle and it is synonymous to
Obviously, Strongly connected automata cannot have a trap state, as every state must
have an outgoing degree greater than one. Strongly connected automata has wide
22
variety of application especially in theoretical computing such as strongly connected
(Volkov, 2008).
In this subsection, we show the new concepts we use in our study. We use
strongly connected automata of the form e , Σ, , ", @f where the set of final states
has only one state @.
The distance ∈ ℤ' ∪ {0} of the strongly connected automaton , is defined as the length of the shortest word ∈ Σ∗ from " to @ such that ∗( ", ) = @ (this
word represents a walk from the graph theoretical point of view). We are interested
in defining the distance of finite automata because every strongly connected
automaton accepts a base word with a length equal to the distance we just defined.
We define Hamiltonian-like word % of a strongly connected automata as
the word accepted by automaton = e , Σ, , , f that the walk represented by this
" @
Figure 19.
23
The distance of (a), (b), (c) varies as we change the final states, and the graph of for when is { 5} or { =}
is similar to (c). According to our definition of distance, the distance for (a), (b), (c) is 0,1 and 2 respectively.
The reason for defining Hamiltonian-like word is because the shortest word accepted
by some strongly connected automata might not pass through all states as seen in Figure
19(a) that accepts the empty word . One of the shortest Hamiltonian-like words accepted by
the automata in Figure 19 above is (a) " 5 5 $ $ = = " with length 8, (b) " 5 5 $ $ = = with length
7 and (c) " 5 5 = = $ with length 6.
24
Chapter 3
METHODOLOGY
3.1 Preamble
In this chapter, we explore five types of Strongly connected automata ( , Σ, , ", ) such that for any pair of states (, 9 ∈ there exits ∈ Σ ∗ such that
e (, 9f = .
We named these five types of automata literarily to understand the structure of
1. Line directed,
2. Directed cycle,
3. Bidirected cycle,
4. Starred,
5. Floral.
For each type, we establish the structure of the automata and derive the regular expression ( that generates the
language these automata accept while varying the final
state = x @y to be { (} for = 0, 1, 2, . . , − 1 where is the number of states.
Let ( , Σ) be a strongly connected automata graph. We associate the automaton =
e , Σ, , ", x @ yf such that = , and the edges of are given the transitions by their names,
in this way every edge of the graph has it unique symbol in the alphabet and therefore
our study really concentrate on the properties of the graph. More specifically, we defined
our automata in the subsection of the next section.
25
'
We define the degree of a state as the number of edge incident to that state. The Indegree as the number of inbound edges(arrow)s and
,
Outdegree as the number of outbound edges(arrows).
We consider two forms of this Line directed automata, the simple line directed automata
have define above and looped line directed automata with ", + both having a loop transition.
As mentioned, we are writing the regular expression for all possible choices of the final
state. Let ( denote the regular expression which describes the regular language when = { (}.
Two states:
∗
" = ( " #)
26
∗
# = "( # ")
Three states: ∗ ∗
" = ( " ( # $ ) ∗ #)
#= "( # $+ # ")
∗ ∗ ∗
$ = ( " #) ( " #)e( $ #) + ( $ #)( " #) ( " #)f
Four states: ∗ ∗ ∗
" = ( " ( #( $ 5) ∗ $ ) ∗ #)
# = "( # " + #( $ 5) $)
∗ ∗ ∗
$ = ( " #) ( " #)e( $ 5) + ( $ #) + ( $ #)( " #) ( " #)f
∗ ∗ ∗ ∗
5 = ( "( # $) #) ( "( # $) # $)e( 5 $) + ( 5 $( # $) # $)
∗ ∗ ∗ ∗ ∗
+( 5 $( # $) #)( "( # $) #) ( "( # $) # $)f
27
Five states: ∗ ∗ ∗ ∗
" = ( "( #( $( 5 =) ∗5) ∗ $∗) #)
# = "( # " + #( $( 5 =) 5) $)
∗ ∗ ∗ ∗
$ = ( " #) ( " #)e( $( 5 =) 5) + ( $ #) + ( $ #)( " #) ( " #)f
∗ ∗ ∗
5= ( "# + " #( $ #) $ #) ( " # $)e( 5( $ #) $) +( 5 =)
∗ ∗ ∗
+( 5 $ #)( " # + " #( $ #) $ #) ( " # $)f
∗
==( " #+ " #( $ #) $ #+
∗ ∗ ∗ ∗ ∗ ∗ ∗
" # $( 5( $ #) $) 5 $ #) ( " # $( 5( $ #) $) 5)e( =( 5( $ #) $) 5) +
∗ ∗ ∗
( =( 5( $ #) $) 5 $ #)( " # + " #( $ #) $# +
∗ ∗ ∗ ∗ ∗ ∗
" # $( 5( $ #) $) 5 $ #) ( " # $( 5( $ #) $) 5)f
Three states: ∗ ∗ ∗
" = ( " + "( # $
∗ ∗ ∗ ∗
$ ) #)
#= " "( # $ $+ # " ")
∗ ∗ ∗
$ = ( " + " #) ( " #)e( $ + $ #) + $ #( " + " #) ( " #)f
Figure 26: Two-state automata from three states looped line direct automata
29
Four states:
=( + ( ( ∗
)∗ )∗ )∗
" " " # $55 $ #
∗ ∗ ∗ ∗
$ = " ( " #)e $ # + $ 5 5 + $ # " ( " #)f
∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗
5 = ( " + "( # $) #) ( "( # $) # $)e 5 + 5 $ + ( 5 $)( # $) ( # $) + ( 5 $( # $) #)( " + "( # $) #) ( "( # $) # $)f
Figure 28: Three-state GTG of four states looped line direct automata
30
Further reduction of the above 3 states automata gives
Figure 29: Two-state GTG of four states looped line direct automata
Looped line direct automata are similar to Simple line direct automata with
the addition of two loops which means the number of circuit it contains is the same
as that of the equal state simple line direct automaton with the addition of two, as it
will be shown in proposition 2. From the above state reductions, we are able to show
the maximum star height in the regular expression accepted by these automata in
proposition 6. And finally, we give the length of the Hamiltonian-like word these
31
edge +,# " has a label +,#. ", #, … , +,# ∈ forms a path represented by the
sequence … with the number of cycles containing any edge e f = 1.
" # +,# ( 9
exactly twice (at the beginning and at the end) while the other states appear only once.
The language accepted by these automata can be defined by regular expression ( as follows.
Two states: This automaton has the same structure as a Two-state Simple direct
automaton with different edge labels.
∗
" = ( " #)
∗
# = "( # " )
Three states: ∗
" = ( " # $)
∗
# = "( # $ ")
∗
$ = " #( $ " #)
32
Four states: ∗
"=( " # $ 5)
∗
# = "( # $ 5 " )
∗
$= " #( $ 5 " #)
∗
5= " # $( 5 " # $)
Five states: ∗
"=( " # $ 5 =)
∗
#= "( # $ 5 = ")
∗
$= " #( $ 5 = " #)
∗
5= "#$( 5="#$)
∗
== "#$5( ="#$5)
Like most strongly connected automata, Directed cycle automata have no cut
vertex and it is trivial that the regular expression of the accepted language can be written
with exactly one Kleene star. In proposition 8, we show the length of Hamiltonian-like
words accepted by these automata with the index of the final state as
33
a dependent variable or the distance of the automata as we have defined in the
previous chapter.
oppositely oriented edge with label . Each vertex ∈ has both indegree
+,# " " (
and no cut vertex. The language accepted by these automata can be defined as follows.
Two-state Bidirected cycle automaton has the same structure as a Simple line direct
automaton with two states, hence the language accepted can be represented by the
Three states: ∗ ∗ ∗ ∗
" = ( " ") + ( " ") e( " + # $)( $ $) ( " + $ #)f
∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗
# = ( " ") ( # + " $)( $ $) e( # + $ ")( " ") ( # + " $)( $ $) f $ = ( # #) ( " + # $)( $ $) e( " + $ #)( # #) ( " + # $)( $ $) f
34
Four states:
∗
"=( " "+ # #)
∗ ∗ ∗
+( " " + # #) e( # $ + " 5)( 5 5 + $ $) ( $ # + 5 ")f
∗ ∗
#= ( "( 5 5) ") ( #
∗
+ "( 5 5) 5 $)( $ $
∗ ∗ ∗ ∗ ∗
+ $ 5( 5 5) 5 $) e( # + $ 5( 5 5) ")( "( 5 5) ") ( #
∗ ∗ ∗ ∗
+ "( 5 5) 5 $)( $ $ + $ 5( 5 5) 5 $) f
∗
$= ( " " + # #) ( # $
+ " 5)( 5 5
∗
+ $ $) e( 5 " + $ #)( " " + # #)∗( # $
∗ ∗
+ " 5)( 5 5 + $ $) f
∗ ∗
5= ( #( $ $) #) ( "
∗
+ #( $ $) $ 5)( 5 5
∗ ∗ ∗ ∗ ∗
+ 5 $( $ $) $ 5) e( " + 5 $( $ $) #)( #( $ $) #) ( "
∗ ∗ ∗∗
+ #( $ $) $ 5)( 5 5 + 5 $( $ $) $ 5) f
35
Figure 37: Three-state GTG of four states bidirected cycle automata
Five states: ∗ ∗
"=( " "+ # #+ " =( = =) = ")
+ ( " "+ # #
∗ ∗
+ " =( = =) = ") e( # $
∗ ∗ ∗ ∗ ∗
+ " =( = =) 5)( 5( = =) 5 + $ $) ( $ # + 5( = =) = ")f
36
∗ ∗
# = ( " " + " =( = = +∗ 5 5) = ") ( #
+ " =( = = + 5 5) 5 $)( $ $
+ $ 5( = = + 5 5)∗ 5 $)
∗
e( #
∗ ∗ ∗
+ $ 5( = = + 5 5) = ")( " " + " =( = = + 5 5) = ") ( #
∗ ∗ ∗ ∗
+ " =( = = + 5 5) 5 $)( $ $ + $ 5( = = + 5 5) 5 $) f
∗ ∗
$= ( " " + ## + " =( = =) = ") ( #$
+ " =( = =)∗ 5)( 5( = =)∗ 5
+ $ $)∗e( 5( = =)∗ = "
∗ ∗
+ $ #)( " " + ## + " =( = =) = ") ( # $
∗ ∗ ∗ ∗
+ " =( = =) 5)( 5( = =) 5 + $ $) f
∗ ∗
5= ( " " + #( $ $) #) ( " =
∗
+ #( $ $) $ 5)( = = +55
∗ ∗
+ 5 $( $ $) $ 5) e( = "
∗ ∗ ∗
+ 5 $( $ $) #)( " " + #( $ $) #) ( " =
∗ ∗ ∗ ∗
+ #( $ $) $ 5)( = = + 5 5 + 5 $( $ $) $ 5) f
∗ ∗
== ( ## + # $( $ $ + 5 5) $ #) ( "
∗
+ # $( $ $ + 5 5) 5 =)( = =
∗ ∗
+ = 5( $ $ + 5 5) 5 =) e( "
∗ ∗ ∗
+ = 5( $ $+ 5 5) $ #)( # # + # $( $ $ + 5 5) $ #) ( "
∗ ∗ ∗ ∗
+ # $( $ $ + 5 5) 5 =)( = = + = 5( $ $ + 5 5) 5 =) f
37
Figure 39: Five-state bidirected cycle automata
38
Figure 41: Three-state GTG of five states bidirected cycle automata
39
For −states Bidirected cycle automata, we show the number of circuits and
cycles it contains in proposition 3 and its regular expression minimum and maximum
star height in proposition 4 and 6, respectively as being similar to the same number of
state loop line direct automata. Finally, on these automata, we show the length of the
shortest Hamiltonian-like word for odd and even numbers of states in proposition 9.
3.2.4 Starred
Starred automaton = ( , Σ, , " , ) is characterized as a complete bipartite graph #,+,# for states in and ≥ 2. It
is an automaton with one internal state as
' , ' ,
node and − 1 leaves. Each state ( ∈ ( − { "}) has both indegree and outdegree to be 1, that is = = 1 while " has = = − 1. Every
edge " ( has a label ( while the oppositely oriented edge (" has a label (. It has a diameter of 2 and a single cut vertex " for ≥ 3.
40
∗
" = ( # #)
∗
# = #( # #)
Four states: ∗
"=( # #+ $ $+ 5 5)
∗
#=( # #+ $ $+ 5 5) #
∗
$=( # #+ $ $+ 5 5) $
∗
5=( # #+ $ $+ 5 5) 5
41
Figure 46: Four-state starred automata
Five states: ∗
"=( # #+ $ $+ 5 5+ = =)
∗
#=( # #+ $ $+ 5 5+ = =) #
$=( ## + $ $+ 5 5 + ==)∗$
5 =( # #+ $ $+ 5 5 + ==)∗5
∗
= =( # #+ $ $+ 55 + ==) =
42
3.2.5 Floral
The Floral automata are just like the Starred automata with a centered state " acting as a node to other states in
a more complex connection. Let = ( , Σ, , " , ) be a Floral automaton, every state ( ∈ ( − { " }) is incident to ". We
define the smallest structure to be a Petal consisting of four states, as shown in Figure 48. For number of petals in ,
every edge " ( has a label ( and for ∈ {1,2 }, the edge ( (9 has a label (9, while edge (9 " has a label (9. It has a diameter of
4 and a single cut
vertex " for ≥ 4 and 3 = 1. The language accepted by these automata can be defined as follows.
One petal:
43
Two petals:
Three petals:
44
∗
#= " #=( # ## ##+ # #$ #$+ $ $# $#+ $ $$ $$+ 5 5# 5# + 55$5$) #
∗
$= " $=( # ## ##+ # #$ #$+ $ $# $#+ $ $$ $$+ 5 5# 5# + 55$5$) $
∗
5= " 5=( # ## ##+ # #$ #$+ $ $# $#+ $ $$ $$+ 5 5# 5# + 55$5$) 5
∗
##= " # ##=( # ## ##+ # #$ #$+ $ $# $#+ $ $$ $$+ 5 5# 5# + 55$5$) ###
∗
#$= " # #$=( # ## ##+ # #$ #$+ $ $# $#+ $ $$ $$+ 5 5# 5# + 55$5$) ##$
∗
$#= " $ $#=( # ## ##+ # #$ #$+ $ $# $#+ $ $$ $$+ 5 5# 5# + 55$5$) $$#
∗
$$= " $ $$=( # ## ##+ # #$ #$+ $ $# $#+ $ $$ $$+ 5 5# 5# + 55$5$) $$$
∗
5#= " 5 5#=( # ## ##+ # #$ #$+ $ $# $#+ $ $$ $$+ 5 5# 5# + 55$5$) 55#
∗
5$= " 5 5$=( # ## ##+ # #$ #$+ $ $# $#+ $ $$ $$+ 5 5# 5# + 55$5$) 55$
45
Figure 51: Five-petal floral automata with sixteen states
Both starred and floral automata can be said to have a graph with a pancyclic
vertex " ∈ with a finite number of p-subgraph incident to ". A p-subgraph of graph
has all the edges incident to its set of vertices in its edge set. While p-subgraph of
starred automata has two vertices, that of floral has four vertices. We will also show
in Proposition 10 and 11, the length of Hamiltonian-like words accepted by these two
automata types.
46
Chapter 4
ANALYSIS
In this chapter, we give and prove some theoretical results about the Strongly
connected automata classes we consider. We start with general bounds.
The length of the Hamiltonian-like word % of a strongly connected automaton =
e , Σ, , ", @f is at least the number of states, and the distance of the automaton is
at most the number of states, ≤ | | ≤ | %|.
These can be seen as follow. The part of the argument ≤ | |, is trivial. Since is the length of the first
word accepted by automata , the word either passes through all states or fewer states. The second part | | ≤ | %| is
a direct interpretation of the definition of Hamiltonian-like word as the word that passes through all states of the
automata, hence cannot be less than | |.
It is important to know that a walk which is an alternating sequence of vertices
and edges, in our case can be written as a sequence of vertices or edges as all edges has a
unique label, and the edge incident to two vertices is also unique in orientation.
Proposition 1
+(+,#)
If = e , Σ, , ", @f is a Simple line directed automata with | | = , then has circuits.
$
Proof: Let ( , Σ) be a graph of with vertices and number of circuits. The number of circuits an edge ∈ Σ belongs
to, is greater than 1, ( ) ≥ 1. All circuits of are symmetric with length 2 for 1 ≤ ≤ − 1. For states, has ( − )
47
+,#
circuits of length 2 for 1 ≤ ≤ − 1. As we vary the value of , = ∑ D.# can be expressed as 1 + 2 + ⋯ + ( − 1). We
have 2 = ( − 1) and hence the prove.
∎
Proposition 2
+(+,#)
If = e , Σ, , ", @f is a Loop line directed automata with | | = , then has + 2 circuits.
$
/
Proof: Let ( , Σ) be Simple line directed graph with vertices and number of circuits, and ( , Σ ∪ { ", +,#}) be Loop line
/ / /
directed graph with vertices and number of circuits. It is trivial that is e-subgraph of and ≥ . All the circuits in are also
/
circuits in with the addition of two circuits " , +,# which denote the self-loops " ", +,# +,# respectively. Hence the proof,
following from proposition
1. ∎
Proposition 3
$
If = e , Σ, , ", @f is a Bidirected cycle automata with | | = , then has + 2 circuits for ≥ 3, and + 2 cycles.
Proof: Let ( , Σ) be the graph of Bidirected cycle automata with vertices and
number of circuits. The uniqueness of a circuit depends on the length of the circuit
and the order of edges in the circuit.
There are always two -circuit of the form # $ … +,# ", " +,# … $ #, additionally, for each state of the states, there are circuit
$
that starts with the state and of varying length 2 for 1 ≤ ≤ . Thus, we have + 2 circuits for ≥ 3.
$
Alternatively, if is odd, for 1 ≤ ≤ , has 2 -circuit for each value of , and two -circuit then += +2.
48
If is even, for 1 ≤ ≤ , has ( − 1) 2 -circuit for each value of , and ( + 2) -circuit then +=
$
( − 1) + ( + 2) = +
2.
For the number of cycles, there are always 2-cycle in and two -cycle (cycle with length )
of the form " # … +,# " and " +,# … # ", which sums the number of cycles to + 2. ∎
A two state automata graph that is Loop line directed is called generic two-state automaton (John
∗
E. Hopcroft, Rajeev Motwani, & Jeffrey D. Ullman, 2006) and we represent it as as shown in Figure 12.
∗
The automata graph of Simple line direct, Looped line direct and Bidirected cycle can be reduced to using
Generalized Transition Graph (GTG) method.
Proposition 4
The regular expression accepted by Loop line directed and Bidirected cycle
Proof: Loop line directed and Bidirected cycle automata can be reduced using the GTG
elimination method to a generic two-state automaton, as shown in Figure 12. The regular
expression that is accepted by this automata graph " and # for when the final state is " and #,
respectively, has a star height of two. From the expression, the star height of both Loop line
directed and Bidirected cycle automata is a minimum of two and hence the proof. ∎
Proposition 5
The graph of Directed and Bidirected cycle automata has no cut vertex.
Proof: Bidirected cycle automata has two Hamiltonian cycle and Directed cycle has
one Hamiltonian cycle as it only cycle, hence removing one vertex will not split the
component of the two automata graph. ∎
49
Proposition 6
The regular expression describing the language accepted by Loop line directed
+,#
or Bidirected cycle automata = e , Σ, , ", @f with | | = , can be written with the maximum star height of … $† + 2.
Proof: For Loop line directed or Bidirected cycle graph with vertices, let be the index representing the final state
of the automata for 2 ≤ ≤ − 1. In deriving the regular expression that these automata accept we will eliminate all
state except for the initial state represented as " and the final state which is D. Eliminating a 2-cycle results in the
incident vertex having a loop while eliminating a 4-cycle results in the incident vertex having a Kleene star in the
+,D'#
regular expression associated with it edges. … $† is the number of nested star that edges incident to D can
have by eliminating
D
vertex D'# to +,#. … $† is the number of nested stars that edges incident to " can have by eliminating vertex # to D,#. The
resulting automata graph is a generic two-state automata that accepts regular expression with star height of two
independent of
+,D,# D
which of the two state is the final state. Hence … $† + … $† + 2 represent the star height of Loop line directed or Bidirected cycle.
∎
Proposition 7
Line directed automata = e , Σ, , ", @f with | | = and @ = D accepts Hamiltonian-like word of length 2 − − 2.
Proof: Let ( , Σ) be graph of Line directed automaton with vertices, then every Hamiltonian-like word will always contain the
walk " # … +,# of length − 1 for ", #, … , +,# ∈ . If vertex D is the vertex equivalent to the final state, then there is − − 1 steps
from the last state to the accepting state. Then the Hamiltonian-like word will have a length of ( − 1) + ( − − 1) which is 2
− − 2. ∎
50
Proposition 8
Directed cycle automata = e , Σ, , ", @f with | | = and @ = D,
accept Hamiltonian-like word of length ( − 1) when = − 1 and ( + ) for other values of .
Proof: Let ( , Σ) be Directed cycle graph with vertices, then every Hamiltonian-like word will contain the walk " # … +,# of length − 1
for ", #, … , +,# ∈ . When is the index of the last state +,#, then the length of the Hamiltonian-like word is − 1. For any other states, the
walk will return back to " with steps and for the steps to reach D. Hence, the length of the Hamiltonian-like word will be + . ∎
Proposition 9
Bidirected cycle automata = e , Σ, , ", @f with | | = and index of @ = D, accept Hamiltonian-like
D +'# +'#
word of length | %| + which is when = 0 and When is odd, median # = $ and $ = $ + 1,
D + , 1≤≤#
| %|+
=‡
2 − −2, $≤≤−1
1≤ ≤
D + ,
|
%|+ =‡2 − −2, <≤−1
Proposition 10
Starred automata = e , Σ, , ", @f with | | = + 1 and @ = D, with the
pancyclic vertex having index 0 has Hamiltonian-like word of length 2 when = 0 and 2 − 1 for
other values of .
Proof: The statement is trivial from the structure of starred automata. For example, from Figure
43 of Six-state starred automata, | | = 6 which means = 5. When @ =
51
" >
", % = # # $ $ 5 5 = = > > with | %| > = 10 = 2 , and for other values of , for example @ = >, % = # # $ $ 5 5 = = > with | %| >=9=2
− 1. ∎
Proposition 11
Floral automata graph with subgraphs + having three vertices each all incident to the pancyclic vertex 0
where is the number of subgraphs, with degree order of (1,1), (1,2) and (1,1) for the vertex index of 1, and 2
respectively. The length of the Hamiltonian-like word accepted by these automata when = 0 is 6 ,
6 + 1 when = and 6 − 1 when is 1 or 2.
Proof: Using induction, the base case is Figure 48, One-petal floral automata with =
#######$
. The Hamiltonian-like words cannot be shorter than these as the walks
are unique to the structure.
" D D# D $
If we assume true for . Then, | %| + = 6 ,| %| + = 6 + 1, | %| + = | %| + = 6 − 1.
For + 1 petals, | "
| =| "
| +|
"
| = 6 + 6 = 6( + 1).
%+'# %+ %#
D#,D $ " ##,#$
| %| +'# =| %| + + | %| # =6 + 5 = 6( + 1) − 1. ∎
52
Chapter 5
CONCLUSION
valuable insights into the structure and behavior of interconnected systems like the
five structures of some strongly connected automata that we have analyzed. Cycles
and circuits play a vital role in understanding connectivity, network properties, and
transportation systems, and social networks, where the flow of information and
resources relies on connectivity. Our study of cycles helps unravel some algebraic
properties of these automata, with connections to linear algebra and algebraic graph
theory
automata can give insight into identifying areas where the system may be
unnecessarily complex or redundant and help simplify the design of the automaton to
53
REFERENCES
Ádám, A. (1973). On some open problems of applied automaton theory and graph
(Mass.).
Ádám, A. (1983). On certain partitions of finite directed graphs and of finite automata.
Horváth, G., & Nagy, B. (2014). Formal Languages and Automata Theory. Budapest:
Typotex.
54
Kleene, S. C. (1951). Representation of events in nerve nets and finite automata. In
Cathleen Sether.
Computer Science.
55