{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

MATH 245 CH5

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

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

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 ; and (c) k wv k = k w k + k v k . Chapter 5 : Languages page 1 of 5

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

View Full Document
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 0 = { λ } . Furthermore, we write A + = [ n =1 A n and A * = A + A 0 = [ 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 0 = { λ } . 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 0 = [ n =0 L n .
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern