We call a set “sum free” if no two elements of the set add up to a third element of the set. What is the maximum size of a sum free subset of $\{1,2,\ldots,2n−1\}$
I am just a secondary school student. I read this from a book and it is about pigeonhole principle. How should I find it?
This is a good example of a case where we can both prove a maximum value and show that it exists (so we can be sure that the value is the "smallest possible" maximum).
So the two hints you have in comments are, first, to prove that, given the largest number $x$, there can't be more than $x/2$ other values. So this uses pigeonhole principle. Each pigeonhole here is associated with a pair of numbers that adds to $x$: $(1,x-1)$, $(2,x-2)$, etc. that show which numbers are allowed in that pigeonhole. The last pigeonhole might have a repeated number label if $x$ is even; $(x/2,x/2)$. There are no more than $x/2$ pigeonholes here, and we cannot have more than one number in each pigeonhole, or we break the restriction on the set. So we're limited to $\lfloor x/2\rfloor +1$ numbers, and we maximize this when the biggest number in the set is the biggest number allowed.
The second hint in comments, odd+odd=even, is a clue to actually make the biggest possible set when the limit is odd, as it is here. Choosing all the allowed odd numbers ensures that you never have a situation where two elements of the set add up to a third, because you have chosen no even numbers.
The general-purpose way to make the biggest possible set that works for both odd and even limits is to choose the bigger number for every pigeonhole.