02-regular-languages-FA

02-regular-languages - Strings Languages Sequences or strings of symbols and characters are fundamental in computer science We use strings of

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

View Full Document Right Arrow Icon
Sequences or strings of symbols and characters are fundamental in computer science. We use strings of symbols to represent data and most importantly we use them to represent algorithms. We formalize these structures as follows: An alphabet is any non-empty, finite set. The elements of an alphabet are called symbols . Examples: Σ= { 0 , 1 } Σ 0 = { a, b, c, d } Γ= { this,and,that } A string over an alphabet is a finite sequence of symbols from that alphabet. Example: Given the alphabet Σ= { 0 , 1 } then the following are strings over this alphabet: 011001 , 000000 , 1 . –p
Background image of page 1

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

View Full DocumentRight Arrow Icon
Operations on Strings If w is a string over Σ , then the length of w , written | w | , is the number of symbols w contains. The empty string , usually written as ± , is a string where | ± | =0 . Given a string w of length n , we can write w = w 1 w 2 ...w n where w i Σ . Furthermore, we can define the reverse of w by w R = w n w n 1 ...w 1 . Some string
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/03/2011 for the course CSC 544 taught by Professor Staff during the Spring '11 term at Rhode Island.

Page1 / 11

02-regular-languages - Strings Languages Sequences or strings of symbols and characters are fundamental in computer science We use strings of

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