TCS
Company
there r three buckets..of 8,5 n 3 litres…out of which only 8 ltr bucket is fully filled…u hv to fill exact 4-4 ltr liquid in 8 and 5 litre bucket by using only these buckets in minimm num of steps…..
Read Solution (Total 9)
-
- Initial Step-1 Step-2 Step-3 Step-4 Step-5 Step-6 Step-7
8 Lt. -> 8 3 3 6 6 1 1 4
5 Lt. -> 0 5 2 2 0 5 4 4
3 Lt. -> 0 0 3 0 2 2 3 0
Minimum Number Of Steps Required : 7 - 12 years agoHelpfull: Yes(67) No(9)
- initially 8 0 0
steps state of buckets
1: 3 5 0
2 3 2 3
3 6 2 0
4 6 0 2
5 1 5 2
6 1 4 3
7 4 4 0
So,total of 7 steps - 12 years agoHelpfull: Yes(21) No(1)
- minimum 7 step is ans..
initially (8,0,0)
1st (3,5,0)
2nd (3,2,3)
3rd (6,2,0)
4th (6,0,2)
5th (1,5,2)
6th (1,4,3)
7th (4,4,0) - 12 years agoHelpfull: Yes(14) No(2)
- ans is (2^n)-1 here n=3 so number of step required is (8-1)=7
- 12 years agoHelpfull: Yes(11) No(7)
- 8 - -
- 5 3
3 5 -
4 4 - i hope u people got the sltn - 12 years agoHelpfull: Yes(4) No(22)
- 8 steps will b rqd
- 12 years agoHelpfull: Yes(4) No(16)
- Ans. Total 8 steps (Minimum)
Buckets (8L,5L,3L) for below:
Initial (8,0,0)
1. Fill 3L Bucket. (5,0,3)
2. Pour 3L in 5L Bucket. (5,3,0)
3. Fill 3L Bucket from 8L Bucket again. (2,3,3)
4. Fill 5L Bucket from 3L until it is full. (2,5,1)
5. Empty 5L Bucket in 8L Bucket. (7,0,1)
6. Empty 3L Bucket in 5L Bucket. (7,1,0)
7. Fill 3L Bucket from 8L Bucket. (4,1,3)
8. Empty 3L Bucket in 5L Bucket. (4,4,0)
Hence done.
- 12 years agoHelpfull: Yes(4) No(6)
- initial > 8 0 0
1: 3 5 0
2: 3 2 3
3: 1 4 3
4: 4 4 0
minimum step required:4 - 12 years agoHelpfull: Yes(3) No(18)
- 8 lit->8 5 4 4
5 lit->0 0 1 4
3 lit->0 3 3 0
hence no of steps= 4 - 12 years agoHelpfull: Yes(2) No(46)
TCS Other Question