SlideServe
Menu
Préférences
© SlideServe · v2026

Strings and Languages

cardea avatar
12 diapositives · 338 Views · Sep 12, 2014

Strings and Languages. Jim Skon Mount Vernon Nazarene College. Sequences and Strings. alphabet - a set of symbols , denoted by  string (or word) - a finite sequence of elements from  example:  = {a, b} possible strings include: a aa ab ba abaa bbb aaaa

Strings and Languages - slide 1
01 / 12Strings and Languages
1 / 17

Télécharger la présentation

Strings and Languages
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Strings and Languages Jim Skon Mount Vernon Nazarene College Sets - Elementary Discrete Math

  2. Sequences and Strings • alphabet - a set of symbols, denoted by  • string (or word) - a finite sequence of elements from  • example: •  = {a, b} • possible strings include: • a aa ab ba abaa bbb aaaa • bbaa abab abbbababbbabbababa • "abba" is a string over • empty word -  (lambda) • * is set of all words over  • - * = {x | x is a word over } • - always includes  • - * is always infinite if  has elements • other interesting alphabets • -  = {0, 1} (binary words) • -  = {1} • -  = {a,b,c,d, . . ., z} • word length • - number of symbols in word (or string) Sets - Elementary Discrete Math

  3. n where n is an integer • - set of all strings of length n • - let ={0, 1}, find: • 1 • 2 • 3 • 0 • - let  = {a, b, c} • For any n it must be true that n*. • - 1* • - 5* • - 65* Sets - Elementary Discrete Math

  4. n where n is an integer • - set of all strings over  with length at most n • - let  = {0, 1}, find: • 1 • 2 • 0 • For any n it must be true that n*. • - 1* • - 4* • - 77* • For a given alphabet , what is the relationship • between n and n? (First think about 2 and 2) Sets - Elementary Discrete Math

  5. Any subset of * is called a language over . • ex: let  = {0,1} • L1 = {x | 2  length(x)  4 and x * } Sets - Elementary Discrete Math

  6. L2 = {x | same number of 0s as 1s and x * } Sets - Elementary Discrete Math

  7. L3 = {x | no leading zeros and x * } Sets - Elementary Discrete Math

  8. n and nare languages over. Sets - Elementary Discrete Math

  9. SET OPERATORS • Sets with no common elements are called disjoint • - If A  B = Ø, then A and B are disjoint. • - ex: n and m are disjoint if n m. • Are n and n disjoint? • What about n and n+1? Sets - Elementary Discrete Math

  10. SET OPERATORS • If A1, A2, . . . An are sets, and no two have a common element, then we say they are mutually disjoint. • Ai  Aj = Ø for all i,j  n and i  j • ex: 0, 1, 2, 3 ,... are all mutually disjoint • 0, 1, 2, 3 ,... are these mutually disjoint? Sets - Elementary Discrete Math

  11. Sets - Elementary Discrete Math

  12. Sets - Elementary Discrete Math