Find the number of lattice points inside a triangle formed by vertices \((0,~0),~~(m/2,~0), (m/2, ~n/2) \) \(m\ne n\) are odd primes
|dw:1423028576509:dw|
do not count the points on x axis/ boundary..
related question where @marki got stuck at http://openstudy.com/study#/updates/54d12febe4b0ff7fa826889d
@dan thats never gonna happen since m is not equal to n
I assumed all lattice points 1 apart. Here's my way: Look at the grid of m by n. Since this will go from 0 to m and 0 to n there are actually m+1 and n+1 dots on the sides of this rectangle. Since we are not counting the sides by specification of the question, we'll subtract 2 from each to get m+1-2 and n+1-2 So we have a rectangle with a total of (m-1)(n-1) dots. Let's divide this rectangle into the four quadrants since our triangle is only in one quadrant. And a triangle is half the square, so divide by 2 again. So we get: \[\Large \frac{(m-1)(n-1)}{8}\] That's the general formula, the reason it works out is cause they're both prime numbers the center of the large rectangle will always be in the middle of a square and all the dots will alternate before this point on either side of a cut across the diagonal. I should probably draw pictures, but I'll let you prove me wrong first or ask questions lol =P
hmmmm
|dw:1423030203117:dw|
Join our real-time social learning platform and learn together with your friends!