Pages

Bookmark and Share

Wednesday, May 8, 2019

Questions in an exam

A test is taken by 2019 students. The test consists of $n$ questions (where $n > 0$ is even), where each question is a true/false problem worth 1 point. It is known that:

1. Each student answered exactly half of the questions correctly.

2. Given two students, their answers agreed on exactly half of the questions.

Find the smallest $n$ such that this situation is possible.

Solution

If $n = 2^k m$ where $m$ is odd, then there are at most $2^k - 1$ students. Therefore, with 2019 students, we need $2048$ questions for this situation to be possible. Proof:

Suppose $m=1$, we will give a configuration of $2^k-1$ students that satisfy both conditions. First of all, given a number $b$, let $f(b)$ denote the number of 1s in its binary representation, modulo 2. That is $f(b)=0$ if $b$ contains an even number of 1s in its binary representation, and $f(b) = 1$ otherwise.

Label the students $1$ to $2^k-1$ and consider their binary representation (from $0...01$ to $1...1$, all having exactly $k$ digits). Also label the problems $0$ to $2^k-1$ and consider their binary representation (from $0...0$ to $1...1$, all having exactly $k$ digits). We set student $s$ answered problem $p$ correctly if $f(p \wedge s) = f(s)$, where $\wedge$ denotes bitwise AND operation between $p$'s binary representation and $s$' binary representation. In other words, if the number of digits where $p$ and $s$ are both 1 in their binary representation is the same parity as the number of 1s in $s$' representation, then student $s$ answered problem $p$ correctly.

For example, student $5=0...101$ answered question $2=0...010$ correctly because $f(5 \wedge 2) = f(0...000) = 0 = f(5)$. But student $7 = 0...111$ answered question $3 = 0...011$ incorrectly because $f(7 \wedge 3) = f(111 \wedge 011) = f(011) = 0 \neq 1 = f(7)$.

From there, it's easy to see that condition 1 is satisfied. A student's correct answers depends only on the digits of $s$ that are 1, and there are $2^{f(s)}$ possible combinations of those digits. Out of those, there will be half that has even number of 1s and half that has odd number of 1s, so that student answers half the questions correctly.

To prove condition 2, consider student $s$ and $t$. Consider $r = s \oplus t$ where $\oplus$ denotes the bitwise XOR operation. In other words, $r$ is a number whose binary representation is 1 at the digits where $s$ and $t$ are different, and 0 at the digits where $s$ and $t$ are the same. The problems where $s$ and $t$'s answers agree are exactly the problems where student $r$ answered correctly. To prove that assertion, note that $f$ is distributive with respect to $\oplus$. That is $f(a \oplus b) = f(a) \oplus f(b)$. This is because if $a$ has $d_a$ number of 1s and $b$ has $d_b$ number of 1s then $a \oplus b$ has $d_a + d_b \mod 2$ number of 1s, because the digits that were both 1s and turned into zero always come in pairs.

So suppose both $s$ and $t$ get problem $p$ right, then $p \wedge r = p \wedge (s \oplus t) = (p \wedge s) \oplus (p \wedge t)$ so $f(p \wedge r) = f(p \wedge s) \oplus f(p \wedge t) = f(s) \oplus f(t) = f(s \oplus t) = f(r)$ and similarly if they both get the problem wrong. We can show that if $s$ gets problem $p$ right and $t$ gets it wrong, then $r$ gets problem $p$ wrong as well. That way, we showed that student $s$ and $t$'s answers agree exactly on the problems that student $r$ gets right, and by condition 1, this is exactly half of all the problems. So condition 2 is proven.

Now for $m > 1$, let $l = 2^k$ so $n = lm$, we simply assign student $s$ answering problem $p$ correctly if and only if student $s$ answers problem $(p \mod l)$ correctly. In essence, we are duplicating problems $0,\dots, l-1$'s answers (which were constructed above) $m$ times. Condition 1 and 2 are still satisfied.

The second part of the proof is to show that this arrangement is optimal. That is, with $n = 2^km$ there is at most $2^k-1$ students.

For $n$ to be even then $k \geq 1$. For $k = 1$ we show that there is at most 1 student. That is, condition 1 can be fulfilled easily, but condition 2 cannot be fulfilled. Indeed, WLOG we may assume that student $A$ answered questions $1,\dots,m$ correctly and $m+1,\dots,2m=n$ incorrectly. If there is a second student $B$, then suppose above questions $1,\dots,m$ he answered $t$ questions correctly, then he must answer $m-t$ questions among the second half correctly. However, that means the number of questions that $A$ and $B$ agreed on is $t + (m- (m-t)) = 2t \neq m$, contradiction. So there is at most $2^1 - 1 = 1$ student for $k = 1$.

Now we use induction on $k$. Suppose that $k > 1$ and let $h = n/2 = 2^{k-1}m$. Take student $A$, and WLOG assume that he answered questions $1, \dots, h$ correctly (i.e. the first half). For any other student $B$, suppose he answers $t$ questions correctly on the first half, so $h-t$ questions correctly from the second half. The number of questions that $A$ and $B$ agreed on is $t + (h-(h-t)) = 2t = h$, so student $B$ answered $h/2$ questions correctly on the first half. This means all students other than $A$ must answer $h/2$ questions correctly on the first half.

Also note that if we replace $B$ with $B'$ whose answers are completely opposite of $B$, then condition 1 and 2 are both still preserved. $B'$ still answered half the questions, and the questions that $B$ agreed with other students are just "flipped." However, $B$ and $B'$ cannot both coexist because obviously condition 2 would be violated.

So now suppose that there are two students $B,C$ distinct from $A$. It's possible that $B$ and $C$ agree completely on the first half (and disagree completely on the second half). We see this a lot in the construction above. In that case, we call $B$ and $C$ "friends", and we put them under one "group." Also, if $B$ and $C'$ would have been friends, we still call $B$ and $C$ friends (as in, if $B$ and $C$ disagree completely on the first half but agree completely on the second half, we still call $B,C$ friends). Note that because $C$ and $C'$ cannot both coexist, we are not claiming that $B$ can be friends with two existing students. Indeed we shall show that $B$ is friends with at most one other person.

If $B$ and $C$ are friends, and $B$ and $D$ are friends. WLOG we may assume that $B,C,D$ agree completely on the first half (otherwise replace $C$ by $C'$ or $D$ by $D'$ or both). Suppose :
1. $X$ is the set of problems that $A$ got right, $B$ got right
2. $Y$ the set of problems $A$ got right, $B$ got wrong
3. $Z$ the set of problems $A$ got wrong, $B$ got right
4. $W$ the set of problems $A$ got wrong, $B$ got wrong

So $X \cup Y$ is the first half, and $Z \cup W$ is the second half. Because $C$ agree with $B$ on the first half, he must disagree completely on the second half. That means $C$ got $X \cup W$ completely right, and $Y \cup Z$ completely wrong. But we my apply the same argument to $D$, therefore $D$ got $X \cup W$ completely right and $Y \cup Z$ completely wrong. This violates condition 2 because now $C,D$ agree everywhere. Contradiction. Therefore, each group of friendship contains at most 2 students. (Some students may not have friends, so they are in a group each by himself).

Next, suppose $B$ and $C$ are not friends. Consider the answers of $C$ in $X,Y,Z,W$ that agree with $B$. Suppose there are $t_X, t_Y, t_Z, t_W$ answers that agree with $B$ respectively. Now by condition 2, the total number of agreement between $B$ and $C$ must be $h$, so: $$t_X + t_Y + t_Z + t_W = h$$ By condition 1, the total number of answers that $C$ got right must be $h$, so: $$t_X + (|Y| - t_Y) + t_Z + (|W| - t_W) = h$$ And note that $|Y| + |W|=h$ because those are the questions that $B$ got wrong. So the second equation can be written as: $$t_X + t_Z = t_Y + t_W$$ That means $t_X + t_Z = t_Y + t_W = h/2$. But also, $C$ must agree with $A$ for $h$ questions, so: $$t_X + |Y| - t_Y + |Z| - t_Z + t_W = h/2$$ But $|Y| + |Z| = h/2$ because those are the questions that $B$ disagreed with $A$, so $t_X + t_W = t_Y + t_Z = h/2$ Solving the two equations, we have $t_X = t_Y$. Next, because $C$ must answer $h/2$ questions correctly on the first half, then $t_X + |Y|-t_Y = h/2$, so $|Y| = h/2$, which means $|X| = |Y| = |Z| = |W| = h/2$. we get $t_X = t_W = t_Z = t_Y = h/4$. Because $k>1$ and $h = 2^{k-1}m$ then $h/4$ is still an integer. Therefore $t_X + t_Y = h/2$. So the conclusion here is that if $B$ and $C$ are not friends, then $C$ agreed with $B$ on exactly $h/2$ on the first half, and $h/4$ on the second half.

Suppose there are $2^k$ students, and because $A$ is one of them, then there are $2^k-1$ "non-A" students. Because each group contains at most 2 students, then there are at least $\lceil (2^k-1)/2 \rceil = 2^{k-1}$ groups. Take any student from each group to be the "representative" of that group. Now, consider their answers only on the first half of the exam. These answers satisfy the condition for the exams with $n/2 = h$ questions. Indeed, condition 1 is satisfied because all students other than $A$ must answer $h/2$ questions correctly. Condition 2 is also satisfied because every two students who are not friends must agree exactly $h/2$ on the first half. Therefore, now we have at least $2^{k-1}$ students (excluding student $A$) with $h = 2^{k-1}m$ problems that satisfy conditions 1 and 2, violating our induction hypothesis. Contradiction. So there must be at most $2^k-1$ students in an exam with $2^km$ problems.

Finally, because $2^{10} < 2019 < 2^{11}$, then in order for this situation to happen with 2019 students, $k \geq 11$. That means the least number of problems is $2^{11}.1 = 2048$.

Thursday, March 28, 2019

Finite difference

Define sequences $x_i,y_i,i=1,2,\dots$ as follows: $$x_{n+1} = x_n^2 - 20$$ $$y_{n+1} = y_n^2 - 30$$ And define $d_i = x_i - y_i$. Find all possible starting pairs $(x_1,y_1)$ such that the set $\{d_1, d_2, \dots \}$ contains only a finite number of elements. Solution Just the outlines. If $x_1 = \pm 4 , \pm 5$ then $x_n$ is bounded, likewise if $y_1 = \pm 5, \pm 6$ it is bounded. It's easy to show that for other possibilities $x_n,y_n$ are both unbounded, and will be positive except for the first few terms.

If $x_n,y_n$ are bounded then they assume a finite number of values, therefore $d_i$ also assume a finite number of values, at most the combinatorial pairs of their images, but most likely much less. However, if one of them is unbounded, then say $x_n$ is unbounded, EVEN IF $y_n$ is bounded, then $x_n+y_n$ is unbounded. At this point it's easy to show that $x_n+y_n$ is monotonically increasing and unbounded (excxept for the first few terms) because once $x_n$ gets large enough, $y_n$'s fluctuation is not enough to make the sum decrease.

Now, if $x_n-y_n$ is unbounded, then $x_n^2 - y_n^2$ is unbounded. If $x_n - y_n$ is bounded then $x_n^2 - y_n^2$ is unbounded, EXCEPT if $x_n = y_n$ identically. But because they have different recursion formula, they can't always be identical. Meaning they're identical at most every other term. On the terms that they are not identical, $x_n-y_n$ is non-zero, and because $x_n+y_n$ is monotonically increasing and unbounded, then $x_n^2 - y_n^2$ is also unbounded. Therefore $d_n +10$ is also unbounded, so it assumes an infinite nunmber of values

Monday, March 18, 2019

Triangular equations

A triangular series of equations is a system of $k$ equations where the $k$-th row consists of $k+1$ terms on the LHS and $k$ terms on the RHS. For example: $$a + b = c$$ $$d + e + f = g + h$$ $$i + j + k + l + m = n + o + p$$ $$...$$ Given the numbers $1, 2, \dots, n^2$ and one number with the same parity as $n$ is removed, prove that the rest of the numbers can be arranged into a triangular series of equations.

For example, out of $1,2,\dots,9$, 3 is removed, so the rest can be written as: $$ 1+4 = 5$$ $$2 + 6 + 8 = 7 + 9$$ Another example, out of $1,2,\dots, 16$, 10 is removed, so the rest can be written as: $$1+3 = 4$$ $$2 + 5 + 8 = 6 + 9$$ $$7 + 11 + 12 + 14 = 13 + 15 + 16 $$

Solution (In Progress)

Suppose we color all the numbers with the same parity as $n$ with red, and color all the numbers with the opposite parity with black. Also, call the number that was removed, the missing number, $x$. A number is called "good" if, when missing, the rest of the numbers can be written as triangular system.

Note the triangular system below: $$1+2 = 3$$ $$4+5+6 = 7+8$$ $$9+10+11+12 = 13+14+15$$ $$...$$ $$k^2 + \dots + (k^2+k) = (k^2+k+1) + \dots + (k^2+2k)$$ $$...$$ $$(n-1)^2 + \dots + ((n-1)^2+n-1) = ((n-1)^2+(n-1)+1) + \dots + (n^2-1)$$ We call this system A. This system is missing $n^2$, and the system is triangular and correct. (The correctness of said system can be verified by simple arithmetic series on the $k$-th row).

So we know that $n^2$ is good. Furthermore, note that each row has the same number of odd numbers (that is, $k$-th row has $k$ odd numbers if $k$ is odd and $k-1$ odd numbers if $k$ is even). So if we increase each odd number by two, we'll still get a correct triangular system: $$3+2 = 5$$ $$4+7+6 = 9+8$$ $$11+10+13+12 = 15+14+17$$ $$...$$ So if $n$ is odd, 1 is good. Call this system B.

Similarly, the $k$-th row has $k$ even numbers in the LHS and $k-1$ even numbers in the RHS. We can increase the even numbers by two, but then the equation will be incorrect. Call the "weight" of an equation to be its RHS - LHS. Obviously, an equation is correct only if it has weight zero. If we increase all the even numbers by two, then the weight of the new equation is -2, for example: $$6+5+8 > 7+10,w=-2$$ But note that now $(k^2+k+2)$ is in the LHS while $k^2+k+1$ is still in the RHS. In other words, the largest number in the LHS is exactly one more than the smallest number in the RHS, so if we switch those two, we restore the weight back to zero: $$6+5+7 = 8+10$$ So we can form a new system this way: $$1+3=4$$ $$6+5+7 = 8+10$$ $$9+12+11+13 = 14+16+15$$ $$...$$ Next, note that out of the $n$ rows in the equation, we can take the first $k$ rows from system A, and the $n-k$ last rows from system B or C. For example: $$1+2 = 3$$ $$4+5+6 = 7+8$$ $$11+10+13+12 = 15+14+17$$ $$...$$ Now we are ready to prove the main assertion by induction. We will show the base cases later. For now, suppose it holds for $n=2,3$. Then, if $x \leq (n-2)^2$, there is a way to arrange $\{1, 2, \dots, (n-2)^2\} \ \{x\}$ in triangular form by induction hypothesis, and the last two rows can be taken from the last two rows of system B (if $n$ is even) or system C (if $n$ is odd). So then we consider cases where the missing number is $x > (n-2)^2$. In system A above, it would be in the last two rows. We will divide into cases depending on the position of $x$ in system A. Note that the missing number is always red.

Suppose $x$ is red on the last row RHS (meaning the missing number is in the interval $x \ in [(n-1)^2+(n-1)+1, n^2-2]$). Take out that number and replace it with $n^2$. Then now the last row has weight a positive even number in the interval $[2, n-1]$. We can switch a number $k$ from LHS and $l$ from the RHS, and the weight would decrease by $2(l-k)$. But the difference of the numbers in RHS and LHS ranges from 1 to $2n-2 > n-2$, and each side has consecutive numbers. So we know there are numbers that we can pick to switch so that the weight is reduced back to zero.

Suppose the missing number is red on the last row LHS, meaning the missing number is in the interval $x \in [(n-1)^2+1, (n-1)^2+(n-1)]$. Take out that number and replace it with $n^2$. Then the last row has weight a negative even number in the interval $[-2n+2, -n]$. Now, there exists a number in RHS $y$ such that $y-n^2$ is exactly half the weight of the last row, because the numbers in RHS is in the range $[(n-1)^2+(n-1)+1,n^2-1]$ so those numbers subtracted by $n^2$ is in the range $[-n+1, -1]$ which encompasses $\frac{1}{2} [-2n+2, -n]$. If we switch this number $y$ and $n^2$, the weight of the last row is restored.

Suppose the missing number is red on the second-to-last (STL) row LHS, meaning the missing number is in the interval $x \in [(n-2)^2, (n-2)^2+(n-2)]$. Take out that number and replace it with $(n-1)^2+1$, and then in the last row, put $n^2$ to where $(n-1)^2+1$ used to be. The STL row now has weight negative even number in the interval $[-2n+2,-n]$, whereas last row has some other even number weight. The last row could be fixed with the procedure described above (as if $(n-1)^2+1$ was the missing number). However the STL row can be fixed by switching $(n-1)^2+1$ with an appropriate number in the STL RHS, because the numbers in STL RHS ranges from $[n^2-3n+3,n^2-2n]$ so the difference ranges from $[-n+1, -2]$ which encompasses $\frac{1}{2}[-2n+2,-n]$

Suppose the missing number is red on the STL row RHS. Same as before, take out that number, replace it with $(n-1)^2+1$, and then in the last row, put $n^2$ to where it used to be. Same as above, the last row can be fixed using the previous strategy, whereas the STL row can be fixed by switching two numbers in the STL (similar to if the missing number is from RHS last row).

Now all that remains is to prove the base cases. For $n=2$, we have either $1+3=4$ or $1+2=3$. For $n=3$, the missing numbers could be $x=1,3,5,7,9$, but $x=9$ is already covered by system A above, $x=1$ covered by system B, and $x=3$ is shown in the example. For $x=5$: $$1+2=3$$ $$4+7+6 = 9+8$$ For $x=7$: $$1+3=4$$ $$2+5+8 = 6+9$$ (Really we're just applying the algorithm described above but we're including here for the sake of proof completeness).

Thursday, February 21, 2019

Given a circle $(O,R)$ and a point $P$ in its interior. For any two points $A,B$ on its perimeter, we define $f(A,B)$ to be the point $C$ such that $APBC$ is a parallelogram.
Determine the image of $f$ when $A,B$ vary over all possible pairs of points on the perimeter. That is, determine the set $S = \{f(A,B) | AO = BO = R\}$
Solution Let $O'$ be a point on the extension of $PO$ such that $OO' = 2PO$. We shall show that $S$ is a circle (including the interior) centered at $O'$ with radius $2R$.

Outline of proof:

Let $T$ to be the circle we claim. Note that $T$ is a 2x dilation of the original circle with center $P$. We show that the boundary of $S$ is boundary of $T$ as well, by letting $A=B$ in the opration

Next we show that any point in $T$ is an image of a specific application of $f$. Let $X' \in T$, then $X'$ is an image of a 2x dilation. Suppose $X$ is the original point. We claim that there exists $A,B$ such that $PX$ is a median of $PAB$. Indeed, if $OAB$ is a triangle such that $OX$ is its median, then $PX$ is median of $PAB$.

Then it is routine to show that $f(A,B) = X'$.

Note: this problem can be extended to any point $P$, and any convex shape $V$ in $R^n$. The sum of vectors $PA + PB$ where $A,B$ are any two points on its boundary is equivalent to the 2x dilation of $V$ with center $P$. However, $V$ must be bounded.

Challenge: prove this generalization. (Hint: use the connectedness of $S^{n-1}$ in $R^n$).

Challenge: give a counter example of this result of $V$ is unbounded

Monday, February 11, 2019

Game making expression positive definite

On the board there are six numbers $A,B,C,D,E,F$, all initially zero. Mary and Nancy are playing a game as follows. On Mary's turn, she increases one of $A,B,C$ by 1, and on Nancy's turn, she increases one of $D,E,F$ by 1. They take turns alternatingly until each has gone 2019 times. Each pair of turns is called a "set" (for example if Mary moves first, then 1 set consists of Mary's move followed by Nancy's move).

Winning condition: Mary wins if at any point at the end of a set the following inequality is true for all $x,y$ real numbers: $$Ax^2 + By^2 + C \geq Dxy + Ex + Fy$$ Determine who has the winning strategy if:

1. Mary goes first

2. Nancy goes first

Solution

If Mary goes first Nancy has a winning strategy.

Replace $x$ with $x/z$ and $y$ with $y/z$ to make the inequality homogeneous: $$Ax^2 + By^2 + Cz^2 \geq Dxy + Exz + Fyz$$ Note that the following form is always true if $u,v,w \geq 0$ $$u(x-y)^2 + v(x-z)^2 + w(y-z)^2 \geq 0$$ So if at any point after a set the inequality can be reduced to that form, then Mary wins. We claim the following two things:

1. That Nancy can always avoid that form, and

2. That if the form is not achieved then there exists a $x,y,z$ to make the inequality false

First to prove 1, note the following rearrangement: $$u(x-y)^2 + v(x-z)^2 + w(y-z)^2 \geq 0$$ $$(u+v) x^2 + (u+w)y^2 + (v+w)z^2 \geq 2u xy + 2v xz + 2w yz$$ Therefore if $D = (A+B-C), E = (A+C-B), F = (B+C-A)$ then that form is achieved. This is the unique solution to achieve that form, and that solution may be negative. If the solution to that form contains negative number then no matter what Nancy does, that form is not achieved. But even if it is a triple of non-negative integers, Nancy has 3 choices of moves to make, so she still has at least 2 moves that won't result in that form.

Now to prove 2, we show that we can find $x,y,z$ that violates the inequality.

First, if $A,B,C$ do not form a triangle, then $A>B+C$ (or its permutation). Note that if we assume (WLOG) that $A>B+C$ then $A+B>C,A+C>B$. Furthermore WLOG we may assume that $B \geq C$. $$Ax^2 + By^2 + Cz^2 \geq Dxy + Exz + Fyz$$ $$\iff (A+B-C)(x-y)^2 + (A+C-B)(y-z)^2 + (B+C-A)(x-z)^2 \geq -(2A+2B-2C-2D)xy - (2A+2C-2B-2E)yz - (2B+2C-2A-2F)xz$$ In that case we can choose the following variables. Let $S,R$ be large numbers. Let $x= 1/R, y = R + 1/R, z = SR + 1/R$. Then $$ (A+B-C)R^2 + (A+C-B)(S-1)^2R^2 \geq (A-B-C)S^2R^2 + ...$$ The "..." part in RHS consists of terms $SR^2$ or lower. As we let $S,R$ become large, the dominant terms are $(S-1)^2R^2$ versus $S^2R^2$. For large enough $S$, $(A+B-C)+(A+B-C)(S-1)^2 < (A-B-C)S^2$. At that point we just fix $S$ but let $R$ become larger. Since the coefficient of $R^2$ in the RHS is larger, then the RHS grows faster, invalidating the inequality.

Now if $A,B,C$ form a triangle, $$\iff (A+B-C)(x-y)^2 + (A+C-B)(y-z)^2 + (B+C-A)(x-z)^2 \geq (2A+2B-2C+2D)xy + (2A+2C-2B+2E)yz + (2B+2C-2A+2F)xz$$ Note that the sum of coefficients in RHS is zero, so the terms are not all positive. We shall divide into two cases: one positive two negatives or vice versa

Case 1: if the RHS is of the form $Uxy + Vxz - (U+V) yz$ with $U,V \geq 0$. Then $$RHS = Uy(x-z) + Vz(x-y)$$ Then we set $x = R+1/R, y = R, z= R$. The terms in LHS will be zero or $(1/R^2)$ whereas the terms in RHS will be $(U + V)$. By setting $R$ large enough we can make LHS < RHS.

Case 2: if the RHS is of the form $(U+V)xy - Uyz - Vxz$ with $U,V \geq 0$ Then $$RHS = Uy(x-z) + Vx(y-z)$$ Then we set $x = R+1/R, y = R+1/R, z= R$. The terms in LHS will be zero or $(1/R^2)$ whereas the terms in RHS will be $(U + V)(1+1/R)$. Again, by setting $R$ large enough we can make LHS < RHS.

Challenge Can you generalize this to third power and four variables? In other words, can the game be extended into the following inequality? $$Ax^3 + By^3 + Cz^3 + Dw^3 \geq Exyz + Fxyw + Gxzw + H yzw$$ Answer: yes. We make use of the following property: $f(a,b,c) = a^3 + b^3 + c^3 - 3abc = (a+b+c)((a-b)^2 + (b-c)^2 + (c-a)^2)/2 \geq 0$ If the inequality can be expressed as a positive sum of $f(x,y,z), f(x,y,w), f(x,z,w), f(y,zw)$ then the inequality holds. If not, then there are two cases:

1. One or more of the $f$ form occurs on the RHS, in which case we choose $x,y,z,w$ to maximize the growth of the ones in the RHS. For example, $x=y=1/R, z = R+1/R, w = SR + 1/R$ for large $S,R$.

2. The $f$ forms all occur on the LHS, so there are terms of $xyz$ etc on the RHS whose coefficients all sum to zero. We can pick $x,y,z,w$ whose differences are small but themselves are large, such as $x=R, Y = R+1/R, z = R+2/R, w = R+3/R$. That way, the values of $f$ will be small but values of $xyz$ will be big. By judiciously permuting those values depending on which coefficients are negative, we can make LHS to be < RHS.