Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Code in Python please withtve output 2-1-B Syracuse Conjecture Douglas Hofstadter's Pulitzer-prize-winning book, Gdel, Escher, Bach, poses the following mathematical puzzle on pages 400-401. 1.

image text in transcribed Code in Python please withtve output
2-1-B Syracuse Conjecture Douglas Hofstadter's Pulitzer-prize-winning book, Gdel, Escher, Bach, poses the following mathematical puzzle on pages 400-401. 1. Pick a positive number n 2. If n is even, divide it by 2. 3. If n is odd, multiply it by 3 and add 1 4. Continue this process until n is 1. The number n will travel up and down but eventually end at 1 (at least for all numbers that have ever been tried-nobody has ever proved that the sequence will always terminate) The sequence of values of n is sometimes called a Hailstone sequence, because hailstones also travel up and down in the atmosphere before falling to earth. It is also called the 3n+1 problem; Collatz conjecture; Ulam conjecture; Kakutani's problem; Thwaites conjecture; Hasse's algorithm; or the Syracuse problem. Write a function that takes a single argument with formal parameter name n, prints out the hailstone sequence starting at n, and returns the number of steps in the sequence. For a demo, use 5: show the steps in Online Text. Then, determine how many steps 27 takes and paste just the number of steps in Online Text. For ten points extra credit, do one of the following: 1. Prove the Conjecture that ALL numbers eventually reach 1 2. Disprove the Conjecture. The simplest way to do this is to provide just one counter-example. For 100 points, provide BOTH proofs. Submission status

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

Step: 3

blur-text-image

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

Database Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions

Question

Define the term Working Capital Gap.

Answered: 1 week ago