Let us assume that a disk scheduling algorithm is applied on a storage disk to access several cylinders (numbered as $0,1, \ldots, n$ arranged in ascending order) for some I/O operations. These are received in the order $<q, r, s, t>$.
If the disk head starts from the cylinder $p$, then state the relations among $p, q, r, s$, and $t$ with proper justifications such that both the scheduling algorithms $\text{SSTF}$ and $\text{SCAN}$ perform similarly in terms of the total head movements required.
Note that, in $\text{SSTF (Shortest Seek Time First)}$ the disk head moves to the nearest cylinder among the unaccessed ones at any point. In $\text{SCAN},$ first the disk head accesses all the cylinders while moving toward cylinder $0$ and then the disk head moves toward the other end.