Question: The second Xenoravon module takes an integer input and outputs a value that resembles the length of a Collatz Conjecture sequence. Although it isn't likely
The second Xenoravon module takes an integer input and outputs a value that resembles the
length of a Collatz Conjecture sequence. Although it isn't likely the Xenoravons know anything
about Lothar Collatz, in he made a conjecture about whether two simple mathematical
operations will eventually transform every positive integer into The operations that are part of his
conjecture are:
If the number is even, divide it by two.
If the number is odd, triple it and add one.
For example, given the number since it is odd, you would triple it and add to get one
step Since is even, you will divide it by two to get two steps Since is even, you would
divide it by two to get three steps Since is even, you would divide it by two and get four
steps FInally, since is even, you divide it by two and end up with one steps So the length of
the Collatz Conjecture sequence for the input of is
There is currently no proof that these operations will eventually transform all positive integers to the
value but that is not your problem the Xenoravons appear to think it does and are using it for
their coded communications. All you need to do is create a flowchart that will count the number
steps that occur given a specific input integer value, until that value is transformed to become
Your flowchart will take an input and print as its result the number of operations needed to
transform to the value Each bullet point given above is considered a single operation.
Again, once you have perfected your flowchart, you will need to test it by hand on given inputs to
see if it gives the same output that the Xenoravon module gives. Try it on the following inputs and
give the resulting output:
How to make flowchart for this
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
