I am trying to re-write the following pseudocode as the simplest if-else, but am struggling to understand the logic fully.
if (a <= b) then // Here, a <= b.
if (y > b) then P // Here, (a <= b) & (y > b).
else if (x < a) then P // Here, (a <= b) & !(y > b) & (x < a).
else if ((y >= a) & (x <= b)) then Q else R
My interpretations of the pseudocode so far are written in comments above. I think that I have correctly understood the logic of the first three lines of pseudocode.
However, I am not sure how to interpret the logic of the fourth and last line of the pseudocode. I would like help to understand the state(s) of the four variables at the fourth line, as well as how to re-write the pseudocode as the simplest if-else.