Question: as a function of N while running the code on my own laptop. The time increases linearly with the number of digits, so in Big
as a function of while running the code on my own laptop. The time increases linearly with
the number of digits, so in Big O notation, its performance can be written as
f Using time module of Python, evaluate the algorithmic efficiency of your code in part d
You need to make the similar figure shown above on your computer.
g How long will running your code for take? You do not run your code for this
big number of digits! Use extrapolation to estimate the running time. Do you think we need
to improve the performance of our code to execute it for large numbers?
Let's improve the performance of the code. We can express any number in the base numeral
system and Any decimal number can be expressed with a series of zeroes and ones :
Decimal number
For example, So in the binary system is
h Write your own function which takes a decimal number and return the number in the
binary system. Do not use bin syntax of python.
In part b you derived that so writing in the binary system,
we get:
dots
For clarity if we want to find it can be explained as follows:
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
