The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+20 votes
2.7k views

The expression $\large \frac{(x+y) - |x-y|}{2}$ is equal to :

  1. The maximum of $x$ and $y$
  2. The minimum of $x$ and $y$
  3. $1$
  4. None of the above
asked in Numerical Ability by Veteran (407k points)
edited by | 2.7k views

4 Answers

+26 votes
Best answer
When $x>y, \mid x-y\mid \quad =x-y,$ if we substitute in expression we get $y.$
When $x<y, \mid x-y\mid\quad =-(x-y),$ if we substitute in expression we get $x.$

Therefore in both the case we get minimum of $(x,y).$
ANS: B
answered by Active (1.4k points)
edited by
0
substitute 6,-2 it is giving -2 as answer
0
Yes -2 is the minimum
0
..?? i did not get.. plz elaborate
0
Take x=-2 y=3

$((x+y) - |x-y|)/2$

That is

$((-2+3) - |-2-3|)/2$

becomes

$((1) - |-5|)/2$

Then, removing mod we get

$((1) - 5)/2$ ---->  $(-4)/2$  --> -2! The minimum! :)
0
(A) The maximum of x and y                                         (B) The minimum of x and y

PLEASE explain meanging of both
+1

$(A)$ The maximum of $x$ and $y$

 $max(x,y)=max(1,2)=2$

 $max(x,y)=max(3,4)=4$

 $max(x,y)=max(44,24)=44$

 $max(x,y)=max(100,20)=100$

 $(B)$ The minimum of $x$ and $y$

 $min(x,y)=min(1,2)=1$

$min(x,y)=min(100,200)=100$

$min(x,y)=min(10,2)=2$

$min(x,y)=min(101,102)=101$

+15 votes
The modulus function works like this:

| x | = x     if ( x >0)

| x | = -x    if (x <0 )

as it can be treated as | x - 0 |

similarly here | x-y | = x-y       if  (  ( x-y )>0  or x>y )

              and  | x-y |=  -( x-y )   if ( ( x-y )<0  or x<y )

so now just substitute in the equation

the expression will give  ( x+y - x +y )/2  = y     if( x>y )

       and                         ( x+y + x - y)/2   =x      if(x<y)

hence whichever is minimum that is coming as output
answered by (351 points)
+10 votes

Hence, minimum value in both the case is the required answer.

So, option (B)

answered by Active (3.9k points)
+5 votes
we can simply take values and check the expression , It always gives minimum of x and y.
(B)   The minimum of x and y
answered by Boss (40.4k points)
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
49,534 questions
54,122 answers
187,321 comments
71,040 users