Book Problem

(CAT 1990)

The pages of a book are numbered 0, 1, 2 … upto M, M>0. There are four categories of instructions that direct a person in positioning the book at a page. The instruction types and their meanings are :
1. OPEN : Position the book at page No. 1
2. CLOSE : Position the book at page No. 0
3. FORWARD, n :From the current page move forward by n pages; if, in this process, page number  M is reached, stop at M.
4. BACKWARD, n : From the current page, move backward by n pages; if in this process, page
number 0 is reached, stop at page number 0.
In each of the following questions, you will find a sequence of instructions formed from the above categories. In each case, let n1 be the page number before the instructions are executed and n2 be the page number at which the book is positioned after the instructions are executed.

1. FORWARD, 25 ; BACKWARD, 10.
Which of the following statements is true?
(a) n1 = n2 if M = 10 and n1 = 0
(b) M = 20 provided n1 > 0
(c) n1 > 30 provided M = 900
(d) n1 = 37 provided M = 25

2. BACKWARD, 5; FORWARD, 5. Which of the following statements is true about the above set of
instructions?
(a) n1 = n2 provided n1 ≥ 5
(b) n1 = n2 provided n1 > 0
(c) n2 = 5 provided M > 0
(d) n1> n2 provided M > 0

3. FORWARD, 10; FORWARD, 10. Which of the following statements about the above instructions
is true?
(a) n2 – n1 = 20 only if n1 = 0
(b) n2 – n1 = 20 if M > 20 and n1 = 1
(c) n2 – n1 = 10 if M = 21 and n1 = 0
(d) n2 > n1 if M > 0

4. FORWARD, 5; BACKWARD, 4. Which of the following statements about the above instructions
is true?
(a) n2 = n1 + 4 Provided 1 < n1 < 7
(b) n2 = n1 provided M < 6
(c) n2 = n1+1 provided M – n1 > 5
(d) n2 – n1< 0 provided M > 0

For the answers click here.

Comments

Popular posts from this blog

Answers for CAT 2006

Two traders: Chetan and Michael

Answers for CAT 2007