Research Article
OntologyOriented Diagnostic System for Traditional Chinese Medicine Based on Relation Refinement
Algorithm 1
Minimum symptom set extraction.
Input: multiset  Output:  if then  return null;  end  else if then  return . get (0);  end  = generateRatioNum (. size());  Let largest elements of the multiset ;  Let ;  Let element of ;  Mark green all the sets such that = , and remove all copies of from ;  Mark red all the sets such that ;  Mark white all the sets such that < , and remove from ;  While do  if sets are red then  if sets are green then   end  Take (white sets) of the green sets and mark them white;  For each remaining green set , insert in the first element of which is , and change the  mark of to red;  Let ;  change the mark to green for all the sets which have as a representative in , and remove from ;  end  Let be the next white set;  if then  Mark in green;  end  else  Insert in the first element of which is strictly larger than , and mark in red;  end  end 
