BSc CSIT (TU) Science Simulation and Modelling (BSc CSIT, CSC317) Question Paper 2074 Nepal
This is the official BSc CSIT (TU) (Science stream) Simulation and Modelling (BSc CSIT, CSC317) question paper for 2074, as set in the regular annual examination. It carries 60 full marks and a time allowance of 180 minutes, across 12 questions. On Kekkei you can attempt this Simulation and Modelling (BSc CSIT, CSC317) past paper online with a timer, get instant AI feedback and step-by-step solutions, and track the topics where you lose marks — completely free. Whether you are revising for your BSc CSIT (TU) Simulation and Modelling (BSc CSIT, CSC317) exam or solving previous years' question papers, this 2074 paper is a great way to practise under real exam conditions.
Section A: Long Answer Questions
Attempt any TWO questions.
Define system, model and simulation. Explain the different types of models and discuss the advantages and disadvantages of simulation.
System, Model and Simulation
System: A collection of entities (people, machines, components) that act and interact together toward the accomplishment of some logical end. It has a state described by state variables (e.g., number of customers in a bank).
Model: A simplified abstract representation of a system that captures its essential features and the relationships among them, used to study the system without experimenting on the real thing.
Simulation: The technique of imitating the operation of a real-world system over time by driving a model with inputs and observing its behaviour, in order to evaluate performance, test alternatives, and predict outcomes.
Types of Models
- Physical (Iconic) vs Mathematical models — physical models are scaled-down tangible replicas (a wind-tunnel aircraft); mathematical models use symbols, equations and logical relations.
- Static vs Dynamic — a static model represents a system at one point in time (Monte Carlo); a dynamic model evolves over time (queue evolution).
- Deterministic vs Stochastic — deterministic models contain no randomness (same input → same output); stochastic models include random variables (random arrivals/service).
- Continuous vs Discrete — in continuous models state changes smoothly with time (fluid flow, differential equations); in discrete models state changes only at distinct event instants (customer arrival).
Most computer simulations of interest are dynamic, stochastic and discrete-event models.
Advantages of Simulation
- Allows study of systems that are too complex for analytical/mathematical solution.
- New policies, designs, and "what-if" scenarios can be tested without disturbing or building the real system.
- Time can be compressed (years simulated in seconds) or expanded.
- Bottlenecks and the effect of changing variables can be identified and understood.
Disadvantages of Simulation
- Building a valid model requires special training; results depend on model quality.
- Can be expensive and time-consuming to develop, run and analyse.
- Outputs are estimates with random error, sometimes mistaken for exact answers (hard to interpret).
- Easy to misuse: an invalid or poorly verified model gives misleading conclusions.
Explain the characteristics and structure of a basic queuing system. Discuss the various performance measures of a single-server (M/M/1) queuing system.
Characteristics and Structure of a Basic Queuing System
A queuing system arises whenever customers demand service from limited servers and may have to wait. Its key characteristics are:
- Arrival (input) process — how customers arrive, described by the inter-arrival time distribution; often Poisson arrivals with rate .
- Service mechanism — number of servers and the service-time distribution; often exponential service with rate .
- Queue (system) capacity — finite or infinite waiting room.
- Queue discipline — order of service: FIFO, LIFO, priority, random.
- Calling population — finite or infinite source of customers.
Structure: Calling population → Arrivals → Queue (waiting line) → Server(s) → Departures. Customers join the queue, wait if all servers are busy, get served, then leave.
Performance Measures of an M/M/1 Queue
M/M/1: Poisson arrivals (rate ), exponential service (rate ), single server, infinite capacity, FIFO. Let the traffic intensity be (system stable only if ).
| Measure | Formula |
|---|---|
| Server utilization | |
| Prob. of customers | |
| Prob. system empty | |
| Avg. number in system | |
| Avg. number in queue | |
| Avg. time in system | |
| Avg. waiting time in queue |
These are linked by Little's Law: and .
Example: If , , then , customers, hr = 30 min.
Explain the Monte Carlo simulation method with a suitable example. Use Monte Carlo simulation to estimate the value of pi.
Monte Carlo Simulation Method
Monte Carlo simulation is a static, stochastic technique that uses repeated random sampling to obtain numerical estimates of quantities that may be deterministic but are difficult to compute analytically. The general steps are:
- Define a domain of possible inputs and a probability model.
- Generate inputs randomly (using random numbers ).
- Perform a deterministic computation on each sample.
- Aggregate (average) the results to estimate the desired quantity.
As the number of samples , by the Law of Large Numbers the estimate converges to the true value; error decreases as .
Simple example (estimating an integral): to estimate , draw and average .
Estimating by Monte Carlo
Consider a unit square containing a quarter circle of radius 1. The quarter circle has area and the square has area 1, so a random point lands inside the quarter circle with probability .
Algorithm:
import random
def estimate_pi(N):
inside = 0
for _ in range(N):
x = random.random() # U(0,1)
y = random.random()
if x*x + y*y <= 1.0: # inside quarter circle
inside += 1
return 4.0 * inside / N
print(estimate_pi(1_000_000)) # ~3.1416
Reasoning:
With random points the estimate is close to ; accuracy improves as increases.
Section B: Short Answer Questions
Attempt any EIGHT questions.
Explain the classification of models: static vs dynamic, deterministic vs stochastic, continuous vs discrete.
Classification of Models
Static vs Dynamic
- Static model: represents a system at a particular instant of time, with no role for time evolution (e.g., a Monte Carlo model of a single roll of dice).
- Dynamic model: represents the system as it changes over time (e.g., a bank queue evolving as customers arrive and leave).
Deterministic vs Stochastic
- Deterministic model: contains no random variables; a given set of inputs always produces the same output (e.g., a fixed schedule of patients with known service times).
- Stochastic model: contains one or more random inputs, so outputs are themselves random and described by distributions (e.g., random customer arrivals and service times).
Continuous vs Discrete
- Continuous model: state variables change continuously with respect to time, usually described by differential equations (e.g., level of water in a reservoir).
- Discrete model: state variables change only at discrete (separated) points in time when events occur (e.g., number of customers changing only at an arrival or a departure).
These dimensions are independent; a typical simulation is dynamic, stochastic and discrete.
Explain the tests for randomness. Describe the frequency (Kolmogorov-Smirnov) test and the runs test.
Tests for Randomness
Generated pseudo-random numbers must be tested for two properties: uniformity (the numbers are uniformly distributed on ) and independence (no correlation between successive numbers). Common tests include the frequency (Kolmogorov-Smirnov / chi-square) test for uniformity and the runs test, gap test, poker test, and autocorrelation test for independence.
Frequency Test — Kolmogorov-Smirnov (K-S)
The K-S test checks uniformity by comparing the empirical CDF of the sample with the theoretical uniform CDF on .
- Rank the numbers in ascending order: .
- Compute
- Let .
- If (critical value from the K-S table for sample size and significance ), accept the hypothesis that the numbers are uniform; otherwise reject.
Runs Test
The runs test checks independence. A run is a succession of similar events (e.g., a run up = increasing sequence, run down = decreasing). The numbers, not their values, are examined for the pattern of increases/decreases.
- Count the total number of runs in the sequence of numbers.
- Under independence, the mean and variance of the number of runs (runs up and down) are
- Form the standardized statistic .
- If , accept independence; otherwise reject (too few or too many runs indicates dependence).
Explain the basic properties of random numbers: uniformity and independence.
Basic Properties of Random Numbers
A sequence of random numbers used in simulation must behave like independent draws from a Uniform distribution. The two essential statistical properties are uniformity and independence.
1. Uniformity
The numbers must be uniformly distributed over the interval ; every value is equally likely. If the interval is divided into equal sub-intervals, each should contain about of the numbers. Formally, the probability density function is
with expected value and variance .
2. Independence
Each random number must be statistically independent of the others; the value of one number gives no information about the next. Therefore there should be no correlation between successive numbers, and the probability of observing a value in any sub-interval is independent of previous values.
Uniformity is verified using frequency tests (chi-square, Kolmogorov-Smirnov); independence is verified using the runs test, autocorrelation test, gap test, etc. A generator satisfying both properties produces numbers acceptable for simulation.
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 with a given CDF by setting , where , and solving .
Steps
- Write the CDF. The exponential distribution with rate (mean ) has pdf , , and CDF
- Set :
- Solve for :
- Simplify. Since is also , we may write
Example
If and a random number , then
Each uniform random number thus yields one exponential variate; repeating gives a sample of exponential inter-arrival or service times for the simulation.
Explain Kendall's notation for queuing systems with examples.
Kendall's Notation for Queuing Systems
Kendall's notation is a shorthand used to describe a queuing system, where:
| Symbol | Meaning |
|---|---|
| A | Inter-arrival time distribution |
| B | Service time distribution |
| c | Number of parallel servers |
| N | System capacity (max customers; default ) |
| K | Size of calling population (default ) |
| Z | Queue discipline (default FIFO) |
Usually only the first three are written: A/B/c. Common codes for A and B:
- M — Markovian / exponential (Poisson process)
- D — Deterministic (constant)
- E — Erlang of order
- G — General (arbitrary) distribution
Examples
- M/M/1 — Poisson arrivals, exponential service, single server, infinite capacity, FIFO.
- M/M/c — Poisson arrivals, exponential service, identical servers (e.g., bank with tellers).
- M/D/1 — Poisson arrivals, constant (deterministic) service time, one server (e.g., automated car wash).
- M/M/1/N — single server but finite capacity (customers turned away when full).
- G/G/1 — general arrival and service distributions, one server.
What is a simulation clock? Differentiate between fixed-increment and next-event time-advance mechanisms.
Simulation Clock
The simulation clock is a variable that records the current value of simulated time in the model. It is not real time; it advances according to the model logic and tells the simulation "when" the current state holds. Because nothing of interest happens between events, the clock is advanced from event to event. Two mechanisms advance it:
Fixed-Increment Time Advance
- The clock advances in uniform, fixed steps (e.g., 1 minute at a time).
- After each step, the model checks whether any events occurred during that interval and processes them, assuming they happened at the end (or start) of the interval.
- Pros: simple; suitable for continuous systems sampled periodically.
- Cons: wasted computation on intervals with no events; loss of accuracy because events are forced onto step boundaries; choosing is a trade-off between speed and precision.
Next-Event Time Advance
- The clock jumps directly to the time of the next imminent event, skipping idle periods.
- The system maintains a future event list (FEL); at each step the earliest event is selected, the clock is set to that event time, and the state and statistics are updated.
- Pros: no idle steps, so it is efficient; events are processed at their exact times (accurate). This is the standard mechanism for discrete-event simulation.
- Cons: more complex bookkeeping (event list management).
Key Difference
Fixed-increment moves time in equal pre-set steps regardless of events; next-event moves time to wherever the next event occurs, making it faster and more accurate for discrete-event systems.
Explain Markov chains and their application in simulation with an example.
Markov Chains
A Markov chain is a stochastic process that moves among a set of states such that the future state depends only on the present state, not on the past — the memoryless or Markov property:
The one-step transition probabilities form a transition probability matrix , where each row sums to 1. The state distribution after steps is , and a stationary (steady-state) distribution satisfies .
Application in Simulation
Markov chains model systems whose state evolves probabilistically over time — queue lengths, machine up/down status, weather, inventory levels, web-page navigation, and Markov-Chain Monte Carlo (MCMC) sampling. In simulation, the transition matrix is used with random numbers to decide the next state at each step.
Example — Weather Model
States: Sunny (S) and Rainy (R). Transition matrix:
| from \ to | S | R |
|---|---|---|
| S | 0.8 | 0.2 |
| R | 0.4 | 0.6 |
If today is Sunny, then . To simulate, draw : from state S, if next state is Sunny, else Rainy. Iterating generates a sequence of weather states whose long-run fractions converge to the steady-state distribution found from (here , ).
Differentiate between physical models and mathematical models with examples.
Physical Models vs Mathematical Models
Physical (Iconic) Model: A tangible, scaled physical replica of the real system that looks like what it represents. It captures geometric and physical properties and is used for visualization and physical experimentation.
Mathematical Model: An abstract representation that uses symbols, variables, equations and logical relationships to describe how the system behaves. It captures functional relationships rather than physical appearance and is studied analytically or by computer simulation.
| Aspect | Physical Model | Mathematical Model |
|---|---|---|
| Form | Tangible, scaled object | Symbols, equations, logic |
| Resemblance | Looks like the real system | Abstract; no physical likeness |
| Manipulation | Physical experiments | Solved analytically / on computer |
| Cost & flexibility | Costly, hard to modify | Cheaper, easy to change parameters |
| Examples | Scale model of a building, wind-tunnel aircraft, globe, model car | , queuing equations , a simulation program of a bank |
Examples:
- Physical: a miniature aeroplane tested in a wind tunnel; a planetarium model of the solar system.
- Mathematical: Newton's law of motion ; an M/M/1 queue described by its rate equations; a computer simulation of traffic flow.
Most computer simulations use mathematical models because they are flexible, inexpensive and easy to experiment with.
Explain the mid-square method and the additive congruential method of generating random numbers.
Mid-Square Method
A technique proposed by von Neumann to generate pseudo-random numbers:
- Start with a seed of digits (commonly 4 digits).
- Square it to get a -digit number (pad with leading zeros if necessary).
- Take the middle digits as the next number .
- Repeat; the random number in is .
Example (4-digit seed ):
- middle 4 digits , so , .
- middle digits , , .
Drawback: the sequence may degenerate (collapse to zero or fall into a short cycle), so it is rarely used in practice.
Additive Congruential Method
A generator that produces the next number by adding previous terms (a lagged generalization of the linear congruential method). The recurrence is
for some lag , where is the modulus. It requires seed values . The corresponding uniform numbers are .
Example (, i.e. Fibonacci-type, , seeds ):
- , and so on, giving .
Additive (lagged-Fibonacci) generators can produce very long periods, which makes them useful for large simulations.
Frequently asked questions
- Where can I find the BSc CSIT (TU) Simulation and Modelling (BSc CSIT, CSC317) question paper 2074?
- The full BSc CSIT (TU) Simulation and Modelling (BSc CSIT, CSC317) 2074 (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) 2074 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) 2074 paper?
- The BSc CSIT (TU) Simulation and Modelling (BSc CSIT, CSC317) 2074 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.