Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Three people, P 1 , P 2 , and P 3 , want to find the earliest meeting date d . Each P is available
Three people, P P and P want to find the earliest meeting date d Each P is available every ai days starting from day bi bi ai ie Pi s available days are bi ai biai bi
Let fi be a function that maps the current candidate date t to Pis earliest available date on or after t Clearly, fit t and fiu u holds for all u such that t u fit
To find the earliest meeting date d they who dont know the other peoples ai and bi start communication using a ring of message channels see figure They have no other means of communication such as shared global variables
Each Pi locally holds hisher own candidate date di whose initial value is representing today and asynchronously and repeatedly performs the following:
update di to hisher earliest available date fidi and send it to the next person,
receive the previous persons candidate date dj and update di to dj if djdi
Note: if you think the above rules are underspecified or inaccurate, you may refine them as necessary.
Anybody can start communication independently.
The communication can terminate when all the Pis realize that no further updates of di will be made.
Q Describe the above algorithm in Promela and test it with a a and a For bi we know that bi for each i but not their exact values. Use the verification mode to figure out
i the largest possible value of the earliest meeting date d and
ii which bis lead to that meeting date.
QHow can each Pi notice that no further updates of di will be made
and communication can be stopped Design and implement a termination mechanism and verify that the algorithm always terminatewith a a and a
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started