I am preparing for the exam on Theory of Programming class. Now I am trying to solve the task from the sample paper:
Task description starts here
Given the following problem: A problem is given by its specification:
Let S denote the following program:
Write down the conditions that are sufficient to prove that the given S program solves the given problem. Prove that S is a solution of the given problem. Detailed explanation is required.
Task description ends here
I tried to solve this task as sequence according to this:
My question: Am I on the right path? If yes, what should I take instead of S2? If I am on the wrong path - what should I do to solve this task?
It would be great if you could suggest the book, webpage, video tutorial which contains similar tasks.