The algorithm based on the UBQP model (Aref et al. 2018) for computing the exact value of frustration index (also called line index of balance)