1
$\begingroup$

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:

enter image description here

Let S denote the following program:

enter image description here

enter image description here

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:

enter image description here

enter image description here

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.

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.