Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Here is a story you may have heard. A drowning princess was saved by a farmer. T

ID: 3561883 • Letter: H

Question

Here is a story you may have heard. A drowning princess was saved by a farmer. To show his appreciation, the king told the farmer that he could ask for I anything in his kingdom. The humble farmer pointed to a chessboard and said: "Your Majesty, I just want to have enough rice to feed my family. Would you put 1 grain of rice in the 1st grid, 2 in the 2nd grid, 4 in the 3rd grid, 8 in the 4th grid, and so on in every grid with grains doubling the previous one, until all the 64 grids are filled up? That's all I want." Without hesitation, the king agreed...... You can finish up the story. But I can tell you that a descendant of the farmer became a biosystems engineer and estimated that 1 kilogram of rice contains 65,536 grains. For your information, world production of rice rose steadily from about 200 million tonnes of paddy rice in 1960 to over 678 million tonnes in 2009. Questions for you: Using paper and pencil, derive equations and calculate how much rice the rarer asked for. Write Matlab script to do the same calculation, but don't use the equation you derived in 1. Instead, use the concept of data vector/array or loop construct to do the calculation. How much the fanner asked for comparing with the world rice production in 2009? Answer each of the above questions and insert your Matlab script and the corresponding results. Turn in this lab report using this sheet as the cover sheet

Explanation / Answer

Matlab Code:----------------------------------------------------------------------------------------------------

arr = zeros(1,64);
arr(1)=1;
sum = arr(1);
for i=2:64
arr(i)=arr(i-1)*2;
sum = sum + arr(i);
end
sum

--------------------------------------------------------------------------------------------------------------------------

Output:

sum =

1.8447e+19

--------------------------------------------------------------------------------------------------------------------------

So the farmer asked for these many grains of rice actually.

Now 678 million tonnes = 678*10^6 tonnes = 678*10^9 kgs

again 1 kg rice contains 65536 grains. Therefore number of grains of rice produced in 2009 is ---> 4.4433408e+16

therefore compared to the rice production in2009, the farmer asked for about more than 415.16 times the production from the king !!

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote