Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

program in Python3 2. Implement an algorithm to explore and analyze the Collatz 3n+ 1 Conjecture, a mathematical hypothesis that has not been proven or

program in Python3
image

2. Implement an algorithm to explore and analyze the Collatz 3n+ 1 Conjecture, a mathematical hypothesis that has not been proven or disproven. The conjecture applies the following rules to any positive integer: . If the number is even, divide it by 2. If the number is odd, multiply it by 3 and add 1. Repeat the process with the new value until the new value becomes 1. The conjecture states that no matter what value you start with, you will always eventually reach 1. 3. Assignment Details: A. Implement the Collatz Sequence Generator: B. Analyze Sequence Lengths: For each number in the range 1 to 10,000,000, calculate the length of its Collatz sequence then store the lengths in a suitable data structure. It may take 3 - 8 minutes in a normal computing environment. C. Identify Top 10 Sequences: Display the top 10 starting numbers whose Collatz sequences are the longest within the given range. D. Reflection and Theory: Watch the video referenced above and write a brief reflection on why the Collatz Conjecture is hard for both humans and computers to prove. Expected Output: For [1.. 1,000,000], 837799 has the highest data elements in the sequence. It has 525 elements and its largest element is 2974984576. The list below shows the top 3 numbers [833799, 626331, 939497, ...] 1. Collatz sequence for 837799 525 2974984576 2. Collatz sequence for 626331: 509 7222283188 3. Collatz sequence for 939497 507 7222283188

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

A Survey of Mathematics with Applications

Authors: Allen R. Angel, Christine D. Abbott, Dennis Runde

10th edition

134112105, 134112342, 9780134112343, 9780134112268, 134112261, 978-0134112107

More Books

Students also viewed these Algorithms questions

Question

What is an investment activity and how are its expenses deducted?

Answered: 1 week ago

Question

=+How sensitive is Pats decision?

Answered: 1 week ago

Question

How intense is the grief for them?

Answered: 1 week ago