In: Computer Science
Set T of integers is recursively defined as follows:
1. 1 is in set T
2. If x is in set T, then x + 2 and 2 ∙ x are both in T.
Which of these integers are in set T? 0 7 11 13 19 24
please explain why if possible, thank you!
All of the integers are present in set T.
Let's start with 1, if one is present, that means (here x= 1) x+2=3 and x*2=2 are present.
Now take x = 2, we saw that 2 is present from the previous step, this means x+2 = 4 and x*2=4 again, is also present.
3 is present as per the first step, so now let's take x = 3, this means x+2 = 5, and x*2 = 6 are also present.
Till now, we have elements 1,2,3,4,5,6 in our set.
Now, let's proceed further.
We have 4 in our set, let's take x = 4, which means x+2 = 6 and x*2 = 8 are also present in the set.
Moving further, we have 5 in our set, so we also have (x=5), x+2 = 7 and x * 2 = 10 in our set.
If we move on in this manner we will see that we are able to find all the elements given to be present in our set.
As far as zero is concerned, we know that 2 is present in the set, we also know that if any number x is present in the set, x+2 is also present in the set, here if we consider x+2=2, we will see that the value of x comes out to be zero(0). This means 0 is also present in the given set.