TCS
Company
27. Find the minimum value of abs (187m -396n + 526) where m and n are integers, if x > 0 abs(x) =x and if x < 0 then abs(x) = -x
Read Solution (Total 8)
-
- let x=187m-396n+526
for x to be minm (187m-396n) must be nearer to -526
x=11(17m-36n)+526
for m=12 & n=7,the value of x=-2
so minm value of abs(x)=2
is it right? - 11 years agoHelpfull: Yes(8) No(5)
- cannot be determined.....
as we have to find the min value 187m-396n+526 should be negative
as m and n are integers we can take m as least neg int and n as max int... - 11 years agoHelpfull: Yes(7) No(7)
- as per defn of abs(x)
the value of abs(187m-396n+526) will be always positive or maybe zero but cant -ve
for minm value of given expression the term (187m-396n+526) mustbe least +ve or zero or max -ve
for m=12 & n=7,the value of x=-2
as |-2|=-(-2)=+2
so minm value of abs(x)=2
- 11 years agoHelpfull: Yes(6) No(0)
- Sorry for the last answer and
the answer is 2 by simply substituting the given m n values from options
11*ABS(17m-36n)=-526
Here m=12. n=7
Ans 2 - 11 years agoHelpfull: Yes(3) No(0)
- @vineesha a small rectification here...see abs(x)=-x.Therefore, here has to be maximum for abs(x) to be minimum. hence, n=0,m=(+)infinite. ans; cannot be determined.
- 11 years agoHelpfull: Yes(0) No(1)
- When m=1. n=2. then
ABS(x)=79 - 11 years agoHelpfull: Yes(0) No(3)
- @naba paul
if we take n=0 and m as max +ve integer then value in abs is positive value....
abs(+value)=+value.....that means we get max value of abs(187m-396n+526)...
but here we want min value of abs(......).
if we take m as max -ve value and n as max +ve value then 187(-ve)-396(+ve)+526
that means -()-()+526 then we get abs(-ve)...as abs(-ve) is -ve we get min value of abs(.......).
am i correct? - 11 years agoHelpfull: Yes(0) No(0)
- the value of abs(187m-396n+526) will be always positive or maybe zero but cant -ve
for minm value of given expression the term (187m-396n+526) mustbe least +ve or zero or max -ve
for m=12 & n=7,the value of x=-2
as |-2|=-(-2)=+2
so minm value of abs(x)=2
- 10 years agoHelpfull: Yes(0) No(0)
TCS Other Question