minimum_row_length function