Ask HN: How do you verify an algorithm’s correctness
The most intuitive way I know to disprove an algorithm is by finding a counter example. But for complex algorithms it can be hard to find a counter example.
Do you have any practical advice? Should I learn formal proofs?
3 comments
[ 96.6 ms ] story [ 827 ms ] threadThen you can use formal methods. For example in Coq you may do something like: