The true statement about correctness is:
Correctness can be shown through formal logic.
Formal methods in computer science provide a rigorous way to prove that an algorithm meets its specification through mathematical proof, rather than just relying on testing.
While testing is helpful and can provide evidence of correctness for many cases, it cannot guarantee correctness for all possible inputs. Furthermore, correctness typically requires clear specifications to ascertain if an algorithm behaves as intended.
The option stating that correctness cannot be shown through mathematical proof is incorrect, as proofs are foundational to establishing correctness in algorithms.