This preview shows pages 1–4. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS 373: Theory of Computation Gul Agha Mahesh Viswanathan Fall 2010 1 1 Operations on Languages Operations on Languages Recall: A language is a set of strings We can consider new languages derived from operations on given languages e.g., L 1 L 2 , L 1 L 2 , 1 2 L , ... A simple but powerful collection of operations: Union, Concatenation and Kleene Closure Union is a familiar operation on sets. We define and explain the other two operations below. Concatenation of Languages Definition 1. Given languages L 1 and L 2 , we define their concatenation to be the language L 1 L 2 = { xy  x L 1 , y L 2 } Example 2 . L 1 = { hello } and L 2 = { world } then L 1 L 2 = { helloworld } L 1 = { 00 , 10 } ; L 2 = { , 1 } . L 1 L 2 = { 000 , 001 , 100 , 101 } L 1 = set of strings ending in 0; L 2 = set of strings beginning with 01. L 1 L 2 = set of strings containing 001 as a substring L { } = L . L = . Kleene Closure Definition 3. L n = ( { } if n = 0 L n 1 L otherwise L * = [ i L i i.e., L i is L L L (concatenation of i copies of L ), for i > 0. L * , the Kleene Closure of L : set of strings formed by taking any number of strings (possibly none) from L , possibly with repetitions and concatenating all of them. If L = { , 1 } , then L = { } , L 2 = { 00 , 01 , 10 , 11 } . L * = set of all binary strings (including ). = { } . For i > 0, i = . * = { } is one of only two languages whose Kleene closure is finite. Which is the other? { } * = { } . 2 2 Regular Expressions 2.1 Definition and Identities Regular Expressions A Simple Programming Language Figure 1: Stephen Cole Kleene A regular expression is a formula for representing a (complex) language in terms of elementary languages combined using the three operations union, concatenation and Kleene closure....
View
Full
Document
This note was uploaded on 10/04/2011 for the course CS 373 taught by Professor Viswanathan,m during the Fall '08 term at University of Illinois, Urbana Champaign.
 Fall '08
 Viswanathan,M

Click to edit the document details