LanguageDefinitions

# LanguageDefinitions - Strings and Languages Operations...

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

1 Strings and Languages Operations Concatenation Exponentiation Kleene Star Regular Expressions

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

View Full Document
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
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

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

View Full Document
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
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}

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

View Full Document
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
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 07/25/2008 for the course CSE 460 taught by Professor Torng during the Fall '07 term at Michigan State University.

### Page1 / 20

LanguageDefinitions - Strings and Languages Operations...

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

View Full Document
Ask a homework question - tutors are online