Find the smallest positive integer N with the following property:
Any subset of { 1 , 2 , 3 , … , 2 0 1 } with N elements must contain two numbers whose greatest common divisor is exactly 2 .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Heyy thanks!!!
First, note that a subset with 1 5 2 elements must contain two numbers whose gcd is 2 because this subset necessarily contains two consecutive even integers. Thus, g c d ( 2 n , 2 n + 2 ) = 2 g c d ( n , n + 1 ) = 2 .
Now, we only need to show that there exists a 1 5 1 element subset which has no pair of elements whose gcd is 2. This can be done by creating a subset of all of the odd numbers and all of the numbers divisible by 4 . There are 1 0 1 odd numbers and 5 0 numbers divisible by 4 , thus we have just created a 1 5 1 element subset which does not contain two numbers whose gcd is 2 . So, we affirm 1 5 2 as our answer. ■
To find the smallest case where N has this property we must consider the worst case, that is, the case where we have the maximum number of elements in the subset without any pair of the integers in the subset having a greatest common divisor of 2.
The subset must therefore contain all of the odd numbers between 1 and 201 inclusive, as no two odd numbers can have a gcd of 2. Then surely if we add two more numbers to the subset, those two numbers must both be even and therefore have a gcd of 2. Not quite, of course, because we could have two even numbers with a gcd of 4 (or 8, or 16, etc). Hence the subset must contain all of the elements in the original set that are divisible by 4. Then, if we add one more element to the subset, the condition will be met.
Hence the smallest value of N is 101 (there are 101 odd integers between 1 and 201 inclusive) + 50 (there are 50 integers divisible by 4) + 1 = 152
here we have to find the smallest N such that gcd 0f 2 no. is 2 so why cant we writw (2,4) as subset and here N=2
Log in to reply
The questions says " Any subset of...". So for N=2 you could have the subset {1, 7}, which does not have the required property.
Since the question says that "for any subset" , we'll consider the worst case...
First let's find out what we need... At first we need at least two even numbers... If gcd ( a , b ) = 2 , then at least one of a and b must have exactly one 2 in it's prime factorization...
Note that in the set { 1 , 2 , 3 , . . . , 2 0 1 } , there's exactly ⌊ 2 2 0 1 ⌋ = 1 0 0 even numbers and so there's exactly 1 0 1 odd numbers... Notice that some of the even numbers have more than one 2 in it's prime factorization... Let's find out the number of evens which have only one 2 in it's prime factorization... It's simply 1 0 0 − ⌊ 4 2 0 1 ⌋ = 5 0 ...
Remember that we need to consider the worst case... Suppose the subset is S ... Let's pick up all of the 1 0 1 odd numbers in S ... Now we have all of the 1 0 0 even numbers in S c ...
For the sake of the worst case, now we pick up all 5 0 of the evens who have more than one 2 in their prime factorizations... We now have 1 0 1 + 5 0 = 1 5 1 elements in S ... Now we need just one of the remaining evens in S c who have just one 2 in their prime factorizations...
In total, we have the smallest value of N which is: N = 1 5 1 + 1 = 1 5 2
We claim that N = 1 5 2 . First, we will show that 152 satisfies the property. There are 101 odd numbers in the set, and so at least 51 of the 152 must be even. Then, all 51 numbers are elements of the set { 2 , 4 , 6 , ⋯ , 2 0 0 } and every pair of numbers must have a greatest common divisor of at least 2. If every pair of numbers has a greater common divisor, they must be all divisible by an additional prime, possibly 2. The even number larger than 2 that has the most multiples among the even numbers up to 200 is 4, which has 50 multiples. Therefore, the 51 numbers cannot all be divisible by a number larger than 2, and thus 152 satisfies the property.
It remains to be shown that 151 doesn't satisfy the property. Let A = { 1 , 3 , 5 , ⋯ , 2 0 1 } and B = { 4 , 8 , 1 2 , ⋯ , 2 0 0 } We claim that the subset A ∪ B ,with 151 elements, has no pair of elements with greatest common divisor 2. Both must be even, and thus in set B . However, all elements of B are multiples of 4, so each pair within the set A ∪ B has greatest common divisor 1 or at least 4.
Therefore, the answer is N = 1 5 2 .
Motivation: I tried to make a set with as many elements as possible without a pair with greatest common divisor of 2. I first took all the odd numbers, and then tried to find as many even numbers as possible that shared an additional divisor.
To generalize, if the set has n elements, then N = ⌈ 2 n ⌉ + ⌊ 4 n ⌋ + 1
Log in to reply
Can you explain your phrase "If every pair of numbers has a greater common divisor, they must be all divisible by an additional prime, possibly 2" ?
Log in to reply
To avoid that part, you can say that since we're picking 51 out of 100 elements in 2, 4, 6, ..., 200, which is more than half, there must be two consecutive elements. These elements have GCD 2.
Oh yeah sorry that was an incorrect statement. Michael gives a correct method to show that 152 works.
Small typoish error: I have to show that every number 151 and below, doesn't work. It doesn't require additional work though.
First take all the odd numbers 1 , 3 , … , 2 0 1 (total 1 0 1 numbers) in a set and g c d of the set is not 2 . Now add all multiple of 4 ( 4 , 8 , … , 2 0 0 , i.e., total 5 0 numbers) in the set to make the cardinality of the set 1 5 1 and still in this set no two numbers whose g c d is 2 . Now, add any one digit from the remaining numbers ( 2 , 6 , … , 1 9 8 ) in the set we can find two numbers whose greatest common divisor is exactly 2 . So the answer is 1 5 2 .
Motivation: Our motivation is to find the set with maximum cardinality and still we can't find any two numbers whose g c d is exactly 2 . So first take all odd numbers from the original set. Now we have to take two even numbers to get the g c d is exactly 2 . At this stage, if we take all digits multiple of 4 , we still unable to find any two numbers such that g c d is exactly 2 . At this stage the constructed set is of maximum cardinality and g c d is not 2 . Now add any integer from 2 , 6 , … to get two numbers whose greatest common divisor is exactly 2 .
Generalize: For any odd integer n , which is the maximum number of the set, N = 2 n + 1 + ⌊ 4 n ⌋ + 1 .
For any even integer n , which is the maximum number of the set, N = 2 n + ⌊ 4 n ⌋ + 1 .
An argument your solution is missing is this: go back to when the set only has the odd numbers in it. If you put two even numbers that are divisible by 2 but not 4 , then that doesn't guarantee that their gcd will be 2 . For example, put in 1 4 and 7 0 , the GCD is clearly 1 4 and not 2 . Add in a number divisble by 4 into the mix (e.g. 2 8 ), the pairwise GCD's are still not equal to 2 . How can you be so sure that the way you did it is maximized?
Log in to reply
In my solution, I add a number of the form 4 n − 2 for n = 1 , 2 , … first time in the set when the cardinality of the set is as maximum as possible and still we can not find two numbers whose greatest common divisor is exactly 2 .
You need to prove that any subset with 152 elements contain two numbers whose greatest common divisor is exactly 2 , not only for the subsets containing the numbers 1 , 3 , 5 , … , 2 0 1 , 4 , 8 , 1 2 , … , 2 0 0 .
Log in to reply
This is the worst case I consider. If we replace any member in the set constructed by me(i.e., the new member is of the form 4 n − 2 for n = 1 , 2 , … ), then in the new set, we must get two numbers whose greatest common divisor is exactly 2 .
Log in to reply
But what happen if you replace twenty numbers of your set by other twenty numbers and in that case is possible to add one more number?
Log in to reply
@Jorge Tipe – If I replace twenty (in general more than or equal to one) numbers with other twenty numbers of the form 4 n − 2 , then the new set already fulfill the above criteria. So no need to add more numbers.
101 odd numbers + 50 multiples of 4 + 1 even number = 152 numbers
Let U={1,2,3,...,2013}. Let P(n) be the property that any subset of U with n elements must contain two numbers whose greatest common divisor (GCD) is 2. We wish to find the smallest n for which P(n) is true.
Let S be the subset of numbers which are divisible by 2 but not by 4. Then S= {2,6,10,...,198}. Also, |S|=50.
U\S is a subset of U with 151 elements that doesn't have two numbers with GCD exactly 2. For each n<=151, we can find a subset of U\S that doesn't satisfy the desired property. Therefore P(n) is false for all n<=151. Therefore, N >=152.
Let T={4,8,12,...,200}.
Any subset A of U with 152 elements will have at least one element s from S and at least one element t from T. GCD(s,t) = 2.
For U = {1,2,3,...,K} with K>=4 (?), N=[(3K+5)/4], where [.] is the greatest integer function.
We have to find the two numbers whose GCD is exactly 2, so (4, 2) is an example.
To find this, first we eliminate all of the odd numbers because odd numbers do not have 2 as a factor.
There are ((201-1)/2)+1=101 odd numbers in this subset.
Then, we eliminate all the multiples of 4 because (multiple of 4, multiple of 4)'s GCD is 4, not 2.
There are 50 multiples of 4.
Now we will need a multiple of 2, but not of 4 to complete the subset.
It can be any multiple of 2, but not a multiple of 4. (2, 6, 10, etc.)
So the answer is 101+51+1=152.
Can you explain why 152 is the smallest number with the property?
Log in to reply
Consider the set S = { 2 k − 1 ∣ k ∈ N ≤ 1 0 1 } ∪ { 4 k ∣ k ∈ N ≤ 5 0 } This set has 1 5 1 elements, but doesn't satisfy the property.
last line -101+51+1=153 and not 152
Well your Solution was not fully explainatory!! :(
Take out all the odd numbers there are 202/2=101 of them
Take out all the multiples of 4 there are 200/4=50 of them
Then you just need 1 number divisible by 2 yet not divisible by so that when you can just choose this particular number and one of the multiples of 4 and this pair will have GCD of 2
SO grand total of 1 0 1 + 5 0 + 1 = 1 5 2
*(yet not divisible by 4) is what I meant on the 3rd line
101 ta odd no..50ta multiples of 4..total 151 elements no two of which have gcd 2. Ete 2 add kor..152 element subset
Wow he actually remixed English with Bengali !!
In {1,2,3....,201} number of odd integers is 101 , multiples of 4 is 50 and remaining odd multiples of 2 is 50. In order to get a set with GCD exactly 2, also considering worst case situation, the set should contain all the odd integers and all the even multiples of 2 (multiples of 4) (such that now the GCD is 4) and atleast one odd multiple of 2 to get an exact GCD 2. Therefore the answer is 101 + 50 + 1 = 152.
Look at the subset containing all the odd numbers in S = {1,2,3,....,201} as well as all the multiples of 4. This subset will contain 101 odd numbers and 50 multiples of 4 for a total of 151 elements, no two of which have a gcd of 2. Any remaining element a of S that we then add to this 151-element subset will be such that gcd(a,4) = 2. So this means that P = 152.
Can you explain why any other set must have fewer than 152?
Note that in order for the gcd of two numbers to be 2, they must be of the form 2 ⋅ m 1 and 2 a ⋅ m 2 , where m 1 , m 2 are odd and a ≥ 1 . So the pairs we are looking for (that have gcd=2) are of the form ( 2 m 1 , 2 a m 2 ) . (*)
The number of numbers in the set that are of the first form is 50, because m 1 can take the values 1 , 3 , . . . , 9 9 .
This means that 201-50-151 numbers cannot be the first pair in (*). This means that if N=151, one of the subsets can have no such numbers of the form 2 m 1 ( m 1 odd) and so does not satisfy the property.
Now the next number up, 152, does indeed satisfy the property. This is because by the pigeonhole principle, at least one of the numbers in any subset will be of the form 2 m 1 ( m 1 odd), and similarly by the pigeonhole principle, at least one of the remaining numbers in the subset will be of the form 2 a m 2 . So the answer is 1 5 2 .
In the third paragraph, it's meant to say: "201-50=151", not "201-50-151". Also, it is meant to say "this means that if N ≤ 1 5 1 , one of the subsets can have no such numbers..."
Number 6 has the form 2 m 1 and number 2 4 has the form 2 a m 2 , but their gcd is not 2 .
Let's look at this problem from a different point of view:
We want to find the LARGEST N for which there exists a subset of length N that haven't any pair whose gcd is 2.
We can start by adding all prime numbers in the set, we are sure that any pair's gcd is 1. Let's extend it a little bit, we actually can add all the odd numbers between 1 and 201. Now we have 101 numbers in our set and the remaining numbers are even numbers. After a little more thinking, we find out that we can add all numbers that are multiples of 4 as any pair of them will have a gcd == 4.
Lemma : if X divides Y and X divides Z then X divides Y - Z
Now we have 151 element in our set and we are left with multiples of 2 that aren't multiples of 4 at the same time, a total of 50 numbers. Now it's clear that if we add any element to the set there will be some pairs whose gcd is 2, so the answer is 1 5 2
Since we must guarantee having two numbers whose greatest common divisor is 2, it's a good idea to think of the "worst-case scenario" that we can have while constructing the subset.
First, I realized that any even number has 2 as a divisor, so then I thought about what would happen if we unluckily picked all odd numbers in the original set. This list of odd numbers is 1 , 3 , 5 , 7 , . . . , 1 9 9 , 2 0 1 , and there are 2 2 0 1 + 1 = 1 0 1 numbers in this list (add 1 to each term and divide by 2). So, we know that N is at least 1 0 1 .
Then, I thought, isn't it just 1 0 1 + 2 = 1 0 3 ? After selecting all odd numbers left, we have to pick two even numbers, so we add 2 to get 1 0 3 . But, this misses the fact that the greatest common divisor is EXACTLY 2 . Again, we could be unlucky and choose two numbers whose greatest common divisor is even, but not 2 . How would this happen? Well, if we unluckily pick all the multiples of 4 , then the greatest common divisor would be 4 . The multiples of 4 in the range are 4 , 8 , 1 2 , . . . , 1 9 6 , 2 0 0 . There are 4 2 0 0 = 5 0 terms in this list. So, our N raises to 1 0 1 + 5 0 = 1 5 1 .
Now, no matter what element we pick next, it will be even but not have a factor of 4 in it, so we add 1 to N , to get the answer, 1 5 2
Motivation: As I said before, the worst-case scenario allows us to figure out when the result will be guaranteed. Also, the fact that the GCD is exactly 2 suggests that there is a good way to solve the problem using parity.
Problem Loading...
Note Loading...
Set Loading...
First, we claim that N ≥ 1 5 2 . Consider the set that contains all multiples of 4 and odd integers. There are 1 5 1 elements, and no two numbers have gcd equal to 2 , thus N ≥ 1 5 2 .
On the other hand, N ≤ 1 5 2 because if 1 5 2 numbers is chosen from the set { 1 , 2 , 3 , . . . , 2 0 1 } , at least 1 5 2 − 1 0 1 = 5 1 of them are even. Partition the set of even numbers ≤ 2 0 0 into 5 0 pairs, { 2 , 4 } , { 6 , 8 } , . . . , { 1 9 8 , 2 0 0 } . Note that the gcd of the numbers in any pair is 2 . By pigeonhole principle, 2 of the selected numbers will fall into the same pair. This completes our proof. Thus, N = 1 5 2 .