Question: Consider a string of n digits. How many different arithmetic expressions can be formed by placing + signs between digits?For example, from 123 we can
Consider a string of n digits. How many different arithmetic expressions can be formed by placing + signs between digits?For example, from 123 we can obtain 123,1 + 23,12 + 3,1 + 2 + 3.Consider the program: for each arithmetic expression e formed from digit string s of length n evaluate(e)Suppose that it takes 109seconds to execute evaluate(e) for each e. If n= 100, how long will the program run? Ignore the time needed to generate the next expression.It may be convenient to think in terms of units other than seconds. For your convenience:One year is approximately 2108seconds.Age of earth is approximately 4.543 billion years, or 91017seconds.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
