# what are the weakest preconditions of these following statements

what is the meaning of postcondition and weakest postcondition in terms of programing and what are weakest postconditons of following statements.

1. a=2*(b-1)-1   {a>0}
2. b=(c+10)/3    {b>6}
3. a=(a+2*b-1)   {a>1}
4. a=2*b+1;b=a-3 {b<0}

• I suggest repeating the material. They should explain what precondition and weakest precondition mean, hopefully with examples. – Yuval Filmus Sep 16 at 14:51

Let's do the first one. You want to find what condition on $$b$$ will imply $$2(b-1)-1>0$$. All you have to do is solve this inequality.