Assignment-1 - Assignment-1 Generation of random numbers 1...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Assignment -1 Generation of random numbers 1) Write a computer program that generates hundred 3- digit random numbers using the Linear Congruential Generator (LCG) method with the parameter values given as, Z 0 =7, a =5, C =19 and m = 128 (these values to be entered by user) Random number Z i = (a * Z 0 + C) (mod m) Normalize the random numbers generated (Ui = Zi/ m) and plot histogram of the normalized random numbers. 2) Repeat step 1 above, using rand() function in C and compare the output results. Note : Conditions for selection of values to get the full period a) The only positive integer that divides both m and C is 1. b) If q is a prime number, that divides m, then q divides a-1 c) If 4 divides m, then 4 divides a-1 d) 0 <= m, a < m, C < m, Z i < m e) m gives period of repetition of random numbers and should be of the form 2 b Reference Books: 1) Simulation & Modeling ……… By Law, Kelton 2) Computer based simulation & modeling ……… By Jerry Banks
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Assignment - 2 Dijkstra’s shortest path algorithm - Enter number of nodes as well as numbers of source and destination nodes as the input. - Each node is labeled with its distance from the source node along with the best known path. - Initially, no paths are known. Hence all nodes may be labeled with infinity - As the algorithm proceeds and paths are found, the labels may change, reflecting better paths. -
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/15/2011 for the course ECO 2023 taught by Professor Mr.raza during the Summer '10 term at FAU.

Page1 / 4

Assignment-1 - Assignment-1 Generation of random numbers 1...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online