CECS 524 Erlang Concurrency Compute an approximation to pi. Consider a circle of radius r inscribed in a square of side 2r. The area of the square is 2r*2r. The area of the circle is pi*r*r so the ratio of circle to square is pi/4. Choose two random numbers such that the point (x,y) lies inside the square. Check if x*x + y*y < r*r to see if the point is also inside the circle. Repeat one million times and find the number of points inside the circle. Use the formula to compute an estimate for pi. Modify the functions of assignment 1. The random numbers are between 0 and 1 and are given by random:uniform(). Use a square of side 1 centered at (0.5,0.5). Modify the squares method to get one random number, subtract 0.5 from it and then find the square. Modify the num method to find the number of elements which are less than 0.25 ( the square of the radius). Spawn a process which receives a tuple of a process id and a number N. The spawned process computes the value of pi using these functions. It sends a message tuple to the process id it received containing its process id and the computed value of pi.