# 0.6 Using temporal logic to specify properties: homework exercises

Give an English translation of the following LTL formulae. Try to give a natural wording for each, not just a transliterationof the logical operators.

• $\left(◇r\left(pUr\right)\right)$
• $\square \left(q\square p\right)$
•  $p$ is true before $r$ .''
•  $p$ is false after $q$ .''

In the following, give an LTL formula that formalizes the given English wording.If the English is subject to any ambiguity, as it frequently is, describe how you are disambiguating it, and why.

•  $p$ is true.''
•  $p$ becomes true before $r$ .''
•  $p$ will happen at most once.''
•  $p$ will happen at most twice.''
• The light always blinks.''Use the following proposition: $p$ = the light is on.
• The lights of a traffic signal always light in thefollowing sequence: green, yellow, red, and back to green, etc. , with exactly one light on at any time.''Use the following propositions: $g$ = the green light is on, $y$ = the yellow light is on, and $r$ = the red light is on.
• This looks so simple and obvious, right?Unfortunately, it is ambiguous. The simple answer, $p$ , says it's true right now . But, the likelier intended meaning is that it's always true, $\square p$ .
• This can be reworded as $p$ becomes true while $r$ is still false.'' $\left(rW\left(pr\right)\right)$
• The version of LTL we use cannot capture the notion ofsomething being true for exactly one state. Instead, we must instead think in terms of somethingbeing true for a while''. Using that idea, we'll reword the original English intomore explicit, long-winded forms. $p$ will happen at most once'' becomes $p$ is false for a while, then it may become true for a while, thenit may become false forever.'' It LTL, that can be written as $\left(pW\left(pW\square p\right)\right)$ .Repeating that pattern, $p$ will happen at most twice'' becomes $\left(pW\left(pW\left(pW\left(pW\square p\right)\right)\right)\right)$ .
• Here are three progressively simpler solutions which areequivalent.
• $\square \left(\left(p◇p\right)\left(p◇p\right)\right)$
• $\left(\square \left(pUp\right)\square \left(pUp\right)\right)$
• $\left(\square ◇p\square ◇p\right)$
• There are many ways to write this, but here's one.It states that whenever the green light is on, no other light is on, and it will stay on until theyellow one is on. Note that this implies the red light won't come onbefore the yellow one. What happens when the other lights are on is entirely parallel.Finally, at least one light is on. $\square \left(\left(g\left(\left(yr\right)\left(gUy\right)\right)\right)\left(y\left(\left(rg\right)\left(yUr\right)\right)\right)\left(r\left(\left(gy\right)\left(rUy\right)\right)\right)\left(gyr\right)\right)$

Recall the Dining Philosophers Problem from the previous homework . Using temporal logic, formally specify the following desiredproperties of solutions to the D.P. Problem. Use the following logic variables, where $0i :

• ${l}_{i}$ : Philosopher $i$ has his/her left fork.
• ${r}_{i}$ : Philosopher $i$ has his/her left fork.

For each question, your answer should cover exactly the given condition -- nothing more or less.You may assume $N=3$ .

• No fork is ever claimed to be held bytwo philosophers simultaneously.
• Philosopher $i$ gets to eat (at least once).
• Each philosopher gets to eat infinitely often.
• The philosophers don't deadlock.(The main difficulty is to conceptualize and restate deadlock''within this specific model in terms of the available logic variables.)You may assume philosophers pick uptwo forks in some order, eat, and drop both forks.
• The philosophers don't deadlock.(The main difficulty is to conceptualize and restate deadlock''within this specific model in terms of the available logic variables.)You may not assume philosophers pick uptwo forks in some order, eat, and drop both forks. For example, one might pick up a single fork and then drop it.Or, the philosophers might be lazy and never pick up a fork.
• Describe a D.P. Problem run in which philosophers don'tdeadlock, but it is not the case that each philosopher gets to eat infinitely often.
• $\square \left(\left({l}_{0}{r}_{2}\right)\left({l}_{1}{r}_{0}\right)\left({l}_{2}{r}_{1}\right)\right)$
• $◇\left({l}_{i}{r}_{i}\right)$
• $\left(\square ◇\left({l}_{0}{r}_{0}\right)\square ◇\left({l}_{1}{r}_{1}\right)\square ◇\left({l}_{2}{r}_{2}\right)\right)$
• Here are two solutions.
• $\square \left(\left({l}_{0}{l}_{1}{l}_{2}\right)\left({r}_{0}{r}_{1}{r}_{2}\right)\right)$
• $\square ◇\left(\left({l}_{0}{r}_{0}\right)\left({l}_{1}{r}_{1}\right)\left({l}_{2}{r}_{2}\right)\right)$
• This simply says that it never gets stuck in oneparticular fork configuration. There would be many if statements, one per configuration, and this is abbreviated. $\square \left(\left(\left({l}_{0}{l}_{1}{l}_{2}\right)◇\left({l}_{0}{l}_{1}{l}_{2}\right)\right)\left(\left({l}_{0}{l}_{1}{l}_{2}{r}_{2}\right)◇\left({l}_{0}{l}_{1}{l}_{2}{r}_{2}\right)\right)\text{}\right)$
• There are many possibilities. One is wherephilosopher 0 repeatedly eats, grabbing the forks so quickly that neither other philosopher has a chance tograb one that is shared with him.

#### Questions & Answers

where we get a research paper on Nano chemistry....?
nanopartical of organic/inorganic / physical chemistry , pdf / thesis / review
Ali
what are the products of Nano chemistry?
There are lots of products of nano chemistry... Like nano coatings.....carbon fiber.. And lots of others..
learn
Even nanotechnology is pretty much all about chemistry... Its the chemistry on quantum or atomic level
learn
da
no nanotechnology is also a part of physics and maths it requires angle formulas and some pressure regarding concepts
Bhagvanji
hey
Giriraj
Preparation and Applications of Nanomaterial for Drug Delivery
revolt
da
Application of nanotechnology in medicine
what is variations in raman spectra for nanomaterials
ya I also want to know the raman spectra
Bhagvanji
I only see partial conversation and what's the question here!
what about nanotechnology for water purification
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
Damian
yes that's correct
Professor
I think
Professor
Nasa has use it in the 60's, copper as water purification in the moon travel.
Alexandre
nanocopper obvius
Alexandre
what is the stm
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
Rafiq
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
Damian
How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
LITNING
scanning tunneling microscope
Sahil
how nano science is used for hydrophobicity
Santosh
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
Rafiq
what is differents between GO and RGO?
Mahi
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
Rafiq
if virus is killing to make ARTIFICIAL DNA OF GRAPHENE FOR KILLED THE VIRUS .THIS IS OUR ASSUMPTION
Anam
analytical skills graphene is prepared to kill any type viruses .
Anam
Any one who tell me about Preparation and application of Nanomaterial for drug Delivery
Hafiz
what is Nano technology ?
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
Is there any normative that regulates the use of silver nanoparticles?
what king of growth are you checking .?
Renato
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
why we need to study biomolecules, molecular biology in nanotechnology?
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
why?
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
Got questions? Join the online conversation and get instant answers!