
90
improvement in memory usage when exploring the solution space in the depth-first manner in
comparison with the breadth-first approach. Memory used (in bytes) is computed with the help
of a separate thread measuring memory at frequent intervals using the methods totalMemory()
and freeMemory(). The graphs for the results obtained are shown in Figure 3.
Memory consumption is more in BFA than in DFA. This is due to the fact that at a time,
only one branch is explored and memory is freed before moving to the next branch. Moreover,
the plotted graphs show a decrease in the average execution time and used memory as the size
of the permutation increases ...