Pages

Showing posts with label XLRI. Show all posts
Showing posts with label XLRI. Show all posts

September 14, 2011

Reasoning on Instruction Sets

There are three bottles of water A, B, C whose capacities are 5 liters, 3 liters and 2 liters respectively. For transferring water from one bottle to another and to drain out the bottle, there exists a piping system. The flow thorough these pipes is computer controlled. The computer that controls the flow through these pipes can be fed with three types of instructions, as explained below

Instruction type

Explanation of the instruction

FILL (X, Y)

Fill bottles labeled X from the water in bottle labeled Y, where the remaining capacity of X is less than or equal to amount of water in Y.

EMPTY (X,Y)

Empty out the water in bottle labeled X into bottle labeled Y, where the amount of water in X is less than or equal to remaining capacity of Y.

DRAIN (X)

Drain out all the water contained in bottle labeled X.

Initially A is full with water and B and C are empty.

Q1. After executing a sequence of three instruction bottle A contains one liter of water. The first and the third of these instructions is given below

First instruction FILL (C, A)

Third instruction FILL (C,A)

Which of the following statesman about the instruction is true?

i) The second instruction is FILL (B,A)

ii) The second instruction is Empty (C,B)

iii) The second instruction transfer water from B to C

iv) The second instruction involves using the water in bottle A.

Q2. Consider the same sequence of three instructions and the same initial state mentioned above. Three more instructions are added at the end of the above sequence to have A contain 4 liters of water. In this total sequence of six instructions, the fourth one is DRAIN (A). this is the only DRAIN instruction in the entire sequence. At the end of the execution of the above sequence, how much water is contained in C?

i) 1

ii) 2

iii) 0

iv) None of these

September 8, 2011

Class Schedule of a School

In a school there are 5 groups of subject combinations for the students of new admission of Arts and Humanities department.
Subject Groups are

A -> Sociology, History, Anthropology, Political Science
B - > History, Geography, Sociology, Political Science
C - > Geography, Economics, Eco-Geography, Political Science
D - > Geography, Mathematics, Economics, Statistics
E - > Statistics, Mathematics, Economics, Computer

There are one teacher in each subjects. Class duration is four hours from 8 a.m to 12 a.m and each class is one hour. There are no gap between two periods.
A clerk of that school schedule a class routine. But history teacher said “I shall take first period but not last period”. Geography teacher said “ I will not take last period”. Sociology teacher said “ I will come to school at 10 a.m.

Not the clerk have to reschedule the routine and you have to answer the following questions::

Q1. Which subject will be taught in the first period?
A. Sociology
B. History / Mathematics
C. Geography / History
D. None of these

Q2. Which subject will be taught in the second period?
A. History
B. Economics
C. Geography
D. None of these

Seven Friends in a row

Seven friends A, B, C, D, E, F and G are standing in a row such that

i) A is immediate right to G

ii) G is fourth to the right of C

iii) D was between B and F

iv) C which was third to the left of B, is at one of the end

Which is the right position of E?

A . Left of A

B. Left of F

C. Between F and G

D. None of these