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

MAT2409-HIGH PERFORMANCE NUMERICAL COMPUTING PAGE 4 oOF 4 EXAMINATION PERIOD-SEM

ID: 3283524 • Letter: M

Question

MAT2409-HIGH PERFORMANCE NUMERICAL COMPUTING PAGE 4 oOF 4 EXAMINATION PERIOD-SEMESTER 1, 2016 QUESTION 4 (35 MARKs) () A computer's random number generator is known as a pseudo-random num- ber generator (a) What is a pseudo-random number generator? (b) Why is it important that a computer's random number generator be as 3 marks 3 marks close to truly random as possible? (ii) Consider the following ordinary differential equation (ODE) y-+y+7y, vo) -1. Using this equation and its initial condition answer the following questions: (a) Write out the simple Euler equation (scheme) that would be used to solve 5 marks this ODE. (b) What changes will you have to make to your Euler Equation of Ques- 5 marks tion 4(ili-a) if you want to implement a 4th order Runge-Kutta method instead? (c) The Euler method is an O(h) method and the 4th order Runge-Kutta 5 marks method is an O(h4) method-what does this mean? (ii) An important equation of non-linear mechanics is van der Pol's equation: dx which models a non-linear, damped oscillator. If the initial conditions are (0) 1, and()-0, answer the following questions. (a) Re-write van der Pol's equation as a system of first order differential 8 marks equations (b) Using Euler's method and a step size h 0.01, find the value of z and 6 marks after one step. END OF EXAMINATION

Explanation / Answer

1. a) Pseudo Random Number Generator (PRNG) refers to an algorithm that uses mathematical formulas to produce sequences of random numbers.

1. b) The result would other be baised and trule random.

A deterministic device will always produce the same output when given the same starting conditions and inputs - that is what it means to be deterministic. "Truly random number" is more of a philosophical viewpoint, as what does it mean to be random is the crux of the philosophical navel gazing.

PRNGs are not suitable for applications where it is important that the numbers are really unpredictable, such as data encryption and gambling. In such cases a truly random number is required.