Journal of Mathematics and Informatics Vol. 8, 2017, 95-101 ISSN: 2349-0632 (P), 2349-0640 (online) Published 24 September 2017 www.researchmathsci.org DOI: http://dx.doi.org/10.22457/jmi.v8a10 95 Precedence Matrices of Binary and Ternary Words and their Algebraic Properties V. Nithya Vani 1 , R. Stella Maragatham 2 , S. Sriram 3 and K.G. Subramanian 4 1,2 Department of Mathematics, Queen Mary’s College, Chennai 600004 India Email: 1 nithyavaniv@gmail.com; 2 rstellamar@yahoo.com 3 Department of Science and Humanities (Mathematics) Saveetha School of Engineering, Saveetha University, Chennai 602105, India Email: sriram.discrete@gmail.com 4 Department of Mathematics, Madras Christian College Tambaram, Chennai 600059, India 4 Corresponding author. Email: kgsmani1948@gmail.com Received 1 September 2017; accepted 22 September 2017 Abstract. A word, mathematically expressed, is a sequence of symbols in a finite set, called an alphabet. Parikh matrix is an ingenious tool providing information on certain subsequences of a word, referred to as subwords. On the other hand, based on subwords of a word, the notion of precedence matrix or p-matrix of a word has been introduced in studying a property, known as fair words. In this paper we consider p-matrix for words especially over binary and ternary alphabets and obtain several algebraic properties of the p-matrix. Keywords: Combinatorics on words, subwords, precedence matrix AMS Mathematics Subject Classification (2010): 68R15 1. Introduction The theory of formal languages [6] is one of the fundamental areas of theoretical computer science. Combinatorics on words [2] is one of the topics of study and research (see, for example, [3, 7]) in the theory of formal languages but is a comparatively new area of research in Discrete Mathematics, with applications in many fields. The concept of Parikh vector [6], which gives counts of the symbols in a word, has been an important notion in the theory of formal languages. Extending this concept Mateescu et al. [5] introduced the notion of Parikh matrix of a word which gives numerical information about certain subwords of the word, including the information given by the Parikh vector of the word. Cerny [1] introduced another notion called precedence matrix or p-matrix of a word which is motivated by the notion of a fair word. Here we consider p-matrices and derive certain algebraic properties of binary and ternary words. 2. Preliminaries A word is a finite sequence of symbols taken from a finite set called an alphabet. For example the word abaabb is over the binary alphabet {a, b}. An ordered alphabet is an