The UVa 102: Ecological Bin Packing can be solved using brute-force search, as outlined in the following Java code snippet. Note that, the primary function getOPTConfiguration iterates over all possible bin arrangements, and
The UVa 100: The 3n+1 Problem is about collatz problem, which we have discussed in details in a recent post. The following Java code describes a brute-force algorithm to solve this problem.
This post focuses on Collatz problem, which is also known as, among others, the 3n+1 problem, and the Syracuse problem.
Outline. We begin by introducing Collatz conjecture; afterwards, we presents an algorithm