Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

1234portion

  • 4 years ago

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

  • This Question is Open
  1. bmp
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    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.

  2. chribonn
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

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

  3. swdalb
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    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.

  4. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy