Soundness and Completeness of a algorithm -
i confused soundness , completeness of algorithms.
a sound algorithm never return false result. possible algorithm doesn't return anything?
a complete algorithm address inputs. dose result algorithm return affect completeness of algorithm. example, if sorting algorithm take inputs , return list, doesn't guarantee return sorted list, unsound algorithm, however, complete?
let s set of right answers.
a sound algorithm never includes wrong answer in s
, might miss few right answers. => not "complete".
a complete algorithm should every right answer in s
: include complete set of right answers. might include few wrong answers. might return wrong answer single input. => not "sound".
so,
a sound algorithm never return false result. possible algorithm doesn't return anything?
it must right. can return nothing.(missed part)
for example, if sorting algorithm take inputs , return list, doesn't guarantee return sorted list, unsound algorithm, however, complete?
well, depends.
if returned lists algorithm forms set s
, it's complete because every correct answer included. doesn't mean every single output correct. e.g. s = {b1, b2}
. assume that, input a1
, correct output b1
; input a2
, correct output b2
. if algorithm returns b2
a1
, b1
a2
, it's complete not sound.
on other hand, if algorithm returns solution b1
both a1
, a2
, it's not complete.
so can't infer whether algorithm complete or not soundness, , vice versa.
Comments
Post a Comment