# Functions question, must at least one be even?

• mr_coffee
In summary, the conversation discusses the concept of choosing n+1 integers from a set of 1 to 2n, and whether at least one of them must be even. The book's explanation states that since there are n even integers in the set, the maximum number of even integers that can be chosen is n, meaning that at least one of the chosen integers must be odd. The conversation then considers the reverse concept of choosing n+1 integers from a set of 1 to 2n, and concludes that at least one of them must be even. There is a brief discussion about the maximum number of odd integers that can be chosen in this set, but it is ultimately determined that if n+1 integers are chosen, at
mr_coffee
Hello everyone.

I'm having some troubles seeing how I would apply the even case for this problem.

The problem is:
If n + 1 integers are chosen from the set {1,2,3,...,2n} where n is a postive integer, must at least one of them be even? why?

Well the book did the exact same problem but instead of even they said must at least one of them be odd? why?
Well there explanation was the following:
Yes. There are n even integers in the set {1,2,3,...,2n}, namely 2(=2x1), 4(=2x2), 6(=2x3),...,2n(2xn). So the maximum number of even integers that can be chosen is n. Thus if n + 1 integers are chosen, at least one of them must be odd.

If I apply the same concept to my problem, don;t' they answer my question in explaning that at least one of them must be odd?
Yes. There are n even integers in the set {1,2,3,...,2n}, namely 2(=2x1), 4(=2x2), 6(=2x3),...,2n(2xn). So the maximum number of even integers that can be chosen is n. Thus if n+1 integers are chosen, at least one must be even.

Or do I have to work in reverse and say:

yes. There are 2n+1 odd integers in the set {1,2,3...,2n},
namely 1(=2(0)+1),
3(=2(1)+1),
5(=2(2)+1),...
but when it comes to 2n, i can't express that as odd can i?
or do i just say, 2n+1?
So the maximum number of odd integers that can be chosen is 2n+1. Thus if n+1 integers are chosen, at least one must be even.

There are n odd integers in the numbers 1...2n. It is almost exactly the same argument your book gave.

mr_coffee said:
yes. There are 2n+1 odd integers in the set {1,2,3...,2n},

No, there aren't. There are n even integers in there, and n odd integers. There aren't even 2n+1 integers in the range 1 to 2n.

Thanks for the responce, i wrote:

yes. There are n odd integers in the set {1,2,3,...,2n},1(=1x1), 3=(3x1), 5(=5x1),...

But I'm stuck here, i can't say 2n(=2xn) Because that's not an odd number is it, the odd number would be 2n+1 I thought...or 2n-1, but if that is correct then I can go on saying:
so the maximum of odd integers that can be chosen is n. Thus if n + 1 integers are chosen, at least one of them must be even.

If its in the range of 1 to 2n, would the larger odd number be 2(n-1)?

Is 2(n-1) odd?

alright i got it i think:

yes. There are n odd integers in the set {1,2,3,...2n}, 1(=2(1-1)), 3(=2(2-1)),...,2n-1(=2(n-1)). It follows that if at least n + 1 integers are chosen, one is sure to be even.

Does 1 = 2(1-1)?

oops i got my ( )'s mixed up i ment
1 (=(2x1)-1), 3(=(2x2)-1), ..., 2n-1(= (2n)-1), now is it okay?

Yeah, looks fine.

wee thanks!

## 1. What is a function?

A function is a block of code that performs a specific task and can be reused throughout a program. It takes in inputs, called parameters, and produces outputs, called return values.

## 2. What does it mean for a function to be "even"?

A function is considered "even" if the output is the same regardless of whether the input is positive or negative. In other words, the function produces the same result when the input is replaced with its negative counterpart.

## 3. Must a function have at least one even number in its input?

No, a function does not necessarily have to have an even number in its input. A function can take in any type of input, including strings, arrays, and objects, as long as it produces the same output for the same input.

## 4. How do you determine if a function is even?

To determine if a function is even, you can use the definition of an even function, which states that f(x) = f(-x). This means that if you plug in the negative counterpart of the input, the output should be the same as when you plug in the original input.

## 5. Can a function be both even and odd?

No, a function cannot be both even and odd. An even function has a symmetry across the y-axis, while an odd function has a symmetry across the origin. These two symmetries cannot coexist, so a function can only be either even or odd.

• Calculus and Beyond Homework Help
Replies
7
Views
2K
• Calculus and Beyond Homework Help
Replies
3
Views
397
• Calculus and Beyond Homework Help
Replies
23
Views
1K
• Calculus and Beyond Homework Help
Replies
9
Views
1K
• Calculus and Beyond Homework Help
Replies
5
Views
1K
• Calculus and Beyond Homework Help
Replies
3
Views
537
• Precalculus Mathematics Homework Help
Replies
4
Views
4K
• Precalculus Mathematics Homework Help
Replies
4
Views
2K
• Precalculus Mathematics Homework Help
Replies
6
Views
1K
• Calculus and Beyond Homework Help
Replies
2
Views
2K