Invariants Questions

I tried solving a few invariants questions but I just can't get the logic... If anyone can recommend a youtube video or just explain the concept...

2

Please log in to comment and participate in discussions.

Comments (2)

Invariant = something that doesn't change, no matter how many times you do the operation.

That's the whole concept. The trick is just finding what doesn't change.

Think of it like a cricket score. Whether a batsman hits a single and then a double, or a double and then a single, the total after those two balls is still 3. The order of events doesn't matter. Only the thing that stays constant does.

How to approach these questions

  1. Read the operation carefully (what is being removed, added, swapped).
  2. Check what happens to the sum, the parity (odd/even), the product, or the remainder after one operation.
  3. Whichever of these stays the same is your invariant.
  4. Compare the starting state with the final state they're asking about. If the invariant doesn't match, that final state is impossible. Done.

Quick example-

Numbers 1 to 10 are written on a board. You erase any two numbers a and b and write a + b. Can the last number left be odd?

Look at the sum. Removing a and b and adding a + b leaves the total exactly the same.

The starting sum is 1 + 2 + ... + 10 = 55.

So the last number has to be 55. Odd, yes.

Now change the operation to "write |a − b|". The sum changes, but its parity doesn't, because a + b and a − b are always both odd or both even. Since 55 is odd, the last number will always be odd.

That's 90% of the invariant questions you'll see. Check the sum, then the parity, then the remainder.

On YT, search "invariance principle problems" and watch the top results. Any one-shot covering parity/sum invariants will do.

2
H
hello..
OP•6d

Thanks but uhmm the exam is done now🥹

But still thank you, it would be useful for other exams!

1