• Non ci sono risultati.

Test of Discrete Event Systems - 07.01.2021 Exercise 1

N/A
N/A
Protected

Academic year: 2021

Condividi "Test of Discrete Event Systems - 07.01.2021 Exercise 1"

Copied!
2
0
0

Testo completo

(1)

Test of Discrete Event Systems - 07.01.2021

Exercise 1

The alarm system of a building is equipped with a keypad located inside the entrance door. Assume that the alarm is active, and let time t = 0 be the instant when the entrance door is opened. A security code of three digits must be entered to deactivate the alarm using the keypad. At time t = 0, a timer T1 of 15 s starts. If the correct code is not entered before T1expires, the alarm goes off. Moreover, another timer T2of 5 s sets the maximum time to enter a new digit. If a new digit is not entered before T2expires, the system is reset to the initial state, waiting for the complete sequence. The same occurs when a wrong digit is entered in the sequence. Timer T2 starts the first time at time t = 0, and then restarts every time a digit is entered, or after it expires. For the sake of simplicity, assume that, when the alarm either goes off or is deactivated, the system enters states where the timers are not active, while entering any digit does not cause any effect.

1. Assume that the security code is 375, and that the sequence 41375375 is entered, with the eight digits entered at times 1.2, 2.8, 5.5, 7.8, 13.2, 14.6, 15.8, and 17.3 s. Build the sample path of the system.

Does the alarm go off, or is it deactivated?

Now assume that the time the user takes to think and enter a digit, has a uniform distribution over the interval [3, 8] s. Moreover, let q = 3/4 be the probability that an entered digit is the correct one in the sequence.

2. Model the system using a stochastic timed automaton {E, X , Γ, p, x0, F }.

3. Compute the probability that the user deactivates the alarm entering only three digits.

4. Compute the probability that the user deactivates the alarm.

Exercise 2

A simple processing unit is shown in the figure. It is composed of a processor and a memory which may host only one task waiting to be executed. Tasks arriving when the unit is full, are rejected.

The execution of a task in the processor may terminate incorrectly with probability q = 1/10. In that case the task queues again for the second execution. The second execution is always successful. Assume that the arrivals of the tasks at the processing unit are generated by a Poisson process with average interarrival time equal to 15 s. The duration of the execution of a task has an exponential distribution: the expected value is 8 s for the first execution, and 6 s for the second. The processing unit is initially empty

1. Model the processing unit using a stochastic timed automaton {E, X , Γ, p, x0, F }.

2. Assume that the processor is executing a task for the first time, and another task is waiting for the second execution. Compute the probability that the processing unit is empty:

a) when a new task arrives;

b) when a new task is accepted.

3. Assume that the processor is executing a task for the first time, and the memory is empty. Compute the probability that the current execution of the task is completed successfully:

a) after the next task is accepted;

b) after the next task is accepted and before 10 s.

4. Assume that the processor is executing a task for the second time, and another task is waiting for the second execution. Compute the probability that both tasks are executed and at least three new tasks arrive in 20 s.

(2)

Exercise 3

Consider the discrete-time homogeneous Markov chain depicted in the figure.

3 4

1

1 2

1 p p

1-p 1-p

Assume p = 1/4.

1. Compute the probability that state 4 is reached from state 1:

a) in exactly 9 steps;

b) in at most 9 steps.

2. Compute the probability that state 4 is reached from state 1 without visiting again state 1.

3. Is state 1 recurrent or transient? Justify the answer analytically.

4. Assuming that the initial state is state 2, compute the average time to reach state 4.

Useful formulas:

• X n=0

xn= 1

1 − x, |x| < 1

Riferimenti

Documenti correlati

[r]

The actual test structure is specified in TT2 or again Perl or XML language, by saying how many questions has to be sampled by which group, with how many right and wrong answers,

Solution proposed by Roberto Tauraso, Dipartimento di Matematica, Universit`a di Roma “Tor Vergata”, via della Ricerca Scientifica, 00133 Roma,

This is a contradiction because a positive integer is the sum of two squares if and only if all the prime factors congruent to 3 mod 4 have an even exponent in

Sono i due nuovi coinquilini della vecchia casa di Thomas e Emma, che sentono “the piano playing / Just as a ghost might play”, infatti, il poeta

With a focus on the renowned Italian–Armenian novelist Antonia Arslan’s Genocide narrative La masseria delle allodole (2004; English translation Skylark Farm, Arslan 2006), I’ll

Truck 1 returns to the warehouse according to a Poisson process with average interevent time equal to 36 hours.. Truck 2 returns according to a Poisson process with average

Eine solche Kette alles Seins wird im Dickicht der Silvae weder gesucht noch gefunden, die einzelnen Entdeckungen werden eben nicht sofort in einen klar gegliederten Kosmos