## Teaser 3121: Top marks

**From The Sunday Times, 17th July 2022** [link] [link]

A teacher is preparing her end of term class test. After the test she will arrive at each pupil’s score by giving a fixed number of marks for each correct answer, no marks for a question that is not attempted, and deducting a mark for each incorrect answer. The computer program she uses to prepare parents’ reports can only accept tests with the number of possible test scores (including negative scores) equal to 100.

She has worked out all possible combinations of the number of questions asked and marks awarded for a correct answer that satisfy this requirement, and has chosen the one that allows the highest possible score for a pupil.

What is that highest possible score?

[teaser3121]

## Jim Randell 4:25 pm

on15 July 2022 Permalink |If there are

nquestions asked, and there areamarks for a correct answer, then the possible scores are:And we need there to be exactly 100 possible scores.

There are

tri(n + 1)different(correct, unanswered, incorrect)ways thenquestions can be answered.So we need

n≥ 13 in order for there to be 100 or more different combinations (some may have the same score).Here’s a quick program to solve the puzzle.

It runs in 66ms.

Run:[ @replit ]Solution:The maximum possible score is 105.There are 15 questions, and 7 marks for each correct answer. The maximum is therefore 15×7 = 105.

It is also possible to have 100 potential scores with 21 questions, and 4 marks for each correct answer. In this case the maximum is 21×4 = 84.

LikeLike

## Frits 7:28 pm

on15 July 2022 Permalink |LikeLike

## Jim Randell 8:59 am

on16 July 2022 Permalink |I wondered how you arrived at your formula for the unreachable marks.

I came up with this:

If we get all the questions right the (maximum possible) score is:

a.nIf we get all but one of the questions right (and don’t attempt the remaining question) the next lowest score is:

a(n − 1).So there are

(a − 1)unreachable scores between these.If, however, we get the remaining question wrong, we get a score of:

a(n − 1) − 1.The there are only

(a − 2)unreachable scores in the next gap.If we get all but two of the questions right the possible scores are:

a(n − 2), a(n − 2) − 1, a(n − 2) − 2.And there are

(a − 3)unreachable scores in the following gap.So, in each gap the number of unreachable scores decreases by 1.

Hence the total number of unreachable scores is:

tri(a − 1), providingn≥a. (All possible negative scores are reachable).And using this we can determine the number of possible scores without having to construct them.

And we can proceed manually (there are only 10 values to check), or programatically:

Run:[ @replit ]Manually, we can consider increasing

avalues, calculateuvalues (by just adding the precedingavalue), and computen = (99 + u) / (a + 1). We neednto be an integer ≥ 13. The calculations proceed as follows:There are two candidate solutions

a=4, n=21 ⇒ max=84anda=7, n=15 ⇒ max=105, so we want the second one.LikeLiked by 1 person

## Frits 12:48 pm

on16 July 2022 Permalink |I printed and analyzed the sorted ss lists of your program and noticed that

the first unreachable number always is F = (n – (a – 2)) * a – (a – 1).

This happens if the number of correct answers is equal to n – (a – 2).

the next two unreachable numbers always are:

(F + a, F + a + 1)

the next three unreachable numbers always are:

(F + 2*a, F + 2*a + 1, F + 2*a + 2)

etc…

LikeLike

## Frits 12:27 am

on17 July 2022 Permalink |If a >= n then the number of possible test scores is independent of a.

The number of unreachable scores is then tri(a – 1) – tri(a – n – 1).

The number of possible test scores is equal to (n + 1) * (n + 2) / 2.

The number of possible test scores equal to 100 leads to the formula

(n + 1) * (n + 2) = 200

A positive solution for n is (3 * sqrt(89) – 3) / 2 = 12.65 so

not an integer solution.

LikeLike

## Frits 6:09 pm

on21 July 2022 Permalink |Formula (2a + 2).n = a.a – a + 198 is valid if marks for a correct answer (a) is not higher than the number of questions (n). If a is higher or equal to n then n must be a non-integer solution (approx 12.65).

Another option would have been to use divisor_pairs().

LikeLike

## Jim Randell 3:04 pm

on22 July 2022 Permalink |I also did a solution based on John Crabtree’s analysis:

It is neat because we sum the divisor pairs.

But it is more straightforward (and slightly faster) just to consider increasing

avalues (as in my second program).LikeLike