LanguageDefinitions - Strings and Languages Operations...

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

View Full Document Right Arrow Icon
1 Strings and Languages Operations Concatenation Exponentiation Kleene Star Regular Expressions
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Strings and Language Operations Concatenation Exponentiation Kleene star Pages 28-32 of the recommended text Regular expressions Pages 85-90 of the recommended text
Background image of page 2
3 String Concatenation If x and y are strings over alphabet Σ , the concatenation of x and y is the string xy formed by writing the symbols of x and the symbols of y consecutively. Suppose x = abb and y = ba xy = abb ba yx = ba abb
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 Properties of String Concatenation Suppose x, y, and z are strings. Concatenation is not commutative. xy is not guaranteed to be equal to yx Concatenation is associative (xy)z = x(yz) = xyz The empty string is the identity for concatenation x/\ = /\x = x
Background image of page 4
5 Language Concatenation • Suppose L 1 and L 2 are languages (sets of strings). • The concatenation of L 1 and L 2 , denoted L 1 L 2 ,is defined as • L 1 L 2 = { xy | x L 1 and y L 2 } Example, • Let L 1 = { ab, bba } and L 2 = { aa, b, ba } • What is L 1 L 2 ? Solution • Let x 1 = ab, x 2 = bba, y 1 = aa, y 2 = b, y 3 = ba • L 1 L 2 = { x 1 y 1 , x 1 y 2 , x 1 y 3 , x 2 y 1 , x 2 y 2 , x 2 y 3 } = { ab aa, ab b, ab ba, bba aa, bba b, bba ba}
Background image of page 5

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

View Full DocumentRight Arrow Icon
6 Language Concatenation is not commutative • Let L 1 = { aa, bb, ba } and L 2 = { /\, aba } • Let x 1 = aa, x 2 = bb, x 3 =ba, y 1 = /\, y 2 = aba • L 1 L 2 = { x 1 y 1 , x 1 y 2 , x 2 y 1 , x 2 y 2 , x 3 y 1 , x 3 y 2 } = { aa
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 20

LanguageDefinitions - Strings and Languages Operations...

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

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