BE Computer Engineering (IOE, TU) Simulation and Modeling (IOE, CT 751 / ENCT 353) Question Paper 2079 Nepal
This is the official BE Computer Engineering (IOE, TU) Simulation and Modeling (IOE, CT 751 / ENCT 353) question paper for 2079, as set in the regular annual examination. It carries 80 full marks and a time allowance of 180 minutes, across 12 questions. On Kekkei you can attempt this Simulation and Modeling (IOE, CT 751 / ENCT 353) 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 BE Computer Engineering (IOE, TU) Simulation and Modeling (IOE, CT 751 / ENCT 353) exam or solving previous years' question papers, this 2079 paper is a great way to practise under real exam conditions.
Section A: Long Answer Questions
Attempt all / any as specified.
(a) Define a system and a model. With suitable examples, distinguish between physical and mathematical models, and between static and dynamic models. [6]
(b) "Simulation is the appropriate technique only when the system is too complex for analytical treatment." Discuss this statement, clearly stating the situations when simulation is the right tool and when it is not appropriate. [6]
(a) System, Model, and Types of Models
System: A system is a collection of entities (objects) that interact together over time to accomplish one or more goals. Example: a bank with tellers, customers and a queue is a system.
Model: A model is a simplified representation (abstraction) of a system used to study and predict the behaviour of that system without operating on the real system itself.
Physical vs. Mathematical models
| Physical model | Mathematical model |
|---|---|
| A tangible, scaled or iconic representation of the system. | A representation using symbols, equations and logical relationships. |
| Example: a scaled wind-tunnel model of an aircraft, a globe. | Example: for a circuit, queueing equations for a bank. |
Static vs. Dynamic models
| Static model | Dynamic model |
|---|---|
| Represents the system at a single point in time; time plays no role. | Represents the system as it evolves over time. |
| Example: a Monte Carlo model estimating ; a balance-sheet. | Example: a discrete-event simulation of a queue over an 8-hour day. |
(b) When is simulation the right tool?
The statement is largely true but incomplete. Simulation is indeed preferred when a system is too complex for closed-form analytical solutions, but complexity is not the only criterion.
Simulation IS appropriate when:
- The system is too complex (non-linear, many interacting random components) for analytical/mathematical solution.
- We want to study the dynamic behaviour and transient effects over time.
- We wish to experiment with "what-if" scenarios or new policies/designs before building the real system.
- It is too costly, dangerous or impossible to experiment on the real system.
- We want to verify or gain insight into an analytical solution.
Simulation is NOT appropriate when:
- The problem can be solved exactly by closed-form analytical methods (e.g. simple M/M/1 formulas) — analysis is then cheaper and exact.
- The cost of building/running the simulation exceeds the benefit, or there is insufficient time/resources/data.
- Common sense or direct measurement gives the answer more easily.
- The system behaviour can be observed directly and cheaply on the real system.
- Adequate input data are unavailable, so the model cannot be validated.
Conclusion: Simulation is a powerful last-resort tool when analysis fails, but when an exact analytical solution exists it should be preferred for accuracy and economy.
Consider a single-server queuing system (M/M/1). Customers arrive with inter-arrival times of 3, 1, 4, 2, 5 minutes and require service times of 2, 4, 1, 3, 2 minutes respectively for the first five customers.
(a) Explain the event-scheduling approach to discrete-event simulation and define the terms event, event list, system state and simulation clock. [5]
(b) Construct the simulation table by hand for the five customers and compute the average waiting time in queue, the average time a customer spends in the system, and the server utilization. [9]
(a) Event-Scheduling Approach
In the event-scheduling / next-event time-advance approach, the simulation clock jumps from the time of one event directly to the time of the next event. At each event, the system state is updated, statistics are collected, and any future events generated are placed in the event list.
- Event: an instantaneous occurrence that may change the state of the system (e.g. an arrival or a departure).
- Event list (FEL): an ordered list of future events with their scheduled times of occurrence; the imminent event (smallest time) is processed next.
- System state: the collection of variables that describe the system at any time (e.g. number in queue, server busy/idle).
- Simulation clock: a variable giving the current value of simulated time; it advances to the time of the next (imminent) event.
(b) Hand Simulation Table
Inter-arrival times (IAT): 3, 1, 4, 2, 5. Service times (ST): 2, 4, 1, 3, 2.
Arrival time . Service start . Departure start ST.
| Cust | IAT | Arr | ST | Start | Wait | Depart | Time in system |
|---|---|---|---|---|---|---|---|
| 1 | 3 | 3 | 2 | 3 | 0 | 5 | 2 |
| 2 | 1 | 4 | 4 | 5 | 1 | 9 | 5 |
| 3 | 4 | 8 | 1 | 9 | 1 | 10 | 2 |
| 4 | 2 | 10 | 3 | 10 | 0 | 13 | 3 |
| 5 | 5 | 15 | 2 | 15 | 0 | 17 | 2 |
Average waiting time in queue:
Average time in system:
Server utilization = total busy time / total simulation time. Total service time min. The first customer arrives at and the last departs at , so the simulation run length is min (server idle 3 min at start, plus idle gaps).
(If utilization is measured only over the busy period from first arrival to last departure , the same value may be quoted if idle start time is excluded; either consistent definition is acceptable.)
(a) Describe the linear congruential method for generating pseudo-random numbers. State the conditions (Hull-Dobell theorem) under which a multiplicative-additive LCG achieves the maximum period. [6]
(b) Using the inverse-transform technique, derive a procedure to generate a random variate from an exponential distribution with mean 1/lambda. Hence generate one exponential variate using the random number R = 0.25 and lambda = 0.5. [6]
(a) Linear Congruential Method (LCG)
The LCG generates a sequence of integers using the recurrence:
where is the seed, is the multiplier, is the increment and is the modulus. The pseudo-random numbers on are obtained as:
If it is a mixed LCG; if it is a multiplicative LCG.
Hull–Dobell theorem (maximum period ): A mixed LCG () has full period if and only if:
- (i.e. and are relatively prime);
- is divisible by every prime factor of ;
- is divisible by if is divisible by .
(b) Inverse-Transform for the Exponential Distribution
The exponential distribution with mean has cdf:
Procedure: Set where and solve for :
Since is also , this is often written .
Numerical generation with , :
The generated exponential variate is .
(a) Differentiate between verification and validation of a simulation model. Describe at least three techniques used to verify a simulation program and three techniques used to validate a model against the real system. [8]
(b) Compare general-purpose programming languages with special-purpose simulation languages (such as GPSS) for building simulation models, listing two advantages and two disadvantages of each. [4]
(a) Verification vs. Validation
Verification asks "Did we build the model right?" — it ensures that the computer program (the operational model) correctly implements the conceptual/assumptions model, i.e. it is free of logical and coding errors.
Validation asks "Did we build the right model?" — it ensures that the model is an accurate representation of the real system for its intended purpose.
Verification techniques (any three):
- Structured walk-through / code review of the program with another person, checking flowcharts against code.
- Trace the simulation — print intermediate values (clock, state, event list) for a few entities and check them by hand.
- Test under simplified/known conditions for which analytical results exist (e.g. deterministic service times) and compare.
- Use animation to visually observe that entities behave as intended.
Validation techniques (any three):
- Compare model output with real-system data (historical/field data) using statistical tests.
- Face validity — have experts/operators of the real system judge whether outputs and behaviour look reasonable.
- Sensitivity analysis / Turing test — vary inputs and check the direction/magnitude of output changes match reality; or see if experts can distinguish model output from real output.
- Validate model assumptions (structural and data assumptions) against the real system.
(b) General-Purpose vs. Special-Purpose Simulation Languages
| General-purpose (C, C++, Java) | Simulation language (GPSS, SIMSCRIPT, Arena) | |
|---|---|---|
| Advantages | (1) Flexible, no need to learn a new language; (2) low cost, widely available, fast execution. | (1) Built-in features (event list, clock, queues, random generators, statistics) reduce coding; (2) faster model development and easier to read/maintain. |
| Disadvantages | (1) Long development time — must code clock, queues, statistics from scratch; (2) error-prone, harder to maintain. | (1) Cost of purchase and learning curve; (2) less flexible/general and may run slower than tailored code. |
Section B: Short Answer Questions
Attempt all / any as specified.
Apply the Kolmogorov-Smirnov test to test the following sequence of numbers for uniformity at the 0.05 level of significance (critical value D(0.05) = 0.565 for n = 5): 0.44, 0.81, 0.14, 0.05, 0.93. State your conclusion.
Kolmogorov–Smirnov Test for Uniformity
Step 1 — Sort the numbers ascending:
Step 2 — Compute and using and .
| 1 | 0.05 | 0.20 | 0.15 | 0.00 | 0.05 |
| 2 | 0.14 | 0.40 | 0.26 | 0.20 | -0.06 |
| 3 | 0.44 | 0.60 | 0.16 | 0.40 | 0.04 |
| 4 | 0.81 | 0.80 | -0.01 | 0.60 | 0.21 |
| 5 | 0.93 | 1.00 | 0.07 | 0.80 | 0.13 |
Step 3 — Test statistic:
Step 4 — Decision: Compare with the critical value .
Conclusion: Since the computed is less than the critical value, we fail to reject the null hypothesis. The numbers can be regarded as drawn from a uniform distribution at the 5% level of significance.
For an M/M/1 queue with arrival rate lambda = 6 customers/hour and service rate mu = 8 customers/hour, derive and compute: (a) the server utilization rho, (b) the expected number of customers in the system L, and (c) the expected waiting time in the queue Wq.
M/M/1 Queue Performance Measures
Given /hr and /hr.
(a) Server utilization :
Since , the queue is stable.
(b) Expected number in the system :
(c) Expected waiting time in the queue :
Summary: , customers, hr ( min).
Explain the acceptance-rejection technique for generating random variates. Using a neat algorithm, show how it can be used to generate a random variate from a distribution whose density is bounded over a finite interval.
Acceptance–Rejection Technique
The acceptance–rejection method generates variates from a target density when direct inversion is difficult. The idea is to generate candidate points uniformly under a bounding envelope and accept only those that fall under ; rejected points are discarded.
Case: bounded on a finite interval . Let be an upper bound on the density. We enclose in the rectangle .
Algorithm:
1. Generate two independent uniform random numbers R1, R2 ~ U(0,1).
2. Set candidate X = a + (b - a) * R1. // uniform on [a,b]
3. Set Y = c * R2. // uniform on [0,c]
4. If Y <= f(X):
Accept and RETURN X. // point lies under f
Else:
Reject and go back to Step 1. // try again
Why it works: Conditioned on acceptance (), the accepted has density proportional to , hence exactly the target distribution. The efficiency (probability of acceptance per trial) is
so a tight bound (envelope close to ) minimizes rejections and maximizes efficiency.
Differentiate between continuous and discrete simulation, and between deterministic and stochastic simulation, giving one real-world example of each type.
Continuous vs. Discrete and Deterministic vs. Stochastic Simulation
Continuous vs. Discrete simulation
| Continuous simulation | Discrete (discrete-event) simulation |
|---|---|
| State variables change continuously with time, usually described by differential equations. | State variables change only at discrete points in time (at events). |
| Example: simulating the level of water in a reservoir / flight of a missile (state continuous functions of time). | Example: simulating customers in a bank queue, where the count changes only at arrivals and departures. |
Deterministic vs. Stochastic simulation
| Deterministic simulation | Stochastic simulation |
|---|---|
| Contains no random variables; same input always gives the same output. | Contains one or more random (probabilistic) inputs; outputs are themselves random and must be estimated statistically. |
| Example: simulating a chemical reaction with fixed reaction rates / a scheduled, fixed-time assembly line. | Example: an M/M/1 bank queue with random arrival and service times; a Monte Carlo inventory model. |
What properties must a good sequence of pseudo-random numbers possess? Briefly describe the runs test (test for independence) and explain what hypothesis it is used to verify.
Properties of Good Pseudo-Random Numbers and the Runs Test
Desirable properties of a good random-number sequence:
- Uniformity — the numbers are uniformly distributed on .
- Independence — the numbers are statistically independent (no correlation/pattern between successive values).
- Long period (cycle length) before the sequence repeats.
- Reproducibility — the sequence can be regenerated from the same seed.
- Computational efficiency — fast to generate and low memory use.
Runs Test (test for independence): A run is a succession of numbers in the same direction. The runs up and down test counts a run as a maximal subsequence of increasing (up) or decreasing (down) values; a sign change marks the end of a run. We count the total number of runs in the sequence.
For numbers, under independence the expected number of runs and its variance are
The test statistic
is approximately standard normal. If we do not reject.
Hypothesis tested: It tests : the numbers in the sequence are independent (no pattern/correlation), against : the numbers are not independent. Too few or too many runs indicates dependence.
With a neat flowchart, explain the general structure (the time-advance mechanism and the main steps) of a next-event time-advance discrete-event simulation.
Next-Event Time-Advance Discrete-Event Simulation
In the next-event time-advance mechanism the simulation clock is advanced to the time of the most imminent future event (not in fixed increments). At each step the state is updated, statistics gathered, and new future events scheduled, until a stopping condition is met.
Main steps / flowchart (described in words):
┌─────────────────────────────┐
│ START: Initialization │
│ - set clock = 0 │
│ - set initial system state │
│ - initialize statistics │
│ - schedule initial event(s) │
└──────────────┬──────────────┘
▼
┌─────────────────────────────┐
│ Determine the imminent │◄──────────┐
│ (next) event from the │ │
│ Future Event List (FEL) │ │
└──────────────┬──────────────┘ │
▼ │
┌─────────────────────────────┐ │
│ Advance simulation clock to │ │
│ the time of that event │ │
└──────────────┬──────────────┘ │
▼ │
┌─────────────────────────────┐ │
│ Execute event routine: │ │
│ - update system state │ │
│ - update statistics │ │
│ - generate & schedule future│ │
│ events into the FEL │ │
└──────────────┬──────────────┘ │
▼ │
◇ Stopping condition met? ◇──No──────┘
│ Yes
▼
┌─────────────────────────────┐
│ Generate report / compute │
│ summary statistics; STOP │
└─────────────────────────────┘
Summary: Initialize → find imminent event → advance clock to it → process event (update state, stats, schedule new events) → repeat until termination → produce report.
Define the following terms with reference to system modeling: (a) entity, (b) attribute, (c) activity, (d) state of a system, and (e) endogenous and exogenous events.
System Modeling Terms
(a) Entity: An object of interest in the system. It may be dynamic (moving through the system, e.g. a customer, a part) or permanent (e.g. a server, a machine).
(b) Attribute: A property or characteristic of an entity. Example: the arrival time, priority or service requirement of a customer; the speed of a machine.
(c) Activity: A duration of time of specified (often known) length during which something happens. Example: a service activity lasting the service time; an inter-arrival activity.
(d) State of a system: The collection of variables (state variables) necessary to describe the system at any instant of time relative to the objectives of the study. Example: the number of busy servers and the number of customers in the queue.
(e) Endogenous and exogenous events:
- Endogenous event — an activity or event occurring within the system. Example: the completion of service (a departure) inside a bank.
- Exogenous event — an activity or event in the environment that affects the system from outside. Example: the arrival of a customer to the bank.
Write short notes on any TWO of the following:
(a) Monte Carlo simulation
(b) Features of a good simulation software package
(c) Calibration of a model in the validation process
Short Notes (any TWO)
(a) Monte Carlo Simulation
Monte Carlo simulation is a static simulation technique that uses repeated random sampling to obtain numerical results for problems that may be deterministic or stochastic, where time plays no substantive role. Random numbers are used to sample from probability distributions, and many trials are averaged to estimate a quantity. A classic use is estimating by throwing random points into a unit square and counting how many fall inside the inscribed quarter-circle: . It is also used for numerical integration, risk analysis and reliability estimation. Accuracy improves with the number of trials (error ).
(b) Features of a Good Simulation Software Package
A good simulation package should provide:
- Modeling flexibility and ease of building/modifying models (graphical/drag-and-drop modeling).
- Built-in random-number and random-variate generators for standard distributions.
- Built-in statistical analysis of output (confidence intervals, multiple replications).
- Animation to visualize and verify model behaviour.
- Good input data analysis (distribution fitting) facilities.
- Run control, debugging/trace tools and clear reporting.
- Good documentation, support, portability and reasonable execution speed.
(c) Calibration of a Model in the Validation Process
Calibration is the iterative process of tuning a model's parameters and assumptions so that its output matches the behaviour of the real system as closely as possible. The modeler compares model output with observed real-system data, identifies discrepancies, adjusts parameters/structure, and repeats. Care must be taken to avoid over-fitting the model to one particular data set; therefore the calibrated model should be re-tested (validated) against a separate, independent data set to confirm it generalizes. Calibration is thus a key sub-step within validation.
Frequently asked questions
- Where can I find the BE Computer Engineering (IOE, TU) Simulation and Modeling (IOE, CT 751 / ENCT 353) question paper 2079?
- The full BE Computer Engineering (IOE, TU) Simulation and Modeling (IOE, CT 751 / ENCT 353) 2079 (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 Modeling (IOE, CT 751 / ENCT 353) 2079 paper come with solutions?
- Yes. Every question on this Simulation and Modeling (IOE, CT 751 / ENCT 353) past paper includes a step-by-step solution, plus instant AI feedback when you attempt it on Kekkei.
- How many marks is the BE Computer Engineering (IOE, TU) Simulation and Modeling (IOE, CT 751 / ENCT 353) 2079 paper?
- The BE Computer Engineering (IOE, TU) Simulation and Modeling (IOE, CT 751 / ENCT 353) 2079 paper carries 80 full marks and is meant to be completed in 180 minutes, across 12 questions.
- Is practising this Simulation and Modeling (IOE, CT 751 / ENCT 353) past paper free?
- Yes — reading and attempting this Simulation and Modeling (IOE, CT 751 / ENCT 353) past paper on Kekkei is completely free.