If \(p, q, r, s\) are distinct integers such that:(f(p, q, r, s) = max (p, q,…

2015

If \(p, q, r, s\) are distinct integers such that:(f(p, q, r, s) = max (p, q, r, s) \\g(p, q, r, s) = min (p, q, r, s)\)\(h(p, q, r, s) \) = remainder of \((p × q) / (r × s)\)  if \((p × q) > (r × s)\) OR remainder of \((r × s) / (p × q)\) if \((r × s) > (p × q)\)

Also a function \(fgh (p, q, r, s) = f(p, q, r, s) × g(p, q, r, s) × h(p, q, r, s)\).
Also the same operation are valid with two variable functions of the form \(f(p, q)\).

What is the value of \(fg(h(2, 5, 7, 3), 4, 6, 8)\)

Attempted by 40 students.

Show answer & explanation

Correct answer: 8

Key idea: concatenation of function names (for example fg(...)) means the product f(...)×g(...). Here f returns the maximum, g returns the minimum, and h returns the remainder as defined.

  • Compute h(2,5,7,3): p×q = 2×5 = 10 and r×s = 7×3 = 21. Since 21 > 10, h = remainder of 21/10 = 1.

  • Now evaluate f(1,4,6,8) and g(1,4,6,8): f = max(1,4,6,8) = 8, g = min(1,4,6,8) = 1.

  • Therefore fg(h(2,5,7,3),4,6,8) = f(1,4,6,8) × g(1,4,6,8) = 8 × 1 = 8.

Answer: 8

Explore the full course: Gate Guidance By Sanchit Sir