Skip to content
Official PYQ · 2015

GATE CS 2015 Set 2 QGA-9 — General Aptitude

Explain with AI
If p,q,r,sp, q, r, s are distinct integers such that:

f(p,q,r,s)= max (p,q,r,s)f (p, q, r, s) = \text{ max } (p, q, r, s)

g(p,q,r,s)= min (p,q,r,s)g (p, q, r, s) = \text{ min } (p, q, r, s)

h(p,q,r,s)=remainder of (p×q)(r×s) if (p×q)>(r×s)h (p, q, r, s) = \text{remainder of } \frac{(p \times q)} {(r \times s)} \text{ if } (p \times q) > (r \times s)
 or remainder of (r×s)(p×q) if (r×s)>(p×q)\text{ or remainder of } \frac {(r \times s)}{(p \times q)} \text{ if } (r \times s) > (p \times q)

Also a function fgh(p,q,r,s)=f(p,q,r,s)×g(p,q,r,s)×h(p,q,r,s)fgh (p, q, r, s) = f(p, q, r, s) \times g(p, q, r, s) \times h (p, q, r, s)
Also the same operations are valid with two variable functions of the form f(p,q)f(p, q)
What is the value of fg(h(2,5,7,3),4,6,8)fg \left(h \left(2, 5, 7, 3\right), 4, 6, 8\right)?
View worked solution

Answer: 8

We need to find the value of the expression:

fg(h(2,5,7,3),4,6,8)fg \left(h \left(2, 5, 7, 3\right), 4, 6, 8\right)

Step 1: Evaluate h(2,5,7,3)h(2, 5, 7, 3)

For the function h(p,q,r,s)h(p, q, r, s) with p=2,q=5,r=7,s=3p=2, q=5, r=7, s=3:

  • p×q=2×5=10p \times q = 2 \times 5 = 10
  • r×s=7×3=21r \times s = 7 \times 3 = 21

Since (r×s)>(p×q)(r \times s) > (p \times q), we compute the remainder of r×sp×q\frac{r \times s}{p \times q}:

h(2,5,7,3)=21(mod10)=1h(2, 5, 7, 3) = 21 \pmod{10} = 1

Step 2: Evaluate the outer function fg(1,4,6,8)fg(1, 4, 6, 8)

Based on the definition of the combined function fgh(p,q,r,s)=f(p,q,r,s)×g(p,q,r,s)×h(p,q,r,s)fgh(p, q, r, s) = f(p, q, r, s) \times g(p, q, r, s) \times h(p, q, r, s), the function fg(p,q,r,s)fg(p, q, r, s) is defined as:

fg(p,q,r,s)=f(p,q,r,s)×g(p,q,r,s)fg(p, q, r, s) = f(p, q, r, s) \times g(p, q, r, s)

For the arguments (1,4,6,8)(1, 4, 6, 8):

  • f(1,4,6,8)=max⁡(1,4,6,8)=8f(1, 4, 6, 8) = \max(1, 4, 6, 8) = 8
  • g(1,4,6,8)=min⁡(1,4,6,8)=1g(1, 4, 6, 8) = \min(1, 4, 6, 8) = 1

Thus, we have:

fg(1,4,6,8)=8×1=8fg(1, 4, 6, 8) = 8 \times 1 = 8

The final value is 8.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore General Aptitude questions