Language properties and Grammar of Parallel and Series Parallel Languages

Similar documents
A General Class of Noncontext Free Grammars Generating Context Free Languages

Erkki Mäkinen State change languages as homomorphic images of Szilard languages

Informatics 2A: Language Complexity and the. Inf2A: Chomsky Hierarchy

RANKING AND UNRANKING LEFT SZILARD LANGUAGES. Erkki Mäkinen DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY OF TAMPERE REPORT A ER E P S I M S

Proof Theory for Syntacticians

A Version Space Approach to Learning Context-free Grammars

COMPUTATIONAL COMPLEXITY OF LEFT-ASSOCIATIVE GRAMMAR

Morphotactics as Tier-Based Strictly Local Dependencies

"f TOPIC =T COMP COMP... OBJ

A R "! I,,, !~ii ii! A ow ' r.-ii ' i ' JA' V5, 9. MiN, ;

Grammars & Parsing, Part 1:

Factoring - Grouping

arxiv: v1 [math.at] 10 Jan 2016

Evolution of Collective Commitment during Teamwork

Syntax Parsing 1. Grammars and parsing 2. Top-down and bottom-up parsing 3. Chart parsers 4. Bottom-up chart parsing 5. The Earley Algorithm

Parsing of part-of-speech tagged Assamese Texts

Improving Fairness in Memory Scheduling

Self Study Report Computer Science

On the Polynomial Degree of Minterm-Cyclic Functions

University of Groningen. Systemen, planning, netwerken Bosman, Aart

Discriminative Learning of Beam-Search Heuristics for Planning

Abstractions and the Brain

Probability and Game Theory Course Syllabus

systems have been developed that are well-suited to phenomena in but is properly contained in the indexed languages. We give a

Enumeration of Context-Free Languages and Related Structures

We are strong in research and particularly noted in software engineering, information security and privacy, and humane gaming.

Visual CP Representation of Knowledge

CS 598 Natural Language Processing

Refining the Design of a Contracting Finite-State Dependency Parser

Centralized Assignment of Students to Majors: Evidence from the University of Costa Rica. Job Market Paper

Lecture 1: Machine Learning Basics

Objectives. Chapter 2: The Representation of Knowledge. Expert Systems: Principles and Programming, Fourth Edition

GACE Computer Science Assessment Test at a Glance

Language Evolution, Metasyntactically. First International Workshop on Bidirectional Transformations (BX 2012)

Evaluation of Usage Patterns for Web-based Educational Systems using Web Mining

Evaluation of Usage Patterns for Web-based Educational Systems using Web Mining

Unraveling symbolic number processing and the implications for its association with mathematics. Delphine Sasanguie

AP Calculus AB. Nevada Academic Standards that are assessable at the local level only.

Mathematics. Mathematics

A Grammar for Battle Management Language

Fragment Analysis and Test Case Generation using F- Measure for Adaptive Random Testing and Partitioned Block based Adaptive Random Testing

Backwards Numbers: A Study of Place Value. Catherine Perez

Page 1 of 11. Curriculum Map: Grade 4 Math Course: Math 4 Sub-topic: General. Grade(s): None specified

Parallel Evaluation in Stratal OT * Adam Baker University of Arizona

Efficient Normal-Form Parsing for Combinatory Categorial Grammar

Introduction and Motivation

Instructor: Matthew Wickes Kilgore Office: ES 310

Detecting English-French Cognates Using Orthographic Edit Distance

PRODUCT PLATFORM DESIGN: A GRAPH GRAMMAR APPROACH

CS 1103 Computer Science I Honors. Fall Instructor Muller. Syllabus

EECS 700: Computer Modeling, Simulation, and Visualization Fall 2014

Context Free Grammars. Many slides from Michael Collins

TabletClass Math Geometry Course Guidebook

Listening and Speaking Skills of English Language of Adolescents of Government and Private Schools

The Journal of Mathematical Behavior

Guide to the Uniform mark scale (UMS) Uniform marks in A-level and GCSE exams

Action Models and their Induction

A Metacognitive Approach to Support Heuristic Solution of Mathematical Problems

Radius STEM Readiness TM

Facilitating Students From Inadequacy Concept in Constructing Proof to Formal Proof

Lecture 1.1: What is a group?

Liquid Narrative Group Technical Report Number

A Comparison of Standard and Interval Association Rules

Learning Methods in Multilingual Speech Recognition

IT Students Workshop within Strategic Partnership of Leibniz University and Peter the Great St. Petersburg Polytechnic University

PH.D. IN COMPUTER SCIENCE PROGRAM (POST M.S.)

OFFICE SUPPORT SPECIALIST Technical Diploma

Natural Language Processing. George Konidaris

Mathematics Program Assessment Plan

Sample Problems for MATH 5001, University of Georgia

Basic Parsing with Context-Free Grammars. Some slides adapted from Julia Hirschberg and Dan Jurafsky 1

TREATMENT OF SMC COURSEWORK FOR STUDENTS WITHOUT AN ASSOCIATE OF ARTS

An Online Handwriting Recognition System For Turkish

GUIDE TO THE CUNY ASSESSMENT TESTS

CHANCERY SMS 5.0 STUDENT SCHEDULING

Specification and Evaluation of Machine Translation Toy Systems - Criteria for laboratory assignments

Grade 6: Correlated to AGS Basic Math Skills

AQUA: An Ontology-Driven Question Answering System

(Sub)Gradient Descent

Learning to Think Mathematically With the Rekenrek

Mathematics subject curriculum

SARDNET: A Self-Organizing Feature Map for Sequences

Computer Science 141: Computing Hardware Course Information Fall 2012

Missouri Mathematics Grade-Level Expectations

Statewide Framework Document for:

The Strong Minimalist Thesis and Bounded Optimality

FROM QUASI-VARIABLE THINKING TO ALGEBRAIC THINKING: A STUDY WITH GRADE 4 STUDENTS 1

PRODUCT COMPLEXITY: A NEW MODELLING COURSE IN THE INDUSTRIAL DESIGN PROGRAM AT THE UNIVERSITY OF TWENTE

CONCEPT MAPS AS A DEVICE FOR LEARNING DATABASE CONCEPTS

Navigating the PhD Options in CMS

Developing a concrete-pictorial-abstract model for negative number arithmetic

Classifying combinations: Do students distinguish between different types of combination problems?

Using the Attribute Hierarchy Method to Make Diagnostic Inferences about Examinees Cognitive Skills in Algebra on the SAT

Classroom Connections Examining the Intersection of the Standards for Mathematical Content and the Standards for Mathematical Practice

Hyperedge Replacement and Nonprojective Dependency Structures

ARNE - A tool for Namend Entity Recognition from Arabic Text

Content Language Objectives (CLOs) August 2012, H. Butts & G. De Anda

Computer Science PhD Program Evaluation Proposal Based on Domain and Non-Domain Characteristics

Standard 1: Number and Computation

Lecture Notes on Mathematical Olympiad Courses

Transcription:

arxiv:1711.01799v1 [cs.fl] 6 Nov 2017 Language properties and Grammar of Parallel and Series Parallel Languages Mohana.N 1, Kalyani Desikan 2 and V.Rajkumar Dare 3 1 Division of Mathematics, School of Advanced Sciences, VIT University, Chennai, India mohana.n@vit.ac.in 2 Division of Mathematics, School of Advanced Sciences, VIT University, Chennai, India kalyanidesikan@vit.ac.in 3 Department of Mathematics, Madras Christian College, Chennai, India rajkumardare@yahoo.com Abstract In this paper we have defined the language theoretical properties of Parallel languages and series parallel languages. Parallel languages and Series parallel languages play vital roles in parallel processing and many applications in computer programming. We have defined regular expressions and context free grammar for parallel and series parallel languages based on sequential languages [2]. We have also discussed the recognizability of parallel and series parallel languages using regular expression and regular grammar. Keywords: Formal language theory, Series parallel languages, Branching automaton, context free language, regular grammar 1 Introduction A language is a medium of communication. In communicating a problem to a machine, the design of a proper language of computation is important and this 1

is the fundamental objective of computability. From the perspective of theory of computation, any type of problem can be expressed in terms of language recognition. Fundamentally, a computer is a symbol manipulator. It takes sequences of symbols as input and processes them as per the program specifications. Finite sequence of symbols over an alphabet is called a string. In other words, alphabets are sequentially arranged. If the alphabets are arranged in parallel, then we call it as parallel words or strings. Series parallel words are arranged both sequentially and in parallel. In this paper we have given the basic notations and definitions of parallel and series parallel words. In section 3, we have discussed about operations such as concatenation, parallel operation, Kleene closure and String Reversal on parallel and series parallel languages. We have also defined context free grammar on parallel and series parallel languages in section 4. Regular expressions and regular languages have been defined in section 5 and 6. In section 7, we have given parallel regular grammar and series parallel regular grammar and their properties. 2 Preliminaries Let Σ be an alphabet. Let Σ denote the set of all finite sequential terms and Σ the set of all finite parallel terms over Σ. In general, Σ + p = {x y : x, y Σ + }, Σ s = {x.y : x, y Σ }. SP (Σ) is the set of all finite series parallel words over Σ. In other words SP (Σ)=Σ + Σ Σ + p Σ s. Language is a set of words or strings. If L Σ, L Σ and L SP ( Σ) then L is said to be a sequential, parallel and series parallel languages over Σ, respectively. Length of a word from Σ can be defined as the number of alphabets in the word and the length of a word from Σ is always one. Similarly, depth of a word from Σ is the number of alphabets in the word and the depth of the word from Σ is one. In general, length and depth of a word in a series parallel language can be defined as follows: lg(x.y) = lg(x) + lg(y), lg(x y) = max(lg(x), lg(y)) dp(x.y) = max(dp(x), dp(y)), dp(x y) = dp(x) + dp(y) where lg and dp represent the length and depth of a word. 2

3 Operations on languages We have some basic operations such as concatenation, parallel operation, Kleene Closure and String Reversal on languages over Σ. Here we discuss these operations for parallel languages and series parallel languages. The above operations on sequential languages have already been discussed in [2]. 3.1 Parallel languages Let L1, L2 Σ. Concatenation of two parallel languages L1 and L2 is defined as L = L1 L2. That is L = {x y x L1, y L2}. Parallel Operation on two parallel languages L1 and L2 is given by L = L1 L2. That is L = {x y x L1, y L2}. Let L be a set of strings from Σ. Kleene Closure of L is defined as the set of strings formed by performing the parallel operation on strings from L with repetitions. More generally, L is an infinite union L n, for n 0 where L n represents n number of repetitions applied parallely on strings of L. For instance, if L = {a, a b} the L 0 = ɛ, L 1 = {a, a b}, L 2 = {a a, a a b, a b a, a b a b} and so on. Let x be a string in Σ. Then String reversal (read backwards) of x is denoted as x R which satisfies the conditions x R = x with dp(x R ) = dp(x) and lg(x R ) = lg(x). 3.2 Series parallel languages Let L1, L2 SP (Σ). Concatenation of two series parallel languages L1 and L2 is defined as L = L1 L2. That is L = {x y x L1, y L2}. Parallel Operation on two series parallel languages L1 and L2 is given by L = L1 L2. That is L = {x y x L1, y L2}. Let L be a set of strings from SP (Σ). Kleene Closure of L is defined as L = L L, where L = L n for n 0, L n represents n number of repetitions and concatenation of strings of L and L indicates the set of series parallel strings. For example, let L = {ab, a b} then L 0 = L 0 = ɛ, L 1 = L 1 = L, L 2 = {abab, ab(a b), (a b)ab, (a b)(a b)}, L 2 = {(ab) (ab), (ab) (a b), (a b) (ab), (a b) (a b)} and so on. 3

Let x be a string in SP (Σ). Then String reversal of x is defined as x R which satisfies the conditions dp(x R ) = dp(x) and lg(x R ) = lg(x). 4 Context Free Grammar We use grammar to generate words of the language and it is represented by the set variables and terminals. The rules relating the variables are called productions. In [2], we have a context free grammar, G for sequential language is defined as G = (V, T, P, S), where V is a finite set of variables or non-terminals, T is a finite set of terminals, P is a finite set of production rules and S is a start symbol, S V. Each production is of the form A α, where A V, α (V T ). A language generated by a context free grammar G is called context free language. That is, L(G) = {w w T, S w} 4.1 Context free Parallel languages Let G = (V, T, P, S) a context free grammar. If P has productions of the form A α, A V, α (V T ) then G is said to be a context free parallel grammar. A language generated by a context free parallel grammar G with the production rules as described above is called context free parallel language. That is, L(G) = {w w T, S w} Example:1 Consider the grammar G = {{S}, {a, b}, P, S} with production rules S a b S S a b ɛ This generates the language L(G) = {(a b) n, n > 0} where n represents parallel iterations. 4.2 Context free series parallel languages Let G = (V, T, P, S) a context free grammar. If P has productions A α, A V, α SP (V T ) then G is called as context free series parallel grammar. A language generated by a context free series parallel grammar G with the production rules as described above is called context free series parallel language. 4

Example:2 Consider the grammar G = {{A, B}, {a, b}, P, S} with production rules S aa bb, A Aa ɛ B bb ɛ The above grammar generates the language L(G) = {a m b n m, n 1} 5 Regular Expressions Regular expression is an another way of defining a language. Regular expressions have been defined by algebraic laws of arithmetic in [2] for sequential words over Σ. Now we define regular expressions for parallel and series parallel words as follows: 5.1 Parallel Regular Expressions Let Σ be an alphabet. φ is a regular expression a Σ is a regular expression If R is a regular expression then R is a regular expression If R1 and R2 are regular expressions then R1.R2,R1 R2 and R1 R2 are also regular expressions. 5.2 Series Parallel Regular Expressions Regular expressions for series parallel strings can be defined using the same conditions as that of parallel strings, but instead of R, we have R to describe Kleene closure on SP (Σ). 6 Regular Languages We have defined parallel regular languages and series parallel regular languages based on the definition of sequential regular languages in [1] as follows: 5

φ, {a}, L n, L 1 L 2... L n, L 1 L 2... L n and L are regular languages, where L Σ φ, {a}, L n, L 1 L 2... L n, L 1 L 2... L n, L and L are regular languages, where L SP (Σ) We can also define a regular language as a language recognized by an automaton and a language generated by a regular grammar as proved in [2] for sequential languages. Recognizability of parallel and series parallel languages on Branching automaton has been discussed in [1] and [6]. Now we define regular grammar for parallel and series parallel languages and prove their regularity. 7 Regular Grammar A grammar G is said to be regular if G is either right-linear or left-linear. Consider G = (V, T, P, S) the production rule A xb or B x is called right-linear and the production rule A Bx or B x is called left-linear, where A, B V, x T. 7.1 Parallel Regular Grammar A grammar G on parallel languages is said to be regular [2] if G is linear. Consider G = (V, T, P, S), the production rule A x B or A B x or B x is called linear, where A, B V, x T. Theorem 1. Let G = {V, T, P, S} be a linear grammar. Then L(G) is a parallel regular language. Proof. By the definition of linear grammar G the production rules are A x B B x, B x where A, B V, x T. Now the language generated by the linear grammar is L(G) = {w w T }. Then by the definition of parallel regular languages, L(G) is a parallel regular language. Example: Let G = (V, T, P, S) where V = {A, B, S}, T = {b} and P = {S a B, B b B, B b} is a parallel regular grammar and the corresponding language L(G) = {a b n n 1} is a parallel regular language. 6

(a) Represents V i a 1 a 2... a m V j (b) Represents V i a 1 a 2... a m Figure 1: Transition Representations Theorem 2. L(G) is a parallel regular language if and only if L is recognized by a branching automaton A. Proof. Let G = (V, T, P, S) be a linear grammar. Then by theorem 1, L(G) is a parallel regular language. We have to prove that L is recognized by a branching automaton A. In otherwords, let w L(G) we now to show that w is accepted by a Branching automaton A. Assume that V = {V 0, V 1,...V n } and S = V 0. Productions are of the form V 0 a 1 V 1, V 1 a 2 V 2,...,V n a l, a 1, a 2,..., a l Σ. Let w L(G), then the production rules are V 0 a 1 V 1 a 1 a 2 V 2... a 1 a 2... a k V n a 1 a 2... a k a l = w. A branching automaton [1][6] over the alphabet Σ is A=(Q,T seq,t fork, T join,t par,s,e) where Q is the set of finite states. S and E are subsets of Q, the set of initial (start) and final (end) states, respectively. T seq Q Σ Q is the set of sequential transitions. T par T fork B T join, B Σ is the set of parallel transitions where T fork Q M ns (Q) and T join M ns (Q) Q are the set of fork and join transitions. Here M ns (Q) (non empty and non singleton) stands for multisets over Q of cardinality at least 2. The initial state of the automaton is V 0 and all other V i s are non-terminal states.in otherwords, states of Branching automaton are the variables of the linear grammar. Each production V i a j V j, for i = 0, 1, 2,..., (n 1) and j = i+1 corresponds to the transition in the branching automaton from V i to V j and the transition is defined by Tpar(V i, B) = V j, B Σ, V i T fork,v j T join and Tpar(V i, w) = V f where V f is a final state. Transitions Tpar in branching automaton are given in Figure 1. Suppose w L(G) then it satisfies the above production rules. By the construction of transitions on branching automaton, clearly V f Tpar(V 0, w) and hence, w is accepted by A. Conversely, assume w is accepted by branching automaton A. We have to 7

prove that w is in parallel regular language L(G). A recognizes w, the automaton passes through a sequence of states V 0, V 2,..., V f using paths labeled by a 1, a 2,..., a m. Then w is of the form w = a 1 a 2... a k a l and its derivation V 0 a 1 V 1 a 1 a 2 V 2... a 1 a 2... a k V n a 1 a 2... a k a l = w exists. Therefore w L(G). 7.2 Series Parallel Regular Grammar A grammar G on series parallel languages is said to be regular if G is rightlinear or left-linear or linear. Consider a grammar G = {V, T, P, S} with production rules A xb x or A Bx x or A x, where A, B V, x SP (T ). Example: Let G = (V, T, P, S) where V = {A, S}, T = {a, b} and P = {S Aa, A a A, A b} is a series parallel regular grammar and L(G) = {(a n b)a n 1} is a series parallel regular language. Theorem 3. A language L Σ is parallel regular if and only if there exists a parallel regular grammar G = {V, T, P, S} such that L = L(G). Proof. It follows from the theorem 2. Theorem 4. Let G = {V, T, P, S} be a left-linear or right-linear and linear grammar. Then L(G) is a series parallel regular language. Proof. We prove this theorem by an example. Consider G = (V, T, P, S) where V = {A, S}, T = {a, b} and P = {S Aa, A a A, A b}. This generates the language and L(G) = {(a n b)a n 1} and L(G) SP (Σ). Here P consists of both left-linear and linear productions. This satisfies the definition of series parallel regular languages. Hence, the theorem proved. Theorem 5. A language L SP (Σ) is regular if and only if there exists a series parallel regular grammar G = {V, T, P, S} such that L = L(G). Proof. It is immediate from the above theorem 4. 8

8 References References [1] K. Lodaya, P.Weil, Series-Parallel languages and the bounded-width property, Theoretical Computer Science, 237 (2000) 347 380 [2] John E. Hopcroft, Rajeev Motwani, Jeffrey D. Ullman, Introduction to Automata theory, Languages, and Computation, Addison-Wesley, 2001 [3] J.W.Thatcher, Characterizing Derivation Trees of Context-Free Grammars through a Generalization of Finite Automata Theory, Journal of Computer and System sciences, 1 (1967) 317 322 [4] Bakhadyr Khoussainov, Anil Nerode, Automata theory and its applications, Springer-Verlag, Berlin, (2010) [5] Nicolas Bedon, Logic and Branching automata, Logical methods in computer science, 11 (2015) 1 38 [6] N. Mohana, Kalyani Desikan, V. Rajkumar Dare, Series Parallel Local Languages and their properties, International Journal of Pure and Applied Mathematics, 109 (2016) 75 82 [7] Ivan M. Havel, Finite Branching Automata, Kybernetika, 10 (1974) 281 302 [8] Pascal Caron, Families of locally testable languages, Theoretical Computer Science 242 (2000) 361 376 9