Practice question · Put in order
Order the steps of using a program to investigate a conjecture.
- Run it and inspect any cases that fail
- If none fails, record the result as evidence rather than proof
- State the conjecture precisely enough to test
- Write a program that checks it on many cases
- Seek a general proof, or a counterexample beyond the range tested
Hints
- A vague statement cannot be tested by machine at all.
- The computation is the middle of the process, never the end of it.
Show the answer
- State the conjecture precisely enough to test
- Write a program that checks it on many cases
- Run it and inspect any cases that fail
- If none fails, record the result as evidence rather than proof
- Seek a general proof, or a counterexample beyond the range tested
Why
Precision comes first because the machine needs a decidable question; the computation supplies evidence or a counterexample; and the mathematics resumes afterwards. Euler's prime-generating polynomial survived 40 cases and then failed, evidence never closes the question.
Practise Programming for Mathematics
The app has 6 more questions on this lesson, and keeps your place in the course. Mathematics I is free to start.
More questions on Programming for Mathematics
- Sort each task by the kind of computation it needs.
- In a Monte Carlo estimate of pi, points are scattered in a unit square containing a quarter-circle and the…
- A test suite passes and the program is wrong. Which of these does testing structurally fail to catch?
- Complete the description of a simulated result.
- Testing a program on a hundred inputs and finding no failures does not prove it correct. Why is testing…
- Because a computer performs arithmetic faster and more reliably than a human, a numerical result it prints…