Solveeit Logo

Question

Question: A special fully automatic car is designated by the Indian scientist in the Hindustan Automobiles Ltd...

A special fully automatic car is designated by the Indian scientist in the Hindustan Automobiles Ltd. The car follows only the following instructions
G1(x){G_1}(x) : The car shall move forward to x meters
G2(x){G_2}(x): The car shall turn in right direction and move x meters
G3(x){G_3}(x): The car shall turn in left direction and move x meters
G4(x){G_4}(x): The car shall move backward x meters
The car is given instruction G2(50){G_2}(50),G3(30){G_3}(30) and G4(20){G_4}(20). Find the shortest distance of the car from the original position. Assume that car was initially at origin and facing the negative x-axis.

Explanation

Solution

G1(x),G2(x),G3(x),G4(x){G_1}(x),{G_2}(x),{G_3}(x),{G_4}(x) are the instructions the car follows.
First, we move the car by following instruction G2(50){G_2}(50)
Then G3(30){G_3}(30) and G4(20){G_4}(20)respectively.
After doing all these we need to find out the position of the car. Then by applying the distance formula we get the shortest distance of the car from the origin.

Complete step by step answer:
It is given that the car is given instructionG2(50){G_2}(50),G3(30){G_3}(30) andG4(20){G_4}(20).
We assume that the car was initially at origin (0,0)\left( {0,0} \right) and facing the negative x axis.
By following the instruction G2(50){G_2}(50)the car will move 50m in the right direction and be at the position(0,50)\left( {0,50} \right) .
After that following the second instruction G3(30){G_3}(30)the car will move 30m in left direction then it will be along negative x axis from(0,50)\left( {0,50} \right)and now the car will be at the position(30,50)\left( { - 30,50} \right) .
Then following the final instruction G4(20){G_4}(20)the car will move 20m backwards and be at the position(10,50)\left( { - 10,50} \right) .
Hence finally the car will reach the point(10,50)\left( { - 10,50} \right).
This is being explained by the following figure

In the drawn figure O represents the initial position A is the position after the first movement B is the position of the car after the second movement and C is the final position of the car.
The distance between the points(0,0)\left( {0,0} \right)and (10,50)\left( { - 10,50} \right)is =(100)2+(500)2= \sqrt {{{( - 10 - 0)}^2} + {{(50 - 0)}^2}}
Let us square the terms inside the root we get,
(100)2+(500)2=100+2500\sqrt {{{( - 10 - 0)}^2} + {{(50 - 0)}^2}} = \sqrt {100 + 2500}
On simplifying we get,
The distance travelled by the car = \sqrt {2600} $$$$ = 10\sqrt {26} units

\therefore The shortest distance of the car from the original position to the final position is 1026units10\sqrt {26} units.

Note:
The shortest distance of two points (x1,y1)({x_1},{y_1})and (x2,y2)({x_2},{y_2})is given by the formula(x2x1)2+(y2y1)2\sqrt {{{({x_2} - {x_1})}^2} + {{({y_2} - {y_1})}^2}} .
If the order of the given instruction changes the distance remains the same but the position of the car changes. That is even though the position of the car may change after the change in the order the distance traveled by car remains constant.