Question

In: Computer Science

A set M of numbers is defined recursively by 1. 2 and 3 belong to M...

A set M of numbers is defined recursively by

1. 2 and 3 belong to M
2. If x and y belong to M, so does x * y

Which of the following numbers belong to M?
6, 9, 16, 21, 26, 54, 72, 218

Solutions

Expert Solution

One approach to solve this problem can be as below:

First prepare a set of numbers upto 218 and then check which numbers are in the set.

Second approach can be while computing the numbers in the set also check whether the given numbers are in the set or no, as they are already arranged in the ascending order.

So let us start building set M

Given: {1,2,3,....}

Add 1X2, 1X3, 2X3 to this set and we get

set M = {1,2,3,6,...}

The new number added must be multipled by every other number excluding the 1st as multiplying by 1 gives the same no.

Add 2X6,3X6

set M = {1,2,3,6,12,18,....}

New numbers 12 and 18 are added to the set

Add 2X12,3X12,6X12,2X18,3X18,6X18,12X18

the new numbers are 24,36,72,36,54,216

So that makes set M look as below, once these numbers are arranged in the ascending order:

set M = {1,2,3,6,12,18,24,36,54,72,216....}

The new numbers are to be multipled by every previous number, only upto max value of 218

2X24,3X24,6X24,12X24,2X36,2X54,6X54,18X54,24X54,2X72,3X72,6X72,12X72,...

New numbers 48,72,144,72,108,216,...(excluding numbers like 6X54=326, that are higher than 218)

set M = {1,2,3,6,12,18,24,36,48,54,72,108,144,216....}

Now let us check the numbers that belong to the set and these are

6, 54, 72

Here we have made the assumption that x*x does not belong to the set. Every number can be used only once.

Numbers that have been excluded are 9,16,21,26,218

If x*x is also in the set then 9 and16 will also be in the set as 3X3, 2X2 =4 and 4X4=16

However 21 has a prime factor 7, 26 has a prime factor 13 and 218 has a prime factor 109 which are not in the given initial set. So these numbers are not part of M.

Third approach to solve this problem:

If there is such huge set to be checked, then another algorithm can be used to check the prime factors of the numbers and clearly exclude those numbers for which prime factor is not a part of the given set.


Related Solutions

Let {an} be a sequence defined recursively by a1 = 1 and an+1 = 2√ 1...
Let {an} be a sequence defined recursively by a1 = 1 and an+1 = 2√ 1 + an where n ∈ N (b) Does {an} converge or diverge? Justify your answer, making sure to cite appropriate hypotheses/theorem(s) used. Hint : Try BMCT [WHY?]. (c) (Challenge) If {an} converges then find its limit. Make sure to fully justify your answer.
1.Prove the following statements: . (a) If bn is recursively defined by bn =bn−1+3 for all...
1.Prove the following statements: . (a) If bn is recursively defined by bn =bn−1+3 for all integers n≥1 and b0 =2, then bn =3n+2 for all n≥0. .(b) If cn is recursively defined by cn =3cn−1+1 for all integers n≥1 and c0 =0, then cn =(3n −1)/2 for all n≥0. .(c) If dn is recursively defined by d0 = 1, d1 = 4 and dn = 4dn−1 −4dn−2 for all integers n ≥ 2, then dn =(n+1)2n for all n≥0.
The Fibonacci numbers are recursively dened by F1 = 1; F2 = 1 and for n...
The Fibonacci numbers are recursively dened by F1 = 1; F2 = 1 and for n > 1; F_(n+1) = F_n + F_(n-1): So the rst few Fibonacci Numbers are: 1; 1; 2; 3; 5; 8; 13; 21; 34; 55; 89; 144; : : : There are numerous properties of the Fibonacci numbers. a) Use the principle of Strong Induction to show that all integers n > 1 and m > 0 F_(n-1)F_(m )+ F_(n)F_(m+1) = F_(n+m): Solution. (Hint: Use...
Consider the set of integers A = {1, 2, 3, 4, 5}. Pairs of numbers are...
Consider the set of integers A = {1, 2, 3, 4, 5}. Pairs of numbers are constructed where each number of the pair comes from set A. Construct the sampling distribution of sample ranges. Apply the Empirical Rule to this distribution.
Consider the set of integer numbers from 0 to 9, that is {0, 1, 2, 3,...
Consider the set of integer numbers from 0 to 9, that is {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. Bob wishes to use these numbers to create a 7-digit password to secure his new laptop. Note that each number can appear in any position (for example, 0 can be the first number in the password). (a) Find the number of 7-digit passwords that are possible. (b) Find the number of 7-digit passwords with distinct digits. (c) Find...
The Lucas numbers are very similar to the Fibonacci numbers and are defined by a1=2, a2=1,...
The Lucas numbers are very similar to the Fibonacci numbers and are defined by a1=2, a2=1, and an+2=an+1+an. So the first five are 2, 1, 3, 4, 7 and it continues in that fashion. Give the next 4 Lucas numbers
Consider the set of numbers {1...200} Denote by A the set of multiples of 2 in...
Consider the set of numbers {1...200} Denote by A the set of multiples of 2 in this set. Denote by B the set of multiples of 5 in this set. Denote by C the set of multiples of 11 in this set. How many numbers in {1...200} are divisible by at least one of 2,5 and 11? How many numbers in {1...200} are relatively prime to 110 ? (Relatively prime means they do not share any factors.) How many numbers...
Fibonacci numbers are defined by F0 = 0, F1 = 1 and Fn+2 = Fn+1 +...
Fibonacci numbers are defined by F0 = 0, F1 = 1 and Fn+2 = Fn+1 + Fn for all n ∈ N ∪ {0}. (1) Make and prove an (if and only if) conjecture about which Fibonacci numbers are multiples of 3. (2) Make a conjecture about which Fibonacci numbers are multiples of 2020. (You do not need to prove your conjecture.) How many base cases would a proof by induction of your conjecture require?
Show that the numbers 1, 3, 3^2 , . . . , 3^15 and 0 for...
Show that the numbers 1, 3, 3^2 , . . . , 3^15 and 0 for a complete system of residues (mod 17). Do the numbers 1, 2, 2^2 , . . . , 2^15 and 0 constitute a complete system of residues (mod 17)?
Consider the following set of numbers: {3, 5, 2, 5, 5, 15, 2, 2, 4, 4,...
Consider the following set of numbers: {3, 5, 2, 5, 5, 15, 2, 2, 4, 4, 20, 4998, 4} 14. The Q3 of this set is: a. 4 b. 5 c. 2 d. 10 15. The Q1 of this set is: a. 4 b. 5 c. 2 d. 2.5 e. 3
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT