Print this article - Indian Journal of Science and Technology

advertisement
Indian Journal of Science and Technology, Vol 8(26), DOI: 10.17485/ijst/2015/v8i26/87161, October 2015
ISSN (Print) : 0974-6846
ISSN (Online) : 0974-5645
Double Substring based Classification for
Nondeterministic Finite Automata
P. Ezhilarasu1* and N. Krishnaraj2
1Department
2Department
of Computer Science and Engineering
Hindusthan College of Engineering and Technology
Coimbatore - 641032, India;prof.p.ezhilarasu@gmail.com
of Information Technology, Valliammai Engineering
College, Chennai - 603203, India;drnkrishnaraj@gmail.com
Abstract
Background/Objectives: To classify Nondeterministic Finite Automata (NFA) using double substring. Methods/Statistical
Analysis: The Substring placed at two places preceded or/and followed by the loop placed at the start/intermediate/final
states. Findings: The Nondeterministic Finite Automata classified based on double substring into three types. Those are
1. NFA that starts with a substring and ends with a substring, 2. NFA that starts with a substring and contains a substring
and 3. NFA that contains a substring and ends with a substring. The previous methods used single, double, and more
than double loop to classify Nondeterministic Finite Automata1,6. Application/Improvements: The categorization also
applicable to regular expression, and Deterministic Finite Automata (DFA). This concept can be used to design modified
ticket vending machines7.
Keywords: Containing Condition, Ending Condition , NFA, Self-Lloop, Starting Condition , Substring
1. Introduction
Finite Automata (FA) has the design, which based on the
string. It has two types, namely Nondeterministic Finite
Automata (NFA) and Deterministic Finite Automata
(DFA). Based on the regular expression it is possible
to construct both NFA and DFA. The transformations
of NFA into DFA and vice versa both are possible. It is
better to construct NFA from Regular expression than
DFA because of swift construction of NFA from Regular
expression than the construction of DFA from the regular
expression.
1.1 NFA has following Properties
• One and only starting state.
• No of accepting state is normally one. In rarity, it may
be more than one state.
*Author for correspondence
(1)
Where ,
E stands for maximum amount of transition,
u stands for no of input,
m stands for number of states,
a has the fixed value two.
Example 1. If the input are {a,n,b,u} i.e totally 4 input
symbols and no of states are {q0,q1,q2,q3} i.e totally 4
states then the highest number of possible transition will
be 4 * 4 power 2 =4 * 16 = 64 transitions.
Example 2. If the input are {k,a,n,i} i.e totally 4 input
symbols and no of states are {q0,q1,q2,q3,q4} i.e totally 5
Double Substring based Classification for Nondeterministic Finite Automata
states then the highest number of possible transition will
be 4 * 5 power 2 =4 * 25 = 100 transitions.
1.2 Ezhilarasu et. al. [2014] proposed on
NFA Classification based on Single Loop
and its Position into Three Types
• NFA, which accepts the string; that starts with particular substring. (String = Substring followed by selfloop at the ending state).
• NFA, which accepts the string; that ends with particular string. (String = Self-loop followed by the given
substring).
• NFA, which accepts the string; which starts with the
particular string and ends with the particular string.
(String = given substring1 followed by self-loop at the
intermediate state and substring2)1.
1.3 Ezhilarasu et. al. [2014] proposed on
NFA Classification that Contains Dual
Loops and its Position
• Loop at the starting and ending state. (String = Selfloop at the starting state followed by given substring
and self-loop at the ending state).
• Loop at starting and intermediate state. (String = Selfloop at the starting state followed by given substring1
and self-loop at the intermediate state followed by
substring2).
• Loop at ending and intermediate state. (String = Substring1 followed by self-loop at the intermediate state
followed by given substring2 and self-loop at the ending state)2.
1.4 Ezhilarasu et. al. [2014] proposed on
NFA Classification that Contains More
than Two Loops and its Position
• Containing two or more substrings. (String = Selfloop at starting, intermediate (>=1) and ending state).
• Starting with a particular substring and containing
two or more substrings. (String = Self-loop at intermediate (>=1) and ending state).
• Ending with a particular substring and containing two
or more substrings. (String = Self-loop at starting and
intermediate state (>=1))3.
A. Kumaravel, K. Rangarajan [2013] proposed on
automaton specification using five printing symbols can
2
Vol 8 (26) | October 2015 | www.indjst.org
escape or find the exit and and showed the coordination of a team of automata that used for finding a way of
escape8.
2. About NFA Classification
Based on1-6 the non-deterministic finite automata classified. The NFA with double substring has three categories,
as shown in Figure 1.
Figure 1. Classification of NFA based on double substring.
3. NFA Types
The NFA that contains double substring classified into
three types.
• NFA, which starts with a substring and ends with a
substring.
• NFA, which starts with a substring and contains a
substring.
• NFA, which contains a substring and ends with a
substring.
3.1 NFA which Starts with a Substring and
Ends with a Substring.
In this first category NFA, the loop is present at the Intermediate state. That means it can have the finite amount
of input characters (Substring) before and after the intermediate state. Once it reaches the accepting state, it will
remain in the same state, as shown in Figure 2.
Figure 2. General form of NFA with a starting substring
and ending substring.
Indian Journal of Science and Technology
P. Ezhilarasu and N. Krishnaraj
GENERAL FORMAT: Substring + Self-loop at Intermediate state + Substring
Example An NFA that accepts a string that starts with
a Substring “ez” and ends with a Substring “il” over {e,z,h,
i,l}, as shown in Figure 3.
3.3 NFA which contains a Substring and
Ends with a Substring
In this third category NFA, the loop is present at the starting state and intermediate state. That means it can have
the finite amount of input characters (Substring) between
starting state and intermediate state then after intermediate state. Once it reaches the accepting state, it will remain
in the same state, as shown in Figure 6.
Figure 3. Starting and ending condition NFA.
3.2 NFA which Starts with a Substring and
contains a Substring
In this second category NFA, the loop is present at the
intermediate and ending state. That means it can have
the finite amount of input characters (Substring) before
intermediate state and between intermediate and the
accepting state. Once it reaches the accepting state, it
will remain in the same state, and it will process the
remaining inputs in the accepting state itself, as shown
in Figure 4.
Figure 4. General form of NFA with a starting substring
and containing substring.
GENERAL FORMAT: Substring+Self loop at the
Intermediate state + Substring + Self-loop at ending state.
Example. An NFA that accepts a string that starts with
a Substring “ez” and contains a substring “il” over {e,z,h,
i,l}, as shown in Figure 5.
Figure 5. Starting and containing condition NFA.
Vol 8 (26) | October 2015 | www.indjst.org
Figure 6. General form of NFA that contains a substring
and ends with a substring.
GENERAL FORMAT: Self Loop at the starting state
+ Substring + Self Loop at the Intermediate state +
Substring.
Example. An NFA that accepts a string that contains a
substring “ez” and ends with a Substring “il” over {e,z,h,
i,l}, as shown in Figure 7.
Figure 7. Containing and ending condition NFA.
4. Conclusion
4.1 Based on Double Substring NFA can be
Classified into Three Categories.
• NFA that starts with a substring and ends with a substring. (substring+self loop at the intermediate state +
substring)
• NFA that starts with a substring and contains a substring. (substring+self loop at the intermediate state+
substring+self loop at the final state).
• NFA that contains a substring and ends with a substring. (self-loop at the start state+ substring+ selfloop at the intermediate state+ substring).
Indian Journal of Science and Technology
3
Double Substring based Classification for Nondeterministic Finite Automata
5. References
1. Ezhilarasu P, Prakash J, Krishnaraj N, Satheesh Kumar D, Sudhakar K , Dhiyanesh B. A Novel Approach to Classify Nondeterministic Finite Automata Based on Single Loop and its
Position. International Journal of Advanced Research Trends
in Engineering and Technology (IJARTET). 2014; 1(4):7 –10.
2. Ezhilarasu P, Prakash J, Krishnaraj N, Satheesh Kumar D,
Sudhakar K, Parthasarathy C.A Novel Approach to Classify
Nondeterministic Finite Automata Based on Dual Loop and
its Position., International Journal of Engineering Trends
and Technology (IJETT). 2014; 18(3):147–50.
3. Ezhilarasu P, Prakash J, Krishnaraj N, Satheesh Kumar D,
Sudhakar K, Parthasarathy C. A Novel Approach to Classify
Nondeterministic Finite Automata Based on More than Two
Loops and its Position. SSRG International Journal of Computer Science and Engineering (SSRG-IJCSE). 2014 Dec;
1(10):46 –9.
4
Vol 8 (26) | October 2015 | www.indjst.org
4. Ezhilarasu P. Lecture notes on Theory of Computation.
Coimbatore: Hindusthan College of Engineering and Technology; CSE students; Batch 2007-2011.
5. Ezhilarasu P. Lecture notes on Formal Language and
Automata Theory. Coimbatore: Hindusthan College of
Engineering and Technology; CSE students; Batch
2008-2012.
6. Ezhilarasu P. Lecture notes on Formal Language and Automata Theory. Coimbatore: Hindusthan College of Engineering
and Technology; CSE students;, Batch 2010-2014.
7. Ezhilarasu P, Krishnaraj N.Applications of Finite
Automata in Lexical Analysis and as a Ticket Vending
Machine–A Review. International Journal of Computer
Science and Engineering Technology (IJCSET). 2015; 6(5)
: 267 –70.
8. Kumaravel A. Rangarajan K.Algorithm for Automaton Specification for Exploring Dynamic Labyrinths. Indian Journal
of Science and Technology. 2013; 6(5):4554 –9.
Indian Journal of Science and Technology
Download