QI: The Collatz conjecture function is defined for a positive integer m as follows. (COO1) g(m) = 3m+1 if m is odd = m/2 if m is even =1 if m=1 The repeated application of the Collatz conjecture function, as follows: g(n), g(g(n)), g(g(g(n))), ... e.g. If m=17, the sequence is 1. g(17) = 52 2. g(52) = 26 3. g(26) = 13 4. g(13) = 40 5. g(40) = 20 6. g(20) = 10 7. g(10) = 5 8. g(5) = 16 9. g(16) = 8 10. g(8) = 4 11. g(4) = 2 12. g(2) = 1 Thus if m=17, apply the function 12 times in order to reach m=1. Use Recursive Function.

Operations Research : Applications and Algorithms
4th Edition
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Wayne L. Winston
Chapter2: Basic Linear Algebra
Section: Chapter Questions
Problem 15RP
icon
Related questions
Question
Ql: The Collatz conjecture function is defined for a positive integer m as
follows. (COO1)
g(m) = 3m+1 if m is odd
= m/2 if m is even
=1 if m=1
The repeated application of the Collatz conjecture function, as follows:
g(n), g(g(n)), g(g(g(n))), ...
e.g. If m=17, the sequence is
1. g(17) = 52
2. g(52) = 26
3. g(26) = 13
4. g(13) = 40
5. g(40) = 20
6. g(20) = 10
7. g(10) = 5
8. g(5) = 16
9. g(16) = 8
10. g(8) = 4
11. g(4) = 2
12. g(2) = 1
Thus if m=17, apply the function 12 times in order to reach m=1. Use
Recursive Function.
Transcribed Image Text:Ql: The Collatz conjecture function is defined for a positive integer m as follows. (COO1) g(m) = 3m+1 if m is odd = m/2 if m is even =1 if m=1 The repeated application of the Collatz conjecture function, as follows: g(n), g(g(n)), g(g(g(n))), ... e.g. If m=17, the sequence is 1. g(17) = 52 2. g(52) = 26 3. g(26) = 13 4. g(13) = 40 5. g(40) = 20 6. g(20) = 10 7. g(10) = 5 8. g(5) = 16 9. g(16) = 8 10. g(8) = 4 11. g(4) = 2 12. g(2) = 1 Thus if m=17, apply the function 12 times in order to reach m=1. Use Recursive Function.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Function Arguments
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole