You are on page 1of 9

14.01.

2023, 15:05 ExamMSE_170122

ExamMSE_170122 Total points 27/36

Exam, 18+18 Questions (20+40 points).


Part II: Questions to which you have to provide (short) answers.

What are the four elements of a (classical) Petri Net? * 2/2

The four elements of a (classical) Petri Net are:


a set of locations 𝐿 which can consist of 𝑚 locations
a set of transitions 𝑇 which can consist of n transitions
a set of arcs , which can be represented through a matrix 𝐼 = 𝑃𝑜𝑠𝑡 − 𝑃𝑟𝑒 , where 𝑃𝑜𝑠𝑡 is the
output matrix, meaning the matrix where a transition can lead to certain locations and 𝑃𝑟𝑒 is
the input matrix, meaning the matrix in where a certain current location can have multiple
transitions.
Token, moved from location to location by igniting the transitions after igniton the tokens
will be transferred from the input locations to the output ones.

Which is the most complete type of modeling used for discrete event *2/2
dynamical systems and what is its formal basis?

The most complete type of modeling used for discrete event dynamical systems is
modeling at statistical level (the most complete) can be used in tandem:
1.operational models: can be used in cases when we can obtain by calculation exact
formulas / results (having ways to simplify computational problems). For example: queuing
systems, queue network.
2.simulation model: provide a complete tool that approximates the dynamics of the system
by providing incremental non-continuous hypostases.

How is a process defined in discrete-event system modeling? * 0/2

A process is a generic representations of a process such a delays, queues, branches (where


one of many routes is chosen based on some criteria), and so on. These are arranged and
joined together into “networks”.

https://docs.google.com/forms/d/e/1FAIpQLScDrLNOVRoqTGzJ50iiU3aKNOivODthAADN1x2ya7vS7QxOQw/viewscore?vc=0&c=0&w=1&flr=0&views… 1/9
14.01.2023, 15:05 ExamMSE_170122

Given the matrices below, synthesize the corresponding Petri net and *2/2
state which transitions are enabledin the initial state:

desen - ALINA G…

What is a modeling formalism? Give two examples of modeling *1/2


formalisms and discuss their duality.

A modelling notation defines the rules according to which a model is built. It defines the
textual or graphical syntax of a model. A modelling notation is called a modelling formalism
if, along with the syntax, a precise meaning is defined.

https://docs.google.com/forms/d/e/1FAIpQLScDrLNOVRoqTGzJ50iiU3aKNOivODthAADN1x2ya7vS7QxOQw/viewscore?vc=0&c=0&w=1&flr=0&views… 2/9
14.01.2023, 15:05 ExamMSE_170122

Prove that the set of events attached to an experiment forms a Boolean *2/2
algebra with respect to the operations defined (union, intersection and
complementarity).

a) A or B is the event that occurs if, and only if, one of the events A or B occurs. This event
is denoted by A ∪ B and is called the union or disjunction of events A and B.
b) A and B is the event that occurs if, and only if, both events A and B occur. This event is
denoted by A ∩ B and is called the intersection or conjunction of events A and B.
c) non A is the event that occurs if, and only if, event A does not occur. This event is called
the complement or opposite of A and is denoted by ¬𝐴.
Definition: An event A from ∑ is said to be compound if there exist two events B and C from
∑, such that 𝐵 ≠ 𝐴, 𝐶 ≠ 𝐴 and 𝐴 = 𝐵 ∪ C . Otherwise, the event A is said to be elementary.
Example: In the experiment of rolling the die:
– Event {3, 5} is compound, because: {3 , 5} = {3} ∪ {5};
– Event {1, 2, 4} is compound, because : {1, 2, 4} = {1, 2} ∪ {4}.
– Events {1}, {2}, {3}, {4}, {5}, {6} are elementary.
Boolean algebras:
Definition: Call Boole algebra a nonempty set A, with operations ∪,∩, ¬ defined and meeting
the following axioms:
1. 𝐴 ∪ 𝐵 = 𝐵 ∪ 𝐴; 𝐴 ∩ 𝐵 = 𝐵 ∩ A (commutativity);
2. 𝐴 ∪ (𝐵 ∪ 𝐶) = (𝐴 ∪ 𝐵) ∪ 𝐶; 𝐴 ∩ (𝐵 ∩ 𝐶) = (𝐴 ∩ 𝐵) ∩ C (associativity);
3. (𝐴 ∩ 𝐵) ∪ 𝐴=(𝐴 ∪ 𝐵) ∩ 𝐴 = A (absorption);
4. 𝐴 ∩ (𝐵 ∪ 𝐶) = (𝐴 ∩ 𝐵) ∪ (𝐴 ∩ 𝐶); 𝐴 ∪ (𝐵 ∩ 𝐶) = (𝐴 ∪ 𝐵) ∩ (𝐴 ∪ 𝐶)( (distributivity);
5. (𝐴 ∩ ¬𝐴) ∪ 𝐵 = 𝐵; (𝐴 ∪ ¬𝐴) ∩ 𝐵 = 𝐵 ( (complementarity),
for any 𝐴, 𝐵, 𝐶 ∈ A.
Axiom: The set of events associated to an experiment is a Boolean algebra.
Example: The set of parts P (Ω) of a nonempty set, with union, intersection and complement
(related to Ω) operations, gets a Boolean algebra structure.

What is an event routine? Is this a static or dynamic description *1/2


associated with the occurrence of an originating event?

Event routine: a subroutine which updates the state. of the system when a particular type of
event occurs.

https://docs.google.com/forms/d/e/1FAIpQLScDrLNOVRoqTGzJ50iiU3aKNOivODthAADN1x2ya7vS7QxOQw/viewscore?vc=0&c=0&w=1&flr=0&views… 3/9
14.01.2023, 15:05 ExamMSE_170122

* 2/2

We know that mean(teta1) = teta, mean(teta2) = teta. We want to prove that: teta3= p* teta1
+ (1-p)*teta2 is also unbiased estimator for teta. Mean(teta 3)=mean[p*teta1 + (1-p)*teta2] =
mean * p * teta1 + mean(1-p)*teta2 = p*mean*teta1 + (1-p)*mean*teta2=p*teta + (1-p)*teta
=> teta3 is unbiased estimator.

Consider the Petri net defined by: P ={p1,p2,p3}, T = {t1,t2,t3} and A = *1/2
{(p1,t1),(p1,t3), (p2,t1), (p2,t2), (p3,t3),(t1,p2), (t1,p3),(t2,p3), (t3,p1),
(t3,p2)} with all arc weights equal to 1 except for w(p1,t1) = 2. (a) Draw
the corresponding Petri net graph and the matrices Pre (I+), Post (I-), I.
(b) Let M0 = [1, 0, 1] be the initial state. Show that in any subsequent
operation of the Petri net, transition t1 can never be enabled.

Pre(I)=[2 0 1
110
001]

Post(I)=[0 0 1
101
110]

I= Post(I) – Pre(I)= Post(I)=[-2 0 0


0 -1 1
1 1 -1]

https://docs.google.com/forms/d/e/1FAIpQLScDrLNOVRoqTGzJ50iiU3aKNOivODthAADN1x2ya7vS7QxOQw/viewscore?vc=0&c=0&w=1&flr=0&views… 4/9
14.01.2023, 15:05 ExamMSE_170122

Given the Petri net in initial state below, write the matrices Pre (I+), Post *2/2
(I-), I and M0:

Pre(I)=[1 1 0 0 0
01010
00100
0 0 0 0 1]

Post(I)=[0 0 2 0 1
10000
01000
0 0 0 1 0]

I= Post(I) – Pre(I)= Post(I)=[-1 -1 2 0 1


1 -1 0 -1 0
0 1 -1 0 0
0 0 0 1 -1]
M=[2 0 0 0 ]

Name at least two out of three different modalities, described in the *1/2
course, to check the quality of a uniform Random Number Generator
(RNG), either implemented by you or taken from the C library.

The three modalities used to check the quality of a uniform Random Number Generator are
mean, variance and expectation of the autocorrelation.

https://docs.google.com/forms/d/e/1FAIpQLScDrLNOVRoqTGzJ50iiU3aKNOivODthAADN1x2ya7vS7QxOQw/viewscore?vc=0&c=0&w=1&flr=0&views… 5/9
14.01.2023, 15:05 ExamMSE_170122

What is a simulation validation? How does it differ from simulation *1/2


verification?

The validation of a simulation consists of analysing the correspondence between the model
and the real system. One method for validating a simulation would be a careful examination
of the model outputs with inputs of the greatest variability, and comparison with the
observation data. Another one would be repeated execution of the programmed model.
The verification of a simulation consists of comparing the conceptual model with the
programmed code. One method for verifying a simulation is the comparison of the
implemented model with other models, both at the level of internal structure and input /
output. Another method is testing at system, subsystem or component level to meet
documented requirements or specifications.

Name some entities, attributes, activities, events and state variables for *2/2
the following systems: (a) a fast-food restaurant; (b) a hospital
emergency room

(a) A fast food restaurant: some entities: Customers, attributes: size of order desired,
activities: placing the order, paying for the order, events: arrival at the counter, completion of
purchase, state variables: number of customers waiting, number of positions operating.(b)
a hospital emergency room: entities: patients, attributes: attention level required, activities:
providing service required, events:arrival of the patient, departure of the patient, state
variables: number of patients waiting, number of physicians working.

What is the default value of seed if function rand() is called before *2/2
srand()? What is the minimum value of RAND_MAX possible in any
implementation?

The default value of seed if the function rand() is called befone srand() is 1 .
The minimum value of RAND_MAX is 32767.

https://docs.google.com/forms/d/e/1FAIpQLScDrLNOVRoqTGzJ50iiU3aKNOivODthAADN1x2ya7vS7QxOQw/viewscore?vc=0&c=0&w=1&flr=0&views… 6/9
14.01.2023, 15:05 ExamMSE_170122

What is the relationship between modeling and the accuracy of *1/2


simulations?

A model is an abstract representation replicating, with a certain degree of accuracy, the


behavior of the system itself. By simulating a model, no exact answers are obtained, only
approximations, estimates, which means that the accuracy of the simulations is reduced to
how much effort is made to make the model have a scheme as unambiguous as possible.

What are the types of modeling you use for simulation? * 1/2

One type of modeling used for simulation is predictive modeling. For exemple, construction
of a car body to meet certain weight, strength, geometry, technology, criteria.
Another type of modeling used for simulation is restrictive modeling. This is modeling in the
conditions of access restrictions to an existing real system; for exemple, we cannot shut
down a network of computers that monitors a nuclear power plant in order to perform some
experiments.
There are two more types of models: physical models (iconic) like plans, schemes, sketches
- necessary in many areas, or Phantoms - in medicine and mathematical (logical) models
that are often represented by appropriate software program.

* 2/2

Y= aX+b => mean y= a*mean x+b => (standard deviation of y) * (standard deviation of y)
*var (aX+b)=a^2 (standard deviation of x)^2 => 2*mean x=alfa *mean x +b => a=2, b=0

https://docs.google.com/forms/d/e/1FAIpQLScDrLNOVRoqTGzJ50iiU3aKNOivODthAADN1x2ya7vS7QxOQw/viewscore?vc=0&c=0&w=1&flr=0&views… 7/9
14.01.2023, 15:05 ExamMSE_170122

A simulation of a major traffic intersection is to be conducted, with the *2/2


objective to improve the current traffic flow. Provide two iterations, in
increasing order of complexity, of steps 1 and 2 (Problem formulation,
Data collection) in the simulation process of Course 8.

Iteration 1: cars arriving at the intersection are controlled by a traffic light.


The cars may go straight , turn left, or turn light.
Objectives: how should the taffic light be sequenced? criterion for evaluating
effectiveness: average delay time of cars. Resources required: 2 people
for 5 days for data collection, 1 person for 2 days fot data analysis, 1 person
for 3 days for model building, 1 person for 2 days for running the model, 1 person for 3
3 days for implementation.
Iteration2 : Same as 1 above plus the following: right on red is allowed after full stop
provided no pedestrians are crossing and no vehicle is approaching the intersection.
Objectives: How should the taffic lightt be sequenced?
Criterion for evaluating effectiveness: average delay time of cars. Resources required: 2
people for 8 days for data collection. 1 person for 3 days for data analysis, 1 person
for 4 days for model building, 1 person for 2 days for running the model 1 person for 3 days
for implementation.

This form was created inside of Universitatea din Craiova.

Forms

https://docs.google.com/forms/d/e/1FAIpQLScDrLNOVRoqTGzJ50iiU3aKNOivODthAADN1x2ya7vS7QxOQw/viewscore?vc=0&c=0&w=1&flr=0&views… 8/9
14.01.2023, 15:05 ExamMSE_170122

https://docs.google.com/forms/d/e/1FAIpQLScDrLNOVRoqTGzJ50iiU3aKNOivODthAADN1x2ya7vS7QxOQw/viewscore?vc=0&c=0&w=1&flr=0&views… 9/9

You might also like