Avuya Mxoli

Avuya Mxoli

  • NA
  • 236
  • 206.1k

The collatz conjecture

Aug 11 2011 10:51 AM
I was asked to come up wth pseudocode to demonstrate the above mentioned algorithm. Bacically you pick a positive number
and if its odd you triple it and add one, else you half it. I did all that but now I have to show how many items are in the series and what is the largest one. I also can stop the series when 4 is computed as it leads us to the ground state. meaning it repeats the numbers 421421...(and i include this explanation only to be clear, i dnt want to assume that everyone knows it as I also found out about it in class today)
Thanks in advance

Answers (2)