Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 14

Click to edit Master title style

INVARIANT PRINCIPLE

1
Click to edit Master title style
Defines ‘invariant’ as ‘never changing’,
and well that’s really all there is. Invariant in
mathematics, is a property held by a
mathematical object, which remains same even
after repetitive transformation of the object. If
for some objects that property is different, then
we can never reach from the original object to
the newer ones, by trying the same
transformations. This may sound tricky, but its
helpful and in some cases may even solve the
problem.
2 2
There are
Click to basically
edit Master two
titlebroad
style

- categories Invariance: Property that stays


constant.
- Mono-variance: Property that changes in only
one-direction.

Its either always increasing or decreasing. As


Arthur Engel said it, “Invariance principle is a
heuristic principle, its best learned by
experience”, lets try to solve some examples to
understand.
3 3
Click to edit Master title style
Example 1:

Lone survivor Statement: Suppose there are 1


to 1000 numbers written on a paper. At each step,
we select any two numbers (randomly) and
replace them with their difference. Is it possible to
have 243 in the end as the only remaining
number?

4 4
Click to edit Master title style

5 5
Click to edit Master title style
The brute force logic says to start with
all the numbers and keep trying all the
possible combinations of selecting 2 numbers
out of 1000. Then do it again, and again and
if you ever reach 243 in the end, the answer
is ‘yes’ otherwise, ‘maybe’ as there are still
many ways left to solve this. Enter
invariance. (Note, try to find some property
which is never changing as we perform the
operation before going further)
6 6
Solution
Click to edit Master title style

7 7
Click to edit Master title style
Example 2:

All equal Statement: A circle is divided into 6 sectors,


then the numbers 1, 0, 1, 0, 0, 0 are written into the sectors
(clockwise). At each step, you increase two neighboring
sector’s number by 1. Is it possible to have all sectors with
same number after some steps?

8 8
Click to edit Master title style

9 9
Click to edit Master title style

Again, we have many possibilities of


selection, and hence operation can be performed
for any pair out of 6. Going one level down, again
we select any pair out of 6. One difference from
the previous question, this never terminates
unless you have the solution i.e., all numbers are
same. Hence, you may perform brute force for
1000s of levels and solution state will still be a
‘maybe’.
1010
Solution
Click to edit Master title style

1111
Click to edit Master title style
Example 3:

Set for life! Statement: Start with set {3, 4, 12}. In each
step, choose any two numbers say a, b (randomly) and
replace them with 0.6a — 0.8b and 0.8a + 0.6b. Is it possible
to reach {4, 6, 12}?

1212
Click to edit Master title style

Note the order doesn’t matter (set), all that's required is


somehow by performing the operations can we
transform the original set to the final one. 1313
Solution
Click to edit Master title style

1414

You might also like