GATE / CS ARCHIVE

GATE CSE 2017 SET 1 / QUESTION 63

GATE CSE 2017 Set 1 Q63

General Aptitude · Algebra, Equations & Number Patterns · Full GATE CSE 2017 Set 1 paper

GATE 2017 Set 1, Q63 2 marks · MCQ
Report issue

Algebra, Equations & Number Patterns

Question 63, GATE 2017: For real x,y, simplify ((x+y)−|x−y|)/2. A max(x,y); B min(x,y); C 1; D none.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

1. Split into the two possible orderings because of the absolute value. If x≥y, |x−y|=x−y.

2. Then ((x+y)−(x−y))/2=2y/2=y, which is the smaller value. If x<y, |x−y|=y−x, giving ((x+y)−(y−x))/2=x.

3. Both cases return min(x,y), including equality where either value is the same. Thus B. A quick check x=2,y=5 gives (7−3)/2=2.

Original paper, page 26 · Answer key