Implementation of Recursively Enumerable Languages using Universal Turing Machine in JFLAP

Similar documents
Implementation of DNA Pattern Recognition in Turing Machines

Universal Turing Machine: A Model for all Computational Problems

Increasing Interaction and Support in the Formal Languages and Automata Theory Course

Increasing Interaction and Support in the Formal Languages and Automata Theory Course

CS154. Turing Machines. Turing Machine. Turing Machines versus DFAs FINITE STATE CONTROL AI N P U T INFINITE TAPE. read write move.

3515ICT Theory of Computation Turing Machines

Turing Machines: An Introduction

Pushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile

(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems.

Automata and Computability. Solutions to Exercises

Honors Class (Foundations of) Informatics. Tom Verhoeff. Department of Mathematics & Computer Science Software Engineering & Technology

Properties of Stabilizing Computations

Turing Machines, Part I

SRM UNIVERSITY FACULTY OF ENGINEERING & TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF SOFTWARE ENGINEERING COURSE PLAN

Notes on Complexity Theory Last updated: August, Lecture 1

The Halting Problem is Undecidable

Regular Expressions and Automata using Haskell

Computer Architecture Syllabus of Qualifying Examination

Pushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, School of Informatics University of Edinburgh als@inf.ed.ac.

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

Using Hands-On Visualizations to Teach Computer Science from Beginning Courses to Advanced Courses

Model 2.4 Faculty member + student

CS 3719 (Theory of Computation and Algorithms) Lecture 4

CS 301 Course Information

CSE 135: Introduction to Theory of Computation Decidability and Recognizability

24 Uses of Turing Machines

Theory of Computation Chapter 2: Turing Machines

Course Manual Automata & Complexity 2015

Computability Theory

Overview of E0222: Automata and Computability

Automata and Formal Languages

Composability of Infinite-State Activity Automata*

CAs and Turing Machines. The Basis for Universal Computation

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 4 Nancy Lynch

Introduction to Turing Machines

Lecture 2: Universality

Introduction to Automata Theory. Reading: Chapter 1

6.080/6.089 GITCS Feb 12, Lecture 3

4.6 The Primitive Recursive Functions

1 Definition of a Turing machine

Introduction to Finite Automata

Computational Models Lecture 8, Spring 2009

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

Regular Languages and Finite State Machines

Compiler Construction

Reading 13 : Finite State Automata and Regular Expressions

Philadelphia University Faculty of Information Technology Department of Computer Science First Semester, 2007/2008.

Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy

T Reactive Systems: Introduction and Finite State Automata

Fast nondeterministic recognition of context-free languages using two queues

Chapter 7 Uncomputability

Pushdown Automata. International PhD School in Formal Languages and Applications Rovira i Virgili University Tarragona, Spain

Regular Languages and Finite Automata

Introduction to Theory of Computation

Computer Science Theory. From the course description:

Genetic programming with regular expressions

Automata Theory. Şubat 2006 Tuğrul Yılmaz Ankara Üniversitesi

COMPUTER SCIENCE STUDENTS NEED ADEQUATE MATHEMATICAL BACKGROUND

Outline. About Me - Research Interests. A bit about me, my background. Through Visualization and Interaction, Computer Science Concepts Come Alive

Formal Grammars and Languages

FINITE STATE AND TURING MACHINES

Holland s GA Schema Theorem

Remarks on the computational complexity of small universal Turing machines

THEORY of COMPUTATION

CSC4510 AUTOMATA 2.1 Finite Automata: Examples and D efinitions Definitions

1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification)

Deterministic Finite Automata

So let us begin our quest to find the holy grail of real analysis.

Finite Automata. Reading: Chapter 2

Complexity of Algorithms

Finite Automata and Regular Languages

Complexity Classes P and NP

NP-Completeness and Cook s Theorem

Modeling of Graph and Automaton in Database

CS 341: Foundations of Computer Science II elearning Section Syllabus, Spring 2015

Chapter 1. Computation theory

PETRI NET BASED SUPERVISORY CONTROL OF FLEXIBLE BATCH PLANTS. G. Mušič and D. Matko

ÖVNINGSUPPGIFTER I SAMMANHANGSFRIA SPRÅK. 15 april Master Edition

Course Syllabus. Also listed as CS U1 Automata Theory (

Turing Machines and Understanding Computational Complexity

Automata on Infinite Words and Trees

Symbol Tables. Introduction

[Refer Slide Time: 05:10]

Online and Minimum-Cost Ad Hoc Delegation in e-service Composition

How To Compare A Markov Algorithm To A Turing Machine

Diagonalization. Ahto Buldas. Lecture 3 of Complexity Theory October 8, Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach.

arxiv:math/ v1 [math.ag] 15 Jun 2005

Converting Finite Automata to Regular Expressions

Duke University. Department of Computer Science. July 11, Premier Award

Lecture summary for Theory of Computation

NFAs with Tagged Transitions, their Conversion to Deterministic Automata and Application to Regular Expressions

Lexical Analysis and Scanning. Honors Compilers Feb 5 th 2001 Robert Dewar

Comparison of Standard, Integrated and Multimedia Information System (IS) with Solutions

Cardinality. The set of all finite strings over the alphabet of lowercase letters is countable. The set of real numbers R is an uncountable set.

CS5236 Advanced Automata Theory

Two-dimensional Languages

A Roller Coaster Game Design using Automata Theory

Welcome to... Problem Analysis and Complexity Theory , 3 VU

Push-down Automata and Context-free Grammars

CMPSCI 250: Introduction to Computation. Lecture #19: Regular Expressions and Their Languages David Mix Barrington 11 April 2013

Transcription:

International Journal of Information and Computation Technology. ISSN 0974-2239 Volume 4, Number 1 (2014), pp. 79-84 International Research Publications House http://www. irphouse.com /ijict.htm Implementation of Recursively Enumerable Languages using Universal Turing Machine in JFLAP Ankur Singh 1 and Jainendra Singh 2 1 Department of Computer Science, IEC College of Engineering, Greater Noida, INDIA. 2 Department of Computer Science, Maharaja Surajmal Institute, C-4, Janakpuri, New Delhi, INDIA. Abstract This paper presents the implementation of recursively enumerable language using Universal Turing machine for JFLAP platform. Automata play a major role in compiler design and parsing. The class of formal languages that work for the most complex problems belongs to the set of Recursively Enumerable Language (REL).RELs are accepted by the type of automata as Turing Machine. Turing Machines are the most powerful computational machines and are the theoretical basis for modern computers. Turing Machine works for all classes of languages including regular language, Context Free Languages as well as Recursive Enumerable Languages. Still it is a tedious task to create and maintain Turing Machines for all problems. The Universal Turing Machine (UTM) is a solution to this problem. A UTM simulates any other TM, thus providing a single model and solution for all the computational problems. Universal Turing Machine is used to implementation of RELs for JFLAP platform. JFLAP is most successful and widely used tool for visualizing and simulating all types of automata. Keywords: Automata; Compiler; Turing Machine; TM; JFLAP; PDA. 1. Introduction An automaton is a mathematical model for a finite state machine (FSM). A FSM is a machine that has a set of input symbols and transitions and jumps through a series of states according to a transition function. Automata play a major role in compiler design

80 Ankur Singh & Jainendra Singh and parsing. Turing machines are the most powerful computational machines. They possess an infinite memory in the form of a tape, and a head which can read and change the tape, and move in either direction along the tape or remain stationary. Turing machines are equivalent to algorithms, and are the theoretical basis for modern computers. A Turing machine that is able to simulate any other Turing machine is called a Universal Turing machine (UTM, or simply a universal machine). A UTM is the abstract model for all computational models. A UTM TU is an automaton that, given as input the description of any Turing Machine TM and a string w, can simulate the computation of M on w. JFLAP is software for experimenting with formal languages topics including nondeterministic finite automata, nondeterministic pushdown automata, and multi-tape Turing machines, several types of grammars, parsing, and L-systems. JFLAP is extremely useful in constructing Turing Machine with multiple inputs. Complex Universal Turing Machines can also be built by using other Turing Machines as components or building blocks for the same. It is possible to introduce various ICT Applications for each category. Farmers can use B2B portals, Information and knowledge managements systems, information systems and mobile technologies to obtain information and direct market to reach the vision. Peelers must be updated with the technologies and market requirements, market trends and standards. Since this is the most critical category in the production process and difficult category for the technology adoption, special attention must required. Collectors are the category who collect cinnamon from farmers, sorting and grading cinnamon. There for they should be updated with market requirements, market trends and standards. They can use knowledge management systems, information systems and web sites to get information to optimize product qualities. Exporters must use B2B portals, interactive webs, informational webs and latest ICT tools for marketing, promotions and communication. Certification authorities are using international standard web sites and ICT tools. But they should be reported to the government authority. Buyers have no much control over the other parties and government. They can access latest prices, details and can directly communicate with exporters, certification authorities, and other categories on demand via the ICT channels. 2. Universal Turing Machine in JFLAP 2.1 JFLAP JFLAP (Java Formal Languages and Automata Package) is software for experimenting with formal languages topics including nondeterministic finite automata, nondeterministic pushdown automata, and multi-tape Turing machines, several types of grammars, parsing, and L-systems. JFLAP is extremely useful in constructing Turing Machine with multiple inputs. Complex Turing Machines can also be built by using other Turing Machines as components or building blocks for the same. The implementation of a Turing Machine and Universal Turing Machine for the JFLAP platform has been described. JFLAP is most successful and widely used tool for visualizing and simulating automata such as finite state machines, pushdown automata, and Turing Machines. By executing our Universal Turing Machine in JFLAP,

Implementation of Recursively Enumerable Languages using Universal Turing 81 everyone get a direct and interactive experience of how this Turing Machine is capable of emulating other Turing Machines. 2.2 Turing Machine A Turing machine is an automation whose temporary storage is tape. This tape is divided into cells, each of which is capable of holding one symbol. Associated with the tape is read-write head that can travel right or left on the tape and that can read and write a single symbol on each move. Turing Machines are the most powerful computational machines. The Turing Machine (TM) is the solution for the halting problem and all other problems that exist in the domain of computer science. Turing Machines provide an abstract model to all problems. It can work with Recursively Enumerable Language. A Turing Machine M is defined by M = (Q, Σ, Γ, δ, q s,, F) where Q is the set of internal states {qi i is a nonnegative integer} Σ is the input alphabet Γ is the finite set of symbols in the tape alphabet δ is the transition function S is Q * Γn subset of Q * Γn * {L, S, R}n is the blank symbol. qs (is member of Q) is the initial state F (is a subset of Q) is the set of final states 2.3 Universal Turing Machine A UTM simulates any other TM, thus providing a single model and solution for all the computational problems. A UTM TU is an automaton that, given as input the description of any Turing Machine TM and a string w, can simulate the computation of M on w. It reduces the memory usage when compared to using multiple TMs. The transition function is the core part of a UTM. The UTM works on the basis of the rules defined in it. The transition function δ is defined as δ : Q Γ Q Γ {L,R} The transition function δ is a partial function on Q X Γ and its interpretation gives the principle by which a Turing Machine operates. The arguments of δ are the current state of the control unit and the current tape symbol being scanned. The result is a new state of the control unit, a new tape symbol which replaces the old one and a move symbol L or R. A UTM can accept regular languages, CFGs as well as RELs. A UTM can solve any problem that can be solved using a FSA, PDA or even a standard Turing Machine. The UTM designed in this paper supports a restricted alphabet of {a, b, c, x, y, z, }. It does not support non-determinism. Any standard TM with a maximum of ten states can be simulated using this UTM. It has over 1000 states to simulate a standard TM.

82 Ankur Singh & Jainendra Singh 2.4 Recursively Enumerable Language A language L is said to be recursively enumerable if there exists a Turing Machine that accepts it. It implies that there exists a Turing Machine M, such that, for every w L q 0 w * M x 1 q f x 2 With q f a final state. The definition says nothing about what happens for w not in L; it may be that machine halts in a no final state or that it never halts and goes into an infinite loop. Regular languages form a proper subset of Context Free Languages. So PDA is more powerful than finite automata. But CFLs are limited in scope because many of the simple language like a n b n c n are not context free. So to incorporate the set of all languages that are not accepted by PDAs and hence that are not context free, more powerful language families has been formed. This creates the class of Recursively Enumerable Languages (REL). 3. Implementation The Language L is said to be recursively enumerable if there exists a Turing Machine that accepts it. The working of Turing Machine for a recursively enumerable language can be explained with an example of a n b n c n. The language a n b n c n is a recursively enumerable language which cannot be implemented using a FA as well as a PDA. The standard Turing machine T M for the language a n b n c n is given in Fig. 1(a). The various strings are applied to the Turing Machine with multiple run. A few results are shown in Fig. 1(b). Fig. 1. (a) Turing Machine for anbncn (b) Multiple Run by Turing Machine The same problem can be solved with the UTM also. The difference lies in the way the UTM branches into states and transitions as a single move of TM corresponds to multiple moves of TU. The same problem can be solved with the UTM also. The difference lies in the way the UTM branches into states and transitions as a single move of TM corresponds to multiple moves of TU.

Implementation of Recursively Enumerable Languages using Universal Turing 83 For a deterministic Turing machine with m symbols in the alphabet such that Σ = m and total number of states n, m X n transitions are possible. A UTM with n states, Σ = m and p possible directions branches into m X n X p states for execution. A problem that can be solved with a multi tape Turing machine with m tapes in O (n) moves can be done with a UTM in O (nm) moves. For Fig. 2 shows the UTM for the recursively enumerable language a n b n c n. Fig. 2: Universal Turing Machine for anbncn. 4. Conclusions Turing Machines are the most powerful computational machines. The Turing Machines provide an abstract model to all the problems. This paper describes the working of a Turing Machine and UTM for Recursively Enumerable Languages for JFLAP platform. A Universal Turing Machine simulates any other Turing Machine, thus providing a single model and solution for all the computational problems. The language a n b n c n is a recursively enumerable language which cannot be implemented using a Finite Automata or a PDA but can done using a Turing Machine. This requires more storage than for Context Free Languages and hence the Turing Machine with the infinite tapes, extendable in both directions is used for this. The UTM is designed to supports an alphabet of {a, b, c, x, y, z}.it simulates standard Turing machine with a maximum of ten states. It also does not support non-determinism. The future work includes enhancing the concept of universality by including more symbols in the input alphabet as well as in the tape alphabet.

84 Ankur Singh & Jainendra Singh References [1] Susan H.Rodger, Eric Wiebe, Kyung Min Lee, Chris Morgan, Kareem Omar and Jonathan Su, Increasing engagment in automata theory with JFLAP, ACM Transactions,, 2009, 403-407. [2] Eric Gramond and Susan H. Rodger, Using JFLAP to interact with theorems in automata theory,acm Poratl Proc. In SIGCSE,1999,336-340. [3] Peter Linz, An Introduction to Formal Languages and Automata (3rd Edition, Narosa Publishing House,2003). [4] J.Hopcroft, R.Motwani and J.Ullmann, Introduction to Automata Theory, Language and Computation (3rd Edition, Addison-Wesley, 2006). [5] [Online]http://www.jfalp.org/tutorials. [6] Susan H.Rodger and Thomas W.Finley, JFLAP: An Interactive Formal Languages and Automata Package, ISBN 0763738344, Jones & Bartlett Publishers, 2006. [7] Sumitha C.H and Krupa Ophelia Geddam, Implementation of Context Free Languages in Turing Machines, IEEE conf. on second International conference on Machine Learning and Computing, 2010. [8] Jainendra Singh, Dr. S.K. Saxena, Implementation of Recursively Enumerable Language in to the Unrestricted Grammar using Turing Machine, International Journal of Information And Computation Technology (IJICT), ISSN 0974-2239, Volume 3, Number 1 (2013), pages 23-26. [9] Jainendra Singh, Dr. S.K. Saxena, Implementation of Unrestricted Grammar in to the Recursively Enumerable Language using Turing Machine, The International Journal of Engineering And Science (IJES), ISSN 2319-1813 ISBN 2319-1805, Volume-2, Issue-3 (2013),pages 56-59.