Proving the decidability of a language

707 Views Asked by At

I'm having issues with the decidability concept of a language especially the proving parts. I haven't been able to grasp the concept behind the prove completely and i need some assistance for it. The question i have:

If L is a language and s is a string, then L△s denotes the language formed by removing s from L if it is there already, and adding s to L otherwise. In other words:

enter image description here

Prove that L is decidable if and only if L△s is decidable.

Here's what I've tried:

If L△s is undecidable, then there will be no decider for it, together with the mapping reduction from L to L△s. So L is undecidable.

If L is undecidable, then there will be no decider for it, together with the mapping reduction from L△s to L. So L△s is undecidable.

Therefore, L is decidable if and only if L△s is decidable. Therefore, L undecidable if and only if L△s is undecidable.

============================================================

I sort of get the idea of the prove, but i find that I'm not relating with the question in terms of the removal of s from the language. Could anyone please help me out with this on how the prove can be completed?

1

There are 1 best solutions below

2
On

Suppose $L$ is decidable and let $M$ be a decider for $L$.
A decider for $L\triangle s$ is then:

D = On input s
       Run M on s
       if M accepts
           reject
       else
           accept

The proof that if $L\triangle s$ is decidable then so is $L$ is similar.
Or you can use the theorem that if a language is decidable then so is its complement.