2The 3 water jug problemThere are three jugs on the table - 3, 5, and 8 ltr. The first two are empty, the last contains 8 ltr. of water. By pouring water from one glass to another make at least one of them contain exactly 4 ltr. of water.
4The 3 water jug solution Move from 3 to 1 Move from 1 to 2 Final - Jug1: 3, Jug2: 1, Jug3:4
5The Tower of HanoiThe Tower of Hanoi or Towers of Hanoi is a mathematical game or puzzle. It consists of three rods, and a number of disks of different sizes which can slide onto any rod. The puzzle starts with the disks in a neat stack in ascending order of size on one rod, the smallest at the top, thus making a conical shape.The objective of the puzzle is to move the entire stack to another rod, obeying the following rules:Only one disk may be moved at a time.Each move consists of taking the upper disk from one of the rods and sliding it onto another rod, on top of the other disks that may already be present on that rod.No disk may be placed on top of a smaller disk.
7The Tower of Hanoi (Solution) If Disks are 3:Move from Src to DstMove from Src to AuxMove from Dst to AuxMove from Aux to SrcMove from Aux to Dst
8The Tower of Hanoi (Solution) If Disks are 4:Move from Src to AuxMove from Src to DstMove from Aux to DstMove from Dst to SrcMove from Dst to AuxMove from Aux to Src
9The Tower of Hanoi (Solution) Move top N-1 disks from Src to Aux (using Dstas intermediary peg).Move bottom disk from source to destination.Move N-1 disks from Aux to Dst (using Src as an intermediary peg).