Browse papers
A

Section A: Long Answer Questions

Attempt any TWO questions.

3 questions·10 marks each
1long10 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 obtain approximate solutions to problems that may be deterministic in nature but are difficult or impossible to solve analytically. By generating large numbers of random samples and observing the fraction that satisfy some condition, we estimate quantities such as areas, integrals, or probabilities.

Key characteristics:

  • Relies on random numbers drawn from a known distribution.
  • Accuracy improves as the number of trials NN increases (error decreases roughly as 1/N1/\sqrt{N}).
  • Used for integration, risk analysis, queuing, and physical-system modelling.

Simple example: To estimate 01f(x)dx\int_0^1 f(x)\,dx, sample xix_i uniformly in [0,1][0,1] and average: 01f(x)dx1Ni=1Nf(xi)\int_0^1 f(x)\,dx \approx \frac{1}{N}\sum_{i=1}^{N} f(x_i).

Estimating π\pi using Monte Carlo

Consider a quarter circle of radius 1 inscribed in a unit square [0,1]×[0,1][0,1]\times[0,1].

  • Area of unit square =1= 1.
  • Area of quarter circle =πr24=π4= \dfrac{\pi r^2}{4} = \dfrac{\pi}{4}.

If we throw points uniformly at random into the square, the probability that a point falls inside the quarter circle equals the ratio of areas:

P(inside)=π/41=π4P(\text{inside}) = \frac{\pi/4}{1} = \frac{\pi}{4}

So if MM out of NN random points satisfy x2+y21x^2 + y^2 \le 1, then

MNπ4π4MN\frac{M}{N} \approx \frac{\pi}{4} \quad\Rightarrow\quad \pi \approx 4\cdot\frac{M}{N}

Algorithm:

M = 0
for i = 1 to N:
    x = random(0,1)        // uniform
    y = random(0,1)
    if (x*x + y*y <= 1):
        M = M + 1
pi_estimate = 4.0 * M / N

Illustrative result: with N=1000N = 1000 points, suppose M=785M = 785 fall inside the circle. Then π4×785/1000=3.14\pi \approx 4 \times 785/1000 = 3.14. As NN \to \infty, the estimate converges to 3.141593.14159\ldots

monte-carlo
2long10 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/natural phenomena (thermal noise, radioactive decay, atmospheric noise)Deterministic mathematical algorithm
ReproducibilityNot reproducibleReproducible (same seed → same sequence)
PeriodicityNo periodEventually repeats (finite period)
SpeedSlow (needs hardware)Very fast
Use in simulationRarely practicalStandard, because reproducibility aids debugging

Pseudo-random numbers only appear random; they pass statistical tests of randomness (uniformity and independence) but are fully determined by the initial seed.

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 (initial value), 0X0<m0 \le X_0 < m
  • aa = multiplier, cc = increment, mm = modulus

Normalized 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 congruential generator.
  • If c0c \ne 0 it is a mixed congruential generator.

The maximum possible period is mm; achieving full period requires conditions (Hull–Dobell theorem) such as gcd(c,m)=1\gcd(c,m)=1.

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, \ldots; normalized: 0.4375,0.375,0.0625,0.5,0.6875,0.4375, 0.375, 0.0625, 0.5, 0.6875, \ldots

random-numbers
3long10 marks

Explain discrete-event simulation. Describe the event-scheduling/time-advance algorithm used in simulation with a flowchart.

Discrete-Event Simulation (DES)

Discrete-event simulation models a system as a sequence of events occurring at discrete points in time, where the system state changes only at event instants (e.g., a customer arrival, a service completion). Between consecutive events the state remains unchanged, so the simulation clock can jump from one event time to the next rather than advancing continuously.

Key components:

  • System state — variables describing the system (e.g., number in queue, server busy/idle).
  • Simulation clock — current value of simulated time.
  • Event list (FEL) — a list of future events ordered by their scheduled time.
  • Statistical counters — accumulate output data (waiting time, utilization).
  • Random number generators — produce inter-arrival and service times.

Event-Scheduling / Time-Advance Algorithm

The next-event time-advance mechanism repeatedly:

  1. Finds the imminent event (the one with the smallest scheduled time) in the Future Event List.
  2. Advances the clock to that event's time.
  3. Executes the event routine, updating state, counters, and scheduling new future events.
  4. Repeats until a stopping condition is met.

Flowchart (described in steps):

        +------------------------------+
        |  Initialize: clock=0, state, |
        |  schedule first arrival      |
        +---------------+--------------+
                        v
        +------------------------------+
        |  Is event list empty / stop  |---- yes --> [ Generate report / End ]
        |  condition reached?          |
        +---------------+--------------+
                        | no
                        v
        +------------------------------+
        |  Remove imminent event;      |
        |  advance clock to its time   |
        +---------------+--------------+
                        v
        +------------------------------+
        |  Execute event routine:      |
        |  - update system state       |
        |  - update statistics         |
        |  - schedule future events    |
        +---------------+--------------+
                        |
                        +----> (loop back to stop check)

This cycle of find imminent event → advance clock → process event → schedule new events drives the entire discrete-event simulation.

discrete-event
B

Section B: Short Answer Questions

Attempt any EIGHT questions.

9 questions·5 marks each
4short5 marks

Explain Kendall's notation for queuing systems with examples.

Kendall's Notation

Kendall's notation is a standard shorthand for describing and classifying a queuing system, written as:

A/B/c/K/N/DA / B / c / K / N / D
SymbolMeaning
AArrival process / inter-arrival time distribution
BService time distribution
cNumber of parallel servers
KSystem capacity (max customers in system; default \infty)
NPopulation size (default \infty)
DQueue/service discipline (default FCFS)

Common distribution codes for AA and BB: M = Markovian/exponential (Poisson arrivals), D = Deterministic, G = General, EkE_k = Erlang.

Examples:

  • M/M/1 — Poisson arrivals, exponential service, single server, infinite capacity, FCFS. The classic single-server queue.
  • M/M/c — Poisson arrivals, exponential service, cc servers (e.g., a bank with cc tellers).
  • M/D/1 — Poisson arrivals, constant (deterministic) service time, one server (e.g., automated car wash).
  • M/M/1/K — same as M/M/1 but limited capacity KK (finite waiting room).
queuing-kendall
5short5 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 time during a simulation run. It does not correspond to real (wall-clock) time; it advances according to the events being modelled and provides the time reference against which events are scheduled and statistics collected.

Fixed-Increment vs Next-Event Time Advance

AspectFixed-Increment Time AdvanceNext-Event Time Advance
Clock advanceBy a fixed step Δt\Delta t each timeJumps directly to time of next event
ProcessingAt each tick, check whether any events occurred in (t,t+Δt](\,t, t+\Delta t\,]Always processes the imminent (earliest) event
Idle periodsWastes computation stepping through periods with no eventsSkips inactive periods efficiently
AccuracyEvents approximated to end of interval → timing errorExact event times preserved
SuitabilityContinuous systems, time-stepped modelsDiscrete-event systems (queues, networks)

Summary: Fixed-increment advances in uniform Δt\Delta t steps and is simple but can be inaccurate and inefficient; next-event advance moves the clock to each successive event time, giving exact timing and better efficiency, and is the standard mechanism for discrete-event simulation.

simulation-clock
6short5 marks

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

Markov Chains

A Markov chain is a stochastic process {Xn}\{X_n\} that moves among a set of states such that the probability of the next state depends only on the current state, not on the history of how it was reached. This is the memoryless (Markov) property:

P(Xn+1=jXn=i,Xn1,)=P(Xn+1=jXn=i)=pijP(X_{n+1}=j \mid X_n=i, X_{n-1}, \ldots) = P(X_{n+1}=j \mid X_n=i) = p_{ij}

The pijp_{ij} form a transition probability matrix PP, where each row sums to 1. The state distribution after nn steps is π(n)=π(0)Pn\pi^{(n)} = \pi^{(0)} P^{n}, and a steady-state distribution π\pi satisfies π=πP\pi = \pi P.

Application in simulation: Markov chains model systems whose future behaviour depends only on present state — weather, machine up/down status, inventory levels, queue lengths, web-page navigation. In simulation we generate the next state by sampling a random number and selecting the destination state according to the current row of PP.

Example (weather model): 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(tomorrow Rainy)=0.2P(\text{tomorrow Rainy}) = 0.2. Solving π=πP\pi = \pi P gives the long-run distribution πS=2/3\pi_S = 2/3, πR=1/3\pi_R = 1/3, i.e., about 67% sunny days in the long run.

markov
7short5 marks

Differentiate between physical models and mathematical models with examples.

Physical Models vs Mathematical Models

AspectPhysical ModelMathematical Model
FormA tangible, scaled-down (or scaled-up) physical replica of the systemA set of equations, relationships, and logic representing the system
RepresentationConcrete / materialAbstract / symbolic
ManipulationChanged by physically altering the modelChanged by varying variables/parameters in equations
Cost & flexibilityOften expensive, hard to modifyCheaper, easily modified, suited to computer simulation
TypesStatic (e.g., a scale model) or dynamic (e.g., wind tunnel)Static or dynamic; analytical or simulation-based

Physical model examples: a scaled aircraft tested in a wind tunnel, a globe representing the Earth, a hydraulic model of a river/dam, an architectural building model.

Mathematical model examples: Newton's law F=maF = ma, the queuing relation L=λWL = \lambda W (Little's Law), a system of differential equations describing population growth, or a probability model of customer arrivals. Mathematical models are the basis of computer simulation because they can be programmed and analysed numerically.

system-modeling
8short5 marks

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

Mid-Square Method

Proposed by von Neumann, the mid-square method generates pseudo-random numbers as follows:

  1. Start with an nn-digit seed X0X_0.
  2. Square it to get a 2n2n-digit number (pad with leading zeros if needed).
  3. Extract the middle nn digits — this is the next number X1X_1.
  4. Repeat using X1X_1 as the new seed; normalize by dividing by 10n10^n for a value in [0,1)[0,1).

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

X02=12342=01522756    middle 4 digits=5227=X1X_0^2 = 1234^2 = 01522756 \;\Rightarrow\; \text{middle 4 digits} = 5227 = X_1 X12=52272=27321529    X2=3215X_1^2 = 5227^2 = 27321529 \;\Rightarrow\; X_2 = 3215

Drawback: can degenerate quickly (numbers may collapse to zero or fall into short cycles), so it is rarely used in practice.

Additive Congruential Method

The additive congruential method generates the next number by adding previous terms in the sequence rather than multiplying. A general form uses the recurrence:

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

It requires kk initial seed values X0,X1,,Xk1X_0, X_1, \ldots, X_{k-1}. A common (lagged-Fibonacci) special case is:

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

Example: with m=100m = 100 and seeds X0=57X_0 = 57, X1=34X_1 = 34:

X2=(34+57)mod100=91X_2 = (34 + 57) \bmod 100 = 91 X3=(91+34)mod100=25X_3 = (91 + 34) \bmod 100 = 25 X4=(25+91)mod100=16X_4 = (25 + 91) \bmod 100 = 16

It is fast and can produce very long periods, but the choice of lags and modulus must be made carefully for good statistical quality.

midsquare
9short5 marks

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

Basic Simulation Terminology

  • Entity — An object of interest in the system whose behaviour we model. Entities may be dynamic (move through the system, e.g., a customer, a part on a conveyor) or permanent (resources, e.g., a server, a machine).

  • Attribute — A property or characteristic of an entity. It distinguishes one entity from another and may hold a value. Example: a customer's arrival time, priority level, or account balance; a machine's speed.

  • Activity — A duration of time of specified length during which something happens, representing a time-consuming process between two events. Example: the service of a customer (lasts a service time), or machining a part.

  • Event — An instantaneous occurrence that may change the state of the system. It marks the start or end of an activity. Example: a customer arrival, a service completion, a machine breakdown.

  • State of the system — The collection of state variables needed to describe the system at any instant relative to the objectives of the study. Example: the number of customers in the queue, whether the server is busy or idle, and the number waiting.

Relationship: Entities (with their attributes) engage in activities; activities are bounded by events; and the values of state variables together define the system state at any point in simulated time.

entities-attributes
10short5 marks

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

Importance of Output Analysis

Simulation outputs are random because they are driven by random number inputs; a single run gives only one sample observation. Output analysis is the statistical treatment of simulation results to draw valid, reliable conclusions. Its importance:

  • Estimates performance measures (mean waiting time, utilization, throughput) with confidence intervals rather than single point values.
  • Quantifies the variability/precision of estimates and determines the number of replications/run length needed.
  • Avoids misleading conclusions from a single, possibly atypical, run.
  • Enables valid comparison of alternative system designs.

Terminating vs Steady-State Simulation

AspectTerminating SimulationSteady-State Simulation
Run lengthDetermined by a natural terminating event EE (e.g., bank closes at 5 pm)Runs (theoretically) indefinitely / very long
InterestBehaviour over a finite, specific periodLong-run steady-state behaviour, independent of initial conditions
Initial conditionsImportant and part of the modelCause initial transient (warm-up) bias that must be removed
Analysis methodReplicate the run multiple times; average across replicationsDeletion of warm-up data, batch means, or long single run
ExampleOne day of a shop, a single missionContinuously running production line, telephone exchange

Summary: A terminating simulation studies a system over a bounded interval ending in a defined event and is analysed by independent replications; a steady-state simulation studies long-run behaviour and must handle warm-up bias using methods such as batch means.

output-analysis
11short5 marks

Explain the Poisson and exponential distributions and their role in queuing simulation.

Poisson Distribution

The Poisson distribution is a discrete distribution that models the number of events occurring in a fixed interval of time when events happen independently at a constant average rate λ\lambda:

P(X=k)=eλλkk!,k=0,1,2,P(X = k) = \frac{e^{-\lambda}\,\lambda^{k}}{k!}, \quad k = 0, 1, 2, \ldots

Its mean and variance both equal λ\lambda. In queuing it models the number of arrivals per unit time.

Exponential Distribution

The exponential distribution is a continuous distribution modelling the time between successive events (inter-arrival or service time) for a process with rate λ\lambda:

f(t)=λeλt,t0,F(t)=1eλtf(t) = \lambda e^{-\lambda t}, \quad t \ge 0, \qquad F(t) = 1 - e^{-\lambda t}

Its mean is 1/λ1/\lambda. It is memoryless: P(T>s+tT>s)=P(T>t)P(T > s+t \mid T > s) = P(T > t).

Role in Queuing Simulation

These two distributions are intimately linked: if arrivals occur as a Poisson process with rate λ\lambda (number of arrivals in any interval is Poisson), then the inter-arrival times are exponentially distributed with mean 1/λ1/\lambda. This pairing underlies the M/M/1 and M/M/c queuing models, where:

  • Arrivals follow a Poisson process (the first M),
  • Service times are exponential (the second M).

The memoryless property makes such systems analytically tractable (Markovian). In simulation, exponential inter-arrival and service times are generated by inverse transform: t=1λln(1R)t = -\frac{1}{\lambda}\ln(1 - R) where RR is a uniform random number in [0,1)[0,1).

distributions
12short5 marks

Explain the features of a general-purpose simulation language (e.g., GPSS).

General-Purpose Simulation Language (GPSS)

A general-purpose simulation language (GPSL) such as GPSS (General Purpose Simulation System) is a special-purpose programming language designed specifically for building discrete-event simulation models, especially queuing systems. Rather than coding clock management and event lists by hand, the modeller describes the system using high-level blocks.

Key features:

  • Transaction-flow (process) orientation — Dynamic entities called transactions (e.g., customers, jobs) flow through a sequence of blocks that represent operations on them.
  • Built-in block statements — Ready-made blocks such as GENERATE (create transactions), QUEUE/DEPART (collect queue statistics), SEIZE/RELEASE (capture/free a facility), ADVANCE (consume service time), and TERMINATE (remove transactions).
  • Automatic simulation control — The language automatically maintains the simulation clock, the future event list, and time advance; the user need not program these.
  • Built-in random number and distribution generators — Functions for uniform, exponential, and other distributions for arrivals and service.
  • Automatic statistics collection — Queue lengths, waiting times, facility utilization, and throughput are gathered and reported automatically.
  • Facilities, storages and queues — Predefined entities to model single-capacity servers (facilities), multi-capacity resources (storages), and waiting lines (queues).
  • Standard output reports — Produces summary reports of performance measures at the end of a run.

Advantages: rapid model development, less coding effort, fewer programming errors, and reusable, readable models — at some cost in flexibility compared with a general-purpose language like C.

gpss

Frequently asked questions

Where can I find the BSc CSIT (TU) Simulation and Modelling (BSc CSIT, CSC317) question paper 2077?
The full BSc CSIT (TU) Simulation and Modelling (BSc CSIT, CSC317) 2077 (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) 2077 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) 2077 paper?
The BSc CSIT (TU) Simulation and Modelling (BSc CSIT, CSC317) 2077 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.