private int computeMinNumberOfNonConflictedTrianglesRequired(int totalTriangles){
  double sum=0;
  for (int k=totalTriangles; k >= 0; k--) {
    sum+=binomial(totalTriangles,k) * Math.pow(1.0 / 3.0,k) * Math.pow(2.0 / 3.0,totalTriangles - k);
    if (sum > 0.05)     return k + 1;
  }
  return 0;
}

private int computeMinNumberOfNonConflictedTrianglesRequired ( int totalTriangles ) { double sum = 0 ; for ( int k = totalTriangles ; k >= 0 ; k -- ) { sum += binomial ( totalTriangles , k ) * Math . pow ( 1.0 / 3.0 , k ) * Math . pow ( 2.0 / 3.0 , totalTriangles - k ) ; if ( sum > 0.05 ) return k + 1 ; } return 0 ; }
computes the minimum number of non - conflicted triangles required to reject h0 with alpha = 0 . 05
