- Problem 1 The Collatz Conjecture Defined Sequence With The Following Recursive Formulas Xk 2 If Xk Is Even Xk 1 F X 1 (72.97 KiB) Viewed 42 times
Problem 1: The Collatz conjecture Defined sequence with the following recursive formulas xk/2, if xk is even Xk+1 = f(x)
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Problem 1: The Collatz conjecture Defined sequence with the following recursive formulas xk/2, if xk is even Xk+1 = f(x)
Problem 1: The Collatz conjecture Defined sequence with the following recursive formulas xk/2, if xk is even Xk+1 = f(x) = . 13xk+1. ifxk is odd and initial value x₁ = n. We terminate the sequence whenever the value 1 is encountered in iteration, and the total length of generated sequence (including this 1 and the initial value) is called the stopping time. The famous Collataz conjecture states: "Regardless of the initial value n chosen, the stopping time is always finite. " Until today, this conjecture has not been rigorously proved, while so far no counter-example has ever been found. Now do the following in Mathematica to explore this conjecture: 1. Define a function named CollatzStoppingTime, whose input is the initial value n, and output is the stopping time. (Hint: There are many ways to do it, and the convenient and elegant way might be using NestWhileList) 2. Use the function to generate a list named stoppingtimeList, whose k-th element corresponds to the stopping time of initial value k, and the total length is 10^5 (may take some time to run). Suppress output at this step. 3. Plot the histogram of stoppingList, to see the distribution of stopping times. References: Wikipedia link and Lecture Videos from Professor Christopher Davis (video 7 and 8 in playlist)