1

How can I prove using a reduction method that a language's length is divided by 2? L={ | is a Turing machine where |L(M)|= 0 mod 2}

I have 2 ideas but I am afraid to follow the wrong one 1) I use the reduction method with Amt and I say that the turing machine takes an x=w0.....wi as input and accept if and only if wi = 0 mod 2 .

2) I use the reduction method with NOT HALT, and I say that the turing machine will refuse any input, so the length of the turing machine will be 0 which is satisfies the condition above!

Any Suggestion ?

templatetypedef
  • 362,284
  • 104
  • 897
  • 1,065
Zok
  • 355
  • 2
  • 15

1 Answers1

2

Here's one option. Given a TM M and a string w, build this new TM N:

N = "On input x:
        If x isn't the empty string, reject.
        Otherwise, run M on w.
        If M accepts, accept; if M rejects, reject.
        (Implicitly, if M loops on w, N loops on x.)"

This TM has the property that if M accepts w, then L(N) = {ε}, so |L(N)| = 1. Otherwise, if M doesn't accept w, then L(N) = ∅, so |L(N)| = 0.

See if you can use that in a reduction.

Here are two other approaches you could take:

  1. Apply Rice's theorem to immediately conclude that this language is undecidable because asking whether |L(M)| is even is a nontrivial property of the RE languages.
  2. Use the Recursion Theorem: build a TM that asks whether its language has an even number of strings in it, then chooses to accept nothing if the answer is "yes" and just the empty string if the answer is "no." This TM's language has even size if and only if it doesn't - a contradiction!
templatetypedef
  • 362,284
  • 104
  • 897
  • 1,065
  • Do I need to add examples for the Rice Theorem? Or it is suffisant to write that the property is nontrivial? @templatetypedef – Zok Dec 07 '15 at 21:41
  • For the reduction you wrote above, in case L(N)={ε}, so the length = 1, then doesnt belong to L right? – Zok Dec 07 '15 at 22:08