The original question includes a diagram: A zig-zag path of six upstrokes and six downstrokes rising from and returning to a dashed horizontal 'sea level' line, never dipping below it; a key shows an upstroke as a line rising left to right and a downstroke as one falling left to right.
This consists of upstrokes which go upwards from left to right, and downstrokes which go downwards from left to right. The example shown has six upstrokes and six downstrokes. The horizontal line at the bottom is known as sea level.
A mountain profile of order n consists of n upstrokes and n downstrokes, with the condition that the profile begins and ends at sea level and never goes below sea level (although it might reach sea level at any point). So the example shown is a mountain profile of order 6.
Mountain profiles can be coded by using U to indicate an upstroke and D to indicate a downstroke. The example shown has the code UDUUUDUDDUDD. A sequence of U's and D's obtained from a mountain profile in this way is known as a valid code.
Which of the following statements is/are true?
I If a valid code is written in reverse order, the result is always a valid code.
II If each U in a valid code is replaced by D and each D by U, the result is always a valid code.
III If U is added at the beginning of a valid code and D is added at the end of the code, the result is always a valid code.
- Anone of them
- BI only
- CII only
- DIII only
- EI and II only
- FI and III only
- GII and III only
Show the answer and worked solution
- Anone of them
- BI only
- CII only
- DIII only
- EI and II only
- FI and III only
- GII and III only