Home Automation Using ESP8266
Home Automation Using ESP8266
Abhishek Shukla
MANIT Bhopal
India
[email protected]
ABSTRACT: This paper is an attempt to compare different methods to solve some context free as well as context sensitive
language [3] using Turing machine. Here we compare complexity [9] of two different methods to solve language like L= anb2n
for all n>=1.This paper give an idea to the reader to develop and analyse different types of methods to solve computational
problem in efficient way.
DOI: 10.6025/tmd/2018/6/2/43-46
1. Introduction
We have studied about Turing machine i.e. it is a tape which has infinite capacity to store data within the tape. It usages special
character “#” used for blank within the tape. It has a read/write head which can move either Left or Right and can read or write
within the tape one character at a time. A Turing machine is used to accept for those languages which are not accepted by DFA
or PDA. Turing machine is an acceptor for the languages those are generated by unrestricted grammar [7]. A Turing machine is
used to accept context sensitive, recursive [5], recursively enumerable languages [4].
Tm = {Q, Σ, τ, q0, δ, F, #}
Where
δ : Q × τ → Q × τ × {L, R}
Now we will described bellow two different methods to compute the language L = {anb2n; n > = 1}.
δ (q0, a) = (q1, x, R)
δ (q1, a) = (q1, a, R)
δ (q1, y) = (q1, y, R)
δ (q1, b) = (q2, y, L)
δ (q2, y) = (q2, y, L)
δ (q2, a) = (q2, a, L)
δ (q2, x) = (q0, x, R)
δ (q0, y) = (q3, y, R)
δ (q3, y) = (q3, y, R)
δ (q3, z) = (q3, z, R)
δ (q3, b) = (q4, y, L)
δ (q4, y) = (q4, y, L)
δ (s0, a) = (s1, x, R)
δ (s1, a) = (s1, a, R)
δ (s1, y) = (s1, y, R)
δ (s1, b) = (s2, y, R)
δ (s2, b) = (s3, y, L)
δ (s3, y) = (s3, y, L)
δ (s3, a) = (s3, a, L)
δ (s3, x) = (s0, x, R)
δ (s0, y) = (s4, y, R)
δ (s4, y) = (s4, y, R)
δ (s4, #) = (s5, #, L)
Similarly for anb3n; n > = 1 Method1 would become little bit complicated and take more steps but Method2 will take just one
more step than anb2n and for anb4n Method1 goes more complicated and Method1 will take one more step than anb3n and so on.
As b’s integral multiple of n increases, number of steps as well as number of states in Method2 increases linearly and in
Method1 it increases randomly.
2. Conclusion
From the above two methods we analyze that method2 is efficient than method1 and take less number of steps to perform
computation hence the time complexity of method2 is fewer than method1.Though the space complexity of the above two
methods will be same as they both have the same number of states. At designer point of view also is easier than method1. In the
similar way we can see that for the language L = {anbnc2n n > = 1} which is not be accepted by either DFA or PDA but turing
a n b 3n 12 7
a n b 3n 13 8
a n b 3n 14 9
a n b 3n 15 10
Table 1
machine , method2 will be efficient to method1. The above two comparison gives an idea to the readers to design some more
algorithms which would be easier in computational nature and perform in fewer time.
References
[1] Linz, Peter. Narosa Publication, An intoduction to Formal Languages and Automata fourth Edition.
[2] Alfred, V., Aho, Monica, S., Lam, Sethi, Ravi., Jeffery, D. Ullman by Pearson Education, Inc. and Dorling Kindersley Publication,
Compilers Principles, Techniques and Tools Second edition. Language No. of steps No. of States
[3] Introduction to automata theory, Languages and computation/John E. Hopcroft, Rajeev Motwani, Jeffery D. Ullman-2nd
edition.
[4] http://www-db.stanford.edu/ullman/ialc.html
[5] Introduction to Languages and The Theory of Computation by John C. Martin, 2nd EDN) ISBN-0-07-463722-3.
[6] Theory of computation by Bernard M. Moret Pearson –ISBN-10:8131708705.
[7] Fundamentals of Theory of computation by Raymond Greenlaw & H. James Hoover (Harcount) ISBN-81-7867-036-4
[8] Elements of Theory of computation by Lewis & Papadimitrou, PHI ISBN- 81-203-1271-6
[9] Elements of Descrete Maths By C. L. LIU TMH 2nd EDN ISBN-0-07-043476-X