Describe an algorithm that uses only assignment statements


Problem:

Question- Describe an algorithm that uses only assignment statements that replaces (x, y, z) with (y, z, x). What is the minimum number of assignment statements needed?

By solutions, the answer is like that.
a:=x, b:=y, c:=z, x:=y, y:=z, z:=x, y:=a, z:=b, x:=c
Then it needs minimum nine assignment statement.
(It's problem of 12E of Chapter 3.1, DIscrete Mathematics and its applications 7th edition).

But I don't understand. It seems that it's just four. Because, I think that a:=x, x:=y, y:=z, z:=a can be a solution. Especially I don't understand last three statements. Why am I need them? If it is wrong, what's the wrong point?

Please Explain don't just write the answer.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Describe an algorithm that uses only assignment statements
Reference No:- TGS0893813

Expected delivery within 24 Hours