Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A malfunctioning garage door opener is defined by the transition graph below. Unfortunately, 8 0 % of the time the system transitions from 'door opening'

A malfunctioning garage door opener is defined by the transition graph below.
Unfortunately, 80% of the time the system transitions from
'door opening' to 'door closing'. Write a Python simulation of
the system and simulate for a predefined number of time
steps to see if the system models the specification. If not,
output the counter-example. Base your code on the example
given in class. Include your code and an example output.
Consider including the following in your code:
# the atoms of the system
# the events
# the states of the system
# the state transition relation
# OPENING has 20% chance of jumping directly to CLOSING by defn.
# the labeling function
#---- Define the event function.
def get_event(current_state):
#---- Define the decision function based on LTL formulas.
def hold_properties(current_state, next_state):
#---- Perform probabilistic state transition, return next state
def transition(current_state):
#---- Simulate state transitions
def simulate( initial_state, num_steps):
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions

Question

What does stickiest refer to in regard to social media

Answered: 1 week ago

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago