

So let’s move the smallest disk to rod C: Our first move can only involve the smallest disk since there is only one stack and this disk is at the top of it. Let’s say the goal is to move all three disks to rod C (which rod we choose as our destination doesn’t matter). We start with all three disks stacked on one of the three rods (rod A in this case): Let’s see an example of the puzzle in action when there are a total of three disks. In each move, we must take the uppermost disk from one of the stacks and move it on top of another stack or to an empty rod.A disk cannot be placed on top of another disk whose size is smaller.

This place can be in different pile or in an auxiliary place if it exists (Hempel & Schmiedel, 2006). A step is the move of an element of data structure to another place. The vertices of G represent the elements of the pile the arcs of G represent the order in which the elements are piled up. The directed graph G = (V, A) is called a pile, if and only if G is finite and does not contain a loop or a cycle. A cycle in a directed graph G = (V, A) is a closed path in G. For G 1 = (V 1, A 1) and G 2 = (V 2, A 2) the union of G 1 and G2 is defined as G 1 U G 2:= (V 1 U V 2, A 1 U A 2). d G+(v) represents numbers of outgoing arcs of v and d G-(v) numbers of incoming arcs of v respectively. For these authors:įor a given directed graph G = (V, A) and its vertices v ϵ V can be used the following notations: N G+(v) is the set of all successors of v, N G-(V) is the set of all predecessors of v. According (Hempel & Schmiedel, 2006) to describe pile problems more precisely is highly recommended using graph theory. Puzzles are connected with graphs, it means can be modeled by using graphs, vertices of the graph represent configuration and graph edges define possible moves of the puzzle (Cull, Merril and Van, 2013). All of these problems can be modeled by applying basic principles of the Towers of Hanoi. They present a common technique for getting the non-recursive implementation by considering minimum steps. These authors analyzed three versions of parallelism considering two factors: the order of moves of disks and the resource utilization of pegs. Lu & Dillon (1995) discuss a parallelism implementation of Towers of Hanoi on which is permitted concurrent moves of disks in a single step. A container pre-marshaling problem is reported in (Shan-Huen & Tsan-Hwan, 2012) which purpose is finding a set of container movements to reach a final container arrangement by satisfying certain restrictions. Some examples are mentioned in (Hempel and Schmiedel, 2006): imagine a port where there are several containers and is necessary to load or to unload loading from the containerships, or suppose large concrete parts for a modern bridge or construction of buildings, or the shunt of trains in a marshaling yard, or patient plays. Pile Problems Applications in Logistics Management Main contribution of this chapter is demonstrate game theory, specifically Towers of Hanoi, can be applied to solve logistics problems, and an approach for the generalization of basic Hanoi Tower form, three discs to four discs, by means of genetic algorithms implemented in C language.ġ.1. Finally, we discussed preliminary results and present our conclusions.

Firstly, we discussed how pile problems applications impact in logistics, later we discussed the Hanoi Towers application in Logistics Management, its mathematical model and common solutions applying different paradigms (iterative, recursive, and heuristics), we present an in depth analysis in genetic algorithms, later we present the analysis of a genetic algorithm applied to solve basic Hanoi Tower game (three pegs three discs) implemented in C language, and later we discuss its generalization from three to four discs. AbstractIn this chapter we discussed the application of Towers of Hanoi in logistics management applications, for this purpose.
