Skip to main content

Chapter 7

Simulation and Modeling

TU BSc CSIT past exam questions

Past questions and answers

71 questions set from this chapter; 3 are most repeated (set, or a close variant set, in 3 or more exams). Most repeated first.

  • Most repeated · 3 of 6 exams
  • 2078 · 5 marks

Explain Monte Carlo simulation method with an example?

Similar questions: Explain the Monte Carlo simulation method. with example. (2079) · Explain Monte Carlo simulation method with example. (2080)

Answer

Monte Carlo simulation is a method that solves a problem by repeated random sampling. A random experiment is performed many times using random numbers drawn from the probability distributions of the inputs, and the average of the results estimates the quantity of interest. It does not use the passing of time, so it is suited to static problems and to problems with uncertainty, such as inventory, risk and numerical integration.

Steps

  1. Build the model and identify the random inputs.
  2. Define the probability distribution of each input and the cumulative distribution.
  3. Assign ranges of random numbers to each outcome according to the cumulative probability.
  4. Generate random numbers and map them to outcomes.
  5. Calculate the result of each trial.
  6. Repeat many times and average the results.

Example: daily demand of newspapers

DemandProbabilityCumulativeRandom number range
100.20.200-19
200.50.720-69
300.31.070-99

Random numbers 45, 83, 12, 67, 91 give demands 20, 30, 10, 20, 30, so the average demand over five days is (20+30+10+20+30)/5=22(20+30+10+20+30)/5=22. With thousands of trials the average approaches the expected demand 10(0.2)+20(0.5)+30(0.3)=2110(0.2)+20(0.5)+30(0.3)=21.

Another example: estimating π\pi by throwing random points in a unit square; the fraction that falls inside the quarter circle x2+y2≤1x^2+y^2\le1 approaches π/4\pi/4.

The accuracy improves as the number of trials grows, with the error falling as 1/n1/\sqrt n.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • Most repeated · 3 of 6 exams
  • 2079 · 5 marks

Explain the Monte Carlo simulation method. with example.

Similar questions: Explain Monte Carlo simulation method with an example? (2078) · Explain Monte Carlo simulation method with example. (2080)

Answer

Monte Carlo simulation is a technique that uses repeated random sampling to estimate the behaviour of a system or the value of a quantity that is hard to compute directly. Random numbers are used to draw values from the probability distributions of the uncertain inputs, the model is evaluated for each sample, and the results are averaged. It is generally used for static models (time plays no role) such as risk analysis, inventory, queues without a clock, and numerical integration.

Steps

  1. Define the problem and the random variables.
  2. Determine the probability distribution and the cumulative distribution of each variable.
  3. Assign random number intervals to the outcomes.
  4. Generate random numbers and read off the corresponding outcomes.
  5. Compute the result for each trial and repeat for many trials.
  6. Average the results to obtain the estimate.

Example: daily sales of a shop

Sales (units)ProbabilityCumulativeRandom number interval
50.10.100-09
60.30.410-39
70.40.840-79
80.21.080-99

Random numbers for 5 days: 52, 06, 83, 29, 71 give sales 7, 5, 8, 6, 7, so the average is 33/5=6.633/5=6.6 units. The exact expected value is 5(0.1)+6(0.3)+7(0.4)+8(0.2)=6.75(0.1)+6(0.3)+7(0.4)+8(0.2)=6.7. With more trials the simulated average comes closer to 6.7.

Classic example: estimating π\pi by choosing random points (x,y)(x,y) in the unit square; the fraction of points with x2+y2≤1x^2+y^2\le1 approaches π/4\pi/4.

The error of the estimate decreases in proportion to 1/n1/\sqrt n.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • Most repeated · 3 of 6 exams
  • 2080 · 5 marks

Explain Monte Carlo simulation method with example.

Similar questions: Explain Monte Carlo simulation method with an example? (2078) · Explain the Monte Carlo simulation method. with example. (2079)

Answer

Monte Carlo simulation is a method that uses repeated random sampling from probability distributions to estimate the behaviour of a system or the value of a quantity. It is a static simulation (time does not play a role) and is used for problems that are random or too complex to solve analytically, such as numerical integration, risk analysis and estimating π\pi.

Steps

  1. Define the problem and the random input variables.
  2. Obtain the probability distribution of each input variable and build its cumulative distribution.
  3. Assign ranges of random numbers to each outcome, according to the cumulative probability.
  4. Generate random numbers and map them to outcomes.
  5. Compute the result of each trial and repeat many times.
  6. Average the results to obtain the estimate.

Example: daily newspaper demand. Demand and its probability are: 10 papers (0.2), 20 (0.5), 30 (0.3). The cumulative probabilities and random number ranges are:

DemandProbabilityCumulativeRandom number range
100.20.200-19
200.50.720-69
300.31.070-99

Using two-digit random numbers 15, 73, 48, 91, 02 gives demands 10, 30, 20, 30, 10. The average demand is (10+30+20+30+10)/5=20(10+30+20+30+10)/5=20 papers per day. The theoretical expected demand is 0.2(10)+0.5(20)+0.3(30)=210.2(10)+0.5(20)+0.3(30)=21, and the estimate approaches it as the number of trials increases.

Advantages: simple, handles random inputs and complex systems. Disadvantage: needs many trials for accuracy, and results are only approximate.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2076 · 10 marks

Define queuing system. Explain different queuing disciplines. Also explain different performance measures for evaluation of queuing system.

Answer

Queuing system

A queuing system consists of customers (jobs, packets, patients) that arrive, wait in a queue if the server(s) are busy, receive service, and leave. Its components are the arrival pattern (e.g. Poisson with rate λ\lambda), the service mechanism (service-time distribution, rate μ\mu, number of servers), the queue capacity (finite or infinite), the calling population (finite or infinite) and the queue discipline. It is described in Kendall notation A/B/c/K/N/DA/B/c/K/N/D, e.g. M/M/1 (Poisson arrivals, exponential service, one server). Examples: bank counters, CPU job scheduling, a call centre.

Queuing disciplines

The queue discipline is the rule that decides which waiting customer is served next.

  1. FIFO (FCFS): first in, first out; customers are served in order of arrival (bank, ticket counter).
  2. LIFO (LCFS): the last to arrive is served first (stack of items, some storage systems).
  3. SIRO (random selection): the next customer is chosen at random.
  4. Priority discipline: customers with higher priority are served first, either pre-emptive (service of a lower-priority customer is interrupted) or non-pre-emptive (current service finishes first); e.g. emergency patients.
  5. SPT / SJF (shortest processing time first): customers with the shortest service time go first, which reduces the average wait (CPU scheduling).
  6. Round robin / processor sharing: each customer gets a fixed time slice in turn.
  7. Balking, reneging and jockeying are customer behaviours: refusing to join a long queue, leaving after waiting, or switching to another queue.

Performance measures

For an M/M/1 queue with utilisation ρ=λ/μ<1\rho = \lambda/\mu < 1:

  • Server utilisation: the fraction of time the server is busy, ρ=λ/μ\rho = \lambda/\mu.
  • Average number in the system: L=ρ1−ρ=λμ−λL = \dfrac{\rho}{1-\rho} = \dfrac{\lambda}{\mu-\lambda}.
  • Average number in the queue: Lq=ρ21−ρ=λ2μ(μ−λ)L_q = \dfrac{\rho^2}{1-\rho} = \dfrac{\lambda^2}{\mu(\mu-\lambda)}.
  • Average time in the system: W=1μ−λW = \dfrac{1}{\mu-\lambda}.
  • Average waiting time in the queue: Wq=λμ(μ−λ)W_q = \dfrac{\lambda}{\mu(\mu-\lambda)}.
  • Probability of nn customers in the system: Pn=(1−ρ)ρnP_n = (1-\rho)\rho^n; P0=1−ρP_0 = 1-\rho is the probability that the system is idle.
  • Probability that a customer must wait, the maximum queue length, throughput and the proportion of customers lost (for finite capacity).

These are related by Little's law, L=λWL = \lambda W and Lq=λWqL_q = \lambda W_q.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2076 · 10 marks

Difference between chi-square test and KS test for uniformity. Use KS test to check for the uniformity for the input set of random numbers given below. 0.54, 0.73, 0.98, 0.11, 0.68, 0.45. Assume level of significance to be D_α=0.05 => 0.565

Answer

Difference between chi-square and KS tests for uniformity

Chi-square testKolmogorov-Smirnov (KS) test
Compares observed and expected frequencies in class intervalsCompares the empirical CDF SN(x)S_N(x) with the uniform CDF F(x)=xF(x)=x
Data must be grouped into nn intervalsWorks directly on individual observations; no grouping
Needs a large sample (each class expected frequency ≥5\ge 5)Suitable for small samples
Statistic χ02=∑(Oi−Ei)2Ei\chi_0^2=\sum \frac{(O_i-E_i)^2}{E_i}, with n−1n-1 degrees of freedomStatistic D=max⁡∣F(x)−SN(x)∣D=\max\lvert F(x)-S_N(x)\rvert
Result depends on the chosen intervalsDoes not depend on interval choice; uses exact data
Applies to discrete and continuous distributionsOriginally for continuous distributions

KS test

H0H_0: the numbers are uniformly distributed on [0,1][0,1]; H1H_1: they are not. N=6N=6, α=0.05\alpha=0.05, critical value Dα=0.565D_\alpha = 0.565.

Rank the numbers: R(1)=0.11, 0.45, 0.54, 0.68, 0.73, R(6)=0.98R_{(1)}=0.11,\ 0.45,\ 0.54,\ 0.68,\ 0.73,\ R_{(6)}=0.98.

D+=max⁡{i/N−R(i)}D^+ = \max\{i/N - R_{(i)}\} and D−=max⁡{R(i)−(i−1)/N}D^- = \max\{R_{(i)} - (i-1)/N\}.

iiR(i)R_{(i)}i/Ni/Ni/N−R(i)i/N - R_{(i)}(i−1)/N(i-1)/NR(i)−(i−1)/NR_{(i)} - (i-1)/N
10.110.16670.056700.1100
20.450.3333-0.11670.16670.2833
30.540.5000-0.04000.33330.2067
40.680.6667-0.01330.50000.1800
50.730.83330.10330.66670.0633
60.981.00000.02000.83330.1467

D+=0.1033D^+ = 0.1033, D−=0.2833D^- = 0.2833, so

D=max⁡(D+,D−)=0.2833D=\max(D^+,D^-)=0.2833

Since D=0.2833<Dα=0.565D = 0.2833 < D_\alpha = 0.565, we fail to reject H0H_0. There is no evidence against uniformity, so the numbers can be accepted as uniformly distributed at the 5% level.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2076 · 10 marks

What do you understandby static mathematical model? Explain with example. Differentiate between stocastic and deterministic activities.

Answer

Static mathematical model

A mathematical model represents a system by mathematical relations (equations, inequalities, functions) among its variables. A static model describes the system at a single point in time, or in equilibrium, and has no time variable; the relationships do not change with time and the output does not depend on previous states. A dynamic model, in contrast, shows how the system evolves with time.

Examples:

  • Break-even model: profit P=(s−v)x−FP = (s - v)x - F, where ss is selling price per unit, vv variable cost per unit, FF fixed cost, xx units. Break-even point is x=F/(s−v)x = F/(s-v).
  • Ohm's law V=IRV = IR.
  • Area/volume formulas, or a linear programming model for product mix: maximise Z=3x1+5x2Z = 3x_1 + 5x_2 subject to x1+2x2≤10x_1 + 2x_2 \le 10, x1,x2≥0x_1,x_2 \ge 0.
  • Economic order quantity Q=2DS/HQ = \sqrt{2DS/H}.

Stochastic vs deterministic activities

Deterministic activityStochastic activity
Outcome is completely determined by the inputs and the rules; no randomnessOutcome involves random variables and probability
The same input always gives the same outputThe same input can give different outputs
Time/result is fixed and exactly predictableResults are described by probability distributions
Example: a machine that always takes exactly 5 minutes per job; a fixed bus timetableExample: arrival of customers at a bank; time to repair a machine
Solved with ordinary calculationNeeds random number generation, many runs and statistical analysis

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2076 · 5 marks

Discuss the merits and demerits of system simulation.

Answer

Merits of system simulation

  • Allows study of systems that are too costly, dangerous or impossible to experiment with directly (aircraft, nuclear plants, large networks).
  • Experiments are fast and cheap: time can be compressed or expanded, and "what-if" alternatives tested without disturbing the real system.
  • Handles complex systems with randomness and many interacting parts that analytic models cannot solve.
  • Gives insight into which variables matter and how the system behaves (sensitivity analysis).
  • Provides a controlled environment where conditions can be repeated exactly.
  • Useful for training (flight simulators) and for design and planning before the system is built.
  • Can be used where no mathematical solution exists.

Demerits

  • Building a model can be expensive and time-consuming, and needs skilled people.
  • Results are only as good as the model and data; wrong assumptions give misleading answers.
  • Simulation gives estimates, not exact or optimal answers; results of stochastic models vary with each run and need many runs and statistical analysis.
  • It does not optimise; it only evaluates the alternatives tried.
  • Results can be hard to interpret, and may give a false sense of precision.
  • Validation against the real system can be difficult.
  • Simulation is sometimes used when a simpler analytic solution would do.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2076 · 5 marks

Explain Markov’s chain with a suitable example.

Answer

Markov chain

A Markov chain is a stochastic process {Xn}\{X_n\} with a finite or countable set of states in which the probability of moving to the next state depends only on the present state and not on the earlier history (the Markov property):

P(Xn+1=j∣Xn=i,Xn−1,…,X0)=P(Xn+1=j∣Xn=i)=pijP(X_{n+1}=j \mid X_n=i, X_{n-1},\dots,X_0) = P(X_{n+1}=j \mid X_n=i) = p_{ij}

The pijp_{ij} are transition probabilities, collected in the transition matrix P=[pij]P=[p_{ij}], where every row sums to 1. If the state probability row vector at step nn is π(n)\pi^{(n)}, then π(n+1)=π(n)P\pi^{(n+1)}=\pi^{(n)}P. For a regular chain, π(n)\pi^{(n)} approaches a steady-state vector π\pi with π=πP\pi = \pi P and ∑πi=1\sum\pi_i = 1.

Example: weather model

States: S = sunny, R = rainy. Suppose

P=(0.70.30.40.6)P=\begin{pmatrix}0.7 & 0.3\\ 0.4 & 0.6\end{pmatrix}

(rows give today's weather: Sunny, Rainy). If today is sunny, the chance of rain the day after tomorrow is found from

P2=(0.7(0.7)+0.3(0.4)0.7(0.3)+0.3(0.6)⋯)P^2=\begin{pmatrix}0.7(0.7)+0.3(0.4) & 0.7(0.3)+0.3(0.6)\\ \cdots\end{pmatrix}

so first row of P2P^2 is (0.61, 0.39)(0.61,\ 0.39); the probability of rain in two days is 0.39.

Steady state: π1=0.7π1+0.4π2\pi_1 = 0.7\pi_1 + 0.4\pi_2 gives 0.3π1=0.4π20.3\pi_1 = 0.4\pi_2, and with π1+π2=1\pi_1+\pi_2=1:

π1=47≈0.571,π2=37≈0.429\pi_1=\frac{4}{7}\approx 0.571,\qquad \pi_2=\frac{3}{7}\approx 0.429

In the long run, about 57% of days are sunny and 43% rainy, whatever today's weather. Markov chains are used in queueing models, PageRank, inventory and reliability problems.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2076 · 5 marks

Define arrival pattern. Explain non-stationary Possion process.

Answer

Arrival pattern

The arrival pattern describes how entities (customers, jobs, packets) arrive at a system: how many arrive and when. It is specified by the inter-arrival time distribution or by the number of arrivals per unit time. Arrivals may be deterministic (at fixed intervals) or random, in single units or in batches, and may be influenced by the state of the system (balking, reneging). The most common random model is the Poisson process: arrivals occur independently at a constant average rate λ\lambda, the number of arrivals in time tt is

P(N(t)=n)=e−λt(λt)nn!P(N(t)=n)=\frac{e^{-\lambda t}(\lambda t)^n}{n!}

and the inter-arrival times are exponentially distributed with mean 1/λ1/\lambda. This is a stationary process because λ\lambda does not change with time.

Non-stationary Poisson process

In many real systems the arrival rate changes with time (rush hours in a bank, peak traffic on a network, lunch hours in a restaurant). A non-stationary (non-homogeneous) Poisson process has an arrival rate that is a function of time, λ(t)\lambda(t). Properties:

  • Arrivals in non-overlapping intervals are independent.
  • The expected number of arrivals in (0,T)(0,T) is Λ(T)=∫0Tλ(t) dt\Lambda(T)=\int_0^T \lambda(t)\,dt, and the number of arrivals in (a,b)(a,b) is Poisson with mean ∫abλ(t) dt\int_a^b\lambda(t)\,dt.
  • It cannot be simulated by simply using a constant mean inter-arrival time. A common method is thinning: generate arrivals at the maximum rate λ∗≥λ(t)\lambda^* \ge \lambda(t) and accept an arrival at time tt with probability λ(t)/λ∗\lambda(t)/\lambda^*. Another is to treat the rate as piecewise constant over intervals.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2076 · 5 marks

Differentiate between validation and calibration. How can we perform validation of a model?

Answer

Validation vs calibration

ValidationCalibration
Determines whether the model is an accurate representation of the real system for its intended purpose ("are we building the right model?")Adjusts the model's parameters and inputs so its output matches observed data from the real system
Compares model output with the real system, without changing itIteratively changes model parameters (input values, distributions, assumptions)
Overall check of credibilityA tuning step used within validation
The result is a judgement: accept or reject the modelThe result is an improved parameter set

Verification is different from both: it checks that the model is implemented correctly in the program (debugging).

How to perform validation

  1. Face validity: Ask experts and users of the real system whether the model and its results appear reasonable.
  2. Validate the model assumptions: Check structural assumptions (e.g. the system is correctly simplified) and data assumptions (collect data, fit distributions, test with goodness-of-fit tests such as chi-square or KS).
  3. Validate input-output transformations: Run the model with the real-world input data and compare the output with the real system's output, using statistical tests such as the t-test on means or confidence intervals; use historical data and, if possible, data not used for calibration.
  4. Sensitivity analysis: Change the inputs and check that the outputs change in the way the real system would.
  5. Extreme-condition tests and Turing test: Check behaviour under extreme values, and see whether experts can distinguish model output from real output.
  6. Iterate: If the model is not accurate enough, calibrate it and validate again until the model is credible.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2076 · 5 marks

Use Mixed congreuential method to generate a sequence of random numbers with X_0 = 27, n = 17, m = 100 and c = 43.

Answer

The mixed congruential method generates numbers with

Xi+1=(aXi+c) mod m,Ri=XimX_{i+1}=(aX_i+c)\bmod m,\qquad R_i=\frac{X_i}{m}

Here a=17a=17, c=43c=43, m=100m=100 and the seed is X0=27X_0=27.

iiCalculationXiX_iRi=Xi/100R_i=X_i/100
1(17×27+43)=502 mod 100(17\times27+43)=502 \bmod 10020.02
2(17×2+43)=77 mod 100(17\times2+43)=77 \bmod 100770.77
3(17×77+43)=1352 mod 100(17\times77+43)=1352 \bmod 100520.52
4(17×52+43)=927 mod 100(17\times52+43)=927 \bmod 100270.27
5(17×27+43)=502 mod 100(17\times27+43)=502 \bmod 10020.02

The seed 27 reappears at i=4i=4, so the sequence repeats with a period of 4:

27, 2, 77, 52, 27, 2, 77, 52,…27,\ 2,\ 77,\ 52,\ 27,\ 2,\ 77,\ 52,\dots

The random numbers generated are 0.02, 0.77, 0.52, 0.27,…0.02,\ 0.77,\ 0.52,\ 0.27,\dots and then they repeat. The short period shows why the parameters must be chosen carefully; a full-period generator needs suitable aa, cc and mm.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2076 · 5 marks

What do you mean by replication of runs. Why it is necessary?

Answer

Replication of runs means running the same simulation model several times, each time with the same model and input parameters but with a different, independent stream of random numbers (different seeds). Each run is one replication and gives one independent observation of the output measure, for example the mean waiting time Xˉj\bar X_j of run jj.

Why it is necessary

  1. A single run is only one sample. The output of a stochastic simulation is itself a random variable. One run may be unusually good or bad by chance, so it cannot be trusted as the true answer.
  2. Independent observations are obtained. The observations inside one run are autocorrelated (for example successive waiting times in a queue), so the ordinary variance formula does not apply to them. The replication means Xˉ1,…,Xˉn\bar X_1,\dots,\bar X_n are independent and identically distributed, so standard statistics can be used.
  3. Confidence intervals can be built. With nn replications, the point estimate is Xˉ=1n∑Xˉj\bar X=\frac1n\sum \bar X_j and the sample variance is s2=1n−1∑(Xˉj−Xˉ)2s^2=\frac1{n-1}\sum(\bar X_j-\bar X)^2. The confidence interval is

Xˉ±tα/2, n−1sn\bar X\pm t_{\alpha/2,\,n-1}\frac{s}{\sqrt n}

  1. Precision improves. The width of the interval shrinks as nn increases, so the accuracy of the estimate can be controlled.
  2. Initial bias can be handled by deleting the warm-up period in each replication.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2076 · 5 marks

Explain generation of non uniform random number generation using inverse method.

Answer

Inverse transform method. Non-uniform random variates are generated from uniform random numbers R∼U(0,1)R\sim U(0,1) by inverting the cumulative distribution function (CDF).

Steps

  1. Find the CDF F(x)F(x) of the required distribution.
  2. Generate a uniform random number RR in (0,1)(0,1).
  3. Set F(X)=RF(X)=R.
  4. Solve for XX: X=F−1(R)X=F^{-1}(R).

Why it works. Since FF is increasing and RR is uniform, P(X≤x)=P(F−1(R)≤x)=P(R≤F(x))=F(x)P(X\le x)=P(F^{-1}(R)\le x)=P(R\le F(x))=F(x). So XX has the CDF FF.

Example: exponential distribution with mean 1/λ1/\lambda. The CDF is F(x)=1−e−λxF(x)=1-e^{-\lambda x} for x≥0x\ge0. Put F(X)=RF(X)=R:

1−e−λX=R ⇒ X=−1λln⁡(1−R)1-e^{-\lambda X}=R\ \Rightarrow\ X=-\frac1\lambda\ln(1-R)

Since 1−R1-R is also uniform, X=−1λln⁡RX=-\frac1\lambda\ln R can be used. If the mean inter-arrival time is 5 min (λ=0.2\lambda=0.2) and R=0.5R=0.5, then X=−5ln⁡0.5=3.47X=-5\ln0.5=3.47 min.

Discrete case. Build the cumulative probability table and return the value xix_i for which F(xi−1)<R≤F(xi)F(x_{i-1})<R\le F(x_i).

Other examples: uniform U(a,b)U(a,b) gives X=a+(b−a)RX=a+(b-a)R, and Weibull gives X=α[−ln⁡(1−R)]1/βX=\alpha[-\ln(1-R)]^{1/\beta}.

Limitation. The method needs a CDF that can be inverted in closed form. For distributions such as the normal, other methods (convolution, acceptance-rejection) are used.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2076 · 5 marks

Parts are being made at the rate of one every 10 minutes. They are of two types, A and B. And are mixed randomly with about 10% being type B. A separate inspector is assigned to examine each part. Inspection of part A takes 6 ± 2 minutes. Both inspector rejects 10% of parts they inspect. Draw GPSS block diagram to simulate the above problem for 100 parts.

Answer

Assumptions. The inspection time of part B is not given, so it is taken as 20±520\pm5 min. Each part type has its own inspector. The time unit is 1 minute. 10% of the parts are type B, and each inspector rejects 10% of what is inspected.

Block diagram

        GENERATE 10                (one part every 10 min)
              |
        TRANSFER .100,,INSB        (10% -> INSB, 90% -> next block)
          |                                   |
   SEIZE INSA                          INSB: SEIZE INSPB
   ADVANCE 6,2                               ADVANCE 20,5
   RELEASE INSA                              RELEASE INSPB
   TRANSFER .100,GOOD,REJ                    TRANSFER .100,GOOD,REJ
          |  90%             10%                    | 90%          10%
          v                   v                     v               v
        GOOD: TERMINATE 1   REJ: TERMINATE 1      (same blocks)

GPSS program

        GENERATE   10
        TRANSFER   .100,,INSB
        SEIZE      INSA
        ADVANCE    6,2
        RELEASE    INSA
        TRANSFER   .100,GOOD,REJ
INSB    SEIZE      INSPB
        ADVANCE    20,5
        RELEASE    INSPB
        TRANSFER   .100,GOOD,REJ
REJ     TERMINATE  1
GOOD    TERMINATE  1
        START      100

In TRANSFER .100,A,B, a fraction 0.1 of transactions go to B and the rest go to A. In the first TRANSFER the empty first location means the next block, so 90% of the parts (type A) go to inspector A and 10% (type B) jump to INSB. After inspection 10% of parts go to REJ and 90% to GOOD. Both end blocks decrement the termination counter, so the run stops after 100 parts. The output gives the utilisation of each inspector and the number of rejected and accepted parts.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2076 · 5 marks

Write short notes on (any two):
  1. System and its environment
  2. Simulation run statistics

Answer

1. System and its environment

A system is a collection of entities (people, machines, etc.) that act and interact together towards the accomplishment of some logical end. Example: a bank with customers, tellers, and queue.

Components of a system: entities, attributes, activities, state, events, and endogenous and exogenous variables.

The environment is everything outside the system that affects it or is affected by it, but is not part of it. A change that occurs outside the system is said to be in the environment. For the bank, the arrival rate of customers, the state of the economy, or the bank's rules from the central bank form the environment. The boundary between system and environment depends on the purpose of the study. Activities in the environment produce exogenous events (e.g. customer arrival), while activities within the system produce endogenous events (e.g. completion of service). A system closed to the environment is a closed system; one that interacts with it is an open system.

2. Simulation run statistics

These are the performance measures collected during a simulation run in order to judge the behaviour of the system. They are of two kinds:

  • Observation-based (tally) statistics, based on individual observations, for example the average waiting time Wˉ=1n∑Wi\bar W=\frac1n\sum W_i, the maximum waiting time, and the number of customers served.
  • Time-persistent statistics, based on the time a state variable holds a value, for example average queue length Lˉ=1T∫0TL(t) dt\bar L=\frac1T\int_0^T L(t)\,dt and server utilisation ρ=busy timeT\rho=\frac{\text{busy time}}{T}.

In GPSS, the standard output reports facility utilisation, number of entries, average time per transaction, queue maximum and average contents, and total and zero entries. Because a run gives a sample, statistics from several replications are combined with confidence intervals.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 10 marks

Define queuing system. Explain the Kendall’s notation for queuing system? What are the various performance measures in single server queuing System? Explain which of them determine system stability and how?

Answer

Queuing system. A queuing system consists of customers (jobs) who arrive, wait in a queue if the server is busy, are served by one or more servers, and then leave. Its components are the arrival process, the queue (with its capacity and discipline such as FIFO), the service mechanism, and the calling population. Examples are a bank counter, a computer CPU scheduling jobs, or a supermarket checkout.

Kendall's notation. A queue is described by A/B/c/K/N/DA/B/c/K/N/D, where

  • AA = inter-arrival time distribution (M = Markovian/exponential, D = deterministic, G = general),
  • BB = service time distribution (M, D, G),
  • cc = number of parallel servers,
  • KK = system capacity (default infinity),
  • NN = size of the calling population (default infinity),
  • DD = queue discipline (default FIFO).

For example, M/M/1 is a single server queue with Poisson arrivals and exponential service times, and M/M/2/10 has two servers and a capacity of 10.

Performance measures of a single-server queue (M/M/1). Let λ\lambda be the arrival rate and μ\mu the service rate.

MeasureFormula
Utilisation (traffic intensity)ρ=λ/μ\rho=\lambda/\mu
Probability of nn in the systemPn=(1−ρ)ρnP_n=(1-\rho)\rho^n
Avg. number in the systemL=ρ1−ρ=λμ−λL=\dfrac{\rho}{1-\rho}=\dfrac{\lambda}{\mu-\lambda}
Avg. number in the queueLq=ρ21−ρ=λ2μ(μ−λ)L_q=\dfrac{\rho^2}{1-\rho}=\dfrac{\lambda^2}{\mu(\mu-\lambda)}
Avg. time in the systemW=1μ−λW=\dfrac1{\mu-\lambda}
Avg. waiting time in the queueWq=λμ(μ−λ)W_q=\dfrac{\lambda}{\mu(\mu-\lambda)}

These are related by Little's law, L=λWL=\lambda W and Lq=λWqL_q=\lambda W_q, and W=Wq+1/μW=W_q+1/\mu. The probability that the server is idle is 1−ρ1-\rho.

Stability. The utilisation ρ=λ/μ\rho=\lambda/\mu determines whether the system is stable. The system reaches a steady state only if ρ<1\rho<1, that is λ<μ\lambda<\mu, so the server can on average serve faster than customers arrive. Then LL, LqL_q, WW and WqW_q are finite. If ρ≥1\rho\ge1 the arrivals exceed the capacity of the server, the queue grows without bound, and LL and W→∞W\to\infty (the formulas above become negative or infinite). As ρ→1\rho\to1 the waiting measures grow very rapidly. For example, with λ=4\lambda=4 and μ=5\mu=5, ρ=0.8\rho=0.8, L=4L=4, W=1W=1 time unit; if μ\mu drops to 4.1 then ρ=0.976\rho=0.976 and L≈40L\approx40.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 10 marks

Define true random numbers and pseudo random numbers with its properties . The sequence of numbers 0.64, 0.50, 0.25, 0.58,0.72, 0.90 has been generated. Use KS Test with Da=0.050 => 0512 to determine if the hypothesis that they are uniformly distributed on interval [o, 1] can be rejected.

Answer

True random numbers are produced from unpredictable physical processes such as radioactive decay, atmospheric noise, thermal noise or the timing of keystrokes. They cannot be reproduced and have no period, but they are slow to produce and not repeatable, which makes debugging a simulation difficult.

Pseudo-random numbers are produced by a deterministic algorithm (for example a congruential generator Xi+1=(aXi+c) mod mX_{i+1}=(aX_i+c)\bmod m) from an initial seed. They appear random and pass statistical tests, but the sequence is fully determined by the seed.

Properties of a good generator

  1. Uniformly distributed on [0,1][0,1].
  2. Statistically independent (no correlation between successive numbers).
  3. Reproducible, so a run can be repeated with the same seed.
  4. Long period (before the sequence repeats).
  5. Fast and needing little memory.
  6. Portable and giving the same sequence on different computers.

Kolmogorov-Smirnov test. H0H_0: the numbers are uniformly distributed on [0,1][0,1]. N=6N=6, α=0.05\alpha=0.05.

Sort the numbers: R(i)R_{(i)} = 0.25, 0.50, 0.58, 0.64, 0.72, 0.90.

iiR(i)R_{(i)}i/Ni/Ni/N−R(i)i/N-R_{(i)}R(i)−(i−1)/NR_{(i)}-(i-1)/N
10.250.1667-0.08330.2500
20.500.3333-0.16670.3333
30.580.5000-0.08000.2467
40.640.66670.02670.1400
50.720.83330.11330.0533
60.901.00000.10000.0667

D+=max⁡(iN−R(i))=0.1133,D−=max⁡(R(i)−i−1N)=0.3333D^+=\max\left(\tfrac iN-R_{(i)}\right)=0.1133,\qquad D^-=\max\left(R_{(i)}-\tfrac{i-1}N\right)=0.3333

D=max⁡(D+,D−)=0.3333D=\max(D^+,D^-)=0.3333

The critical value for N=6N=6 and α=0.05\alpha=0.05 from the K-S table is Dα=0.521D_\alpha=0.521.

Since D=0.333<0.521D=0.333<0.521, the null hypothesis cannot be rejected. The numbers can be treated as uniformly distributed on [0,1][0,1] (with so few numbers the test has little power).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 10 marks

What do you understand by dynamic mathematical model? Explain with example. Differentiate it with static mathematical model.

Answer

Dynamic mathematical model. A mathematical model describes a system by equations. A dynamic model is one in which the variables change with time, so the state of the system at time tt depends on its earlier states. It is usually written with differential equations (continuous systems) or difference equations (discrete-time systems), and its solution is a time history of the state.

Example. The growth of a population P(t)P(t) with rate constant kk:

dPdt=kP ⇒ P(t)=P0ekt\frac{dP}{dt}=kP\ \Rightarrow\ P(t)=P_0e^{kt}

Another example is a mass-spring-damper system, mx¨+cx˙+kx=F(t)m\ddot x+c\dot x+kx=F(t), whose displacement varies with time, or the water level in a tank, Adhdt=qin−qoutA\frac{dh}{dt}=q_{in}-q_{out}. A bank queue whose length changes over the day is also dynamic.

Static model. A static model represents a system at a single point in time, or in equilibrium, so time does not appear. Example: the relation F=maF=ma at an instant, the balance sheet of a firm, or the cost of an order C=fixed+unit price×QC=\text{fixed}+\text{unit price}\times Q.

Dynamic modelStatic model
Time is an independent variableTime does not appear
Shows how the system changes over timeShows the system at one instant or at equilibrium
Uses differential or difference equationsUses algebraic equations
Output depends on past states (memory)Output depends only on the present input
Harder to build and solve; simulation is often neededSimple and easy to solve
Example: queue, population growth, circuits with C and LExample: Ohm's law V=IRV=IR, break-even analysis

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

Describe the phases in simulation.

Answer

Phases (steps) in a simulation study

  1. Problem formulation. State clearly the problem, the objectives and the questions to be answered.
  2. System definition and model conceptualisation. Define the system boundary, entities, attributes, activities and the performance measures. Start with a simple model and add detail later.
  3. Data collection. Collect data about the real system (inter-arrival and service times) and fit probability distributions. This runs in parallel with model building.
  4. Model translation. Code the model in a general-purpose language (C, Java, Python) or a simulation language (GPSS, Arena, SIMULA).
  5. Verification. Check that the program works as intended, that is, that the model is built right (debugging, tracing).
  6. Validation. Check that the model represents the real system with sufficient accuracy, by comparing its output with real data.
  7. Experimental design. Decide the run length, warm-up period, number of replications and the alternatives to be simulated.
  8. Production runs and analysis. Run the simulation and estimate performance measures with confidence intervals.
  9. More runs? Decide from the analysis whether more experiments are needed; if so, return to step 7.
  10. Documentation and reporting. Document the model, program and results, and present the conclusions.
  11. Implementation of the findings.

The steps are iterative; the analyst may go back to earlier phases when verification or validation fails.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

Explain the concept of discrete event simulation. Explain poisson’s arrival pattern.

Answer

Discrete event simulation (DES). In DES the state of the system changes only at distinct, separate points of time, called events, and stays constant between events. Examples are the arrival of a customer or the end of a service. The simulation clock does not advance in fixed steps; it jumps from one event time to the next.

Main components:

  • System state (e.g. number in queue, server busy or idle).
  • Simulation clock.
  • Event list, holding future events ordered by time.
  • Statistical counters to collect results.
  • Initialisation, timing, and event routines, and a report generator.

Working: remove the imminent event from the list, advance the clock to its time, execute the event routine to update the state and schedule new events, update the statistics, and repeat until a stopping condition is met. A queuing system is the typical DES model.

Poisson arrival pattern. Arrivals follow a Poisson process with rate λ\lambda when they occur one at a time, independently, and at a constant average rate. The number of arrivals NN in an interval of length tt has the Poisson distribution

P(N=n)=e−λt(λt)nn!,n=0,1,2,…P(N=n)=\frac{e^{-\lambda t}(\lambda t)^n}{n!},\qquad n=0,1,2,\dots

with mean and variance both λt\lambda t. Equivalently, the inter-arrival times are independent and exponentially distributed with mean 1/λ1/\lambda, f(t)=λe−λtf(t)=\lambda e^{-\lambda t}. The process has no memory, so a future arrival does not depend on the past. In simulation inter-arrival times are generated by T=−1λln⁡RT=-\frac1\lambda\ln R. For example, if λ=6\lambda=6 customers/hour, the mean gap is 10 min.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

Define the terms verification, calibration, validation and accreditation of models.

Answer

Verification. The process of checking that the computer program (the implemented model) correctly represents the conceptual model, that is, "building the model right". It is done by debugging, code walk-throughs, tracing, checking with simple inputs whose results are known, and checking that outputs are reasonable.

Calibration. The process of adjusting the model parameters (and re-checking the model) by comparing the model's output with the real system's data, repeatedly, until the model matches the real system closely enough. It is an iterative loop: compare, revise, compare again.

Validation. The process of determining whether the model is an accurate representation of the real system for the intended purpose, that is, "building the right model". The output of the model is compared with actual system data using statistical tests, face validity (experts review), or Turing-type tests.

Accreditation. The official certification by an authority or the user that a model or simulation is acceptable for a specific purpose. It is a decision based on the evidence from verification and validation and is usually used in military and large government projects.

Order of use: verification and validation give the evidence, calibration improves the model, and accreditation is the final formal acceptance.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

Use Multiplicative congruential method to generate a sequence of random numbers with X=7,a=11 m=16.

Answer

The multiplicative congruential method uses

Xi+1=aXi mod m,Ri=XimX_{i+1}=aX_i \bmod m,\qquad R_i=\frac{X_i}{m}

Here X0=7X_0=7, a=11a=11, m=16m=16.

iiCalculationXiX_iRi=Xi/16R_i=X_i/16
111×7=77 mod 1611\times7=77 \bmod 16130.8125
211×13=143 mod 1611\times13=143 \bmod 16150.9375
311×15=165 mod 1611\times15=165 \bmod 1650.3125
411×5=55 mod 1611\times5=55 \bmod 1670.4375
511×7=77 mod 1611\times7=77 \bmod 16130.8125

The seed 7 recurs at i=4i=4, so the period is 4 and the sequence is

7, 13, 15, 5, 7, 13, 15, 5,…7,\ 13,\ 15,\ 5,\ 7,\ 13,\ 15,\ 5,\dots

The generated random numbers are 0.8125, 0.9375, 0.3125, 0.43750.8125,\ 0.9375,\ 0.3125,\ 0.4375, and then they repeat.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

Why is estimation methods used in simulation? Explain.

Answer

Estimation methods in simulation. A simulation run is a sample experiment on a stochastic model, so its output is a random variable. The true performance measure (for example the mean waiting time θ\theta) is unknown and must be estimated from the observations Y1,…,YnY_1,\dots,Y_n, for example by the sample mean θ^=Yˉ=1n∑Yi\hat\theta=\bar Y=\frac1n\sum Y_i.

Why estimation is used

  1. Output is random. Different runs (different random numbers) give different results, so the output of one run is not the exact answer.
  2. Only a finite run is possible. The simulation cannot be run forever, so the true long-run (steady-state) value can only be approximated.
  3. To measure the precision. Estimation gives not only a point estimate but also an interval estimate Yˉ±tα/2,n−1 s/n\bar Y\pm t_{\alpha/2,n-1}\,s/\sqrt n, which shows how reliable the result is.
  4. To compare alternatives. Decisions among alternative designs need estimates of the difference in performance with a confidence interval.
  5. To determine the run length or the number of replications needed for a given accuracy.
  6. To remove bias and correlation. Observations in a run are correlated and the initial conditions bias them, so special methods are needed (replication, batch means, regenerative method, deleting the warm-up period).

Types of estimate: point estimates (mean, variance, proportion) and interval estimates (confidence intervals). For terminating simulations the method of replications is used; for steady-state simulations batch means or the regenerative method is common.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

Explain the importance of elimination of initial bias during simulation.

Answer

Initial bias (the initialisation or start-up problem) arises when a steady-state simulation starts in an artificial state, usually "empty and idle" (no customers, all servers free). Early in the run the system is not representative of its long-run behaviour, so the output observations in this transient period are systematically lower or higher than the steady-state values. The estimate of the steady-state mean is then biased.

Importance of eliminating it

  1. Accurate estimates. The bias is removed, so the sample mean is closer to the true steady-state value. For example, a queue started empty underestimates the average waiting time.
  2. Valid decisions. Wrong estimates may lead to wrong conclusions about the capacity or performance of the system.
  3. Reliable confidence intervals. The interval is centred around the correct value, so its coverage is as stated.
  4. Better comparison of alternatives, since each is judged on its steady-state performance.
  5. Shorter runs. Removing the transient part avoids the need for extremely long runs to dilute the bias.

Methods of elimination

  • Deleting (warm-up period). Discard the first dd observations and use Yˉ=1n−d∑i=d+1nYi\bar Y=\frac{1}{n-d}\sum_{i=d+1}^{n}Y_i. The value of dd is found by plotting the output (Welch's method, moving averages).
  • Intelligent initialisation. Start the system in a typical or steady-state condition, using data from the real system or a pilot run.
  • Long runs, so the effect of the start-up becomes small.
  • Use replications, deleting the warm-up from each.

Care is needed: deleting too little leaves the bias, and deleting too much wastes data and raises the variance.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

Workers come to a supply store at the rate of one every 6(+-) 2 minute. Their requisitions are processed by one of the two clerks who take 8 (+-) 2 minutes for each requisition. The requisitions are then passed to a single storekeeper who fills them one at a time, taking 6(+-)3 minutes for each. Draw GPSS Block diagram to simulate The above problem for 100 requisitions.

Answer

Model. Workers arrive every 6±26\pm2 min. There are two clerks (a storage of capacity 2) who take 8±28\pm2 min per requisition. The requisitions then go to one storekeeper who takes 6±36\pm3 min. The simulation runs for 100 requisitions. Time unit is 1 minute.

Block diagram

GENERATE 6,2                (worker/requisition arrival)
    |
QUEUE CLERKQ                (wait for a clerk)
    |
ENTER CLERKS                (take one of the 2 clerks)
    |
DEPART CLERKQ
    |
ADVANCE 8,2                 (clerk processes the requisition)
    |
LEAVE CLERKS                (free the clerk)
    |
QUEUE STOREQ                (wait for storekeeper)
    |
SEIZE STOREKPR
    |
DEPART STOREQ
    |
ADVANCE 6,3                 (storekeeper fills it)
    |
RELEASE STOREKPR
    |
TERMINATE 1                 (100 requisitions)

GPSS program

CLERKS   STORAGE   2
         GENERATE  6,2
         QUEUE     CLERKQ
         ENTER     CLERKS
         DEPART    CLERKQ
         ADVANCE   8,2
         LEAVE     CLERKS
         QUEUE     STOREQ
         SEIZE     STOREKPR
         DEPART    STOREQ
         ADVANCE   6,3
         RELEASE   STOREKPR
         TERMINATE 1
         START     100

The STORAGE 2 statement defines the two clerks as a multiple server, so up to two requisitions can be processed together. The storekeeper is a single server, a facility, served by SEIZE/RELEASE. The mean arrival interval is 6 min, the mean clerk service is 8 min with two clerks (utilisation about 8/(2×6)=0.678/(2\times6)=0.67), and the mean storekeeper service is 6 min (utilisation about 6/6=16/6=1), so the storekeeper is the likely bottleneck and the queue STOREQ is expected to grow. The output gives the utilisation of the clerks and the storekeeper and the queue statistics.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2078 · 5 marks

Write short notes on (any two):
a. Digital analog simulator
b. Simulation tools

Answer

a. Digital analog simulator (DAS)

A digital analog simulator is a digital computer program that imitates an analog computer. The system is described by block diagram elements of the analog computer (integrators, summers, multipliers, coefficient potentiometers, function generators), and the program solves the equations numerically. The user writes the problem in terms of these blocks, and the program does the numerical integration step by step.

Advantages: high accuracy and repeatability, no hardware patching, no drift or noise, easy storage and modification, and the user keeps the familiar analog block-diagram viewpoint. Disadvantage: it is slower than a real analog machine, since the integrations are done sequentially. Examples: MIDAS, CSMP, DSL/90 and, in modern form, Simulink. They are used for continuous system simulation such as control systems and mechanical systems.

b. Simulation tools

Simulation can be written in three kinds of tools:

  • General-purpose languages (C, C++, Java, Python). They are flexible and cheap, but all routines (event list, random numbers, statistics) must be written by the user.
  • Simulation languages (GPSS, SIMSCRIPT, SIMULA, GASP). They provide the clock, event list, random number generators, statistics and report generation. GPSS is block-oriented and is suited to queuing models.
  • Simulation packages (simulators) (Arena, AnyLogic, Simul8, MATLAB/Simulink, NS-2/NS-3, SimPy). They offer a graphical interface, animation, input distribution fitting and output analysis, so models are built faster with little programming.

Selection depends on the problem, cost, ease of use, speed, flexibility, animation facilities, statistical support and the skill of the user.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 10 marks

What is transaction in GPSS? Explain about facility in GPSS. Customers arrive at Joey Barbershop one every 15±3 minutes and it takes Joey 18±2 minutes to cut hair of a customer. Create a GPSS model with block diagram for the Barbershop using the concept of facility and run the simulation for 9 hours.

Answer

Transaction in GPSS. A transaction is the dynamic entity that moves through the blocks of a GPSS model. It represents a unit of traffic in the real system, such as a customer, a part, a message or a job. Transactions are created by GENERATE blocks, move from block to block, may wait in queues or be delayed by ADVANCE, and are removed by TERMINATE. Each transaction has a number, a priority and parameters that can store data, and its movement is controlled by the simulation clock and the current/future events chains.

Facility in GPSS. A facility is a single-server resource that can be used by only one transaction at a time. It is occupied by a SEIZE block and freed by a RELEASE block. If a transaction arrives when the facility is busy, it waits (in the delay chain) until the facility is released. GPSS keeps statistics for each facility: number of entries, utilisation (fraction of time busy), and average holding time per transaction. A real example is a barber, a teller or a machine.

Barbershop model. Customers arrive every 15±315\pm3 min (uniform from 12 to 18). Joey cuts hair in 18±218\pm2 min (16 to 20). The run is 9 hours, i.e. 9×60=5409\times60=540 minutes. Time unit is 1 minute.

Block diagram

GENERATE 15,3        customer arrives
     |
QUEUE WAITLINE       join waiting line
     |
SEIZE JOEY           occupy the barber (facility)
     |
DEPART WAITLINE      leave the line
     |
ADVANCE 18,2         haircut
     |
RELEASE JOEY         barber free
     |
TERMINATE            customer leaves

GENERATE 540         timer segment
     |
TERMINATE 1          ends the run after 540 min

GPSS program

         GENERATE   15,3
         QUEUE      WAITLINE
         SEIZE      JOEY
         DEPART     WAITLINE
         ADVANCE    18,2
         RELEASE    JOEY
         TERMINATE
         GENERATE   540
         TERMINATE  1
         START      1

The timer transaction is created once at time 540 and its TERMINATE 1 reduces the termination counter from 1 to 0, ending the simulation. About 540/15=36540/15=36 customers arrive. Since the mean service time (18 min) is larger than the mean arrival gap (15 min), the utilisation is close to 100% and the queue keeps growing, so only about 540/18=30540/18=30 haircuts are completed. The output reports the utilisation of JOEY and the queue statistics of WAITLINE.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 10 marks

Why accuracy of analog computer is low? Explain analog computer with suitable example. Differentiate between analog and digital computer.

Answer

Why the accuracy of an analog computer is low

An analog computer represents variables by continuous physical quantities such as voltages, and solves problems by electrical circuits. Its accuracy is limited, typically to about 0.1% to 1% (three or four significant digits), because:

  1. Components (resistors, capacitors, amplifiers) have tolerances and change with temperature and ageing, causing drift.
  2. Noise and interference affect the signals.
  3. Operational amplifiers have finite gain and offsets, and integrators leak.
  4. The voltage can be read only with the precision of the measuring instrument (meter or plotter).
  5. The voltage range is limited, and values outside it saturate the amplifiers.
  6. Scaling is needed, which restricts the resolution of small values.

A digital computer, by contrast, represents numbers in binary with as many digits as wanted, so its accuracy is limited only by word length.

Analog computer with example

Main components: summers, inverters, integrators, coefficient potentiometers, multipliers and function generators, patched together by a patch-board according to the problem. Time integration is done in real time by operational amplifier integrators.

Example: solve the equation of a spring-mass-damper system x¨=−2x˙−4x+f(t)\ddot x=-2\dot x-4x+f(t), or the simple decay dydt=−ky\frac{dy}{dt}=-ky, y(0)=y0y(0)=y_0. Rewrite as y=−∫ky dty=-\int ky\,dt. An integrator with initial condition y0y_0 produces −y-y; a potentiometer set to kk scales the signal and an inverter restores the sign. The output of the integrator is fed back through the potentiometer to its input. The voltage at the integrator output then follows y(t)=y0e−kty(t)=y_0e^{-kt} and can be shown on an oscilloscope or recorder.

Analog versus digital computer

Analog computerDigital computer
Works on continuous physical quantities (voltage)Works on discrete binary numbers
Low accuracy (about 0.1%-1%)Very high accuracy, limited by word length
Programmed by patching and wiring componentsProgrammed by stored instructions
Operates in parallel, so speed does not depend on problem sizeOperates mostly in sequence, speed falls with problem size
Limited memory and no data storageLarge and flexible storage
Suited to differential equations and real-time simulationGeneral purpose, used for all types of computation
Affected by noise and driftNot affected by noise (error-free storage)
Hard to change the problem; hardware is expensiveChanging the program is easy

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 10 marks

Define and develop a Poker test for four-digit random numbers. A sequence of 1,000 random numbers,each of four digits has been generated. The analysis of the numbers reveals that in 525 numbers all four digits are different, 419 contain exactly one pair of like digits, 47 contain two pairs, 9 have three digits of a kind and 7 contain all like digits. Use Poker test to determine whether these numbers are independent.(Critical value of chi-square for a = 0.05 and N = 4 is 9.49).

Answer

Poker test. The poker test checks the independence of random numbers by treating each group of digits like a poker hand and comparing the observed frequency of each pattern with the frequency expected from truly independent random digits. For four-digit numbers the patterns and their probabilities are:

PatternProbability
All four different (abcd)10⋅9⋅8⋅7104=0.5040\dfrac{10\cdot9\cdot8\cdot7}{10^4}=0.5040
One pair (aabc)6⋅10⋅9⋅8104=0.4320\dfrac{6\cdot10\cdot9\cdot8}{10^4}=0.4320
Two pairs (aabb)3⋅10⋅9104=0.0270\dfrac{3\cdot10\cdot9}{10^4}=0.0270
Three of a kind (aaab)4⋅10⋅9104=0.0360\dfrac{4\cdot10\cdot9}{10^4}=0.0360
Four of a kind (aaaa)10104=0.0010\dfrac{10}{10^4}=0.0010

Procedure

  1. H0H_0: the numbers are independent; H1H_1: they are not.
  2. For NN numbers, expected frequency of each class is Ei=N piE_i=N\,p_i.
  3. Count the observed frequency OiO_i of each pattern.
  4. Compute the statistic

χ02=∑i(Oi−Ei)2Ei\chi_0^2=\sum_i\frac{(O_i-E_i)^2}{E_i}

  1. If χ02>χα, k−12\chi_0^2>\chi^2_{\alpha,\,k-1}, reject H0H_0.

Calculation (N=1000N=1000)

PatternOiO_iEiE_i(Oi−Ei)2/Ei(O_i-E_i)^2/E_i
All different525504212/504=0.87521^2/504=0.875
One pair419432132/432=0.39113^2/432=0.391
Two pairs4727202/27=14.81520^2/27=14.815
Three of a kind936272/36=20.25027^2/36=20.250
Four of a kind7162/1=36.0006^2/1=36.000

χ02=0.875+0.391+14.815+20.250+36.000=72.33\chi_0^2=0.875+0.391+14.815+20.250+36.000=72.33

The critical value is χ0.052=9.49\chi^2_{0.05}=9.49 (as given). Since 72.33>9.4972.33>9.49, H0H_0 is rejected. The numbers are not independent.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Why Confidence interval is needed in the analysis of simulation output. How can we establish a confidence interval?

Answer

Why a confidence interval is needed

The output of a stochastic simulation is random: each run gives a different value. A single number such as the sample mean of waiting times is only a point estimate and says nothing about how close it is to the true value. A confidence interval gives a range that contains the true value with a stated probability (1−α)(1-\alpha), so it measures the precision and reliability of the result. It is also needed to decide whether the run is long enough, and to compare alternative designs (if the intervals do not overlap, or the interval for the difference excludes zero, there is a real difference).

Establishing a confidence interval (method of replications)

  1. Run the model nn times independently, using different random number streams, each with the same length and the warm-up removed.
  2. Let Xˉj\bar X_j be the mean output of replication jj. These are independent and identically distributed.
  3. Compute the overall mean and the sample variance:

Xˉ=1n∑j=1nXˉj,s2=1n−1∑j=1n(Xˉj−Xˉ)2\bar X=\frac1n\sum_{j=1}^n\bar X_j,\qquad s^2=\frac{1}{n-1}\sum_{j=1}^n(\bar X_j-\bar X)^2

  1. The 100(1−α)%100(1-\alpha)\% confidence interval is

Xˉ±tα/2, n−1sn\bar X\pm t_{\alpha/2,\,n-1}\frac{s}{\sqrt n}

where tα/2,n−1t_{\alpha/2,n-1} is taken from the Student t table (the normal value zα/2z_{\alpha/2} for large nn).

For a single long run, the batch means method is used instead: divide the run into batches large enough to be nearly independent and apply the same formula to the batch means. For example, with n=10n=10, Xˉ=12\bar X=12, s=2s=2 and t0.025,9=2.262t_{0.025,9}=2.262, the 95% interval is 12±2.262×2/10=12±1.4312\pm2.262\times2/\sqrt{10}=12\pm1.43, that is (10.57, 13.43).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Generate ten 3 digit random integers and corresponding randomn variables using Multiplicative Congruential method where a =7, and X0= 22.

Answer

The multiplicative congruential method uses

Xi+1=aXi mod m,Ri=XimX_{i+1}=aX_i \bmod m,\qquad R_i=\frac{X_i}{m}

For three-digit integers take m=103=1000m=10^3=1000, with a=7a=7 and X0=22X_0=22.

iiCalculationXiX_iRi=Xi/1000R_i=X_i/1000
17×22=1547\times22=1541540.154
27×154=1078 mod 10007\times154=1078 \bmod 10000780.078
37×78=5467\times78=5465460.546
47×546=3822 mod 10007\times546=3822 \bmod 10008220.822
57×822=5754 mod 10007\times822=5754 \bmod 10007540.754
67×754=5278 mod 10007\times754=5278 \bmod 10002780.278
77×278=1946 mod 10007\times278=1946 \bmod 10009460.946
87×946=6622 mod 10007\times946=6622 \bmod 10006220.622
97×622=4354 mod 10007\times622=4354 \bmod 10003540.354
107×354=2478 mod 10007\times354=2478 \bmod 10004780.478

The ten three-digit random integers are 154, 078, 546, 822, 754, 278, 946, 622, 354, 478, and the corresponding random variables are 0.154, 0.078, 0.546, 0.822, 0.754, 0.278, 0.946, 0.622, 0.354, 0.478.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

“Building a model right” and “Building a right model”. Are both statements same?Discuss the importance of V&V

Answer

Are the two statements the same? No.

  • "Building a model right" is verification. It asks whether the model has been implemented correctly: does the computer program do what the conceptual model specifies, free of programming and logical errors? It compares the program with the conceptual model.
  • "Building the right model" is validation. It asks whether the conceptual model is the correct representation of the real system for the purpose of the study, with the needed accuracy. It compares the model's output with the real system.

A model can be built right but still be the wrong model (a perfectly coded model of an incorrect assumption), or be the right model but wrongly coded. Both are needed, so they are different and complementary.

Importance of V&V

  1. Gives confidence that the results are credible, so decision makers will accept and use them.
  2. Prevents wrong decisions that could be costly or dangerous, because a faulty model gives misleading results.
  3. Detects errors early, when they are cheap to correct.
  4. Ensures that the model is fit for its intended purpose and the assumptions are reasonable.
  5. Supports accreditation of the model and documents its limits.

Techniques: for verification, code walk-through, debugging, tracing and testing with known cases; for validation, face validity, comparison with historical data, statistical tests and sensitivity analysis. V&V is carried out throughout the project, not only at the end.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Differentiate between discrete and continuous system.

Answer

Discrete systemContinuous system
State variables change only at separate points in time (events)State variables change continuously with time
Examples: bank queue, inventory, a factory production lineExamples: flow of liquid, speed of a car, temperature, a chemical process
Variables take countable values (integers)Variables take real values over a range
Modelled by event/queuing models; time jumps from event to eventModelled by differential equations; time advances in small steps
Simulated with discrete event simulation languages (GPSS, SIMSCRIPT)Simulated with analog computers, digital analog simulators (CSMP, Simulink)
State is constant between eventsState changes at every instant
Stochastic nature is commonOften deterministic

Many real systems are combined (hybrid), for example a continuous process such as steel production with discrete batches, and both types of model are needed.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

What is markov chain? Explain with example.

Answer

A Markov chain is a stochastic process {Xn,n=0,1,2,… }\{X_n, n = 0,1,2,\dots\} with a finite or countable set of states in which the future depends only on the present state and not on how the process reached it. This is the Markov (memoryless) property:

P(Xn+1=j∣Xn=i,Xn−1=in−1,…,X0=i0)=P(Xn+1=j∣Xn=i)=pijP(X_{n+1}=j \mid X_n=i, X_{n-1}=i_{n-1},\dots,X_0=i_0) = P(X_{n+1}=j \mid X_n=i) = p_{ij}

Main elements

  • State space: the set of values the process can take (for example Sunny, Rainy).
  • Transition probability pijp_{ij}: probability of moving from state ii to state jj in one step. Each row of the transition matrix P=[pij]P=[p_{ij}] sums to 1.
  • Initial distribution π(0)\pi^{(0)}: probability of starting in each state.
  • n-step probabilities: π(n)=π(0)Pn\pi^{(n)} = \pi^{(0)}P^n.
  • Steady-state distribution: for an irreducible, aperiodic chain, π=πP\pi = \pi P with ∑πi=1\sum \pi_i = 1.

Example (weather model). Let the states be S (sunny) and R (rainy), with

P=[0.80.20.40.6]P = \begin{bmatrix} 0.8 & 0.2 \\ 0.4 & 0.6 \end{bmatrix}

If today is sunny, π(0)=(1,0)\pi^{(0)}=(1,0). Tomorrow: π(1)=(0.8,0.2)\pi^{(1)}=(0.8,0.2). The day after:

π(2)=(0.8×0.8+0.2×0.4,  0.8×0.2+0.2×0.6)=(0.72, 0.28)\pi^{(2)} = (0.8\times0.8+0.2\times0.4,\; 0.8\times0.2+0.2\times0.6) = (0.72,\,0.28)

For the steady state solve πS=0.8πS+0.4πR\pi_S = 0.8\pi_S + 0.4\pi_R with πS+πR=1\pi_S+\pi_R=1. This gives 0.2πS=0.4πR0.2\pi_S = 0.4\pi_R, so πS=2πR\pi_S = 2\pi_R, and therefore πS=2/3\pi_S = 2/3, πR=1/3\pi_R = 1/3. In the long run about two thirds of days are sunny, whatever today's weather.

In simulation, Markov chains are used to model state-dependent random behaviour such as machine states (working/failed), queue lengths and customer brand switching.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Explain basic characteristics of Queueing System

Answer

A queueing system consists of customers who arrive, possibly wait in a queue, receive service from one or more servers and then leave. Its basic characteristics are as follows.

  1. Calling population (source): the pool from which customers come. It may be infinite (arrival rate unaffected by the number in the system) or finite (arrivals fall as more customers are in the system, for example a fixed set of machines needing repair).

  2. Arrival process: describes how customers arrive. It is usually specified by the inter-arrival time distribution. Arrivals are often Poisson, so inter-arrival times are exponential with mean 1/λ1/\lambda. Arrivals may come singly or in batches, and may be scheduled or random. A customer may balk (refuse to join) or renege (leave after waiting).

  3. Service mechanism: the distribution of service time, with mean 1/μ1/\mu (exponential, constant or general). Service may be single or batch, and its rate may depend on queue length.

  4. Number of servers: single server or multiple servers in parallel, or in series (a network of queues).

  5. System capacity: the maximum number of customers allowed in the system. It may be finite or infinite. When the system is full, arrivals are lost.

  6. Queue discipline: the rule for choosing the next customer to serve, such as FIFO, LIFO, SIRO (random) or priority.

  7. Queue behaviour and layout: a single queue or several queues, and whether jumping between queues is allowed.

These characteristics are summarised by Kendall's notation A/B/c/K/N/DA/B/c/K/N/D. Performance measures include utilisation ρ=λ/(cμ)\rho=\lambda/(c\mu), average waiting time and average queue length.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Describe dynamic physical model in detail with the help of suitable example.

Answer

A physical model is a physical representation of a system, built from real objects, which behaves like the system under study. A dynamic physical model is one whose physical behaviour changes with time. It reproduces the time-varying behaviour of the real system, usually at a different scale.

Characteristics

  • It is a tangible, scaled-down (or scaled-up) replica of the real system.
  • Its state changes over time, so time is an essential variable.
  • It is used to observe, test and predict system behaviour before building or modifying the real system.
  • It needs similarity between model and system (geometric, kinematic and dynamic similarity).

Example 1: wind tunnel model of an aircraft. A scaled aircraft model is placed in a wind tunnel and air is blown past it at controlled speeds. Lift, drag and turbulence vary with air speed and angle of attack, which change over time. Engineers measure these and use them to predict the behaviour of the full-size aircraft. Without the airflow the model would be a static model.

Example 2: scaled ship or dam model. A scaled ship hull is towed through a water tank to study wave resistance. A river or dam model with flowing water is used to study flood behaviour.

Example 3: flight simulator. A cockpit on a motion platform reproduces the dynamic response of an aeroplane to pilot inputs.

Advantages: experiments are safer and cheaper than on the real system, conditions can be repeated and controlled, and designs can be tested before construction.

Limitations: a physical model is costly to build and modify, scaling effects may make results inexact, and it is not as flexible as a mathematical or computer model.

By contrast, a static physical model (for example an architectural scale model of a building) does not change with time.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2079 · 5 marks

Write short notes:
a.Hypothesis testing
b.Stationary poission process

Answer

(a) Hypothesis testing

Hypothesis testing is a statistical procedure for deciding, using sample data, whether a claim about a population is supported. In simulation it is used to test random number generators (uniformity, independence) and to validate models by comparing model output with real-system data.

Steps

  1. State the null hypothesis H0H_0 (for example the numbers are uniform on [0,1]) and the alternative H1H_1.
  2. Choose the level of significance α\alpha, the probability of rejecting a true H0H_0 (Type I error). A typical value is 0.05.
  3. Choose a test statistic (Z, t, χ2\chi^2 or K-S) and compute it from the sample.
  4. Find the critical value from tables for α\alpha and the degrees of freedom.
  5. Decision: reject H0H_0 if the statistic falls in the critical region (for example ∣Z0∣>Zα/2|Z_0|>Z_{\alpha/2}); otherwise do not reject it.

A Type II error (β\beta) is accepting a false H0H_0. Failing to reject H0H_0 does not prove it, it only means there is no evidence against it.

(b) Stationary Poisson process

A Poisson process counts random events occurring over time. It is stationary (homogeneous) when the arrival rate λ\lambda is constant. The properties are:

  • Arrivals occur one at a time.
  • Numbers of arrivals in non-overlapping intervals are independent.
  • The distribution of arrivals in an interval depends only on its length, not on where it starts.

The number of arrivals N(t)N(t) in time tt has the Poisson distribution

P(N(t)=n)=(λt)ne−λtn!,n=0,1,2,…P(N(t)=n)=\frac{(\lambda t)^n e^{-\lambda t}}{n!},\qquad n=0,1,2,\dots

with mean and variance both λt\lambda t. The inter-arrival times are independent and exponential with mean 1/λ1/\lambda. A stationary process is not suitable where the rate varies, for example with rush hours, which needs a non-stationary process. Stationary Poisson arrivals are used in queueing models such as M/M/1.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 10 marks

Why model of a system is built? What is static model? Differentiate between static and dynamic mathematical models in simulation.

Answer

Why a model of a system is built

A model is a representation of a system. Experimenting on the real system is often impossible, costly, dangerous or slow, or the system may not exist yet. A model is built to:

  • understand how the system works and how its components interact;
  • predict performance under different conditions and test "what-if" cases without disturbing the real system;
  • compare alternative designs or policies at low cost and risk;
  • study the system faster (time compression) or more slowly (time expansion) than reality;
  • find bottlenecks, and train people or communicate the design.

Static model

A static model represents a system at a particular point in time, or one in which time plays no role. The relationships do not change with time and there is no time variable. Examples are a Monte Carlo model of the profit from a product with random sales and cost (one-off calculation), a balance sheet, or the equation Profit=Revenue−Cost\text{Profit} = \text{Revenue} - \text{Cost}.

Static versus dynamic mathematical models

BasisStatic mathematical modelDynamic mathematical model
TimeTime is not a variable; shows the system at one instant or in equilibriumTime is an explicit variable; system state evolves over time
FormAlgebraic equations or inequalitiesDifference or differential equations, or event-based state changes
ExampleY=aX+bY = aX + b, linear programming, Monte Carlo profit estimatePopulation growth dN/dt=rNdN/dt = rN, bank queue simulation, inventory over months
OutputSingle result or distributionTime history of the state (trajectory)
ComplexitySimple to build and solveMore complex, often needs simulation
UsePlanning and one-off decisionsSystems that change, such as queues, traffic and manufacturing

Dynamic simulation models can be further classified as discrete-event or continuous, and deterministic or stochastic.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 10 marks

What is storage in GPSS? Describe the blocks associated to storage in GPSS. A machine tool in a manufacturing shop is turning out parts at the rate off one every 5 minutes. As they are finished the parts go on an inspector who takes 10 ± 3 minutes to examine each one and rejects 10% of the parts. Represent the system in GPSS using the concept of facility and run the simulation for 500 parts.

Answer

Storage in GPSS

A storage is a GPSS entity that models a resource which can serve many transactions at the same time, such as a parking lot, a warehouse or a group of identical machines. A facility serves only one transaction at a time. Its capacity is set by the STORAGE definition:

CAP  STORAGE  5

Blocks associated with storage

  • ENTER A,B: a transaction takes BB units of storage AA (default 1). If space is not available it waits.
  • LEAVE A,B: the transaction returns BB units to storage AA, so another waiting transaction can enter.
  • STORAGE (control statement): defines the capacity of the storage.
  • SAVAIL / SUNAVAIL: make the storage available or unavailable.
  • Standard numerical attributes: S$name (current content), R$name (remaining capacity), SA$name (average content), SC$name (entry count), SR$name (utilisation), SM$name (maximum content).

Machine and inspector problem (using a facility)

Parts are produced every 5 minutes (mean). The inspector takes 10±310 \pm 3 minutes, that is uniform between 7 and 13. About 10% of parts are rejected. The inspector is a single server, so we use a facility. Since an inspection takes longer than 5 minutes on average, a queue will form.

        GENERATE   5            ; a part every 5 minutes
        QUEUE      INSQ         ; join inspector queue
        SEIZE      INSP         ; capture inspector
        DEPART     INSQ         ; leave queue
        ADVANCE    10,3         ; inspect 10 +/- 3 minutes
        RELEASE    INSP         ; free inspector
        TRANSFER   .100,,REJ    ; 10% go to REJ, 90% continue
        TERMINATE  1            ; accepted part
REJ     TERMINATE  1            ; rejected part
        START      500          ; run until 500 parts processed

Working

  • GENERATE 5 creates one part (transaction) per 5 minutes.
  • QUEUE/DEPART collect the waiting time statistics.
  • SEIZE/RELEASE model the single inspector. A part waits if the inspector is busy.
  • ADVANCE 10,3 holds the part for a time uniformly distributed in 7 to 13 minutes.
  • TRANSFER .100,,REJ sends 10% of parts to label REJ and the remaining 90% to the next block.
  • Both paths end in TERMINATE 1, each decrementing the termination counter by 1. START 500 stops the run when 500 parts have been processed.

At the end, the output gives the utilisation of INSP, the queue statistics and the number of parts accepted and rejected. The mean service time (10) exceeds the inter-arrival time (5), so the queue keeps growing and the inspector utilisation is close to 100%.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 10 marks

What are the two main properties of random numbers? Test whether the 3rd, 7th, 11th, and so on numbers in the sequence in the following random number sample are auto-correlated. (Z_α=0.05 and Z_0.025=1.96)
0.12 0.01 0.23 0.28 0.89 0.31 0.64 0.28 0.83 0.93 0.99 0.15 0.33 0.35 0.91 0.41 0.60 0.27 0.75 0.88 0.68 0.49 0.05 0.43 0.95 0.58 0.19 0.36 0.69 0.87

Answer

Two main properties of random numbers

  1. Uniformity: every number in the interval [0,1) is equally likely, so Ri∼U(0,1)R_i \sim U(0,1). If the interval is divided into nn equal classes, each class should contain N/nN/n observations.
  2. Independence: the probability of observing a value does not depend on previous values, so there is no correlation or pattern in the sequence.

Test for autocorrelation

We test numbers starting at i=3i=3 with lag m=4m=4 (3rd, 7th, 11th, ...) in a sequence of N=30N=30 numbers.

H0:ρim=0H_0: \rho_{im}=0 (independent), H1:ρim≠0H_1: \rho_{im}\neq 0 (auto-correlated). α=0.05\alpha=0.05, Z0.025=1.96Z_{0.025}=1.96.

Step 1: find MM (the largest integer such that i+(M+1)m≤Ni+(M+1)m \le N):

3+(M+1)⋅4≤30⇒M+1≤6.75⇒M=53 + (M+1)\cdot 4 \le 30 \Rightarrow M+1 \le 6.75 \Rightarrow M=5

The numbers used are the 3rd, 7th, 11th, 15th, 19th, 23rd and 27th: 0.23, 0.64, 0.99, 0.91, 0.75, 0.05, 0.19.

Step 2: estimate the autocorrelation

ρ^im=1M+1[∑k=0MRi+kmRi+(k+1)m]−0.25\hat\rho_{im} = \frac{1}{M+1}\left[\sum_{k=0}^{M} R_{i+km}R_{i+(k+1)m}\right] - 0.25

kProductValue
00.23 x 0.640.1472
10.64 x 0.990.6336
20.99 x 0.910.9009
30.91 x 0.750.6825
40.75 x 0.050.0375
50.05 x 0.190.0095
Sum2.4112

ρ^3,4=2.41126−0.25=0.4019−0.25=0.1519\hat\rho_{3,4} = \frac{2.4112}{6} - 0.25 = 0.4019 - 0.25 = 0.1519

Step 3: standard deviation

σ^ρ=13M+712(M+1)=7272=0.1179\hat\sigma_{\rho} = \frac{\sqrt{13M+7}}{12(M+1)} = \frac{\sqrt{72}}{72} = 0.1179

Step 4: test statistic

Z0=ρ^imσ^ρ=0.15190.1179=1.29Z_0 = \frac{\hat\rho_{im}}{\hat\sigma_\rho} = \frac{0.1519}{0.1179} = 1.29

Decision: ∣Z0∣=1.29<Z0.025=1.96|Z_0| = 1.29 < Z_{0.025} = 1.96, so H0H_0 is not rejected. There is no evidence of autocorrelation, and the 3rd, 7th, 11th, ... numbers can be treated as independent.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

Explain Markov chain with suitable example.

Answer

A Markov chain is a stochastic process in which the probability of moving to the next state depends only on the present state, not on the earlier history (the Markov property):

P(Xn+1=j∣Xn=i,Xn−1,…,X0)=P(Xn+1=j∣Xn=i)=pijP(X_{n+1}=j \mid X_n=i, X_{n-1},\dots,X_0) = P(X_{n+1}=j \mid X_n=i)=p_{ij}

The chain is described by its states and a transition matrix P=[pij]P=[p_{ij}], where pij≥0p_{ij}\ge 0 and every row sums to 1. If π(0)\pi^{(0)} is the initial distribution, the distribution after nn steps is π(n)=π(0)Pn\pi^{(n)}=\pi^{(0)}P^n. For a regular chain, the long-run (steady-state) distribution satisfies π=πP\pi=\pi P with ∑πi=1\sum\pi_i=1.

Example: market share of two brands. Customers buy brand A or brand B each month. 90% of A buyers stay with A, and 20% of B buyers switch to A:

P=[0.90.10.20.8]P=\begin{bmatrix}0.9&0.1\\0.2&0.8\end{bmatrix}

If the market is now 60% A and 40% B, π(0)=(0.6,0.4)\pi^{(0)}=(0.6,0.4). Next month:

π(1)=(0.6×0.9+0.4×0.2,  0.6×0.1+0.4×0.8)=(0.62, 0.38)\pi^{(1)}=(0.6\times0.9+0.4\times0.2,\; 0.6\times0.1+0.4\times0.8)=(0.62,\,0.38)

Steady state: πA=0.9πA+0.2πB\pi_A = 0.9\pi_A+0.2\pi_B gives 0.1πA=0.2πB0.1\pi_A=0.2\pi_B, so πA=2πB\pi_A=2\pi_B. With πA+πB=1\pi_A+\pi_B=1 we get πA=2/3\pi_A=2/3 and πB=1/3\pi_B=1/3. In the long run brand A holds about 66.7% of the market.

Markov chains are used in queueing models, weather prediction, inventory and reliability models and text generation.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

What are steps involved in simulation study? Explain.

Answer

A simulation study is carried out in a series of steps.

  1. Problem formulation: state the problem clearly, and agree on it with the client or decision maker.
  2. Setting objectives and overall project plan: decide the questions the simulation must answer, the alternatives to test, and the time, cost, people and software needed.
  3. Model conceptualisation: abstract the essential features of the system. Start with a simple model and add detail as needed.
  4. Data collection: collect input data (inter-arrival times, service times, failure rates) in parallel with model building, because it takes time.
  5. Model translation: code the model in a simulation language (GPSS, Simscript) or a general-purpose language.
  6. Verification: check that the computer program works as intended and has no coding errors.
  7. Validation: check that the model is an accurate representation of the real system, by comparing output with real data. Calibrate the model if necessary.
  8. Experimental design: decide the alternatives to simulate, run length, warm-up period and number of replications.
  9. Production runs and analysis: execute the runs and estimate performance measures (means, confidence intervals).
  10. More runs? decide, from the analysis, whether more runs or other designs are needed.
  11. Documentation and reporting: record the model, assumptions and results (program and progress documentation).
  12. Implementation: put the findings into practice.

Steps are iterative: validation or analysis often sends the study back to earlier steps.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

Generate 10 random integers using Linear congruential method where m=1000, a =19, c=6 and X_0=13

Answer

The linear congruential method generates integers by

Xi+1=(aXi+c) mod m,Ri=XimX_{i+1}=(aX_i+c)\bmod m,\qquad R_i=\frac{X_i}{m}

Here m=1000m=1000, a=19a=19, c=6c=6, X0=13X_0=13.

iXi=(19Xi−1+6) mod 1000X_{i}=(19X_{i-1}+6) \bmod 1000WorkingRi=Xi/1000R_i = X_i/1000
125319 x 13 + 6 = 2530.253
281319 x 253 + 6 = 48130.813
345319 x 813 + 6 = 154530.453
461319 x 453 + 6 = 86130.613
565319 x 613 + 6 = 116530.653
641319 x 653 + 6 = 124130.413
785319 x 413 + 6 = 78530.853
821319 x 853 + 6 = 162130.213
95319 x 213 + 6 = 40530.053
101319 x 53 + 6 = 10130.013

The ten random integers are 253, 813, 453, 613, 653, 413, 853, 213, 53, 13.

Note that X10=13=X0X_{10}=13=X_0, so the sequence has period 10 and the next number would repeat 253.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

Explain different estimation methods which are used in simulation output analysis.

Answer

Simulation output is random, so results from a run are only estimates of the true system performance. Two kinds of analysis apply: for terminating simulations (a natural end, such as a bank that closes at 5 pm) and steady-state simulations (long-run behaviour). The estimation methods are as follows.

1. Point estimation

A single value computed from the output, for example the sample mean of nn observations Y1,…,YnY_1,\dots,Y_n:

θ^=Yˉ=1n∑i=1nYi\hat\theta=\bar Y=\frac1n\sum_{i=1}^n Y_i

It is easy but gives no idea of the precision of the estimate. For time-persistent variables such as queue length, a time-weighted average 1T∫0TL(t) dt\frac1T\int_0^T L(t)\,dt is used.

2. Interval estimation (confidence interval)

Gives a range that contains the true mean with probability 1−α1-\alpha:

Yˉ±tα/2, n−1Sn\bar Y \pm t_{\alpha/2,\,n-1}\frac{S}{\sqrt n}

where SS is the sample standard deviation. This requires independent, roughly normal observations.

3. Method of independent replications

The simulation is run RR times with different random numbers. Each replication gives one independent estimate YrY_r, and the confidence interval is built from the RR values. It suits terminating simulations. For steady-state work an initial warm-up period is deleted from each run to remove initialisation bias.

4. Batch means method

One long run is divided into kk batches of equal length. The batch means are nearly independent if the batches are long enough, and a confidence interval is built from them. It avoids repeating the warm-up for every run.

5. Regenerative method

The run is divided into independent cycles at regeneration points (for example when the system becomes empty). Ratio estimators of cycle totals give the estimate and its interval.

All methods deal with correlation in the output (autocorrelation) and initial-state bias.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

Define verification and validation. Explain the process of model verification in brief.

Answer

Verification asks "Is the model built right?" It checks that the computer program (the implementation) correctly matches the conceptual model, that is, it is free of programming and logic errors.

Validation asks "Is the right model built?" It checks that the model is an accurate representation of the real system for the intended purpose, by comparing model output with real system behaviour.

Process of model verification

  1. Write and debug in modules: the program is built and tested in small parts (subprograms) and each is checked before integrating.
  2. Code walkthrough: another person reads the code and logic, or the code is reviewed by a team.
  3. Trace the simulation: step through the event list, state variables and statistical counters by hand for a short run, and compare with the program's trace.
  4. Check output for reasonableness: run with a variety of input values and check that the output behaves sensibly (for example more servers gives shorter waits).
  5. Run with simplified cases: use cases whose answers are known, for example deterministic input, or a simple M/M/1 queue that can be compared with the analytic result.
  6. Use a debugger and self-checking code: print the input parameters and check they were read correctly, and add assertions.
  7. Animation or graphical display: watch the model behave to spot errors.
  8. Check consistency of the model with the conceptual assumptions: compare the simulation's distributions and counts with those specified.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

What is feedback system? Explain with example.

Answer

A feedback system is a system in which part of the output is returned to the input and used to influence future behaviour. The output of an activity affects the activity itself through a loop, so the system corrects or reinforces itself.

Types

  • Negative feedback reduces the difference between the output and the target value. It is stabilising (goal-seeking), as in a thermostat.
  • Positive feedback amplifies change in the same direction, so growth or decline accelerates, as in population growth or a microphone placed near its loudspeaker.

Structure: input →\rightarrow process →\rightarrow output, with a feedback path from output through a comparator (against the desired value) back to the input.

Example 1: room heating by thermostat (negative feedback). The desired temperature is 24 degrees C. A sensor measures room temperature and compares it with the set point. If the temperature is lower, the heater turns on, and if higher, it turns off. The output (temperature) is fed back to control the heater, keeping the temperature near the set value.

Example 2: inventory control. Stock level is compared with the reorder level. When it falls below it, an order is placed. Deliveries increase stock, which reduces further orders.

In simulation, feedback systems are modelled with continuous or system-dynamics models, where the state at one time step depends on the outputs of earlier steps. They are common in economics, ecology, control engineering and business.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

What is calling population? Explain arrival and service process in a queue.

Answer

Calling population

The calling population is the group of potential customers who may arrive at the queueing system. It can be:

  • Infinite: so large that arrivals are not affected by how many customers are already in the system (for example customers of a large shop). The arrival rate is constant.
  • Finite: a small fixed number of units (for example 10 machines needing repair). When more are in the system, fewer remain to arrive, so the arrival rate falls.

Arrival process

This describes how and when customers enter the system. It is specified by the inter-arrival time distribution. Arrivals may be at random or scheduled (for example appointments with constant gaps). For random arrivals the usual model is a Poisson process with rate λ\lambda, which makes inter-arrival times exponential with mean 1/λ1/\lambda. Arrivals may be single or in batches. Customer behaviour may include balking, reneging and jockeying.

Service process

This describes how long a customer takes at a server. It is specified by the service time distribution (exponential with mean 1/μ1/\mu, constant, normal or general). Service rate μ\mu may be constant or depend on queue length. Service may be one at a time or in batches, and by a single server or several parallel servers. The service discipline (FIFO, LIFO, priority) decides who is served next.

The ratio ρ=λ/(cμ)\rho=\lambda/(c\mu) must be less than 1 for a stable queue.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2080 · 5 marks

Write short notes on:
a. Non-stationary poisson process
b. Poker test

Answer

(a) Non-stationary Poisson process

A Poisson process in which the arrival rate λ(t)\lambda(t) changes with time. It is used where the arrival rate varies, for example customers arriving at a restaurant (lunch peak), vehicles on a road at rush hour, or calls at a call centre. It is also called a non-homogeneous Poisson process.

The properties are:

  • Arrivals occur one at a time and in non-overlapping intervals they are independent.
  • The expected number of arrivals in (0,t](0,t] is Λ(t)=∫0tλ(s) ds\Lambda(t)=\int_0^t\lambda(s)\,ds, and the number of arrivals in (t1,t2](t_1,t_2] is Poisson with mean ∫t1t2λ(s) ds\int_{t_1}^{t_2}\lambda(s)\,ds.
  • Inter-arrival times are not identically distributed and are not independent of arrival time, so a plain exponential generator cannot be used.

Generation by thinning: generate arrivals at the maximum rate λ∗≥λ(t)\lambda^*\ge\lambda(t) using a stationary process, then accept an arrival at time tt with probability λ(t)/λ∗\lambda(t)/\lambda^*. Another approach is to treat the rate as constant in short intervals.

(b) Poker test

The poker test checks the independence of random numbers by treating groups of digits as poker hands. For the three-digit version, the digits of each number are examined and classified as:

PatternProbability
All different (ABC)0.72
One pair (AAB)0.27
Three alike (AAA)0.01

For four digits the probabilities are: all different 0.5040, one pair 0.4320, two pairs 0.0270, three alike 0.0360, four alike 0.0010.

Procedure

  1. Take NN numbers and classify each by its pattern.
  2. Count the observed frequency OiO_i in each class and compute expected frequency Ei=NpiE_i = N p_i.
  3. Compute the chi-square statistic

χ02=∑i(Oi−Ei)2Ei\chi_0^2=\sum_i\frac{(O_i-E_i)^2}{E_i}

  1. Compare with the critical value χα,k−12\chi^2_{\alpha,k-1} (k = number of classes). If χ02≤χα,k−12\chi_0^2 \le \chi^2_{\alpha,k-1}, accept that the numbers are independent. Otherwise reject.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 10 marks

Why is it necessary to analyze the simulation output. Explain different estimation method which are used in simulatiom output analysis.

Answer

Why simulation output must be analysed

The inputs of a simulation are random, so its output is also random. One run is only one sample of the possible outcomes, and a single number such as the average waiting time from one run may be far from the true value. Output analysis is needed to:

  • estimate system performance measures (mean waiting time, utilisation, throughput) from the sample;
  • measure the precision of the estimate (confidence intervals, standard error);
  • decide the run length, number of replications and warm-up period;
  • remove the effects of initial conditions and autocorrelation in the output;
  • compare alternative designs fairly, so that differences are not just random noise.

Simulations are either terminating (a natural end event, such as a shop closing) or non-terminating (steady-state behaviour is of interest). The methods differ.

Estimation methods

1. Point estimation. A single-valued estimate of a parameter, such as the sample mean

Yˉ=1n∑i=1nYi\bar Y=\frac1n\sum_{i=1}^nY_i

For time-weighted measures such as queue length L(t)L(t), the estimate is L^=1T∫0TL(t) dt\hat L=\frac1T\int_0^TL(t)\,dt. It gives no measure of accuracy.

2. Interval estimation. A confidence interval that contains the true mean with probability 1−α1-\alpha:

Yˉ±tα/2,n−1 Sn\bar Y\pm t_{\alpha/2,n-1}\,\frac{S}{\sqrt n}

where S2=1n−1∑(Yi−Yˉ)2S^2=\frac{1}{n-1}\sum (Y_i-\bar Y)^2. It is valid for independent, approximately normal data.

3. Method of independent replications. The model is run RR times with independent random number streams, and each run gives one estimate YrY_r. The confidence interval is built from the RR independent values. For steady-state work the initial transient (warm-up) of each run is deleted. It is simple and gives independent data, but the warm-up cost is repeated for each run.

4. Batch means method. One long run, after deleting the warm-up, is divided into kk batches of equal size. If the batches are long enough the batch means are nearly independent, and a confidence interval is computed from them:

Yˉ±tα/2,k−1Sbk\bar Y\pm t_{\alpha/2,k-1}\frac{S_b}{\sqrt k}

It is economical because the warm-up is incurred once.

5. Regenerative method. The run is split into independent, identically distributed cycles at regeneration points (for example when the system becomes empty). The estimate is a ratio of cycle sums, and a confidence interval is constructed from it. It needs no warm-up deletion, but regeneration points may be rare in complex systems.

Conclusion: using one of these methods properly gives results with known precision, so that the study's conclusions are reliable.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 10 marks

Consider that a machine tool in a manufacturing shop is turning out parts at the rate of two every 5 minutes. As they are finished, the parts go to an inspector, who takes 5±2 minutes to examine each one and reject about 15% of the parts. Now develop a block diagram and write the code for simulating the above problem using GPSS, and also explain the function of each block used in the block diagram in detail.

Answer

Problem. Parts are produced two every 5 minutes, that is one every 2.5 minutes on average. The inspector takes 5±25\pm2 minutes (uniform between 3 and 7), and about 15% of parts are rejected.

To keep clock times as integers, we use a time unit of 0.5 minute. Then the inter-arrival time is 5 units, and the inspection time is 10±410\pm4 units.

Block diagram (flow of a transaction)

GENERATE 5 --> QUEUE INSQ --> SEIZE INSP --> DEPART INSQ --> ADVANCE 10,4
   --> RELEASE INSP --> TRANSFER .150,,REJ --+--> TERMINATE 1 (accepted)
                                             +--> REJ: TERMINATE 1 (rejected)

GPSS code

        GENERATE   5            ; a part every 2.5 min (5 units of 0.5 min)
        QUEUE      INSQ         ; join the inspector's queue
        SEIZE      INSP         ; capture the inspector
        DEPART     INSQ         ; leave the queue
        ADVANCE    10,4         ; inspect for 5 +/- 2 min (10 +/- 4 units)
        RELEASE    INSP         ; free the inspector
        TRANSFER   .150,,REJ    ; 15% go to REJ, 85% go to next block
        TERMINATE  1            ; accepted part leaves
REJ     TERMINATE  1            ; rejected part leaves
        START      500          ; stop after 500 parts are processed

(The number of parts, 500, is a choice; the problem does not fix it.)

Function of each block

  • GENERATE 5: creates transactions (parts) with a mean inter-arrival time of 5 units; here the machine produces two parts per 5 minutes.
  • QUEUE INSQ: a transaction joins the queue named INSQ, and the queue statistics (maximum, average content and waiting time) start being recorded.
  • SEIZE INSP: the transaction captures the facility INSP (the inspector). If the inspector is busy it waits.
  • DEPART INSQ: the transaction leaves the queue as it gets the inspector, which ends its waiting-time record.
  • ADVANCE 10,4: holds the transaction for a time uniformly distributed over 10±410\pm4 (6 to 14 units, that is 3 to 7 minutes), modelling the inspection.
  • RELEASE INSP: frees the inspector for the next waiting part.
  • TRANSFER .150,,REJ: statistical transfer; with probability 0.15 the transaction goes to the block labelled REJ, otherwise it moves to the next block.
  • TERMINATE 1: removes the transaction from the model and reduces the termination counter by 1 (once for the accepted path and once for the rejected path).
  • START 500: starts the run and ends it when the counter reaches zero, that is after 500 parts.

The mean inspection time (5 minutes) exceeds the mean arrival interval (2.5 minutes), so the inspector is overloaded: utilisation approaches 100% and the queue grows throughout the run. In practice a second inspector would be needed.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 10 marks

Explain the independenceand uniformity property of random number. For the following sample of random numbers, perform test for independence using K-S test. (D_0.05,10 = 0.41)
0.35, 0.77, 0.12, 0.33, 0.88, 0.45, 0.19, 0.25, 0.91, 0.54

Answer

Uniformity. Every number in [0,1) has the same chance of occurring. If [0,1) is divided into nn equal sub-intervals, each should receive about N/nN/n of the NN numbers, that is Ri∼U(0,1)R_i\sim U(0,1) with E(R)=1/2E(R)=1/2 and Var(R)=1/12\mathrm{Var}(R)=1/12.

Independence. The value of one number does not depend on any earlier number, so there is no correlation or pattern. The probability of observing a value in any sub-interval is the same whatever the previous values were.

Kolmogorov-Smirnov test

The K-S test compares the empirical distribution function of the sample with the uniform CDF F(x)=xF(x)=x. Strictly it tests whether the numbers are uniform. As requested, it is applied here to the sample using the given critical value.

H0H_0: the numbers are uniformly distributed (no evidence of departure). α=0.05\alpha=0.05, N=10N=10, D0.05=0.41D_{0.05}=0.41.

Step 1: rank the data (ascending): 0.12, 0.19, 0.25, 0.33, 0.35, 0.45, 0.54, 0.77, 0.88, 0.91.

Step 2: compute D+=max⁡i(iN−R(i))D^+=\max_i\left(\frac iN-R_{(i)}\right) and D−=max⁡i(R(i)−i−1N)D^-=\max_i\left(R_{(i)}-\frac{i-1}N\right).

iR(i)R_{(i)}i/Ni/Ni/N−R(i)i/N - R_{(i)}R(i)−(i−1)/NR_{(i)} - (i-1)/N
10.120.1-0.020.12
20.190.20.010.09
30.250.30.050.05
40.330.40.070.03
50.350.50.15-0.05
60.450.60.15-0.05
70.540.70.16-0.06
80.770.80.030.07
90.880.90.020.08
100.911.00.090.01

D+=0.16D^+=0.16 and D−=0.12D^-=0.12, so

D=max⁡(D+,D−)=0.16D=\max(D^+,D^-)=0.16

Decision: D=0.16<D0.05=0.41D=0.16 < D_{0.05}=0.41, so H0H_0 is not rejected. No difference from the uniform distribution is detected, and the sample can be used as random numbers (the test finds no evidence against uniformity and independence at the 5% level).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

Difference between static physical and dynamic physical models.

Answer

A physical model is a tangible representation of a system. It may be static or dynamic.

BasisStatic physical modelDynamic physical model
MeaningA physical representation that does not change with timeA physical representation whose behaviour changes with time
TimeTime is not a factor; shows the system at one instantTime is essential; shows how the system evolves
Motion/actionNo movement or interaction with the environmentMoves or reacts to forces, flows or inputs
PurposeShape, layout, structure and appearancePerformance, response and behaviour under operating conditions
ExamplesArchitectural scale model of a building, globe, plastic model of a car, plant layout modelWind tunnel model of an aircraft, ship model in a water tank, flight simulator, scaled dam with flowing water
Cost and complexityCheap and simple to buildMore costly and complex, needs instruments and control
ExperimentsLimited to visual inspection and measurementAllows testing and measurement of the effect of changing conditions

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

Describe different phases of simulation study with help of flowchart.

Answer

A simulation study proceeds through the following phases, shown in the flowchart below.

Problem formulation
        |
Setting of objectives and overall project plan
        |
Model conceptualization <----+
        |                    |
Data collection              |
        |                    |
Model translation            |
        |                    |
Verified? --No---------------+
        | Yes                |
Validated? --No--------------+
        | Yes
Experimental design
        |
Production runs and analysis
        |
More runs? --Yes--> (back to Experimental design)
        | No
Documentation and reporting
        |
Implementation

Phases

  1. Problem formulation: state the problem, in agreement with the client.
  2. Objectives and project plan: define the questions to be answered, the alternatives, and the resources and schedule.
  3. Model conceptualization: abstract the key features of the real system into a conceptual model, starting simple.
  4. Data collection: gather and fit input data (inter-arrival and service times), alongside model building.
  5. Model translation: program the model in a simulation language or general-purpose language.
  6. Verification: check that the program implements the conceptual model correctly. If not, debug.
  7. Validation: compare model output with the real system and calibrate. If not valid, return to conceptualisation or data collection.
  8. Experimental design: choose the alternatives, run length, warm-up and replications.
  9. Production runs and analysis: perform the runs and estimate performance measures.
  10. More runs: decide whether more or different runs are needed.
  11. Documentation and reporting: record the program, assumptions and results.
  12. Implementation: apply the results to the real system.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

Explain markov chain with suitable example. What are diffrernt application areas of markov chain?

Answer

A Markov chain is a stochastic process with a countable set of states in which the next state depends only on the present state, not on the path that led to it:

P(Xn+1=j∣Xn=i,Xn−1,…,X0)=P(Xn+1=j∣Xn=i)=pijP(X_{n+1}=j\mid X_n=i,X_{n-1},\dots,X_0)=P(X_{n+1}=j\mid X_n=i)=p_{ij}

The one-step transition probabilities form a matrix P=[pij]P=[p_{ij}] with non-negative entries and each row summing to 1. The distribution after nn steps is π(n)=π(0)Pn\pi^{(n)}=\pi^{(0)}P^n, and the steady-state distribution solves π=πP\pi=\pi P, ∑πi=1\sum\pi_i=1.

Example: weather. States are Sunny (S) and Rainy (R):

P=[0.70.30.40.6]P=\begin{bmatrix}0.7&0.3\\0.4&0.6\end{bmatrix}

If today is sunny, π(0)=(1,0)\pi^{(0)}=(1,0). Tomorrow π(1)=(0.7,0.3)\pi^{(1)}=(0.7,0.3). Day after: π(2)=(0.7×0.7+0.3×0.4,  0.7×0.3+0.3×0.6)=(0.61, 0.39)\pi^{(2)}=(0.7\times0.7+0.3\times0.4,\;0.7\times0.3+0.3\times0.6)=(0.61,\,0.39).

Steady state: πS=0.7πS+0.4πR⇒0.3πS=0.4πR\pi_S=0.7\pi_S+0.4\pi_R\Rightarrow 0.3\pi_S=0.4\pi_R, so πS=43πR\pi_S=\tfrac43\pi_R. Using πS+πR=1\pi_S+\pi_R=1 gives πS=4/7≈0.571\pi_S=4/7\approx0.571 and πR=3/7≈0.429\pi_R=3/7\approx0.429.

Application areas

  • Queueing systems and network traffic (queue length as a birth-death chain).
  • Weather forecasting and prediction models.
  • Inventory and supply chain models.
  • Reliability and maintenance (machine working/failed states).
  • Marketing: brand switching and market share.
  • Finance and economics: credit ratings, stock price models.
  • Speech recognition, text generation and bioinformatics (hidden Markov models).
  • Search engines (Google PageRank) and genetics.
  • Board games such as snakes and ladders.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

Explain itetrative process of calibrating a simulation model.

Answer

Calibration is the process of adjusting a model, after comparing it with the real system, until its output is close enough to the real system for the intended use. Validation and calibration form an iterative loop.

The iterative process

  1. Build the initial model from the conceptual design and the available data.
  2. Compare the model with the real system, by comparing the model's output with real observations. This may be done by subjective tests (expert review, animation) or objective tests (statistical tests such as the t-test or confidence intervals on the difference of means).
  3. Find the discrepancies between the model and the system.
  4. Revise the model to remove the differences: change parameters, distributions or assumptions, or add detail missing from the model.
  5. Compare the revised model again with the real system, using new data if available.
  6. Repeat steps 3 to 5 until the model is accepted as valid, with accuracy adequate for the purpose.
Real system <--- compare ---> Model (version 1)
                    |
        revise model, recalibrate
                    |
Real system <--- compare ---> Model (version 2)
                    |
                  ... until acceptable

Points to note

  • It is better to make several small revisions and re-check than a few large ones.
  • The aim is not perfect agreement, only sufficient accuracy for the decisions to be made.
  • Calibration should use data different from the data used to build the model, otherwise the validation is not independent.
  • The process stops when further improvements cost more than the benefit.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

Describe the process of model building, verification and validation in detail with example.

Answer

Model building

Model building turns the real system into a working model. The steps are to observe the system and define the problem, abstract it into a conceptual model (components, variables, assumptions), collect and analyse input data, and then translate it into a program. A simple model is built first and detail is added gradually.

Verification checks that the program correctly implements the conceptual model ("is the model built right?"). It is done by modular testing and debugging, code walkthroughs, tracing the event list by hand, running simple cases with known answers, and checking that input parameters and output are reasonable.

Validation checks that the model represents the real system accurately enough for its purpose ("is the right model built?"). It involves:

  1. checking that the assumptions are reasonable (face validity, expert review);
  2. validating input data and distributions (goodness-of-fit tests);
  3. comparing the output with real system output using statistical tests, such as the t-test or a confidence interval for the difference of means.

If the model fails, it is calibrated and the cycle repeats.

Example: bank teller model

A bank has one teller. Observation shows customers arrive about every 4 minutes, and service takes about 3 minutes.

  • Building: the model has customers (arrival, service time), one server and one queue. Inter-arrival times are modelled as exponential with mean 4, and service times as exponential with mean 3.
  • Verification: the program is checked by tracing the first few customers by hand, and by comparing with the M/M/1 formula, giving ρ=3/4=0.75\rho=3/4=0.75 and average waiting time in queue Wq=ρμ−λ=0.751/3−1/4=9W_q=\frac{\rho}{\mu-\lambda}=\frac{0.75}{1/3-1/4}=9 minutes. The simulated values should be close to these.
  • Validation: the mean waiting time observed over several days at the real bank is compared with the model's average. If the difference is statistically insignificant, the model is valid. If not, the model (for example the service time distribution) is revised.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks
  • 2081 · 5 marks

Define traffic intensity and server utilization. Write down the Kendall’s notation for queuing system with example.

Answer

Traffic intensity

Traffic intensity is the ratio of the arrival rate to the total service capacity:

ρ=λcμ\rho=\frac{\lambda}{c\mu}

where λ\lambda is the mean arrival rate, μ\mu the mean service rate of one server and cc the number of servers. For a single server ρ=λ/μ\rho=\lambda/\mu. It measures the load on the system, and a steady state exists only if ρ<1\rho<1. If ρ≥1\rho\ge1 the queue grows without bound.

Server utilisation

Server utilisation is the fraction of time a server is busy. For a stable system it equals the traffic intensity, U=ρ=λ/(cμ)U=\rho=\lambda/(c\mu). For example if λ=3\lambda=3 per hour and μ=4\mu=4 per hour with one server, ρ=U=0.75\rho=U=0.75, so the server is busy 75% of the time and idle 25%.

Kendall's notation

A queueing system is described by

A/B/c/K/N/DA/B/c/K/N/D

  • AA: inter-arrival time distribution.
  • BB: service time distribution.
  • cc: number of parallel servers.
  • KK: system capacity (maximum number in the system), default ∞\infty.
  • NN: size of the calling population, default ∞\infty.
  • DD: queue discipline (FIFO, LIFO, SIRO, priority), default FIFO.

Common symbols for AA and BB are M (Markovian: Poisson arrivals or exponential service), D (deterministic), EkE_k (Erlang) and G (general).

Examples

  • M/M/1: Poisson arrivals, exponential service, one server, infinite capacity and population, FIFO (for example a single-counter bank).
  • M/M/3/20: three servers and a system capacity of 20.
  • M/D/1: constant service time (for example an automatic car wash).
  • M/G/1: general service time distribution with one server.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

What is analog computer ? Explain with suitable example.

Answer

An analog computer is a computing device that represents the quantities of a problem by continuously varying physical signals (voltage, current, shaft rotation, fluid pressure) and solves the problem by letting these signals interact according to physical laws. The output is read as a continuous measurement and not as a sequence of discrete digits.

Main characteristics

  • Data are continuous; there is no binary encoding.
  • The computer is built as a network of components, each performing one mathematical operation: summer, inverting amplifier (multiplication by a constant), integrator, differentiator, multiplier and function generator.
  • Operation is parallel and in real time; all components work simultaneously, so the speed does not depend on problem size.
  • Accuracy is limited by component tolerance and noise, typically 0.1% to 1%.
  • It is programmed by patching components together, not by storing instructions.

Example: solving a differential equation

To solve the equation

dxdt=−kx,x(0)=x0\frac{dx}{dt} = -kx, \qquad x(0)=x_0

an operational amplifier integrator is used with a feedback connection. The integrator output xx is multiplied by −k-k and fed back to the integrator input. The voltage at the output then follows x(t)=x0e−ktx(t)=x_0e^{-kt} and can be displayed continuously on an oscilloscope. Changing kk means turning a potentiometer. In the same way, a mass-spring-damper system mx¨+cx˙+kx=F(t)m\ddot{x}+c\dot{x}+kx=F(t) is solved with two integrators, summer and coefficient potentiometers.

Other examples are the slide rule, the mercury thermometer, the speedometer, the differential analyser, and the fuel-pump display.

Use in simulation. Analog computers were the first tools for continuous system simulation (aircraft, control systems, chemical plants). They have been replaced largely by digital computers, but are still used in hybrid computers where speed in real time is needed.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2081 · 5 marks

Write short notes:
  1. Queuing discipline
  2. Random variate

Answer

1. Queuing discipline

Queuing discipline (service discipline) is the rule that decides which waiting customer is chosen next for service when a server becomes free. It affects the waiting time of individual customers, though not the average number served in most cases.

Common disciplines:

  • FIFO / FCFS (first in, first out): customers are served in order of arrival. Used at bank counters and ticket windows.
  • LIFO / LCFS: the last arrival is served first, such as a stack of files.
  • SIRO (service in random order): the next customer is chosen at random.
  • Priority: customers are classed by priority (emergency patients), either pre-emptive (the one in service is interrupted) or non-pre-emptive.
  • SPT (shortest processing time first): used in CPU scheduling to reduce average waiting.

Along with the arrival pattern, the service pattern, number of servers and system capacity, queuing discipline is one of the basic characteristics of a queuing system and appears in Kendall notation (default is FIFO).

2. Random variate

A random variate is a value of a random variable that follows a specified probability distribution (exponential, normal, Poisson, uniform and so on). A simulation requires such values to model the inter-arrival time, service time or failure time.

Steps for generation:

  1. Generate a random number R∼U(0,1)R\sim U(0,1) from a good generator.
  2. Convert RR to a variate of the desired distribution using a method such as inverse transform, acceptance-rejection, convolution or composition.

For example, an exponential variate with mean 1/λ1/\lambda is X=−1λln⁡(1−R)X=-\frac{1}{\lambda}\ln(1-R). If λ=1/3\lambda = 1/3 per minute and R=0.5R=0.5, then X=−3ln⁡0.5≈2.08X=-3\ln 0.5\approx 2.08 minutes.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 10 marks

Describe the MARK and TABULATE block in GPSS. A coffee shop has a single barista serving customers. Customers arrive at an average rate of one every 3 minutes and the barista takes an average of 2.5 minutes to serve a customer. Create a simulation model and block diagram representing the coffee shop using GPSS blocks and simulate the system for 8 hours.

Answer

MARK block

MARK A records the current simulation clock time in a transaction's parameter, or sets the transaction's mark time (the "M1" time) when no operand is given. In GPSS MARK without an operand stamps the arrival time of the transaction in the system; the transit time is later obtained as M1 (current clock minus mark time). With an operand, MARK PARAM stores the current clock in the named parameter, and the elapsed time is later found as AC1-P$PARAM. It makes it possible to measure the time a transaction spends between any two points of the model.

TABULATE block

TABULATE A enters a value into the frequency table named in operand A. The value is the argument defined by the TABLE entity, for example Q_TIME TABLE M1,0,2,10: the argument M1, the upper limit of the first class 0, class width 2 and 10 classes. Each time a transaction enters TABULATE Q_TIME, the table counts the observation in the right class and updates the mean, standard deviation and histogram that are printed at the end of the run.

Coffee shop model (time unit: 1 minute; arrivals exponential with mean 3, service exponential with mean 2.5; run 8×60=4808\times60=480 minutes)

Block diagram, in order:

GENERATE (arrival, exp mean 3) →\rightarrow MARK (time stamp) →\rightarrow QUEUE (BQ) →\rightarrow SEIZE (BARISTA) →\rightarrow DEPART (BQ) →\rightarrow ADVANCE (service, exp mean 2.5) →\rightarrow RELEASE (BARISTA) →\rightarrow TABULATE (TIMEINSYS) →\rightarrow TERMINATE

Timer segment: GENERATE 480 →\rightarrow TERMINATE 1.

        EXPON FUNCTION RN1,C24
0,0/.1,.104/.2,.222/.3,.355/.4,.509/.5,.69/.6,.915/.7,1.2/.75,1.38
.8,1.6/.84,1.83/.88,2.12/.9,2.3/.92,2.52/.94,2.81/.95,2.99/.96,3.2
.97,3.5/.98,3.9/.99,4.6/.995,5.3/.998,6.2/.999,7/.9998,8

TIMEINSYS TABLE M1,0,2,15

        GENERATE   3,FN$EXPON        ; arrival, mean 3 min
        QUEUE      BQ                ; join the queue
        SEIZE      BARISTA           ; capture the barista
        DEPART     BQ                ; leave the queue
        ADVANCE    2.5,FN$EXPON      ; service, mean 2.5 min
        RELEASE    BARISTA
        TABULATE   TIMEINSYS         ; record time in shop
        TERMINATE

        GENERATE   480               ; timer transaction
        TERMINATE  1
        START      1                 ; run until the counter is 0

(Here the mean times are written as mean,FN$EXPON, which multiplies the exponential function value by the mean. Transactions enter the model with an automatic mark time, so M1 gives the total time in the shop; an explicit MARK block can be placed after GENERATE if the time is to be kept in a parameter.)

Expected results. Utilisation ρ=λ/μ=2.5/3≈0.83\rho=\lambda/\mu=2.5/3\approx0.83, so the barista is busy about 83% of the time; roughly 480/3=160480/3=160 customers arrive. For the M/M/1 model, the average time in the system is W=1μ−λ=10.4−0.333=15W=\frac{1}{\mu-\lambda}=\frac{1}{0.4-0.333}=15 minutes and the average wait in the queue is Wq=ρW=12.5W_q=\rho W=12.5 minutes. The simulation output (queue maximum, average contents, average time per transaction, utilisation of BARISTA, TIMEINSYS histogram) approximates these figures, with differences caused by random variation in a single run of 8 hours.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 10 marks

What is simulation? Describe the analogy between a mechanical system and corresponding electrical system with reference to dynamic physical model.

Answer

Simulation

Simulation is the imitation of the operation of a real-world process or system over time. It involves building a model that represents the key characteristics and behaviour of the system and then running (experimenting with) the model on a computer to observe how the system behaves under different conditions, so as to draw conclusions or predict performance without disturbing the real system. It is used when experimenting with the real system is costly, dangerous or impossible, when the system does not yet exist, and when analytical solutions are not available.

Dynamic physical model

A dynamic physical model is a physical system whose behaviour changes with time and whose state is described by differential equations. Two different physical systems can obey the same mathematical equation, so one can be used as a model (analog) of the other. The electrical system is easier to build, measure and adjust, so mechanical systems are often studied by building the electrical analog.

Analogy between mechanical and electrical systems

Mechanical (translational) system: a mass MM attached to a spring of stiffness KK and a damper (friction) with coefficient BB, driven by a force f(t)f(t). The equation is

Md2xdt2+Bdxdt+Kx=f(t)M\frac{d^2x}{dt^2}+B\frac{dx}{dt}+Kx=f(t)

Electrical (series RLC) circuit: inductance LL, resistance RR, capacitance CC driven by a voltage e(t)e(t). With charge qq, the equation is

Ld2qdt2+Rdqdt+1Cq=e(t)L\frac{d^2q}{dt^2}+R\frac{dq}{dt}+\frac{1}{C}q=e(t)

The two equations have the same form, so each element has a counterpart (force-voltage analogy):

MechanicalElectrical
Force ffVoltage ee
Mass MMInductance LL
Damping BBResistance RR
Spring stiffness KKReciprocal of capacitance 1/C1/C
Displacement xxCharge qq
Velocity v=dx/dtv=dx/dtCurrent i=dq/dti=dq/dt

(In the force-current analogy, force corresponds to current, mass to capacitance, damping to 1/R1/R and spring stiffness to 1/L1/L, giving the parallel RLC circuit.)

Use in simulation. The natural frequency ωn=K/M\omega_n=\sqrt{K/M} corresponds to 1/LC1/\sqrt{LC} and the damping ratio corresponds to R2C/L\frac{R}{2}\sqrt{C/L}. By measuring the response of the electrical circuit (or an analog computer built from integrators, summers and potentiometers representing the same equation) for various inputs, the behaviour of the mechanical system such as a vehicle suspension can be predicted without building it.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 10 marks

What are the properties of random number? The sequence of numbers 0.23, 0.45, 0.67, 0.12, 0.89, 0.34, 0.56, 0.78, 0.19, 0.41, 0.63, 0.08, 0.85, 0.29, 0.51, 0.73, 0.16, 0.94, 0.37, 0.59 has been generated. Test for the independence among numbers in the sequence starting with index (i) = 2 and lag (m)=3 using auto-correlation test. (α = 0.05, Zα/2=1.96)

Answer

Properties of random numbers

A sequence of random numbers R1,R2,…R_1,R_2,\dots used in simulation must have two important statistical properties:

  1. Uniformity: each RiR_i is uniformly distributed over [0,1)[0,1), so the expected frequency in each of nn equal sub-intervals is N/nN/n and E(R)=1/2E(R)=1/2, V(R)=1/12V(R)=1/12.
  2. Independence: the value of one number does not depend on the earlier ones, so there is no correlation between the numbers.

Other desirable properties are a long period (before the sequence repeats), reproducibility, computational efficiency and low memory use.

Autocorrelation test

Hypotheses:

H0:ρim=0 (independent),H1:ρim≠0H_0:\rho_{im}=0 \ \text{(independent)},\qquad H_1:\rho_{im}\neq0

Given N=20N=20, i=2i=2, m=3m=3.

Number of terms:

M=⌊N−im⌋−1=⌊183⌋−1=5M=\left\lfloor\frac{N-i}{m}\right\rfloor-1=\left\lfloor\frac{18}{3}\right\rfloor-1=5

The numbers used are Ri,Ri+m,…,Ri+(M+1)mR_i,R_{i+m},\dots,R_{i+(M+1)m}, i.e. R2,R5,R8,R11,R14,R17,R20R_2,R_5,R_8,R_{11},R_{14},R_{17},R_{20} =0.45, 0.89, 0.78, 0.63, 0.29, 0.16, 0.59=0.45,\,0.89,\,0.78,\,0.63,\,0.29,\,0.16,\,0.59.

Products of consecutive terms:

PairProduct
0.45×0.890.45\times0.890.4005
0.89×0.780.89\times0.780.6942
0.78×0.630.78\times0.630.4914
0.63×0.290.63\times0.290.1827
0.29×0.160.29\times0.160.0464
0.16×0.590.16\times0.590.0944
Sum1.9096

Estimator:

ρ^im=1M+1∑k=0MRi+kmRi+(k+1)m−0.25=1.90966−0.25=0.3183−0.25=0.0683\hat\rho_{im}=\frac{1}{M+1}\sum_{k=0}^{M}R_{i+km}R_{i+(k+1)m}-0.25=\frac{1.9096}{6}-0.25=0.3183-0.25=0.0683

Standard deviation:

σ^ρ=13M+712(M+1)=7272=8.48572=0.1179\hat\sigma_{\rho}=\frac{\sqrt{13M+7}}{12(M+1)}=\frac{\sqrt{72}}{72}=\frac{8.485}{72}=0.1179

Test statistic:

Z0=ρ^imσ^ρ=0.06830.1179=0.579Z_0=\frac{\hat\rho_{im}}{\hat\sigma_\rho}=\frac{0.0683}{0.1179}=0.579

Conclusion. The critical value is Zα/2=1.96Z_{\alpha/2}=1.96. Since ∣Z0∣=0.579<1.96|Z_0|=0.579<1.96, we fail to reject H0H_0: the numbers are independent (no significant autocorrelation at lag 3 starting from the 2nd number) at the 5% level.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

Explain static mathematical model with suitable example.

Answer

A static mathematical model represents a system at a single point in time, or a system in which time plays no role. It is made of equations or relationships between variables with no time variable, and the output does not change as the system evolves. It is solved once, usually by algebra or optimisation, in contrast to a dynamic model, whose state changes with time and is described by differential or difference equations.

Characteristics

  • No time variable; the result is for a fixed condition or an equilibrium.
  • Simple to build and solve, and often deterministic.
  • Used for planning, costing, allocation and what-if analysis at one instant.

Example 1: Break-even model

If the fixed cost is FF, the variable cost per unit is vv and the selling price per unit is pp, the profit for xx units is

P(x)=px−(F+vx)P(x)=px-(F+vx)

For F=Rs 50,000F=\text{Rs }50{,}000, v=Rs 30v=\text{Rs }30, p=Rs 80p=\text{Rs }80:

xBE=Fp−v=50,00050=1000 unitsx_{BE}=\frac{F}{p-v}=\frac{50{,}000}{50}=1000\text{ units}

The model gives the result immediately without any time progression.

Example 2: Ohm's law, V=IRV=IR, and the linear programming model, max⁡Z=cTx\max Z=c^Tx subject to Ax≤bAx\le b, are further static models; a Monte Carlo estimate of π\pi is a static (time-independent) simulation.

A static model is thus suitable where the behaviour over time is not of interest.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

Define Markov Chain. Explain with suitable example.

Answer

Definition

A Markov chain is a stochastic process {Xn}\{X_n\} with a finite or countable set of states, in which the probability of moving to the next state depends only on the present state and not on the sequence of states that preceded it (the Markov or "memoryless" property):

P(Xn+1=j∣Xn=i,Xn−1=in−1,…,X0=i0)=P(Xn+1=j∣Xn=i)=pijP(X_{n+1}=j\mid X_n=i,X_{n-1}=i_{n-1},\dots,X_0=i_0)=P(X_{n+1}=j\mid X_n=i)=p_{ij}

The numbers pijp_{ij} are the transition probabilities and are arranged in the transition matrix P=[pij]P=[p_{ij}], in which every row sums to 1:

∑jpij=1\sum_j p_{ij}=1

The nn-step probabilities are given by PnP^n and the state distribution by π(n)=π(0)Pn\pi^{(n)}=\pi^{(0)}P^n. For an ergodic chain, a steady-state distribution π\pi exists such that π=πP\pi=\pi P and ∑πi=1\sum\pi_i=1.

Example: weather model

States: Sunny (S) and Rainy (R). Let

P=[0.80.20.40.6]P=\begin{bmatrix}0.8&0.2\\0.4&0.6\end{bmatrix}

If today is sunny, the probability of rain tomorrow is 0.2. The probability that it is rainy the day after tomorrow:

P(S→R in 2 steps)=0.8(0.2)+0.2(0.6)=0.16+0.12=0.28P(S\to R\text{ in 2 steps})=0.8(0.2)+0.2(0.6)=0.16+0.12=0.28

Steady state: solve πS=0.8πS+0.4πR\pi_S=0.8\pi_S+0.4\pi_R and πS+πR=1\pi_S+\pi_R=1:

0.2πS=0.4πR⇒πS=2πR⇒πS=23, πR=130.2\pi_S=0.4\pi_R\Rightarrow\pi_S=2\pi_R\Rightarrow\pi_S=\tfrac23,\ \pi_R=\tfrac13

In the long run, 2/3 of days are sunny.

Markov chains are used in simulation of queues, inventory, page ranking and brand switching.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

Explain non-stationary Poisson process in brief.

Answer

A non-stationary Poisson process (NSPP) is a Poisson arrival process whose arrival rate λ(t)\lambda(t) changes with time instead of being constant. It is used where arrivals follow a pattern, for example more customers in a bank at lunch time, rush-hour traffic, or calls to a call centre in the morning.

Properties

  • Arrivals occur one at a time.
  • Numbers of arrivals in disjoint intervals are independent (independent increments).
  • The number of arrivals in (t,t+s](t,t+s] is Poisson with mean ∫tt+sλ(u) du\int_t^{t+s}\lambda(u)\,du:

P(N(t+s)−N(t)=n)=e−mmnn!,m=∫tt+sλ(u) duP(N(t+s)-N(t)=n)=\frac{e^{-m}m^n}{n!},\quad m=\int_t^{t+s}\lambda(u)\,du

Unlike the stationary (homogeneous) Poisson process, the inter-arrival times are neither identically distributed nor exponential with a fixed mean.

Generating arrivals (thinning method)

  1. Let λ∗=max⁡tλ(t)\lambda^*=\max_t\lambda(t) and set t=0t=0.
  2. Generate RR and let E=−1λ∗ln⁡RE=-\frac{1}{\lambda^*}\ln R; set t=t+Et=t+E.
  3. Generate another R′R'; if R′≤λ(t)/λ∗R'\le\lambda(t)/\lambda^* accept tt as an arrival time, otherwise reject it.
  4. Repeat from step 2.

An alternative is to split the day into intervals of constant rate and use a stationary process in each of them.

Example. Customers arrive at 10/hour from 9 to 11, 30/hour from 11 to 1, and 15/hour afterward; the model of the arrival is a non-stationary Poisson process with piecewise constant λ(t)\lambda(t).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

Discuss the inverse transform technique and acceptance-rejection technique for random variate generation.

Answer

Random variate generation converts a uniform random number R∼U(0,1)R\sim U(0,1) into a value of a random variable with a required distribution.

1. Inverse transform technique

Let the required variable XX have cumulative distribution function F(x)F(x).

  1. Compute the CDF F(x)F(x).
  2. Set F(X)=RF(X)=R.
  3. Solve for X=F−1(R)X=F^{-1}(R).
  4. Generate R1,R2,…R_1,R_2,\dots and compute Xi=F−1(Ri)X_i=F^{-1}(R_i).

Why it works: P(X≤x)=P(F−1(R)≤x)=P(R≤F(x))=F(x)P(X\le x)=P(F^{-1}(R)\le x)=P(R\le F(x))=F(x).

Example, exponential with rate λ\lambda: F(x)=1−e−λxF(x)=1-e^{-\lambda x}. Setting 1−e−λX=R1-e^{-\lambda X}=R gives

X=−1λln⁡(1−R)X=-\frac{1}{\lambda}\ln(1-R)

or −1λln⁡R-\frac1\lambda\ln R, since 1−R1-R is also uniform. For a discrete distribution, a table of cumulative probabilities is searched to find the interval in which RR lies. The method is exact and fast, but requires F−1F^{-1} in closed form (it is not available for the normal or gamma distributions).

2. Acceptance-rejection technique

Used when F−1F^{-1} is unavailable. A candidate is generated from a simple distribution and accepted with a probability determined by the target density f(x)f(x).

For a density ff on [a,b][a,b] with maximum M=max⁡f(x)M=\max f(x) (or a proposal g(x)g(x) with f(x)≤c g(x)f(x)\le c\,g(x)):

  1. Generate XX uniform on [a,b][a,b] (or from gg): X=a+(b−a)R1X=a+(b-a)R_1.
  2. Generate R2∼U(0,1)R_2\sim U(0,1).
  3. If R2≤f(X)/MR_2\le f(X)/M (or f(X)/(c g(X))f(X)/(c\,g(X))) accept XX; otherwise reject and go to step 1.

Example, Poisson variate with mean α\alpha (Poisson from exponential spacing): generate R1,R2,…R_1,R_2,\dots and find the smallest nn with ∏i=1n+1Ri<e−α\prod_{i=1}^{n+1}R_i<e^{-\alpha}; then N=nN=n. The efficiency is 1/c1/c (the fraction of candidates accepted), so the proposal should fit ff closely.

Comparison. Inverse transform uses one random number per variate and no rejection; acceptance-rejection works for any density that can be evaluated, but wastes some random numbers.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

Explain the iterative process of calibrating a model.

Answer

Calibration is the process of comparing the model with the real system, adjusting the model (structure, parameters, assumptions) if the two do not agree well enough, and comparing again. It is repeated until the model is accepted as an adequate representation of the system. Calibration is part of validation.

Iterative process

  1. Build the first model from observations of the system, theory, and the opinions of experts (face validity).
  2. Compare the model with reality. Run the model for the same inputs as the real system and compare outputs (means, variances, histograms, time series). Use informal methods (graphs, expert review) and statistical tests (t-test, confidence intervals, chi-square, Turing test).
  3. Revise the model if the agreement is poor: correct wrong assumptions, change the structure, adjust parameters such as service-time distributions or the number of servers, and remove errors.
  4. Compare the revised model again with the real system.
  5. Repeat steps 2 to 4 until the discrepancies are within an acceptable limit, balancing the cost of more calibration with the added accuracy.

The usual cycle is therefore: model →\rightarrow compare →\rightarrow revise →\rightarrow compare →\rightarrow revise ... with the real system's data used as the benchmark at every iteration.

Cautions

  • Keep some data aside to validate (not only calibrate) the final model.
  • A model need not be perfect; it should be accurate enough for the decisions it supports.
  • Document each change, as repeated tuning to the same data may over-fit the model.

Example. A model of a bank predicts a mean wait of 6 min while the real system gives 9 min. The service-time mean is re-estimated, a missing group of customers with long service times is added, and the model is rerun until the predicted wait is within the confidence interval of the observed value.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

Explain Kendall notation with appropriate example.

Answer

Kendall notation is a standard way of describing a queuing system by a short code of the form

A/B/c/K/N/DA/B/c/K/N/D

where

  • A: inter-arrival time distribution.
  • B: service time distribution.
  • c: number of parallel servers.
  • K: system capacity (maximum number of customers in the system, queue plus service); default ∞\infty.
  • N: size of the calling population; default ∞\infty.
  • D: queue discipline (FIFO, LIFO, SIRO, priority); default FIFO.

The first three are always given, and the others are omitted when they take their default values.

Symbols used for A and B:

SymbolMeaning
MMarkovian (exponential inter-arrival or service time; Poisson arrivals)
DDeterministic (constant)
EkE_kErlang with kk phases
GGeneral (any) distribution
GIGeneral independent

Examples

  • M/M/1: Poisson arrivals, exponential service, one server, infinite capacity, FIFO. A single-counter ticket booth. With λ=4\lambda=4/h and μ=6\mu=6/h, ρ=λ/μ=0.667\rho=\lambda/\mu=0.667 and L=ρ1−ρ=2L=\frac{\rho}{1-\rho}=2 customers.
  • M/M/3: a bank with three tellers sharing one queue.
  • M/D/1: Poisson arrivals, constant service time, one server (an automatic car wash).
  • M/M/1/10/∞\infty/FIFO: single server, a waiting room limited to 10 customers in total.
  • M/G/1: Poisson arrivals, general service time, one server.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

Explain Hybrid Simulation with examples.

Answer

Hybrid simulation combines two or more simulation approaches in one model, so that the strengths of each are used for different parts of the system. In the classical sense it means combining analog and digital computing (continuous parts handled in analog, logic and decisions on the digital machine); in modern usage it means combining simulation paradigms, mainly discrete-event, continuous (system dynamics) and agent-based simulation, or combining simulation with analytical models.

Why it is used

  • Real systems contain both discrete events (arrival of a job, failure of a machine) and continuous change (temperature, fluid level, population).
  • A single paradigm can describe only part of the system accurately.

Types

  1. Analog-digital (hybrid computer) simulation: the analog part solves differential equations in real time; the digital part controls, stores, logs and sets parameters. An interface of A/D and D/A converters connects them.
  2. Discrete-continuous simulation: the state variables change continuously, but discrete events (for example, a valve opening when a level exceeds a threshold, a state event) change the equations or the parameters.
  3. Simulation-analytic hybrid: a simulation model is combined with an analytical model, for instance an analytical queue model for a part of the network that is not critical.
  4. Multi-method: agent-based plus discrete-event plus system dynamics (e.g. in AnyLogic).

Examples

  • Space vehicle / aircraft flight simulator: the equations of motion are solved continuously (analog or numerical integration), while the pilot actions, instrument displays and fault events are discrete.
  • Chemical batch plant: the continuous reaction process in tanks and discrete events such as the loading of a batch and equipment failures.
  • Epidemic with a hospital: infection spread by a continuous model, and patient arrival and treatment as discrete-event simulation.
  • Supply chain: continuous flow of material in a pipe or conveyor and discrete orders and shipments.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

What is a feedback system? Explain with suitable examples.

Answer

A feedback system is a system in which a part of the output (or a quantity derived from it) is returned to the input and compared with the desired value, so that the next action of the system depends on the result of its earlier actions. This forms a closed loop: input →\rightarrow process →\rightarrow output →\rightarrow feedback →\rightarrow input.

Elements

  • Reference input (set point), the desired value.
  • Comparator / summing point, which finds the error e=r−be=r-b (reference minus feedback).
  • Controller, which acts on the error.
  • Plant / process, the system being controlled.
  • Sensor (feedback path), which measures the output.

Types

  • Negative feedback reduces the error and stabilises the system (self-regulating). Example: a thermostat.
  • Positive feedback increases the deviation and amplifies the change (growth, instability). Example: microphone squeal.

For a loop with forward gain GG and feedback gain HH, the closed-loop gain is G1±GH\dfrac{G}{1\pm GH} (minus sign in the denominator for positive feedback, plus for negative feedback).

Examples

  1. Room heater with a thermostat: set to 25 °C; the sensor measures the room temperature, and the heater is switched on when it is below 25 °C and off when above (negative feedback).
  2. Cruise control in a car: the measured speed is compared to the set speed, and the throttle is adjusted.
  3. Inventory control: the stock is monitored, and when the level falls below the reorder point an order is placed; a rise in stock stops the ordering.
  4. Human body: sugar level controlled by insulin; and bank interest or population growth are positive feedback examples.

In system simulation, feedback systems are modelled with system dynamics (stock and flow diagrams, causal loop diagrams).

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

  • 2082 · 5 marks

Write a short note on:
a. Mid Square Method
b. Digital Analog Simulation

Answer

a. Mid-square method

The mid-square method, proposed by John von Neumann, is one of the earliest pseudo-random number generators.

Procedure:

  1. Choose a seed X0X_0 of nn digits.
  2. Square the number, giving up to 2n2n digits (add leading zeros if needed).
  3. Take the middle nn digits as X1X_{1}.
  4. Divide by 10n10^n to obtain R1=X1/10nR_1=X_1/10^n, and repeat.

Example with n=4n=4, X0=5497X_0=5497: 54972=30217009→5497^2=30217009\rightarrow middle digits 21702170, R1=0.2170R_1=0.2170. Then 21702=04708900→70892170^2=04708900\rightarrow7089, R2=0.7089R_2=0.7089. Then 70892=50253921→25397089^2=50253921\rightarrow2539, R3=0.2539R_3=0.2539.

Weakness: the sequence can degenerate to zero (e.g. X0=0100X_0=0100 gives 0000) or fall into a short cycle, so it is no longer used in practice; congruential generators (Xi+1=(aXi+c) mod mX_{i+1}=(aX_i+c)\bmod m) are preferred.

b. Digital-analog simulation

Digital-analog simulation (digital simulation of an analog system) uses a digital computer to simulate a system that would formerly be solved on an analog computer, using programming languages (such as CSMP or MIMIC) that imitate the analog components, e.g. integrators, summers, multipliers, function generators and coefficient units. The system's differential equations are written in block-diagram form, and the language integrates numerically (Euler, Runge-Kutta) in time steps.

Advantages: high accuracy and a wide range of values, no patching or scaling of amplitude, easy storage and change of parameters, and repeatability. Disadvantage: it is not truly parallel and cannot be real-time for large problems, being slower than an analog machine.

Answer checked by Claude Sonnet · Oct 21, 2026

Test yourself · 2 MCQs

Loading…

Questions from TU BSc CSIT 2076 Cryptography (TU IOST board exam, 2076), TU BSc CSIT 2078 Cryptography (TU IOST board exam, 2078), TU BSc CSIT 2079 Cryptography (TU IOST board exam, 2079), TU BSc CSIT 2080 Cryptography (TU IOST board exam, 2080), TU BSc CSIT 2081 Cryptography (TU IOST board exam, 2081), TU BSc CSIT 2082 Cryptography (TU IOST board exam, 2082), TU BSc CSIT 2076 Design and Analysis of Algorithms (TU IOST board exam, 2076), TU BSc CSIT 2078 Design and Analysis of Algorithms (TU IOST board exam, 2078), TU BSc CSIT 2079 Design and Analysis of Algorithms (TU IOST board exam, 2079), TU BSc CSIT 2080 Design and Analysis of Algorithms (TU IOST board exam, 2080), TU BSc CSIT 2081 Design and Analysis of Algorithms (TU IOST board exam, 2081), TU BSc CSIT 2082 Design and Analysis of Algorithms (TU IOST board exam, 2082), TU BSc CSIT 2080 Image Processing (TU IOST board exam, 2080), TU BSc CSIT 2081 Image Processing (TU IOST board exam, 2081), TU BSc CSIT 2082 Image Processing (TU IOST board exam, 2082), TU BSc CSIT 2080 Multimedia Computing (TU IOST board exam, 2080), TU BSc CSIT 2081 Multimedia Computing (TU IOST board exam, 2081), TU BSc CSIT 2082 Multimedia Computing (TU IOST board exam, 2082), TU BSc CSIT 2076 System Analysis and Design (TU IOST board exam, 2076), TU BSc CSIT 2078 System Analysis and Design (TU IOST board exam, 2078), TU BSc CSIT 2079 System Analysis and Design (TU IOST board exam, 2079), TU BSc CSIT 2080 System Analysis and Design (TU IOST board exam, 2080), TU BSc CSIT 2081 System Analysis and Design (TU IOST board exam, 2081), TU BSc CSIT 2082 System Analysis and Design (TU IOST board exam, 2082), TU BSc CSIT 2076 Society and Ethics in Information Technology (TU IOST board exam, 2076), TU BSc CSIT 2078 Society and Ethics in Information Technology (TU IOST board exam, 2078), TU BSc CSIT 2079 Society and Ethics in Information Technology (TU IOST board exam, 2079), TU BSc CSIT 2076 Simulation and Modeling (TU IOST board exam, 2076), TU BSc CSIT 2078 Simulation and Modeling (TU IOST board exam, 2078), TU BSc CSIT 2079 Simulation and Modeling (TU IOST board exam, 2079), TU BSc CSIT 2080 Simulation and Modeling (TU IOST board exam, 2080), TU BSc CSIT 2081 Simulation and Modeling (TU IOST board exam, 2081), TU BSc CSIT 2082 Simulation and Modeling (TU IOST board exam, 2082), TU BSc CSIT 2076 Web Technology (TU IOST board exam, 2076), TU BSc CSIT 2078 Web Technology (TU IOST board exam, 2078), TU BSc CSIT 2079 Web Technology (TU IOST board exam, 2079), TU BSc CSIT 2080 Web Technology (TU IOST board exam, 2080), TU BSc CSIT 2081 Web Technology (TU IOST board exam, 2081) and TU BSc CSIT 2082 Web Technology (TU IOST board exam, 2082). Answers are written for this site; check them against your class notes.