Solving Recursive Sets with Turing Machines

Click For Summary
SUMMARY

The discussion centers on proving that a set is recursive if and only if both the set and its complement are recursively enumerable. A Turing machine (TM) is constructed to demonstrate that if a recursive set \( A \) is decided by TM \( M \), then its complement \( A^c \) is also recursively enumerable through the construction of TM \( M' \) and TM \( M'' \). Conversely, if both \( A \) and \( A^c \) are recursively enumerable, a TM \( M \) can be constructed to simulate both TMs \( M_1 \) and \( M_2 \) that semi-decide \( A \) and \( A^c \), respectively, ensuring that \( M \) will always halt with a definitive output.

PREREQUISITES
  • Understanding of Turing machines (TMs)
  • Knowledge of recursive and recursively enumerable sets
  • Familiarity with formal language theory
  • Basic concepts of computability theory
NEXT STEPS
  • Study the construction of Turing machines for specific languages
  • Learn about the implications of the Church-Turing thesis
  • Explore the differences between recursive and recursively enumerable sets
  • Investigate the halting problem and its significance in computability
USEFUL FOR

Students and researchers in computer science, particularly those focused on theoretical computer science, automata theory, and computability. This discussion is beneficial for anyone looking to deepen their understanding of Turing machines and recursive sets.

mathmari
Gold Member
MHB
Messages
4,984
Reaction score
7
Hey! :o

I have to show that a set is recursive if and only if the set and its complement is recursively enumerable.

I have done the following:

$\Rightarrow$
Let $A$ the recursive set, so there is a Turing machine $M$ that decides the set $A$. We construct a TM $M'$ that semi-decides the set $A$. If the TM $M$ accepts the input, then the TM $M'$ accepts the input too. If the TM $M$ doesn't accept the input, then the TM $M'$ doesn't halt on this input.
That means that there is a TM that semi-decides te set $A$. So, any recursive set is recursively enumerable.

If the set $A$ is recursive there is a TM $M$ that decides the set $A$. We construct a TM $M''$ that decides the set $A^c$. If the TM $M$ accepts the input, then the TM $M''$ doesn't accept the input and if the TM $M$ doesn't accept the input, then the TM $M''$ accepts it.

So, if the set $A$ is recursive, the complement is also recursive. So, the set $A^c$ is also recursively enumerable. That means that if the set $A$ is recursive, then the sets $A$ and $A^c$ are recursively enumerable.
$\Leftarrow$
Let $A$ and $A^c$ be recursively enumerable. That means that there are TM $M_1$ and $M_2$ that semi-decides the set $A$ and $A^c$ respectively. We construct a TM $M$ that simulates simultaneously $M_1$ and $M_2$. $M$ accepts the input if $M_1$ accepts it and rejects it if $M_2$ accepts it. Since the input is either in $A$ or in $A^c$ exactly one of $M_1$ or $M_2$ will accept. That means that $M$ will always have the output either "yes" or "no", but will never have both.

That means that there is a TM that accepts $A$. So, $A$ is recursive. Is this correct? Could I improve something?
 
Technology news on Phys.org
Yes, this is correct. You may elaborate on "a TM $M$ that simulates simultaneously $M_1$ and $M_2$". How do you do this?
 
Evgeny.Makarov said:
Yes, this is correct. You may elaborate on "a TM $M$ that simulates simultaneously $M_1$ and $M_2$". How do you do this?

The input of $M$, let $w$, is given simultaneously to the TMs $M_1$ and $M_2$ as inputs. One of these two machines will halt. If the machine that halts is $M_1$ the TM $M$ accepts $w$ and if it is $M_2$ then the TM $M$ rejects $w$.

View attachment 4475

Is this correct?
 

Attachments

  • TM!.png
    TM!.png
    3.1 KB · Views: 124
Yes, it's fine.
 
Ok... Thank you! (Smile)
 

Similar threads

Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
1
Views
2K
Replies
29
Views
5K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 18 ·
Replies
18
Views
4K
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K