Adding methods to calculate the number of trigger flags on each side and fill the...