Formal mathematical argument that an algorithm meets its specification, i.e. it always produces the correct output for any permitted input.
In order to find the diameter of a tree I can take any node from the tree, perform BFS to …
algorithm tree graph-theory proof-of-correctnessI am trying to compare 2 algorithms. I thought I may try and write a proof for them. (My math sucks, …
algorithm proof proof-of-correctnessint i, temp; a is an array of integers [1...100] i = 1; while i < 100 if a[i] > a[i+1] temp = …
algorithm loops proof loop-invariant proof-of-correctness