MATH 245 CH5 - DISCRETE MATHEMATICS W W L CHEN c W W L...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: DISCRETE MATHEMATICS W W L CHEN c W W L Chen, 1991, 2008. This chapter is available free to all individuals, on the understanding that it is not to be used for financial gain, and may be downloaded and/or photocopied, with or without permission from the author. However, this document may not be kept on any information storage and retrieval system without permission from the author, unless such system is not accessible to any individuals other than its owners. Chapter 5 LANGUAGES 5.1. Introduction Most modern computer programmes are represented by finite sequences of characters. We therefore need to develop an algebraic way for handling such finite sequences. In this chapter, we shall study the concept of languages in a systematic way. However, before we do so, let us look at ordinary languages, and let us concentrate on the languages using the ordinary alphabet. We start with the 26 characters A to Z (forget umlauts, etc. ), and string them together to form words. A language will therefore consist of a collection of such words. A different language may consist of a different such collection. We also put words together to form sentences. Let A be a non-empty finite set (usually known as the alphabet). By a string of A (word), we mean a finite sequence of elements of A juxtaposed together; in other words, a 1 ...a n , where a 1 ,...,a n A . Definition. The length of the string w = a 1 ...a n is defined to be n , and is denoted by k w k = n . Definition. The null string is the unique string of length 0 and is denoted by . Definition. Suppose that w = a 1 ...a n and v = b 1 ...b m are strings of A . By the product of the two strings, we mean the string wv = a 1 ...a n b 1 ...b m , and this operation is known as concatenation. The following results are simple. PROPOSITION 5A. Suppose that w , v and u are strings of A . Then (a) ( wv ) u = w ( vu ) ; (b) w = w = w ; and (c) k wv k = k w k + k v k . Chapter 5 : Languages page 1 of 5 Discrete Mathematics c W W L Chen, 1991, 2008 Definition. For every n N , we write A n = { a 1 ...a n : a 1 ,...,a n A } ; in other words, A n denotes the set of all strings of A of length n . We also write A = { } . Furthermore, we write A + = [ n =1 A n and A * = A + A = [ n =0 A n . Definition. By a language L on the set A , we mean a (finite or infinite) subset of the set A * . In other words, a language on A is a (finite or infinite) set of strings of A . Definition. Suppose that L A * is a language on A . We write L = { } . For every n N , we write L n = { w 1 ...w n : w 1 ,...,w n L } . Furthermore, we write L + = [ n =1 L n and L * = L + L = [ n =0 L n ....
View Full Document

This note was uploaded on 12/20/2009 for the course MATH 245 taught by Professor ramaswamy during the Spring '08 term at San Diego State.

Page1 / 5

MATH 245 CH5 - DISCRETE MATHEMATICS W W L CHEN c W W L...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online