**Water Jugs Problem - 13 july**Six jugs are in a row.

The first three are filled with coke, and the last three are empty.

By moving only one glass, can you arrange them so that the full and the empty glasses alternate?

The first three are filled with coke, and the last three are empty.

By moving only one glass, can you arrange them so that the full and the empty glasses alternate?

Pour coke from 2nd jug yo 5th Jug and put 2nd jug back to its position.

ReplyDeletejust empty the contents of the second glass into the fifth glass and place the second glass back at its place, then you have the desired arrangement of Full and Empty glass alternate to each other

ReplyDeletecontents of jug 2 -> jug 5 will create alternate full and empty glasses.

ReplyDeleteProvision for emptying is there. It will used,

ReplyDeleteYou can move all of them because they aren't in glasses there in jugs

ReplyDeleteThat's what I thought too

DeleteYep!! I agree

Deleteeasy one it took a few seconds and no diagram to figure out

ReplyDelete|C|= coke |_|= empty

|C||C||C||_||_||_|

take the middle coke and pour it into the middle empty then put it back

----------\C\

|C|__|C||_||_||_|

-----------\_\

|C|__|C||_||C||_|

|C||_||C||_||C||_|

just like the penny pyramid problem

This is technically the same as the juice one

ReplyDeleteThe new and designer made shot glasses for use :-

ReplyDeleteThere customized shot glasses are some to given extent home builders the association is quite a big in the period of Online shot glasses time. The home above as well beyond fresh new piece places built on thing are shot glass becoming up has been so legal above in place of well beyond developing it will increase unique shot glasses type or kind out to some extent particular question is real.

The innovative as well as fashionable shot glasses for usage :-

ReplyDeleteThere customized shot glasses are some to given extent home builders the association is quite a big in the period of Online shot glasses time. The home above as well beyond fresh new piece places built on thing are shot glass becoming up has been so legal above in place of well beyond developing it will increase unique shot glasses type or kind out to some extent particular question is real.

What if the glasses are in random position???

ReplyDeleteplease please any one share me the algorithm to solve the above problem as well as the java source code of it..