Browse papers
A

Section A: Long Answer Questions

Attempt any TWO questions.

3 questions·10 marks each
1long10 marks

Explain the characteristics and structure of a basic queuing system. Discuss the various performance measures of a single-server (M/M/1) queuing system.

Basic Queuing System

A queuing system describes the behaviour of customers (entities) arriving at a service facility, possibly waiting in a queue, receiving service, and then departing.

Characteristics / Structure

  1. Arrival (input) process — how customers arrive, described by the inter-arrival time distribution (e.g. Poisson arrivals with rate λ\lambda).
  2. Queue (waiting line) — the buffer where customers wait. Characterised by capacity (finite/infinite) and population (finite/infinite).
  3. Queue discipline — order of service: FIFO, LIFO, SIRO, or priority.
  4. Service mechanism — number of servers cc and the service-time distribution (e.g. exponential with rate μ\mu).
  5. Departure — served customers leave the system.

Structure (in words): Arrivals → Queue → Server(s) → Departures.

Single-Server M/M/1 System

For M/M/1: Poisson arrivals (rate λ\lambda), exponential service (rate μ\mu), one server, infinite queue, FIFO.

Let the traffic intensity (utilization) be:

ρ=λμ,ρ<1 for stability\rho = \frac{\lambda}{\mu}, \qquad \rho < 1 \text{ for stability}

Performance measures:

MeasureFormula
Server utilizationρ=λ/μ\rho = \lambda/\mu
Probability system is emptyP0=1ρP_0 = 1-\rho
Prob. of nn customersPn=(1ρ)ρnP_n = (1-\rho)\rho^n
Avg. number in systemL=ρ1ρ=λμλL = \dfrac{\rho}{1-\rho} = \dfrac{\lambda}{\mu-\lambda}
Avg. number in queueLq=ρ21ρ=λ2μ(μλ)L_q = \dfrac{\rho^2}{1-\rho} = \dfrac{\lambda^2}{\mu(\mu-\lambda)}
Avg. time in systemW=1μλW = \dfrac{1}{\mu-\lambda}
Avg. waiting time in queueWq=ρμλ=λμ(μλ)W_q = \dfrac{\rho}{\mu-\lambda} = \dfrac{\lambda}{\mu(\mu-\lambda)}

These satisfy Little's law: L=λWL = \lambda W and Lq=λWqL_q = \lambda W_q.

Example: If λ=4\lambda = 4/hr and μ=6\mu = 6/hr, then ρ=0.667\rho = 0.667, L=2L = 2 customers, Lq=1.33L_q = 1.33, W=0.5W = 0.5 hr, Wq=0.333W_q = 0.333 hr.

queuing
2long10 marks

Explain the Monte Carlo simulation method with a suitable example. Use Monte Carlo simulation to estimate the value of pi.

Monte Carlo Simulation

Monte Carlo simulation is a numerical technique that uses repeated random sampling to estimate the value of an unknown quantity (often an integral, probability, or expected value). It is especially useful for problems that are deterministic but hard to solve analytically.

General Steps

  1. Define a domain of possible inputs.
  2. Generate random inputs from a probability distribution over the domain.
  3. Perform a deterministic computation on the inputs.
  4. Aggregate the results (average / count successes).
  5. The estimate improves as the number of samples NN \to \infty (error decreases as 1/N1/\sqrt{N}).

Estimating π\pi

Consider a quarter circle of radius 1 inscribed in the unit square [0,1]×[0,1][0,1]\times[0,1]. The area of the quarter circle is π/4\pi/4 and the area of the square is 1.

If we throw NN random points uniformly in the square and count MM points that fall inside the circle (i.e. x2+y21x^2 + y^2 \le 1), then:

MNπ/41    π4MN\frac{M}{N} \approx \frac{\pi/4}{1} \implies \pi \approx 4\cdot\frac{M}{N}

Algorithm:

import random
M = 0
N = 1000000
for _ in range(N):
    x = random.random()   # uniform in [0,1]
    y = random.random()
    if x*x + y*y <= 1.0:
        M += 1
pi_estimate = 4.0 * M / N
print(pi_estimate)        # ~3.1416 for large N

For example, if N=1000N = 1000 and M=785M = 785, then π4×785/1000=3.14\pi \approx 4 \times 785/1000 = 3.14. Larger NN gives a more accurate estimate.

monte-carlo
3long10 marks

Differentiate between true and pseudo-random numbers. Explain the linear congruential method of generating pseudo-random numbers with an example.

True vs Pseudo-Random Numbers

AspectTrue random numbersPseudo-random numbers
SourcePhysical phenomena (radioactive decay, thermal/atmospheric noise)Deterministic mathematical algorithm
ReproducibilityNot reproducibleReproducible (same seed → same sequence)
PeriodicityNo periodEventually repeats (finite period)
Speed/costSlow, needs hardwareFast, software-only
PredictabilityUnpredictablePredictable if seed/algorithm known
UseCryptography, lotteriesSimulation, modelling, games

Pseudo-random numbers are preferred in simulation because they are fast and reproducible (essential for debugging and comparing experiments), even though they are not truly random.

Linear Congruential Method (LCG)

The LCG generates a sequence using the recurrence:

Xn+1=(aXn+c)modmX_{n+1} = (a X_n + c) \bmod m

where X0X_0 = seed, aa = multiplier, cc = increment, mm = modulus. Random numbers in [0,1)[0,1) are obtained as Rn=Xn/mR_n = X_n/m.

  • If c=0c = 0 it is a multiplicative LCG; if c0c \ne 0, a mixed LCG.
  • Good parameters give a full period of mm.

Example

Let a=5a = 5, c=3c = 3, m=16m = 16, X0=7X_0 = 7.

X1=(57+3)mod16=38mod16=6X_1 = (5\cdot7 + 3)\bmod 16 = 38 \bmod 16 = 6 X2=(56+3)mod16=33mod16=1X_2 = (5\cdot6 + 3)\bmod 16 = 33 \bmod 16 = 1 X3=(51+3)mod16=8X_3 = (5\cdot1 + 3)\bmod 16 = 8 X4=(58+3)mod16=43mod16=11X_4 = (5\cdot8 + 3)\bmod 16 = 43 \bmod 16 = 11

Sequence: 7,6,1,8,11,7, 6, 1, 8, 11, \dots; normalized: R=6/16=0.375, 1/16=0.0625, 8/16=0.5,R = 6/16=0.375,\ 1/16=0.0625,\ 8/16=0.5,\dots

random-numbers
B

Section B: Short Answer Questions

Attempt any EIGHT questions.

9 questions·5 marks each
4short5 marks

Explain the basic properties of random numbers: uniformity and independence.

Random numbers used in simulation must satisfy two statistical properties:

1. Uniformity: The numbers should be uniformly distributed over the interval [0,1)[0,1). If the interval is divided into nn equal sub-intervals, each sub-interval should contain (on average) the same fraction 1/n1/n of the numbers. Formally, for RU(0,1)R \sim U(0,1) the pdf is f(x)=1f(x)=1 for 0x<10\le x<1, giving mean 1/21/2 and variance 1/121/12. Uniformity is tested using the frequency (chi-square / Kolmogorov–Smirnov) test.

2. Independence: Each generated number must be statistically independent of the others — the value of one number should give no information about the next, and there should be no correlation or pattern in the sequence. Independence is checked using autocorrelation, runs, and gap tests.

Together, uniformity and independence ensure the numbers behave like a genuine i.i.d. U(0,1)U(0,1) sample, which is the foundation for generating other random variates in simulation.

random-properties
5short5 marks

Explain the inverse transform technique for generating random variates from the exponential distribution.

Inverse Transform Technique (Exponential Distribution)

The inverse transform method generates a random variate XX with cdf F(x)F(x) from a uniform random number RU(0,1)R\sim U(0,1) using X=F1(R)X = F^{-1}(R).

Derivation for Exponential

The exponential distribution with rate λ\lambda (mean 1/λ1/\lambda) has:

f(x)=λeλx,x0f(x) = \lambda e^{-\lambda x}, \quad x \ge 0 F(x)=1eλxF(x) = 1 - e^{-\lambda x}

Step 1 — Set F(X)=RF(X) = R:

1eλX=R1 - e^{-\lambda X} = R

Step 2 — Solve for XX:

eλX=1R    λX=ln(1R)e^{-\lambda X} = 1 - R \implies -\lambda X = \ln(1-R) X=1λln(1R)\boxed{X = -\frac{1}{\lambda}\ln(1-R)}

Since (1R)(1-R) is also U(0,1)U(0,1), this is commonly simplified to:

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

Example

If λ=2\lambda = 2 and R=0.25R = 0.25:

X=12ln(0.25)=12(1.386)=0.693X = -\frac{1}{2}\ln(0.25) = -\frac{1}{2}(-1.386) = 0.693

Repeating with different RR values yields exponential inter-arrival/service times for simulation.

random-variate
6short5 marks

Explain Kendall's notation for queuing systems with examples.

Kendall's Notation

Kendall's notation describes a queuing system in the compact 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 (max customers in system; default \infty)
  • N — calling population size (default \infty)
  • D — queue discipline (default FIFO)

The last three are often omitted, giving the short form A/B/cA/B/c.

Common symbols for A and B:

  • M — Markovian / exponential (Poisson process)
  • D — Deterministic (constant)
  • G — General distribution
  • Ek_k — Erlang-kk

Examples

  • M/M/1 — Poisson arrivals, exponential service, single server, infinite capacity, FIFO.
  • M/M/c — Poisson arrivals, exponential service, cc servers (e.g. a bank with cc tellers).
  • M/D/1 — Poisson arrivals, constant (deterministic) service, single server (e.g. an automated car wash).
  • M/M/1/K — single server with finite capacity KK.
  • G/G/1 — general arrival and service distributions, one server.
queuing-kendall
7short5 marks

What is a simulation clock? Differentiate between fixed-increment and next-event time-advance mechanisms.

Simulation Clock

A simulation clock is a variable that holds the current value of simulated (virtual) time in a discrete-event simulation. It does not correspond to real wall-clock time; it advances according to the events of the model and is used to schedule and order events.

Time-Advance Mechanisms

AspectFixed-increment time advanceNext-event time advance
How clock movesAdvances by a fixed step Δt\Delta t each cycleJumps directly to the time of the next event
Event handlingAt each step, check which events occurred in (t,t+Δt](t, t+\Delta t]Process exactly one (next) imminent event
Idle periodsWastes computation when no event occurs in a stepSkips over inactive periods, efficient
AccuracyEvents forced to Δt\Delta t boundaries → timing errorEvents processed at exact times → accurate
UsageContinuous / time-stepped modelsMost discrete-event simulations

Summary: In fixed-increment, the clock ticks by equal intervals Δt\Delta t regardless of events; in next-event, the clock advances to the timestamp of the most imminent scheduled event, making it more efficient and accurate for discrete-event simulation.

simulation-clock
8short5 marks

Explain Markov chains and their application in simulation with an example.

Markov Chains

A Markov chain is a stochastic process {Xt}\{X_t\} over a set of states that satisfies the Markov (memoryless) property: the probability of the next state depends only on the current state, not on the history of past states.

P(Xt+1=jXt=i,Xt1,)=P(Xt+1=jXt=i)=pijP(X_{t+1}=j \mid X_t=i, X_{t-1},\dots) = P(X_{t+1}=j \mid X_t=i) = p_{ij}

The pijp_{ij} form the transition probability matrix PP, where each row sums to 1. The state distribution evolves as π(t+1)=π(t)P\pi^{(t+1)} = \pi^{(t)}P, and a steady-state distribution π\pi satisfies π=πP\pi = \pi P.

Application in Simulation

Markov chains model systems whose future depends only on the present state — e.g. weather, machine up/down status, queue lengths, inventory levels, web-page navigation. In simulation, the next state is generated by sampling a uniform random number and selecting the state according to the cumulative transition probabilities of the current row.

Example (Weather)

States: Sunny (S), Rainy (R).

P=(0.80.20.40.6)P = \begin{pmatrix} 0.8 & 0.2 \\ 0.4 & 0.6 \end{pmatrix}

If today is Sunny, then P(tomorrow Sunny)=0.8P(\text{tomorrow Sunny})=0.8, P(Rainy)=0.2P(\text{Rainy})=0.2. Starting Sunny, after one step the distribution is (0.8,0.2)(0.8, 0.2); iterating π=πP\pi=\pi P converges to the steady-state π(0.667,0.333)\pi \approx (0.667, 0.333), i.e. in the long run about 2/3 of days are sunny.

markov
9short5 marks

Differentiate between physical models and mathematical models with examples.

Physical vs Mathematical Models

Physical model: A tangible, scaled-down (or scaled-up) physical representation of a system. It looks like the real system and its behaviour is studied directly by observation or experiment.

  • Static physical model: scale model of a building, a globe, an architectural mock-up.
  • Dynamic physical model: wind-tunnel model of an aircraft, a hydraulic analog of a water-distribution network.

Mathematical model: An abstract representation of the system using symbols, equations, and logical/quantitative relationships among variables. The system is studied by solving or simulating these equations rather than by physical observation.

  • Static mathematical model: a regression equation, Monte Carlo estimate of an integral.
  • Dynamic mathematical model: differential/difference equations describing population growth, M/M/1 queue formulas.
AspectPhysical modelMathematical model
FormTangible/physical objectSymbols & equations
Study methodDirect observation/experimentAnalytical/numerical solution or simulation
Cost & flexibilityExpensive, hard to changeCheap, easy to modify parameters
ExampleWind-tunnel aircraft modelL=λ/(μλ)L=\lambda/(\mu-\lambda) for a queue

Most computer simulations use mathematical models because they are flexible and inexpensive to experiment with.

system-modeling
10short5 marks

Explain the mid-square method and the additive congruential method of generating random numbers.

Mid-Square Method

Proposed by von Neumann, this method generates pseudo-random numbers by repeatedly squaring a number and extracting the middle digits.

Steps:

  1. Choose an nn-digit seed X0X_0.
  2. Square it: X02X_0^2 (pad with leading zeros to 2n2n digits).
  3. Take the middle nn digits as the next number X1X_1.
  4. Repeat. Normalize by dividing by 10n10^n to get RR in [0,1)[0,1).

Example (4-digit seed X0=5735X_0 = 5735):

57352=32890225middle 4 digits=8902X1=89025735^2 = 32890225 \rightarrow \text{middle 4 digits} = 8902 \Rightarrow X_1 = 8902 89022=792456042456X2=2456, 8902^2 = 79245604 \rightarrow 2456 \Rightarrow X_2 = 2456,\ \dots

Drawbacks: short period; may degenerate to zero or get stuck in a cycle.

Additive Congruential Method

This generates the next number by adding previous terms modulo mm instead of multiplying. A general form uses the last kk values:

Xn=(Xn1+Xn2++Xnk)modmX_n = (X_{n-1} + X_{n-2} + \dots + X_{n-k}) \bmod m

The simplest two-term (Fibonacci-type) version is:

Xn=(Xn1+Xn2)modmX_n = (X_{n-1} + X_{n-2}) \bmod m

Example: m=100m = 100, seeds X0=23, X1=47X_0=23,\ X_1=47:

X2=(47+23)mod100=70X_2 = (47+23)\bmod 100 = 70 X3=(70+47)mod100=17X_3 = (70+47)\bmod 100 = 17 X4=(17+70)mod100=87, X_4 = (17+70)\bmod 100 = 87,\ \dots

Normalized: R2=0.70, R3=0.17, R_2 = 0.70,\ R_3 = 0.17,\ \dots It is fast and can achieve long periods but has weaker statistical independence.

midsquare
11short5 marks

Define entity, attribute, activity, event and state of a system in the context of simulation.

In simulation a system is described in terms of the following components:

  • Entity: An object of interest in the system whose behaviour is being studied. Example: a customer in a bank, a machine in a factory.

  • Attribute: A property or characteristic of an entity. Example: a customer's arrival time or priority; a machine's status (busy/idle).

  • Activity: A time-consuming process or operation that changes the state of the system over a period. Example: serving a customer, machining a part.

  • Event: An instantaneous occurrence that may change the state of the system. Example: arrival of a customer, completion of a service. (Events are classified as endogenous — internal — or exogenous — from the environment.)

  • State of the system: The collection of variables (state variables) needed to describe the system at any instant for the purpose of study. Example: the number of customers in the queue and whether the server is busy or idle.

Together these define the model: entities possessing attributes engage in activities, bounded by events, which together determine the system state over time.

entities-attributes
12short5 marks

Explain the importance of output analysis in simulation. Differentiate between terminating and steady-state simulation.

Importance of Output Analysis

Simulation output is random (it depends on the random numbers used), so a single run gives only one sample observation of system performance. Output analysis applies statistical methods to simulation results so that valid conclusions can be drawn. Its importance:

  • Estimates performance measures (e.g. mean waiting time) with confidence intervals, not just point values.
  • Quantifies the statistical error / variability of estimates.
  • Determines the required number of runs / run length for desired precision.
  • Enables fair comparison of alternative system designs.
  • Avoids misleading conclusions from a single, noisy run.

Terminating vs Steady-State Simulation

AspectTerminating simulationSteady-state (non-terminating) simulation
End conditionNatural event/time ends the run (e.g. bank closes at 5 PM)Runs indefinitely; interested in long-run behaviour
GoalPerformance over a specific finite periodPerformance after transient effects die out
Initial conditionsImportant and affect resultsMust remove/ignore initial transient (warm-up)
ReplicationsMultiple independent short runsOne long run (batch means) or many long runs
ExampleDaily operation of a shopLong-run utilization of a 24×7 server/network

Summary: A terminating simulation has a well-defined event that ends each run, and we analyze a fixed interval; a steady-state simulation studies the long-run equilibrium behaviour and requires handling the initial transient via a warm-up period.

output-analysis

Frequently asked questions

Where can I find the BSc CSIT (TU) Simulation and Modelling (BSc CSIT, CSC317) question paper 2075?
The full BSc CSIT (TU) Simulation and Modelling (BSc CSIT, CSC317) 2075 (regular) question paper is available free on Kekkei. You can read every question online and attempt the paper under timed exam conditions.
Does the Simulation and Modelling (BSc CSIT, CSC317) 2075 paper come with solutions?
Yes. Every question on this Simulation and Modelling (BSc CSIT, CSC317) past paper includes a step-by-step solution, plus instant AI feedback when you attempt it on Kekkei.
How many marks is the BSc CSIT (TU) Simulation and Modelling (BSc CSIT, CSC317) 2075 paper?
The BSc CSIT (TU) Simulation and Modelling (BSc CSIT, CSC317) 2075 paper carries 60 full marks and is meant to be completed in 180 minutes, across 12 questions.
Is practising this Simulation and Modelling (BSc CSIT, CSC317) past paper free?
Yes — reading and attempting this Simulation and Modelling (BSc CSIT, CSC317) past paper on Kekkei is completely free.