The 3x + 1 Problem and its Generalizations