26.10.2014 Views

Closure Properties of Decidable and Recognizable Languages ...

Closure Properties of Decidable and Recognizable Languages ...

Closure Properties of Decidable and Recognizable Languages ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong> <strong>and</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Robb T.<br />

Koether<br />

Homework<br />

Review<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

Assignment<br />

<strong>Closure</strong> <strong>Properties</strong> <strong>of</strong> <strong>Decidable</strong> <strong>and</strong><br />

<strong>Recognizable</strong> <strong>Languages</strong><br />

Lecture 28<br />

Problems 3.15 <strong>and</strong> 3.16<br />

Robb T. Koether<br />

Hampden-Sydney College<br />

Fri, Oct 31, 2008


Outline<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong> <strong>and</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Robb T.<br />

Koether<br />

Homework<br />

Review<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

Assignment<br />

1 Homework Review<br />

2 <strong>Closure</strong> <strong>Properties</strong> <strong>of</strong> <strong>Decidable</strong> <strong>Languages</strong><br />

Intersection<br />

Union<br />

3 <strong>Closure</strong> <strong>Properties</strong> <strong>of</strong> <strong>Recognizable</strong> <strong>Languages</strong><br />

Intersection<br />

Union<br />

4 Assignment


Homework Review<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong> <strong>and</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Robb T.<br />

Koether<br />

Homework<br />

Review<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

Exercise 3.6, page 160.<br />

In Theorem 3.21 we showed that a language is<br />

Turing-recognizable iff some enumerator enumerates it.<br />

Why didn’t we use the following simpler algorithm for the<br />

forward direction <strong>of</strong> the pro<strong>of</strong>? As before, s 1 , s 2 , . . . is a list <strong>of</strong><br />

all strings in Σ ∗ .<br />

E = “Ignore the input.<br />

1 Repeat the following for i = 1, 2, 3, . . .<br />

2 Run M on s i .<br />

3 If it accepts, print out s i .”<br />

Assignment


Homework Review<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong> <strong>and</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Robb T.<br />

Koether<br />

Homework<br />

Review<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

Exercise 3.7, page 160.<br />

Explain why the following is not a description <strong>of</strong> a legitimate<br />

Turing machine.<br />

M bad = “The input is a polynomial p over variables x 1 , . . . , x n .<br />

1 Try all possible settings <strong>of</strong> x 1 , . . . , x n to integer values.<br />

2 Evaluate p on all <strong>of</strong> these settings.<br />

3 If any <strong>of</strong> these settings evaluates to 0, accept;<br />

otherwise, reject.”<br />

Assignment


<strong>Closure</strong> <strong>Properties</strong> <strong>of</strong> <strong>Decidable</strong> <strong>Languages</strong><br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong> <strong>and</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Robb T.<br />

Koether<br />

Homework<br />

Review<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

Theorem (<strong>Closure</strong> <strong>Properties</strong> <strong>of</strong> <strong>Decidable</strong> <strong>Languages</strong>)<br />

The class <strong>of</strong> decidable languages is closed under<br />

Union<br />

Intersection<br />

Complementation<br />

Concatenation<br />

Star<br />

Assignment


<strong>Closure</strong> Under Intersection<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong> <strong>and</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Robb T.<br />

Koether<br />

Homework<br />

Review<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

Theorem<br />

If L 1 <strong>and</strong> L 2 are decidable, then L 1 ∩ L 2 is decidable.<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

Assignment


<strong>Closure</strong> <strong>of</strong> Intersection<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong> <strong>and</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Robb T.<br />

Koether<br />

Homework<br />

Review<br />

Pro<strong>of</strong>.<br />

Let D 1 be a decider for L 1 <strong>and</strong> let D 2 be a decider for L 2 .<br />

Then build a decider D for L 1 ∩ L 2 as in the following<br />

diagram.<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

w<br />

D<br />

yes<br />

yes<br />

D 1 D 2<br />

yes<br />

Union<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

no<br />

no<br />

no<br />

Intersection<br />

Union<br />

Assignment


<strong>Closure</strong> Under Union<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong> <strong>and</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Robb T.<br />

Koether<br />

Homework<br />

Review<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

Theorem<br />

If L 1 <strong>and</strong> L 2 are decidable, then L 1 ∪ L 2 is decidable.<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

Assignment


<strong>Closure</strong> Under Union<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong> <strong>and</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Robb T.<br />

Koether<br />

Homework<br />

Review<br />

Pro<strong>of</strong>.<br />

Let D 1 be a decider for L 1 <strong>and</strong> let D 2 be a decider for L 2 .<br />

Then build a decider D for L 1 ∪ L 2 as in the following<br />

diagram.<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

w<br />

D<br />

no<br />

no<br />

D 1 D 2<br />

no<br />

Union<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

yes<br />

yes<br />

yes<br />

Intersection<br />

Union<br />

Assignment


<strong>Closure</strong> Under Other Operators<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong> <strong>and</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Robb T.<br />

Koether<br />

Homework<br />

Review<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

How would we show that if L 1 <strong>and</strong> L 2 are decidable,<br />

then so are<br />

L 1 L 2<br />

L 1<br />

L ∗ 1<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

Assignment


<strong>Closure</strong> <strong>Properties</strong> <strong>of</strong> <strong>Recognizable</strong> <strong>Languages</strong><br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong> <strong>and</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Robb T.<br />

Koether<br />

Homework<br />

Review<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

Theorem (<strong>Closure</strong> <strong>Properties</strong> <strong>of</strong> <strong>Recognizable</strong> <strong>Languages</strong>)<br />

The class <strong>of</strong> recognizable languages is closed under<br />

Union<br />

Intersection<br />

Concatenation<br />

Star<br />

Assignment


<strong>Closure</strong> Under Intersection<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong> <strong>and</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Robb T.<br />

Koether<br />

Homework<br />

Review<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

Theorem<br />

If L 1 <strong>and</strong> L 2 are recognizable, then L 1 ∩ L 2 is recognizable.<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

Assignment


<strong>Closure</strong> Under Intersection<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong> <strong>and</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Robb T.<br />

Koether<br />

Homework<br />

Review<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

Pro<strong>of</strong>.<br />

Let R 1 be a recognizer for L 1 <strong>and</strong> let R 2 be a recognizer<br />

for L 2 .<br />

Then build a recognizer R for L 1 ∩ L 2 as in the following<br />

diagram.<br />

w<br />

R<br />

yes<br />

yes<br />

R 1 R 2<br />

yes<br />

Assignment


<strong>Closure</strong> Under Union<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong> <strong>and</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Robb T.<br />

Koether<br />

Homework<br />

Review<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

Theorem<br />

If L 1 <strong>and</strong> L 2 are recognizable, then L 1 ∪ L 2 is recognizable.<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

Assignment


<strong>Closure</strong> Under Union<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong> <strong>and</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Robb T.<br />

Koether<br />

Homework<br />

Review<br />

Pro<strong>of</strong>.<br />

Let R 1 be a recognizer for L 1 <strong>and</strong> let R 2 be a recognizer<br />

for L 2 .<br />

Then build a recognizer R for L 1 ∪ L 2 as in the following<br />

diagram.<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

R<br />

R 1<br />

yes<br />

Union<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

w<br />

R 2<br />

yes<br />

yes<br />

Union<br />

Assignment


<strong>Closure</strong> <strong>of</strong> Union<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong> <strong>and</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Robb T.<br />

Koether<br />

Homework<br />

Review<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

Pro<strong>of</strong>.<br />

In that diagram, we must be careful to alternate<br />

execution between R 1 <strong>and</strong> R 2 .<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

Assignment


<strong>Closure</strong> Under Other Operators<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong> <strong>and</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Robb T.<br />

Koether<br />

Homework<br />

Review<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

How would we show that if L 1 <strong>and</strong> L 2 are recognizable,<br />

then so are<br />

L 1 L 2<br />

L ∗ 1<br />

Why is L 1 not necessarily recognizable?<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

Assignment


Assignment<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong> <strong>and</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Robb T.<br />

Koether<br />

Homework<br />

Review<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Decidable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

Homework<br />

Read Section 3.2, pages 152 - 154.<br />

Problems 15, 16, page 161.<br />

<strong>Closure</strong><br />

<strong>Properties</strong> <strong>of</strong><br />

<strong>Recognizable</strong><br />

<strong>Languages</strong><br />

Intersection<br />

Union<br />

Assignment

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!