Problem 1532. SLP Calculation
The SLP Calculation Challenge is to implement SLP sequences and output the result as a string. SLP, Straight Line Program, creates a value based upon two pointers of prior values and one of the operators [ + - * ]. The first value in the sequence is 1 and is assigned pointer 0 (zero based indexing).
Input: SLP_sequence (string)
Output: SLP_value (string)
Example:
Input: SLP_sequence='0+0,1+1,2*2,3+1,3*4,5-3,6+0,5*1,5*7,9+8,9*10';
Produces:( Index 0 is 1 )
2, 4, 16, 18, 288, 272, 273, 576, 78624, 79200, 6227020800
Output: '6227020800'
The complexity to this Challenge is some solutions will exceed 2^64 and have eps>1.
Prior to viewing the link: What number is 2568 digits long and has 249 trailing zeros?
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers7
Suggested Problems
-
Rosenbrock's Banana Function and its derivatives
148 Solvers
-
Find the largest value in the 3D matrix
1447 Solvers
-
We love vectorized solutions. Problem 1 : remove the row average.
790 Solvers
-
Operate on matrices of unequal, yet similar, size
181 Solvers
-
I've got the power! (Inspired by Project Euler problem 29)
110 Solvers
More from this Author294
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!