azarmuradli 0 Report post Posted March 26, 2021 Can anyone please help me to answer this question? We investigated a program which is probably used as one component of a bigger password breaking algorithm. We determined that the program can input arbitrary N-bit queue and for actual N-bit input also the program output will be always N bits long. Additionally we noticed that the longer program input is, the longer will be the output calculating time. After performing some repeating tests we also determined that the program working time depends only and exactly on input length, not on the input itself. Finally we fixed some actual working times: -for N=10 - 10.576 seconds; -for N=20 - 11.087 seconds; -for N=25 - 13.544 seconds; -for N=30 - 27.442 seconds; -for N=35 - 1 minute 46.059 seconds; -for N=40 - 9 minutes 10.784 seconds. Task: a) Find the program working time for N=50. b) Please derive the mathematical formula using which is possible to calculate actual working time for arbitrary N. Quote Share this post Link to post Share on other sites
champ 147 Report post Posted March 28, 2021 if you use your datasets to make a regression model, you should be able to roughly approximate the working time when N is 50. if you're looking for more accurate results, then I'd go for some kind of exponential smoothing or such. if you look at your data, then you can clearly define that it is not a linear regression, as it grows faster than it. although no method will give you the exact result especially since your datasets are kinda scanty we can roughly estimate the result: using polynomial regression, my best rough guess is that given that N is 50, working time would be ~1100,94 seconds (or 18 minutes and 20.94 seconds) the formula is: y = 1.2557x2 - 48.993x + 411.34 R² = 0.8443 p.s. I don't know whether that result is correct and you should check if other regressions would produce a better prediction model. 1 Quote Share this post Link to post Share on other sites
pika pika 0 Report post Posted March 31, 2021 On 3/28/2021 at 11:28 PM, patrick13 said: if you use your datasets to make a regression model, you should be able to roughly approximate the working time when N is 50. if you're looking for more accurate results, then I'd go for some kind of exponential smoothing or such. if you look at your data, then you can clearly define that it is not a linear regression, as it grows faster than it. although no method will give you the exact result especially since your datasets are kinda scanty we can roughly estimate the result: using polynomial regression, my best rough guess is that given that N is 50, working time would be ~1100,94 seconds (or 18 minutes and 20.94 seconds) the formula is: y = 1.2557x2 - 48.993x + 411.34 R² = 0.8443 p.s. I don't know whether that result is correct and you should check if other regressions would produce a better prediction model. could you please, explain how you find out that equation? because I found the equation y=13.79x-247.9 p.s. I don't know whether that equation is correct or not Quote Share this post Link to post Share on other sites
champ 147 Report post Posted March 31, 2021 1 hour ago, pika pika said: could you please, explain how you find out that equation? because I found the equation y=13.79x-247.9 p.s. I don't know whether that equation is correct or not Polynomial regression, I’m assuming you were predicting using linear which is not right. 1 Quote Share this post Link to post Share on other sites