1

Given a language $L$ that is recursive prove that $Prefix(L) = \{ x \ | \ xv \in L\}$ is recursively enumerable.

My first attempt at this was to try and formulate an algorithm in pseudocode.

Prefix-Recogniser(x)
    for v in Σ*:
     w = xv
     if L-Decider(w) -> YES:
      return YES

Since $L$ is recursive a decider for it say $M$ exists and if $x$ is a prefix of $L$ at some point Prefix-Recogniser will respond with YES.

A Turing Machine can be easily implemented for the pseudocode above but is my thought process correct?

RookieCookie
  • 165
  • 6

1 Answers1

0

Yes your way is true. Because when L is recursive, your language should have a decidable alphabet. Because if it doesn't, then the set of your language's words can't contain a recursive subset. So your way to enumerate all possible words is true.