All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Logic
Numbered Balls in Test Tubes (Posted on 2020-01-06) Difficulty: 2 of 5
Three test tubes contain numbered balls. The first and last of the tubes can contain three balls each, but the middle tube can hold only two. They start out in the configuration shown at left, and your task is to move one ball at a time from one tube to another without exceeding the tube's capacity, until the numbered balls are in the configuration on the right.

What's the minimum number of moves of individual balls and what's the sequence of moves?

 | |         |2|          | |         | |
 | |   | |   |4|  ====>   |2|   | |   |4|
 |1|   |5|   |3|          |5|   |1|   |3|
  =     =     =            =     =     =

From Daily Brain Games calendar 2019, by HAPPYneuron, Andrews McMeel Publishing, Kansas City, MO. Puzzle for November 23.

See The Solution Submitted by Charlie    
Rating: 4.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
soln | Comment 1 of 3
Being disinclined to hard thinking, I wrote a code that made random legal moves. After a lot of tries it did it in 7 moves:

============   index=  0 move= 0 (initial state)


  | |       |2|

  | |  | |  |4|

  |1|  |5|  |3|


============   index=  1 move= 3 (column 1 gets from 2)


  | |       |2|

  |5|  | |  |4|

  |1|  | |  |3|


============   index=  2 move= 6 (column 2 gets from 3)


  | |       | |

  |5|  | |  |4|

  |1|  |2|  |3|


============   index=  3 move= 1 (column 2 gets from 1)


  | |       | |

  | |  |5|  |4|

  |1|  |2|  |3|


============   index=  4 move= 2 (column 3 gets from 1)


  | |       |1|

  | |  |5|  |4|

  | |  |2|  |3|


============   index=  5 move= 3 (column 1 gets from 2)


  | |       |1|

  | |  | |  |4|

  |5|  |2|  |3|


============   index=  6 move= 3 (column 1 gets from 2)


  | |       |1|

  |2|  | |  |4|

  |5|  | |  |3|


============   index=  7 move= 6 (column 2 gets from 3)


  | |       | |

  |2|  | |  |4|

  |5|  |1|  |3|


 imin =    7

(it is interesting that 3 and 4 are to be ignored completely)

Edited on January 7, 2020, 8:43 am
  Posted by Steven Lord on 2020-01-07 06:51:52

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (9)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information