1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

# The algorithms given below represent linear function. Which of the two algorithm(s) have zero output at the zero input?

A
Algorithm 1
No worries! Weâ€˜ve got your back. Try BYJUâ€˜S free classes today!
B
Both of them
No worries! Weâ€˜ve got your back. Try BYJUâ€˜S free classes today!
C
None of them
No worries! Weâ€˜ve got your back. Try BYJUâ€˜S free classes today!
D
Algorithm 2
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
Open in App
Solution

## The correct option is D Algorithm 2Let us consider Algorithm 1: Values of x Value of y 3 15 4 19 5 23 Consider any two coordinates, say (3,15) and (4,19) Slope=Change in yChange in x=19 − 154 − 3 ⇒ Slope = 4 Equation of straight line is y = mx + c Putting the value of m, we get: y=4x+c Consider one point, say (3,15) Substituting the values, we get: ⇒15=4(3)+c ⇒15=12+c ⇒3=c Therefore, the equation for Algorithm 1 will be y = 4x + 3 At x = 0, y=4×0+3 ⇒ y = 3 Therefore, at zero input the output is 3. So it is not the correct option. Let us consider Algorithm 2: Value of x Value of y 3 13.5 4 18 5 22.5 Consider any two coordinates, say (3,13.5) and (4,18) Slope=Change in yChange in x=18 − 13.54 − 3 ⇒ Slope = 4.5 Equation of straight line is y = mx + c Putting the value of m, we get: y=4.5x+c Consider one point, say (5,22.5) Substituting the values, we get: ⇒22.5=4.5(5)+c ⇒22.5=22.5+c ⇒0=c Therefore, the equation for Algorithm 2 will be y = 4.x + 3 At x = 0, y=4×0+0 ⇒ y = 0 Therefore, at zero input the output is zero. So it is correct option.

Suggest Corrections
0
Join BYJU'S Learning Program
Related Videos
MATHEMATICS
Watch in App
Join BYJU'S Learning Program