
Math Puzzle: Integer Points - pratikpoddar
http://pratikpoddarcse.blogspot.in/2013/04/integer-points.html
======
nilkn
There are four pairs of values modulo two, so if you have five points some two
of them must be the same modulo two. Say these points are A and B. Then A + B
= (even, even), and so (A + B) / 2 has integer coordinates.

~~~
olivier1664
So that means that there will be at least on line which _the center_ is an
integer point.

~~~
jonsen
There are four possible coordinate parities

    
    
      (even, even),  (even, odd),  (odd, even),  (odd, odd)
    

Among five points two must have the same parity.

Between two points of same parity the difference has the parity (even, even).

As (even, even) is divisible by two there's an integer midpoint.

------
Scaevolus
I don't understand. Choose points (0,0) (0,1) (1,0) (1,2) (2,1) (2,2). What
line contains three points?

Diagram:

_OO

O_O

OO_

e: oh, not a point in the original set, any integer point. thanks!

~~~
shib71
I _think_ the question might be better put this way:

Pick 5 random points on an infinite plane. Draw lines between all of them. One
of those lines will contain another integer point. Prove this is true for
every set of 5 random points.

------
nemo1618
Technically, the problem doesn't specify that the points have to be
distinct...

~~~
tantalor
Yeah that bothered me too. If all the points are (0, 0), does that satisfy the
conditions? Does the line segment (0, 0) to (0, 0) "contain" an integer point?

------
eridius
This seems rather trivial.

Take two arbitrary points, named A and B, where Ax < Bx (if Ax == Bx, this
becomes absurdly simple).

Calculate the delta ∂ between the points, such that ∂x = Bx - Ax and ∂y = By -
Ay

Define a third point C such that Cx = Bx + ∂x and Cy = By + ∂y.

C is integral, and is colinear with A and B.

~~~
chengsun
C does not lie on the line _segment_ AB.

~~~
eridius
Oh my, I didn't notice the word "segment" there. That does change the problem.

------
nemo1618
While we're all solving puzzles, can anyone help me with this one?

No doubt you've doodled this shape in your graph paper before:
<http://i.imgur.com/oY29sBc.png>

What function does this slope approximate? It almost a circle, but not quite.

~~~
anonymoushn
This is a quadratic Bézier curve
<http://en.wikipedia.org/wiki/B%C3%A9zier_curve>

~~~
jacobolus
Or in other words, it’s a section of a parabola. (As it happens, it’s a
parabola tilted 45°, but still.)

------
mycsc
LOL. For any two integer points P(i, j), Q(l, m). We have the equation of a
line:

y - j = ((m - j) / (l - i)) * (x - i)

Choose x = k * (l - i) + i y = k*(m - j) + j Since i, j, l, m, k are all
integers we obtain another integer point. No need 5 points... I may
misunderstand the question. :(

------
counterexample
I don't see any obvious problem with this counterexample: (0,5), (3,0), (4,6),
(7,1), (9,4)

[http://farm9.staticflickr.com/8114/8661127874_f9269f0ee5_b.j...](http://farm9.staticflickr.com/8114/8661127874_f9269f0ee5_b.jpg)

Is there something I'm missing?

~~~
jonsen
(3,0) ... (6,2) ... (9,4)

So comprehensive testing is what you are missing :-)

------
nazgulnarsil
back of the napkin: take the first 4 points to be a unit box with the lower
left point at the origin. You can draw any of 4 lines to the 5th point (x,y).
These 4 lines will have slopes x:y, x-1:y, x:y-1, x-1,y-1. You can always
arrive at a slope ratio that is evenly divisible through some combination of
-1 and reducing the ratio to simplest form. An evenly divisible slope ratio
will pass through another point.

example: 5th point (11,4). Choose line with slope 10:4. Divisible by 2, this
line passes through the point (5,2). A ratio divisible by 3 would pass through
2 additional points etc.

~~~
anonymoushn
A real proof would work for an arbitrary first four points (with any segment
between two not containing a lattice point), but I think nikln already
provided this :)

~~~
nazgulnarsil
doh, forgot to do the last and most important step, generalizing.

------
thejteam
If I am remembering correctly, this was on the ARML(American Regions Math
League) competition "power question" roughly, say 16-17 years ago. The answers
given here from nilkn and the children comments are correct.

------
nimnam
choose two integers x and y. These represent the first point on a plain. Only
adjacent points can be added i.e. any point can only be 1 integer away from
this origin point otherwise there will exist an integer point between the
origin point the chosen point. so now we have (x, y), (x+1, y), (x, y+1), and
(x+1, y+1). Adding a fifth point anywhere on the graph will make it such that
an integer point will exists between two of the selected points.

------
fahadkhan
It doesn't hold. Pick (0,1), (0,2), (0,3), (0,4), (0,5) on the plane z = 0

~~~
jonsen
Well, you have _five_ integer points on the same line.

~~~
fahadkhan
"Suppose we arbitrarily choose 5 integer points in a plane.

Show that we can always find 2 among these 5 integer points such that the line
segment joining the 2 points contains at least 1 more integer point."

I am not sure what you mean. I have 'arbitrarily' picked 5 integer points on a
plane. Yes, they happen to lie on line. All their line segments contain only
these integer points.

Perhaps you mean that is line not on "a plane"? In that case (0,0), (0,1),
(0,2), (0,3), (0,1) is another counter example.

~~~
vbuterin
In the case of {(0,0),(0,2)}, (0,1) counts as "1 more integer point" - the
point has to be not one of the two points generating the line, not a point
outside the set of 5 points on the plane.

------
graycat
Okay, we have a solution for the plane. The plane is in two dimensions. Now,
for any positive integer n, generalize the problem to n dimensions.

So, now the problem is, for any positive integer n, given any 2^n + 1 n-tuples
of integers, at least two of these n-tuples if added have all even components.

