No-one has got the correct answer yet. It's a simple arithmetic question.We are confusing the OP's question with other similar questions which was:
Nothing to do with the scores except my example was if every ball was potted individually and legally to bring the frame to a conclusion (not including the final black which isn't mandatory and depends on the scores).
Forget fouls, concessions, refereeing decisions. Just pots by the winner.
No need to over complicate it.