Quantitative Aptitude

GATE CS previous year questions · 19 questions

GATE CS 2025 Set 1 | Question 3

MCQ · 1 mark · −0.33

The average marks obtained by a class in an examination were calculated as 30.8. However, while checking the marks entered, the teacher found that the marks of one student were entered incorrectly as 24 instead of 42. After correcting the marks, the average becomes 31.4. How many students does the class have?

Options for GATE CS 2025 Set 1 | Question 3

Explanation

Answer: (C)

Fixing the wrong entry raises the class total by \(42 - 24 = 18\) marks, and this raises the average by \(31.4 - 30.8 = 0.6\). If the class has \(n\) students, the average rises by \(\frac{18}{n}\), so \(\frac{18}{n} = 0.6\) and \(n = 30\). Check: \(30 \times 30.8 = 924\) and \(924 + 18 = 942 = 30 \times 31.4\).

Answer: C

GATE CS 2025 Set 1 | Question 7

MCQ · 2 marks · −0.66

In the diagram, the lines QR and ST are parallel to each other. The shortest distance between these two lines is half the shortest distance between the point P and line QR. What is the ratio of the area of the triangle PST to the area of the trapezium SQRT?

Note: The figure shown is representative.

Triangle PQR with P at the top and base QR; S lies on PQ, T lies on PR, and the segment ST is parallel to QR.
Options for GATE CS 2025 Set 1 | Question 7

Explanation

Answer: (A)

Let the distance from P to QR be \(h\). ST is \(\frac{h}{2}\) from QR, so it is also \(\frac{h}{2}\) from P. Because ST is parallel to QR, triangle PST is similar to triangle PQR with scale factor \(\frac{1}{2}\), so its area is \(\left(\frac{1}{2}\right)^2 = \frac{1}{4}\) of the area of PQR. The trapezium SQRT is the remaining \(\frac{3}{4}\), so the required ratio is \(\frac{1/4}{3/4} = \frac{1}{3}\).

Answer: A

GATE CS 2025 Set 1 | Question 8

MCQ · 2 marks · −0.66

A fair six-faced dice, with the faces labelled ‘1’, ‘2’, ‘3’, ‘4’, ‘5’, and ‘6’, is rolled thrice. What is the probability of rolling ‘6’ exactly once?

Options for GATE CS 2025 Set 1 | Question 8

Explanation

Answer: (A)

In one roll, a 6 comes with probability \(\frac{1}{6}\) and any other face with probability \(\frac{5}{6}\), and the three rolls are independent. The single 6 can be on the first, second or third roll, so \(P = 3 \times \frac{1}{6} \times \left(\frac{5}{6}\right)^2 = 3 \times \frac{25}{216} = \frac{75}{216}\).

Answer: A

GATE CS 2025 Set 1 | Question 10

MCQ · 2 marks · −0.66

A shop has 4 distinct flavors of ice-cream. One can purchase any number of scoops of any flavor. The order in which the scoops are purchased is inconsequential. If one wants to purchase 3 scoops of ice-cream, in how many ways can one make that purchase?

Options for GATE CS 2025 Set 1 | Question 10

Explanation

Answer: (B)

Since the order does not matter, a purchase is fixed by how many scoops of each flavour are taken, that is, by whole numbers \(a, b, c, d \ge 0\) with \(a + b + c + d = 3\). By the stars and bars formula, the count is \(\binom{3 + 4 - 1}{3} = \binom{6}{3} = 20\). Check by cases: all three of one flavour gives 4 ways, two of one flavour and one of another gives \(4 \times 3 = 12\) ways, and three different flavours gives \(\binom{4}{3} = 4\) ways, a total of 20.

Answer: B

GATE CS 2025 Set 2 | Question 3

MCQ · 1 mark · −0.33

If \(Pe^{x} = Qe^{-x}\) for all real values of \(x\), which one of the following statements is true?

Options for GATE CS 2025 Set 2 | Question 3

Explanation

Answer: (A)

Multiply both sides by \(e^{x}\) to get \(Pe^{2x} = Q\), which must hold for every real \(x\).

At \(x = 0\) this gives \(P = Q\), and at \(x = \frac{1}{2}\ln 2\) it gives \(2P = Q\). Together these force \(P = 0\), and then \(Q = 0\). In short, \(e^{2x}\) keeps changing, so \(Pe^{2x}\) can stay equal to the constant \(Q\) only when \(P = 0\).

  • B holds only at \(x = 0\).
  • C would make the positive number \(e^{x}\) equal the negative number \(-e^{-x}\).
  • D needs \(P = 0\) with \(Q \neq 0\), but \(P = 0\) forces \(Q = 0\) as well.

Answer: A

GATE CS 2025 Set 2 | Question 5

MCQ · 1 mark · −0.33

Let \(p_{1}\) and \(p_{2}\) denote two arbitrary prime numbers. Which one of the following statements is correct for all values of \(p_{1}\) and \(p_{2}\)?

Options for GATE CS 2025 Set 2 | Question 5

Explanation

Answer: (B)

The product \(p_{1}p_{2}\) is divisible by \(p_{1}\), which is neither 1 nor the product itself (because \(p_{2} \ge 2\)). So \(p_{1}p_{2}\) always has a third divisor and is never prime, even when \(p_{1} = p_{2}\). Statement B holds for all primes.

One counterexample rules out each other option:

  • A: \(2 + 3 = 5\) is prime.
  • C: \(3 + 5 + 1 = 9\) is not prime.
  • D: \(3 \times 5 + 1 = 16\) is not prime.

Answer: B

GATE CS 2025 Set 2 | Question 9

MCQ · 2 marks · −0.66

In the given figure, PQRS is a square of side 2 cm and PLMN is a rectangle. The corner L of the rectangle is on the side QR. Side MN of the rectangle passes through the corner S of the square.

What is the area (in cm2) of the rectangle PLMN?

Note: The figure shown is representative.

Square PQRS with P at the top left, S at the top right, R at the bottom right and Q at the bottom left. A tilted rectangle PLMN shares corner P with the square, has corner L on side QR, and its side MN passes through S, with N above the square and M to its right.
Options for GATE CS 2025 Set 2 | Question 9

Explanation

Answer: (D)

Find the area of triangle PLS in two ways.

  • With base PS: PS = 2 cm, and L lies on QR, which is 2 cm from PS. So the area is \(\frac{1}{2} \times 2 \times 2 = 2\) cm2.
  • With base PL: S lies on MN, which is parallel to PL at a distance LM. So the area is \(\frac{1}{2} \times PL \times LM\), half the rectangle.

Hence the rectangle’s area is \(2 \times 2 = 4\) cm2, wherever L sits on QR.

Answer: D

GATE CS 2024 Set 1 | Question 2

MCQ · 1 mark · −0.33

If two distinct non-zero real variables \(x\) and \(y\) are such that \((x + y)\) is proportional to \((x - y)\) then the value of \(\frac{x}{y}\)

Options for GATE CS 2024 Set 1 | Question 2

Explanation

Answer: (D)

“Proportional” means \(x + y = k(x - y)\) for some fixed constant \(k\). Rearranging,

\[x + y = kx - ky \;\Rightarrow\; y(k + 1) = x(k - 1) \;\Rightarrow\; \frac{x}{y} = \frac{k + 1}{k - 1}.\]

The right-hand side involves only the constant \(k\), so \(\frac{x}{y}\) is the same for every pair that satisfies the condition: it is a constant. (Here \(k \neq \pm 1\), because \(k = 1\) would force \(y = 0\) and \(k = -1\) would force \(x = 0\).)

Answer: D

GATE CS 2024 Set 1 | Question 3

MCQ · 1 mark · −0.33

Consider the following sample of numbers:

9, 18, 11, 14, 15, 17, 10, 69, 11, 13

The median of the sample is

Options for GATE CS 2024 Set 1 | Question 3

Explanation

Answer: (A)

The median is the middle value once the data are sorted:

9, 10, 11, 11, 13, 14, 15, 17, 18, 69

There are ten values, an even count, so the median is the average of the 5th and 6th values: \(\frac{13 + 14}{2} = 13.5\).

The large value 69 drags the mean up to \(\frac{187}{10} = 18.7\) (option D), but the median depends only on the order of the values, so the outlier does not move it. Option C, 11, is the mode.

Answer: A

GATE CS 2024 Set 1 | Question 4

MCQ · 1 mark · −0.33

The number of coins of ₹1, ₹5, and ₹10 denominations that a person has are in the ratio 5:3:13. Of the total amount, the percentage of money in ₹5 coins is

Options for GATE CS 2024 Set 1 | Question 4

Explanation

Answer: (C)

Take the coin counts as 5, 3 and 13; multiplying all three by the same factor would not change the percentage. The money held in each kind of coin is:

  • ₹1 coins: 5 × ₹1 = ₹5
  • ₹5 coins: 3 × ₹5 = ₹15
  • ₹10 coins: 13 × ₹10 = ₹130

The total is ₹150, so the share in ₹5 coins is \(\frac{15}{150} \times 100 = 10\%\).

Option B, \(14\frac{2}{7}\%\), is the share of ₹5 coins by count (3 out of 21 coins), not by value.

Answer: C