08282017, 09:48 PM
For task 5 at some point you will overflow the size of an integer. How many levels are we expected to display?
Task 5 bounds

08282017, 09:48 PM
For task 5 at some point you will overflow the size of an integer. How many levels are we expected to display?
08282017, 11:21 PM
Scam overflows at 4,294,967,291 so we could print up to 32 levels
08282017, 11:25 PM
The Scam interpreter is written in C, so whenever C overflows, so will Scam. But the actual point at which Scam overflows depends on the architecture (32 or 64 bit).
09012017, 04:17 PM
What is a reasonable number of levels our program should be able to compute in however long you allow our program to run?
Mine starts to slow down at around 15 levels or so. 20 levels took quite a while.
09012017, 04:26 PM
(09012017, 04:17 PM)SSinischo Wrote: What is a reasonable number of levels our program should be able to compute in however long you allow our program to run? Well, I told you to implement a recursive process. The question is, are there any redundant computations (like fib)?
09012017, 04:36 PM
(09012017, 04:26 PM)lusth Wrote:(09012017, 04:17 PM)SSinischo Wrote: What is a reasonable number of levels our program should be able to compute in however long you allow our program to run? There are many redundant computations. For each new level printed, the entire triangle above the level must be calculated again due to my recursive process. Of course, this function would be a great candidate for memoization/dynamic programming... but we aren't allowed any lists or arrays. Am I going about this the wrong way then?
09012017, 05:07 PM
No, with redundant computations, behavior is likely exponential, so a slowing down even at small numbers of levels is to be expected.
09072017, 12:26 AM
With recursion for this task, after 15 levels, is the display for the following levels expected to take some time to display due to recursion on pascal and computations?
Viserion was like the middle child, always forgotten about and dealt a bad hand generally, even in and after death. R.I.P. Viserion.... well.... sorta.
09072017, 12:28 AM
(09072017, 12:26 AM)NicoleT Wrote: With recursion for this task, after 15 levels, is the display for the following levels expected to take some time to display due to recursion on pascal and computations? yis. ur good.
UA ACM Vice President
ACM has biweekly meetings Tuesdays at 5:15pm We're UA's best organization for CS majors (website) Join us on Slack for all kinds of discussion channels (including one for CS403) 
« Next Oldest  Next Newest »
