BioMed Research International / 2013 / Article / Psdc 1

Research Article

Algorithms of Ancestral Gene Length Reconstruction

Pseudocode 1

/* Assignment values left[ ] and right [ ] */
FL = FALSE;
if (left[l] == 0) { left[a] = left[r]; right[a] = right[r]} else
if (left[r] == 0) { left[a] = left[l]; right[a] = right[l]} else
if (left[l] ≤ left[r]) {
 if (right[l] < left[r]) {
  left[a] = right[l]; right[a] = left[r]; FL = TRUE;
 } else {
  left[a] = left[r]; right[a] = min(right[l], right[r]);
 }
} else {
if (right[r] < left[l]) {
  left[a] = right[r]; right[a] = left[l]; FL = TRUE;
 } else {
  left[a] = left[l]; right[a] = min(right[l], right[r]);
 }
}
/* Assignment values and : is a cost of , is a cost of for all i:
left ≤ ≤ right */
if (FL) diff = right[ ] − left[ ]; else diff = 0;
= min( , + ) + min( , + )
= min(diff + + , + + ), + + , 2 + + )

Article of the Year Award: Outstanding research contributions of 2020, as selected by our Chief Editors. Read the winning articles.