Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 14 Online
OpenStudy (anonymous):

I am supposed to decide whether an arbitrary computer program finishes running or runs forever

OpenStudy (anonymous):

You can either do an algorithm analysis to check whether or not you are running into a infinite loop or you could try it out empirically. So yeah, in general, it's your call to decide whether or not the program is running forever.

OpenStudy (anonymous):

Given that you are given the data you should be able to "dry run" the program. Infinite loops are not desireable.

OpenStudy (anonymous):

bmp is right, but to know for certain you need to do the algorithm analysis - check all of your for and while loops etc. and make sure each test terminates.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!