Presents
Download
1 / 24

presents - PowerPoint PPT Presentation


  • 105 Views
  • Uploaded on

presents. Reducibility. w ith Dr. Bunsen Honeydew. Hello, I’m Dr. Bunsen Honeydew. Today we’re going to talk about Reducibility . We’ve been having some…issues here around the studio. .

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'presents' - mick


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

Reducibility

Reducibility

with Dr. Bunsen Honeydew




Presents

Beaker started experimenting with Turing Machines and…well, he found about about the Halting Problem the hard way.


Presents

He’s still looping. and…well, he found about


Presents

Now, on to our lesson and…well, he found about


Presents

Suppose we have a context-free grammar, and…well, he found about EQCFG which we want to prove is undecidable. We use reducability!


Presents

Determining that and…well, he found about EQCFG is undecidable is easy when we remember Corollary 5.23, which some incredibly smart person figured out for us. . .


Presents

Corollary 5.23 says: and…well, he found about

If A ≤m B and A is undecidable, then B is undecidable


Presents

That means that if you have something that and…well, he found about is undecidable, you can reduce it to a second object to prove that it is undecidable as well.


Presents

So let’s use this corollary to prove that and…well, he found about EQCFG is undecidable. Do we know of anything that is already undecidable?


Presents

We already know that and…well, he found about ALLCFG is undecidable!


Presents

Indeed. So if and…well, he found about ALLCFG is undecidable, we should follow Corolary 5.23 and reduce it to EQCFG show that EQCFG is also undecidable


Presents

Let’s go to the chalkboard. . . and…well, he found about


Presents

Goal: and…well, he found about reduce ALLCFG to EQCFG to show that EQCFG is undecidable

Phase1

Set up our contradiction proof

First, let’s just assume that EQCFG is actually decidable. Then we’re going to create a decider for it named E.

Now, let’s make a decider which will decide ALLCFG an we’ll call

it A. A does something special though. A is going to use E like a subroutine, giving it the ability to decide EQCFG

as well as ALLCFG

Since A is our decider,

if ALLCFG is decidable, A will accept

else reject

So now that we have our deciders, let’s build our machine!


Presents

For our decider A, we need to define certain actions for certain inputs, just like if we were writing code for A . . .

Now, for the input, let’s use an arbitrary name, G1. Now, ALLCFG is defined as:

ALLCFG = {<G1> | G1 is a CFG and L(G1)=Σ*} so G1 is a Context Free Grammar with the language Σ*. So write our definition for A as follows:

A: “on input <G1> (a CFG with the language defined above)

1. Change <G1> into <G2,G3>

2. Return E(<G2>,<G3>) (E is our decider for EQCFG )

You’ll notice that in number 1, we say we’re going to CHANGE G1.

Why?


Presents

  • This is part of certain inputs, just like if we were writing code for A . . . Reducing something. We have input which is of ALLCFG. If we can change that input to be like EQCFG, then it means that ALLCFG and EQCFG are the same and therefore, both undecidable. Right?

  • So let’s skip ahead and look at what our final output will look like:

  • What will the change need to satisfy?? (This is part of phase 3)

    • <G1> ∈ ALLCFG => <G2, G3> ∈ EQCFG

      • This means that some G1, which is a member of ALLCFG will need to change into G2,G3, which are members of EQCFG

    • <G1> ∉ ALLCFG => <G2, G3> ∉ EQCFG

      • This means that some G1, which is not a member of ALLCFG will need to change into G2,G3, which are not members of EQCFG


Presents

Now that we have a little preview of our goal, let’s skip ahead and look at the second step of our reduction proof:

Phase2

Now let’s actually change G1, like we were just talking about

“On input <G1>

1. Let some G2 = G1 (so we now have a CFG G2 which is

exactly the same as G1

2. Build G3 with L(G3) = Σ* (so the language is Σ*)

Output <G2, G3>”

Now that we have effectively changed, G1 into G2,G3. Now let’s see if it met our goals that we just talked about.


Presents

Phase ahead and look at the second step of our reduction proof:3

<G1> ∈ ALLCFG and the language of G1 is as follows: L(G1) = Σ*

We created G2 as a copy of G1 so L(G2) is like L(G1) and = Σ*

When we created G3, we defined its language as Σ*; therefore, L(G3)

also = Σ*

Let’s review that EQ = { <G2,G3>|G2 and G3 are CFGs and L(G2) = L(G3) }

Are the languages of G2 and G3 the same?

YES!

Therefore, we can conclude that:

<G2, G3> ∈ EQCFG because L(G2) = L(G3)


Presents

Phase ahead and look at the second step of our reduction proof:3 Cont’d

That proves that the languages are the same, but can we show the reverse?

<G1> ∉ ALLCFGthen L(G1) ≠ Σ* (common sense if we look at the definition)

So L(G2) – and remember that G2 is a copy of G1 – L(G2) ≠ Σ*

Therefore, L(G2) ≠ L(G3) = Σ* (we defined the language of G3 as being Σ*!)

So we can conclude that

<G2, G3> ∉ EQCFG


Presents

So back to our decider. Does A accept? ahead and look at the second step of our reduction proof:


Presents

Heavens no. The contradiction lies in the ahead and look at the second step of our reduction proof:undecidability of ALLCFG, not EQCFG