Tribhuwan University

Institute of Science and Technology

2078

Bachelor Level / Third Year / Fifth Semester / Science

B.Sc in Computer Science and Information Technology (CSC328)

(Simulation and Modeling)

Full Marks: 60

Pass Marks: 24

Time: 3 Hours

Candidates are required to give their answers in their own words as for as practicable.

The figures in the margin indicate full marks.

Section A

Long Answers Questions

Attempt any TWO questions.
[2*10=20]
1.
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?[10]

Queuing System – Definition, Kendall's Notation, Performance Measures & System Stability

A queuing system is a mathematical model used to study waiting lines, where customers arrive, wait for service if necessary, and leave after being served.


Definition of Queuing System

A queuing system consists of customers arriving at a service facility, waiting in a queue (line) if the server is busy, getting served, and then departing. It is used to analyze and optimize waiting times, server utilization, and overall system efficiency in real-world scenarios like banks, hospitals, and computer networks.

Basic components of a queuing system:

  • Arrival process – How customers arrive (pattern/rate)
  • Service mechanism – How customers are served (time/rate)
  • Queue discipline – The order in which customers are served (FIFO, LIFO, Priority)
  • System capacity – Maximum number of customers allowed
  • Number of servers – Single or multiple servers

Kendall's Notation

Kendall's notation is a standard shorthand used to describe and classify a queuing system. It is written as:

A/B/s/K/N/DA / B / s / K / N / D

Where each symbol represents:

Position Symbol Meaning
A Arrival process Distribution of inter-arrival times
B Service process Distribution of service times
s Number of servers Count of parallel servers
K System capacity Maximum customers in system (queue + service)
N Population size Size of the calling population
D Queue discipline Rule for selecting next customer

Common distribution codes:

  • M – Markovian (Exponential/Poisson – memoryless)
  • D – Deterministic (constant/fixed times)
  • G – General (any arbitrary distribution)
  • Ek – Erlang-k distribution

Example: M/M/1///FIFOM/M/1/\infty/\infty/FIFO represents a single server system with Poisson arrivals, exponential service times, infinite capacity, infinite population, and First-In-First-Out discipline.

When last three parameters are not mentioned (e.g., M/M/1$), it is assumed: $K = \infty, N=N = \infty, D=FIFOD = FIFO.


Performance Measures in Single Server Queuing System (M/M/1)

Let:

  • λ\lambda = mean arrival rate
  • μ\mu = mean service rate
  • ρ=λ/μ\rho = \lambda / \mu = traffic intensity (utilization factor)

The key performance measures are:

Measure Formula Meaning
Traffic Intensity ($\rho$) ρ=λ/μ\rho = \lambda / \mu Fraction of time server is busy
Average number in system ($L_s$) Ls=ρ1ρL_s = \frac{\rho}{1 - \rho} Expected customers in entire system
Average number in queue ($L_q$) Lq=ρ21ρL_q = \frac{\rho^2}{1 - \rho} Expected customers waiting in queue
Average time in system ($W_s$) Ws=1μλW_s = \frac{1}{\mu - \lambda} Expected time a customer spends in system
Average time in queue ($W_q$) Wq=ρμλW_q = \frac{\rho}{\mu - \lambda} Expected waiting time in queue only
Probability system is empty ($P_0$) P0=1ρP_0 = 1 - \rho Probability of zero customers
Probability of n customers ($P_n$) Pn=(1ρ)ρnP_n = (1-\rho)\rho^n Probability of exactly n customers

Little's Law connects these measures:

Ls=λWsandLq=λWqL_s = \lambda \cdot W_s \quad \text{and} \quad L_q = \lambda \cdot W_q


System Stability – Which Measure Determines It and How?

The traffic intensity ρ=λ/μ\rho = \lambda / \mu is the critical measure that determines system stability.

Stability condition: The system is stable (steady-state exists) if and only if:

ρ=λμ<1\rho = \frac{\lambda}{\mu} < 1

Explanation:

  • If ρ<1\rho < 1: The service rate is greater than the arrival rate ($\mu > \lambda$). The server can handle incoming customers, queue does not grow indefinitely, and the system reaches a steady state.

  • If ρ=1\rho = 1: The arrival rate equals the service rate. The queue grows without bound over time — system is unstable.

  • If ρ>1\rho > 1: Customers arrive faster than they are served. The queue length increases infinitely — system is completely unstable and no steady-state solution exists.

Conclusion: The traffic intensity ρ\rho acts as the stability indicator. For any single server queuing system to function effectively and reach equilibrium, it is mandatory that ρ<1\rho < 1, ensuring that the server is not overwhelmed and all performance measures remain finite and meaningful.

2.
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 [0, 1] can be rejected.[10]
3.
What do you understand by dynamic mathematical model? Explain with example. Differentiate it with static mathematical model.[10]
Section B

Short Answers Questions

Attempt any Eight questions.
[8*5=40]
4.
Describe the phases in simulation. [5]
5.
Explain the concept of discrete event simulation. Explain poisson’s arrival pattern. [5]
6.
Explain Monte Carlo simulation method with an example? [5]
7.
Define the terms verification, calibration, validation and accreditation of models. [5]
8.
Use Multiplicative congruential method to generate a sequence of random numbers with X=7, a=11 m=16. [5]
9.
Why is estimation methods used in simulation? Explain. [5]
10.
Explain the importance of elimination of initial bias during simulation. [5]
11.
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. [5]
12.
Write short notes on (any two): a. Digital analog simulator b. Simulation tools [5]