in Quantitative Aptitude edited by
1,862 views
12 votes
12 votes

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$
in Quantitative Aptitude edited by
1.9k views

1 comment

explain it please
0
0

2 Answers

11 votes
11 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.$

edited by

2 Comments

@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. 

2
2

@zeeshanmohnavi

For line connecting (0,0) and (4,3).

Using your method:

$Slope = \frac{3-0}{4-0} = 0.75$

The line passes through $1 * 4 = 4$ unit squares.

Using the formula given in the link:

The line passes through $4 + 3 - gcd(4,3) = 7 - 1 = 6$ unit squares.

And it is correct. See figure below.

0
0
0 votes
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 

4 Comments

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

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true