+8 votes
702 views

Imagine the first quadrant of the real plane as consisting of unit squares. A typical square has $4$ corners: $(i, j), (i+1, j), (i+1, j+1),$and $(i, j+1)$, where $(i, j)$ is a pair of non-negative integers. Suppose a line segment $l$ connecting $(0, 0)$ to $(90, 1100)$ is drawn. We say that $l$ passes through a unit square if it passes through a point in the interior of the square. How many unit squares does $l$ pass through?

1. $98,990$
2. $9,900$
3. $1,190$
4. $1,180$
5. $1,010$
| 702 views
0
explain it please

## 2 Answers

+10 votes
Best answer

Answer will be (d) 1,180

If a line segment passes through unit square from $(0,0)$ to $(i,j)$ the line intersects $(i+j-gcd(i,j))$

no. of squares =$(90+1100-10)=1180.$

by Veteran (118k points)
edited
+1

@srestha Apart from the below stackexchange link, you do have any standard reference explaining the formulae you have used to answer?

My logic yields $1170$ as the number of units the given line passes through. Please check my logic.

Slope of the line connecting $(0, 0) \text{ and } (90, 1100) = \frac{1100-0}{90-0} = 12.22...$

This means, per $1$ unit of the x-axis, the line passes through $13$ units across the y-axis.

$\therefore$ The line passes through $13 \times 90 = 1170$ unit squares.

0 votes

I think (B) answer will be 99000

(0,0) to(90,1100) total rowwise 91 points and columnwise 1101 points

Each 2 points makes 1 square

So, total no. of unit square are 90* 1100 = 99000

by Veteran (118k points)
+2
Ans given is d) option. I think 99000 will be total no. of unit squares from point (0,0) to (90,1100) but we have to calculate only the ones through which this line passes.
0

I think there is no harm if line goes like this and condition also satisfies

as there is no specification about line

+1
I think then it would become a curve instead of line segment... Also the ans still remains to be 1180..
+4
0
yes u have to put formula for doing this
Answer:

+5 votes
2 answers
2
+3 votes
1 answer
4