Here’s a little problem with some big lessons for problem solving.

This question is from Kenanga in 2017, not long before the *Ask Dr. Math* service stopped taking questions:

Insufficient Information In Question Given A + B + C = 1 B + C + D = 2 C + D + E = 3 D + E + F = 4 E + F + G = 5 F + G + H = 6 G + H + I = 7 Calculate: A + E + I = ? There are 8 variables but only 7 equations.

One of the things you learn in solving systems of equations is that when there are fewer equations than variables, the system will not have a unique solution. But this is not your typical problem!

Doctor Ian answered, starting with what makes it possible to solve:

Hi Kenanga, It's true that you have more unknowns than equations, butyou're not being asked to find the values of all the unknowns. You're being asked to find the sum of three of them.

Ir may well be that, although there are infinitely many solutions to the system, the value of \(A + E + I\) is the same for all of them. (In fact, since the problem was given by a presumably reasonable person, there’s a good chance of that. If it was made up randomly, or arose from a real problem, you might not assume it can be solved.)

Next, a useful way to make the nature of a system of equations more apparent:

Have you tried aligning the unknowns in those equations? A + B + C = 1 B + C + D = 2 C + D + E = 3 D + E + F = 4 E + F + G = 5 F + G + H = 6 G + H + I = 7 That at least makes it easier to see that A and I appear in only one equation each. That might turn out to be helpful. Or it might not.

So *A* and *I* are special; is *E*, too? All we can do is try something:

If weadd all the equations, we get A + 2B + 3C + 3D + 3E + 3F + 3G + 2H + I = 28 If weadd the 1st, 4th, and 7th equations, we get A + B + C + D + E + F + G + H + I = 12 A + E + I + (B + C + D + F + G + H) = 12 So if we could find the sum that I re-grouped in ()'s, we'd be golden, right? I don't know if we CAN do that. It's not like I already know how to solve this!I'm just playing around here, to give you a sense of what kinds of things you can look at.

Why choose those three equations to add? Because they involve, respectively, \(A + B + C\), \(D + E + F\), \(G + H + I\), which together include all the variables once each. We’re using one of the patterns revealed by the aligned version of the equations.

Now what? I can see several things I might have tried, such as subtracting this equation (total 12) from the other equation (total 28). But he has a goal in mind, and sees a way to get to it:

What if weadd the equations that DON'T feature A, E, or I? B + C + D = 2 F + G + H = 6 That gives us B + C + D + F + G + H = 8 That's just what we were hoping to find!

It’s just a small step from here; like Doctor Ian, I’ll leave that for you …

So now we have an answer, and it would be tempting to just move on, but that would be a mistake. There are some important lessons to be learned here.

The first is that just because youexpectedto start with more information, that doesn't mean that a solution will ultimatelyrequiremore. In particular, rules of thumb like "You want to have an equation for each unknown" are just that -- rules of thumb. They're mostly true, but sometimes they're not.

Expectations are not absolutes. When your expectation is about something slightly different from what you are faced with, expect that the result might be slightly different, too.

The second is that it's important tokeep in mind what you're being asked for, and not inadvertently think that you have to find something else. In this case, it's intuitive to think that in order to find the sum of A, E, and I, you first have to find their individual values and then add them up. But that's not the case, is it?You were asked to find the sum of three unknowns, and by looking for that directly, the lack of an eighth equation didn't stop us. For that matter, if we did start with eight variables in eight equations, we may have been tempted to plunge into a lot of tedious (and error-prone) algebra.

You’re used to problems where you have to find each variable, so you expect to do that in order to answer the question. But interesting problems may involve shortcuts.

The third is that,when you don't know what to do, the worst thing to do is just throw up your hands and do nothing. Try things. Play around! See what you can conclude from what you've been given. Try toestablish what you would need to knowto be a step or two from a solution -- like working a maze backward as well as forward. That's what happened here: we saw that if we could get the sum of the OTHER unknowns, we could get the sum we were looking for. And that suggested a strategy: look at the equations that have ONLY those other variables.

Playing with a problem is a fundamental mindset for solving problems. If you don’t see how to open a puzzle box, turn it around in your hands to see it from different perspectives. Imagine what it might look like opened, and let your mind wander into different ways that might happen. Then try pushing in various places, to see what happens …

Working backward and forward at the same time is one of the strategies we saw in a recent puzzle example (“bidirectional search”), and it worked well here, too.

Never give up.

]]>We’ll start with this question from 1999:

Probability in Virus Testing In a country, 1 person in 10,000 (.01%) has the EB virus. A test that identifies the disease gives a positive indication 99% of the time when an individualhas the disease. However, 2% of the time it gives a positive indication when a persondoesn't have the disease. a) If a randomly selected individual is tested and the test turns out positive, what is the chance that this individualhas the virus? b) Construct a 2 by 2 table. I am having trouble constructing the table. I am also not sure what I am supposed to do with the numbers to arrive at the answer for (a).

Here we know how common the virus is, and how often the test gives a true positive, or a false positive, result. We want to know the probability that it is correct when the result is positive. At first glance, you might think that’s already been answered! But in probability, a careful reading of any problem is essential. There is a big difference between the test being positive 99% of the time when you are sick, and you being sick 99% of the time when it is positive! (The latter, we’ll see, is far from true.)

Doctor Anthony replied, first making the table:

Initial Prob. Initial Prob. Has the virus Does not have virus Prob = 0.0001 Prob = 0.9999 ------------------------------------- 0.00001 x 0.99 0.9999 x 0.02 Test is positive = 0.0000099 = 0.019998 0.00001 x 0.01 0.9999 x 0.98 Test is negative = 0.0000001 = 0.979902

This is the requested table; but we need to think carefully about what it means.

Each entry gives the proportion of the entire population that fits each description: in reading order, those who have the virus and test positive, those who don’t have the virus but test positive, those who have the virus but test negative, and those who don’t have the virus and test negative. So the first column contains the 0.01% of all people with the virus; 99% of these test positive, and 1% test negative. The second column contains that 99.99% of the population who don’t have the virus; 2% of these test positive, while 98% test negative.

I have marked in red the false negatives (whom the test wrongly said are clean, also called a Type 1 error), and in green the false positives (whom the test wrongly said have the virus, also called a Type 2 error). There are many more of the latter, simply because there are so many healthy people. Both are dangerous; false negatives can keep people from being treated, which is very bad; but false positives scare people, and also reduce faith in the test. (One of my colleagues recently had his statistics class interrupted by a faulty fire alarm, and explained to his class that that was a type 2 error, saying they were in danger when they were weren’t; that suggests why a type 1 error, failing to warn them, is called that. Yet too many false alarms can cause students to start ignoring them, which is also bad.)

Now apply this to a person who tests positive:

Since we are told that the test is positive, the sample space is confined to the top row. 0.0000099 Prob has virus = -------------------- = 0.0004948 0.0000099 + 0.019998 With such a low probability of a person actually having the disease given a positive result,the test itself is practically worthless.

What happened here is that with so many false positives, the few true positives are swamped. A positive result is far from indicating that you are in fact sick.

What if you test negative? Then the probability that you are actually healthy is, by the same reasoning, $$P(\text{no virus}) = \frac{0.979902}{0.0000001 + 0.979902} = 0.9999999$$ So you can be assured (99.99999%) that you are virus-free – but you were already 99.99% sure anyway.

The 99% in this problem, the **true positive rate**, is called the **sensitivity** of the test, because it tells us how sensitive the test is to what it is looking for. The **true negative rate**, 98%, is called the **specificity**, because it tells how specific a positive result is to this particular condition. As we see here, the specificity can be extremely important when we are testing for something rare!

As a current example, in evaluating a test for SARS-CoV2, it is important on one hand that it should be sensitive (find most cases of the virus, so they can be isolated or treated); but if it is not also specific (e.g. not showing positive results for someone who has had a cold caused by a different coronavirus), it may be useless. On the other hand, the significance of any result is strongly affected by the prevalence of the virus in the population — which we can’t be sure of without testing.

I want to include here a question from Stephen in 2004 that was not put in the archive, that covers a little more:

If a particular test for AIDS wasaccurate in detecting the disease 95% of the time, and the test had afalse positive rateof only 1%, if 1% of the population being tested had the disease: (a)what proportion of the population would be diagnosed as having AIDS? (Hint: this answer requires you to make two calculations, not just one.) The hint the teacher gives us in question (a) is that there are two calculations needed to come up with the answer. I don't see why this is so. To me it seems like the proportion of the population that would be diagnosed would be 95% (accuracy rate) of the 1% of the population that has the disease.

Doctor Pete answered:

Is this the exact wording of the question? I will make a few assumptions about what you mean by "95% accuracy" and "1% false positives." I take these to mean that 95 out of 100 people with disease will be correctly identified, and the remaining 5 will be incorrectly identified as healthy (Type I error); and out of 100 people, 1 will be identified as having the disease when in fact he is healthy (Type II error). The null hypothesis, of course, is that the tested individual has the disease.

The assumption is that “accuracy” means sensitivity. It can instead be taken to mean the proportion of results that are correct, that is, (TP + TN)/n as defined below.

In this situation, there are four categories: TP = True Positive = Subject tests positive and is indeed HIV+ FP = False Positive = Subject tests positive but is in fact HIV- (Type II) TN = True Negative = Subject tests negative and is indeed HIV- FN = False Negative = Subject tests negative but is in fact HIV+ (Type I) Then we have the following facts: TP + FP = Total positive test results FN + TN = Total negative test results TP + FN = Total number of HIV+ subjects FP + TN = Total number of HIV- subjects Furthermore, n = TP + FP + FN + TN = Total number of test subjects.

These, of course, are the four cells of our table, and the sums of the rows and columns. Now we have to fill them in:

Now suppose n = 10000. We are told that the prevalence rate of HIV is 1%. In other words, TP + FN = 100, FP + TN = 9900. Since the probability of a Type II error (false positive) is 1%, we then also have FP = 100. Hence, TN = 9900 - FP = 9800. Since the test accurately identifies 95% of all HIV+ test subjects, that means that TP = 0.95(100) = 95, and FN = 5. Therefore, out of 10000 trials, the test will give TP + FP = 95 + 100 = 195 positive results, which is 1.95%.

Stephen had taken into account only TP, not FP.

I hope this is what you had in mind; I can't be sure because the term "accuracy" is rather vague. Incidentally, we have Sensitivity = TP/(TP+FN) = 95/100 = 95%, which is what you called "accuracy" Specificity = TN/(FP+TN) = 9800/9900 = 98.99% Positive predictive value (PPV) = TP/(TP+FP) = 95/195 = 48.72% Negative predictive value (NPV) = TN/(TN+FN) = 9800/9805 = 99.95% Efficiency = (TP+TN)/n = 98.95%Sensitivity and specificity are independent of the prevalence rate, and are indicators of a test's "clinical value." The low PPV tells you that slightly more than half of all positive tests are false. The high NPV tells you that you can be very confident that a negative test result is in fact correct. Thus, the test is not suitable for testing populations with a low prevalence, becauseit tends to cause unnecessary alarm(too many false positives). I strongly recommend you repeat this exercise with a high prevalence rate, say 20%, and calculate sensitivity, specificity, PPV, NPV of the test. Then interpret these results and compare them to the 1% prevalence results.

For a slightly more complicated question, where the test can be inconclusive, see:

Test for Tuberculosis

Here is a question from 2003 that is superficially quite different, but has the same underlying idea:

Two-Headed Coin and Bayesian Probability In a box there arenine fair coinsandone two-headed coin. One coin is chosen at random and tossed twice. Given that heads show both times, what is the probability that the coin is the two-headed one? What if it comes up heads for three tosses in a row? I understand that there are 10 coins in total. My teammates tried it out also and they got 4/(9 + 4) for the first part and 8/(9 + 8) for the second part. I don't understand how they got this.

Rather than a disease, we have a defective coin, and rather than a blood test, we have a toss test. But basically it is the same thing: Deciding an underlying cause (the kind of coin) from an observation (the results of some tosses). Notice that this “test” will not produce false negatives: If the test comes out negative (either toss results in tails), then we *know for sure* that it is a normal coin! But it *can* have false positives.

Doctor Mitteldorf took this one, using a tree rather than a table:

Dear Maggie, Here's a way to think about it. Make a tree: flip two heads (1/4) / choose fair coin (9/10) / \ / flip anything else (3/4) 10 coins \ \ choose two-headed coin (1/10) -> flip 2 heads (1/1)

This shows the probabilities of choosing a fair or defective coin, and then of each outcome for the coin we flip:

- P(fair) = 9/10;
- P(two heads | fair) = 1/4;
- P(any tails | fair) = 3/4;

- P(defective) = 1/10;
- P(two heads | defective) = 1.

Study this tree, and it becomes clear that there are 3 possibilities: 1 - the top one has probability (9/10)*(1/4) = 9/40 2 - the next one has probability (9/10)*(3/4) = 27/40 3 - the last one has probability (1/10)*1 = 1/10

These are the probabilities

- P(fair and 2 heads) = 9/40,
- P(fair and any tails) = 27/40, and
- P(defective and 2 heads) = 4/40,

which add up to 1. In total, P(2 heads) = 13/40 and P(any tails) = 27/40.

Before you did the experiment, these were all the possibilities there were. Then you did the experiment. What did it tell you? It told you that the middle option is out. The coin did NOT show a tail, so we know it wasn't the second outcome.This narrows our universeto the 9/40 and the 1/10. The trick now is to re-normalize these probabilities so that they show a total probability of 1, but stay in the same ratio. Within that universe (all the possibilities that are left) lines (1) and (3) remain in the ratio 9:4. So the probability of the top one is 9/13 and the bottom is 4/13, where 13 is just the sum of 9 and 4.

That is, $$P(\text{defective | 2 heads}) = \frac{P(\text{defective and 2 heads})}{P(\text{2 heads})} = \frac{9/40}{9/40 + 4/40} = \frac{9}{13}$$

Can you extend this reasoning to come up with the corresponding result for three flips? (This kind of reasoning is called Bayesian probability, and it is one of the most confusing topics in probability at any level of study.)

Do you see the similarity of this to the medical test problems? In all these cases, in order to determine the actual probabilities, we had to know the population: what percent had the disease, and (here) what percent of the available coins were defective. In real life, we may not know that …

What if we knew a little less about the environment? Here is a broader question from 2004:

Probability Philosophy and Applying Inference If I flip a coin 4 times and they all turn out to be heads,what is the probability that the coin is fair?Because I am not sure if there is a proper comparison distribution, would I have to use the T-distribution and is this problem even answerable? Would the question be answerable if I flipped the coin 50 times and it turned out heads each time? Any help would be great.

Nothing is said here about where the coin comes from; otherwise, this is essentially the same question.

Doctor Schwa answered:

Hi John, If you're a "frequentist" probability philosopher, the question has no answer: either the coin is fair, or it isn't--what's the repeated event from which we can abstract a probability? That is, you can say "the probability of this die showing 6 is about 1/6" based on rolling it a lot of times. But you can't do the same for "this coin is fair" because it is either always fair, or not--there's no variation!

If we knew anything about the coin, such as that it was known to be fair, or that it is from a population in which 1% of coins are made with double heads, or that it has produced heads 1000 times, we could answer the question; but as it is, the probability that it is a fair coin is not really defined from this perspective, in which probability is defined in terms of repeated experiments.

On the other hand, a "Bayesian" probability philosopher would be perfectly happy with your question. They would ask for one more piece of information first, though: what do you know about the person giving you the coin?How much did you trust them?The Bayesian would then use P(coin is fair) in the abstract, followed by P(4 heads in a row | coin is fair) compared with P(4 heads in a row | coin is unfair), to eventually determine P(coin is fair | 4 heads in a row).

Bayesian probability is about subjective judgments of one-time situations. In order to make this judgment, we need to start with an assessment of the *a priori* probability that any given coin is fair. In effect, that would be an estimate of the population the coin comes from.

But there’s another perspective, which is a misreading of hypothesis testing in statistics; the phrasing of the problem suggests that this is the context:

More likely than any of the above nonsense, though,what your teacher really wants you to calculate is a P-value. A P-value is NOT the probability that the coin is fair, though many people (and many statistics textbooks, even!) often misstate it as such. A P-value is just one of the probabilities that a Bayesian would use: P(4 heads in a row | coin is fair).

This goes right back to our initial discussion, of the difference between “the probability that I have the virus given that the test is positive” and “the probability that the test is positive given that I have the virus”. The p-value is the probability that we would get the results we see, if we assume that the coin is fair, rather than the probability that the coin is fair, given the results.

That is, you can answer the question "how likely is a fair coin to produce 4 heads in a row", and if that P-value is small enough, decide to reject the hypothesis that the coin is fair--but it's certainly not the probability that the coin is fair! You're simply casting doubt on the ASSUMPTION that it's a fair coin by noticing that the DATA you got would be really unlikely if the coin was fair. It's the DATA (the 4 heads in a row) that have a really low probability. I hope that response helps!

In this case, the probability that a fair coin will show heads four times in a row is \(\left(\frac{1}{2}\right)^4 = \frac{1}{16} = 0.0625 = 6.25\%\). We commonly pick a threshold of 5% or 1% for the p-value, figuring that anything less likely than that to have produced the results we see is hard to believe. In this case, a fair coin showing heads four times is within the realm of believability.

]]>Although we focus in this blog on questions at early college level and below, we do get questions at higher levels. This one deals with finding an invariant for a finite state machine, with possible movements of a robot as the example.

The question came to us last December, from Akinyemi:

The question is on discrete mathematics (state machine: invariant principle)

Have been trying solving it but wasn’t able to get the solution.

Please help

Here are the four moves:

Doctor Jacques replied, asking for contextual information and making an initial suggestion:

Hi,

It would help us to give you the most useful answer it you told us what you have been studying on this subject, and similar problems you have been solving, in particular about finding invariants.

I can give you some ideas to get you started. Note first that the moves (1) and (2) on the one hand, and (3) and (4) on the other hand, are inverses of each other. This means that you can use only the moves (1) and (3), for example, if you allow negative moves.

More precisely,

you can describe any sequence of moves as.m(2, -1) +n(1, 3), wheremandnare (possibly negative) integers

The key idea here is that move [2] is the opposite of move [1], and move [4] is the opposite of move [3]; that means the robot can go back and forth in either of the two directions, which amounts to positive or negative multiples. This is not always true, and will not be in our second problem.

You can then set this equal to (1, 1); this will give you a linear system of two equations (corresponding to the x and y coordinates):

2

m+n= 1

–m+ 3n= 1If you solve that system, you will find that

mandnare not integers.

Because these variables are not integers, there is no whole number of moves by which the robot could reach (1, 1). But this is not what the author of the problem asked for:

This answers the question. However,

this does not use the concept of invariant; I could give you an invariant right away, but it would look like black magic; it would not tell youhow to find the invariant. That is why I asked you how you were told to answer that type of question.Here is a hint: try first to solve the system of equations above:

the denominator in the solution will tell you what kind of invariant you need.Please feel free to write back if you need further help, and don’t forget to tell us what you learned about this type of problem.

Sometimes finding an invariant for a new problem *can* be magic. But there’s no sense making it look like that when it isn’t …

Akinyemi responded with an example he was using (which I have since found is available at MIT OpenCourseWare):

Thanks for your quick response towards my question, I really appreciate.

I tried getting your method but not yet comfortable with it.

Regards what have been studying on this work are the pictures attached below.

Kindly go through it and help with any further assistance.

(He included more from the book showing details of a proof of the invariant, which I am omitting.)

In this example, the four allowed moves are simpler:

The invariant they use (that is, a property of the location of the robot that must always be true because it is preserved by each legal move) is that the sum of the coordinates is even. Whatever location you start at, changing both *x* and *y* by 1 will either leave the sum unchanged, or increase it or decrease it by 2; so if that sum started even, it will stay even.

Doctor Jacques replied, first showing how to use his hint (solving the system of equations) to find the invariant:

Hi again,

We want to find

a property of the coordinates that is preserved by the movesof the robot.If you try to solve the system of equations above, you will find

m= 2/7,n= 3/7. In the examples you showed me, the condition to be preserved was divisibility by 2. In this example, the denominator 7 suggests that we mustfind an expression that must be divisible by 7(to get integral values formandn).A little

trial and errorwill show that, for example, I_{1}= 3x–yis such an expression. Indeed, I_{1}is divisible by 7 for the starting position (0, 0) and is divisible by 7 for the two moves (2, -1) and (1, 3). You can then use the same induction argument as in your notes. As I_{1}is not divisible by 7 at the position (1, 1), that position is not reachable.

Adding 2 to *x* and -1 to *y* increases I_{1} by \(3(2) – (-1) = 7\), retaining divisibility by 7; and similarly, adding 1 to *x* and 3 to *y* increases I_{1} by \(3(1) – (3) = 0\).

Trial and error is not un-mathematical, as many people imagine; but something else would be desirable.

A more systematic wayto find the invariant would be to solve the system:2

m+n=x

–m+ 3n=yas a function of

xandy. This givesm= (3x–y)/7 andn= (x+ 2y)/7. The solution will be integral if and only if I_{1}= (3x–y) and I_{2}= (x+ 2y) are divisible by 7.I

_{1 }is the invariant we found before; I_{2}is another invariant. Note, however, that you only need one of these, since 2I_{1}+ I_{2}= 7xis always divisible by 7.

This system of equations represents the vector equation \(m\left\langle 2,-1 \right\rangle + n\left\langle 1,3\right\rangle = \left\langle x,y \right\rangle\); that is, we are now finding how to get to any point, not just \((1, 1)\). By generalizing, we can more easily see patterns! The conclusion is that any point \((x, y)\) is accessible if \(3x-y\) and \(x+2y\) are both multiples of 7; but it turns out that if one is, the other is, which was shown by eliminating *y* to see that \(I_2\) differs from \(2I_1\) by a multiple of 7.

Akinyemi needed a little more help (which will be good for others who read this!):

I thank you for your kind gesture towards this my problem. You have really helped a soul sir!

Having gone through the solutions, I still find it difficult to understand the whole solution and I have come up with the following questions so as to understand clearly sir!

- Why describing sequence of move as m(2, -1) + n(1, 3)?
- Why setting it to (1, 1) and not other value?
- How do we get I
_{1}= 3x – y?- How do we know I
_{1}is divisible by 7 for the starting point (0, 0) and divisible by 7 for the two moves (2, -1) and (1, 3)?- Why is I
_{1}not divisible by 7 at the position (1, 1)?Also, in the systematic way, how do we get the solution part of “iff” I

_{1}= (3x-y) and I_{2}= (x+2y) are divisible by 7?I’m really sorry for asking all these questions, this topic is strange to me and I need to understand so as to solve other problems myself.

Looking forward to hear from you.

Doctor Jacques took each question in turn:

Hi Akinyemi,

Question 1[Why m(2, -1) + n(1, 3)?]You can see a sequence of moves as an

addition of vectors. You have two basis vectorsu= (u_{1},u_{2}) = (2,-1) andv= (v_{1},v_{2}) = (1, 3), which correspond to moves (1) and (3) in the problem (moves (2) and (4) are –uand –v).You add vectors by adding the corresponding components. This operation is commutative: the end result does not depend on the order of the moves. We can use

mas the number of times you execute move (1) (or move (2) ifm< 0), andnas the number of times you execute move (3) (or (4) ifn< 0).The final position (

x, y) is therefore (mu_{1}+nv_{1},mu_{2}+nv_{2}) = (2m+n, –m+ 3n), which we can write asmu+nv=m(2,-1) +n(1,3). Equating corresponding components gives the system of equations in my last answer:2

m+n=x

–m+ 3n=y(*)This system has a unique solution (

m, n). A position is reachable if and only ifmandnare integers (these are numbers of moves; partial moves are not allowed).

To put it another way, the final *x* coordinate results from adding 2, *m* times (move 1), and adding 1, *n* times (move 3). The final *y* coordinate comes from subtracting 1, *m* times, and adding 3, *n* times.

Question 2[Why (1, 1)?]I used (

x, y) = (1, 1) because that is what the problem asks for. If you solve the system (*) withx=y= 1, you will find that the solutionm= 2/7,n= 3/7 does not consist of integers. As you cannot execute 2/7 of a move, the position is not reachable. This is sufficient if you only want to prove that result, but apparently, you are supposed to find aninvariantto prove that result, and this calls for a more general solution, which is explained in the next section.

In the method using the invariant, (1, 1) is used in applying the invariant to answer the question; in the first method, it was used from the start.

Question 3[How I_{1}= 3x – y?]If we solve the system (*) with

xandyas parameters (you know how to do that, don’t you?), we find the general solution:

m= (3x–y)/7n= (x+ 2y)/7A position is reachable if and only if

mandnare integers. This means that (3x–y) and (x+ 2y) must be divisible by 7. For convenience, we call these expressions I_{1}and I_{2}. As these expressions depend onxandy, it might be a good idea to call them I_{1}(x, y) and I_{2}(x, y) to emphasize the point. To summarize, the position (x, y) is reachable from (0, 0) iff I_{1}(x, y) = (3x–y) and I_{2}(x, y) = (x+ 2y) are both divisible by 7.As I said, you only need to check one of the conditions, since 2I

_{1}+ I_{2}= 7x is always divisible by 7: if one of them is divisible by 7, so is the other.

Let’s carry out the solution of the system:

We want to solve $$\begin{matrix} 2m + n = x\\-m + 3n = y\end{matrix}$$

To eliminate *n*, we can multiply the first equation by -3 and add; we get $$\frac{\begin{matrix} -6m – 3n = -3x\\-m + 3n = y\;\;\;\end{matrix}}{-7m\;\;=-3x+y}\Rightarrow m = \frac{3x-y}{7}$$

To eliminate *m*, we can multiply the second equation by 2 and add; we get $$\frac{\begin{matrix} 2m + n = x\\-2m + 6n = 2y\;\;\;\end{matrix}}{7n\;\;=x+2y}\Rightarrow n = \frac{x+2y}{7}$$

Question 4[How do we know I_{1}is divisible by 7?]You just have to substitute

xandyin I_{1}(x, y) = (3x–y). This gives I_{1}(0, 0) = 0, I_{1}(2, -1) = 7, and I_{1}(1, 3) = 0, and these are all divisible by 7.

Question 5[Why is I_{1}not divisible by 7 at (1, 1)?]We have I

_{1}(1, 1) = 2, and this is not divisible by 7; therefore this point is not reachable.Your last question is answered as part of question 3.

The idea in question 4, of course, is that I_{1} *must* be divisible by 7 in order to have a solution (whole moves); while in question 5, it is that I_{1} is *not* be divisible by 7 when calculated for the point (1, 1), which shows that there is no solution in this case. These are two sides of the same coin, and it is likely that Akinyemi was looking at the wrong sides!

I would like to add a few remarks.

If you are familiar with modular arithmetic, you can say that I

_{1}(x, y) mod 7 does not change during a sequence of moves, since each move adds a multiple of 7 to it. This corresponds more closely to the meaning of an invariant expression: I_{1}(x, y) mod 7 does not change. Otherwise, we have an invariantcondition(instead ofexpression): I_{1}must be divisible by 7. The modular formalism has the advantage that you can use it easily if you have another starting point instead of (0, 0).

Any knowledge of number theory techniques can make this topic easier to handle.

Sometimes, the invariant has an intuitive meaning. In the example you showed me with the robot moving diagonally, you can imagine the robot

moving on the squares of a chessboard. If the squares with (x+y) even are colored black and the others white, the condition expresses the fact that the robot stays on squares of the same color (like a Bishop in chess).The invariant is the color of the squarein this case.

Here is that example, superimposed on a chessboard:

The color remains black after any move.

There is also a nice geometric interpretation of your problem. You can construct a parallelogram on the vectors

uandvrepresenting the moves, and tile the whole plane with copies of that parallelogram.Because you can only move along the sides of these parallelograms, the only positions reachable from the origin are the vertices of the parallelograms. As the point (1, 1) is inside a parallelogram, it is not reachable. This allows you to answer the question without any calculation.

The key here is to see clearly that the grid constrains all possible motions in this system; without that, the problem can seem impossible, but with it, it is obvious!

Akinyemi responded with thanks and a further challenge:

Greetings Dr,

Kudos to you! You are a great teacher. With your explanation, I was able to attempt a question on my own. Attached is the problem I solved but needs your observation whether I’m right or wrong.

Solving the problem, I used moves (3) & (4) which leads to the system of equations:

M = y and n = (y – x)/3.

Since we can only use either of the invariant, I used y – x to check and all the conditions were satisfied except the given condition I(0, 2) which is not divisible by 3 which implies the point is not reachable.

Thanks so much Dr!

Here are the moves for this problem:

Doctor Jacques answered:

Hi Akinyemi,

This problem is different from the previous one. In the previous one, we had pairs of moves that are inverse of each other, and this allowed us to use only one move for each pair, together with possibly negative coefficients.

This is not the case here. I understand that you cannot use a move like -[1] = (-2, +1) (at least, not directly, see below for more).

This means that you must use

all four moves, andonly positive coefficients.The short method is to observe that, in all four moves, the difference

x–yis a multiple of 3. You noticed this for moves [3] and [4], but that is not enough: you must check it for all moves. As this is true for the starting position, this is an invariant condition. As it does not hold for (0, 2), that position is not reachable. Note that this is sufficient to reach the conclusion: it does not depend on the fact that negative moves are not allowed.This requires some minimal guessing; you can observe that, if you solve the system of equations for all possible pairs of moves, you will find in each case that something must be divisible by 3. This suggests looking for something that is divisible by 3 in each move.

You can see this invariant, that each move changes *x* and *y* by a sum of 3, visually, by observing that the points all lie on the lines shown here, namely \(x-y = -3, 0, 3\):

Now for the long method. This may require some techniques that you are not familiar with (although this case is simpler than the general case), and I would be surprised if you were expected to do this. If, while reading this, you have no idea what I am talking about, just ignore it; as I said, I believe that the short method is all you need. Anyway, here it goes:

— Start of digression —

I said that you cannot use

directlythe inverse of the moves. However, in this case, it turns out that you can achieve the same result with combinations of moves. For example, move -[1] = (-2, +1) can be simulated as [3] + [4]. Explicitly, we have the equivalences:-[1] = (-2, 1) = (+1, +1) + (-3, 0) = [3] + [4]

-[2] = (-1, +2) = 2(+1, +1) + (-3, 0) = 2[3] + [4]

-[3] = (-1, -1) = (+2, -1) + (-3, 0) = [1] + [4]

-[4] = (+3, 0) = (+2, -1) + (+1, +1) = [1] + [3]Note that, in each case, we use only positive coefficients, as required. At this point, a couple of remarks are in order:

- I found these equivalences
by inspection(which means that, after all, this method is not better than the short method). In general, there is a systematic method for finding these equivalences if they exist, but that requires solvingsystems of Diophantine equations in several variables.- In this case, we are
luckythat such equivalences exist. If this is not the case, I don’t know if a general method exists; we would probably need an ad hoc method.We have shown that we can, in fact, use all the four moves [1] – [4] with positive or negative coefficients.

We need now to reduce this set to only two moves; this will allow us to use the technique of the previous problem. The general technique is called reduction to

Hermite normal formand describedhere. However, in this case, we already have the answer: you can generate all moves using [3] and [4], possibly with negative coefficients (we had to prove that part first). Indeed, if we change the signs of the first two equivalences, we find:[1] = -[3] – [4]

[2] = -2[3] – [4]— End of digression —

We have therefore proved that we can use only moves [3] and [4], possibly with negative coefficients. In fact,

this is what you did, but you have to prove first that it is legitimate; it is not an immediate consequence of the hypotheses.The solution of the system of equations is

m=y,n= (y–x)/3, as you found.

Akinyemi was right, and yet wrong in not backing up what he did with proof.

However, it is not true that you can use: that was true for the previous problem, but it is not true here. In fact,eitherinvariant in this casem=yonly tells you thatyis an integer, and that is not helpful. You must use the second invariant: (y–x) must be a multiple of 3. This is because the denominator 3 only appears in the second invariant.I think that the conclusion of all this is that

you should use the short method: observe that (y–x) is a multiple of 3 in all 4 moves. This is sufficient to prove the conclusion, and you don’t need to prove that you can use only the moves [3] and [4].

Again, “inspection” (like trial and error) is respectable!

]]>Here is the problem as posed to us in 2002:

Who Owns the Fish? (Einstein's Problem) There are 5 houses sitting next to each other, each with a different color, occupied by 5 guys, each from a different country, and with a favorite drink, cigarette, and pet. Here are the facts: The British occupies the red house. The Swedish owns a dog. The Danish drinks tea. The green house is on the left of the white house. The owner of the green house drinks coffee. The person who smokes "Pall Mall" owns a bird. The owner of the yellow house smokes "Dunhill". The owner of the middle house drinks milk. The Norwegian occupies the 1st house. The person who smokes "Blend" lives next door to the person who owns a cat. The person who owns a horse live next door to the person who smokes "Dunhill". The person who smokes "Blue Master" drinks beer. The German smokes "Prince". The Norwegian lives next door to the blue house. The person who smokes "Blend" lives next door to the person who drinks water. The question is: Who owns the fish?

Doctor Ian answered, first giving a link to a site that includes a solution (which I will let you find for yourself if you give up):

This is a famous problem, attributed to Albert Einstein. If you just want to find out the answer, you can go here: ... If you'd like to find the answer yourself (it's actually pretty fun once you get into it, so I recommend finding the answer instead of just looking it up), you'll have to set up some systematic way to eliminate the possibilities.

With so many attributes, the full tables we used last time may be too unwieldy. Strategies have to be adjusted to fit the problem.

For example, you might list the houses, along with the possible owners, and information about the owners, e.g., House 1 House 2 House 3 House 4 House 5 ---------- ---------- ---------- ---------- ---------- Brit Brit Brit Brit Brit Swede Swede Swede Swede Swede Dane Dane Dane Dane Dane Norwegian Norwegian Norwegian Norwegian Norwegian German German German German German Red Red Red Red Red White White White White White Yellow Yellow Yellow Yellow Yellow Green Green Green Green Green Blue Blue Blue Blue Blue Pall Mall Pall Mall Pall Mall Pall Mall Pall Mall Dunhill Dunhill Dunhill Dunhill Dunhill Blend Blend Blend Blend Blend Blue Master Blue Master Blue Master Blue Master Blue Master Prince Prince Prince Prince Prince

This includes only the houses, countries, colors, and cigarettes, so you will need to add the drinks and pets.

Then you use the clues to eliminate possibilities, until only one possibility is left. For example,the Norwegian occupies the first house. That means thatno one else can be in the house, and the Norwegian can't be in any other houses: House 1 House 2 House 3 House 4 House 5 ---------- ---------- ---------- ---------- ---------- Brit Brit Brit Brit Swede Swede Swede Swede Dane Dane Dane Dane NORWEGIAN German German German German Red Red Red Red Red White White White White White Yellow Yellow Yellow Yellow Yellow Green Green Green Green Green Blue Blue Blue Blue Blue Pall Mall Pall Mall Pall Mall Pall Mall Pall Mall Dunhill Dunhill Dunhill Dunhill Dunhill Blend Blend Blend Blend Blend Blue Master Blue Master Blue Master Blue Master Blue Master Prince Prince Prince Prince Prince

This is equivalent to zeroing out the rest of each row and column last time.

Another clue says thatthe Norwegian lives next door to the blue house. This meansthe second house has to be blue, and no other house can be blue: House 1 House 2 House 3 House 4 House 5 ---------- ---------- ---------- ---------- ---------- Brit Brit Brit Brit Swede Swede Swede Swede Dane Dane Dane Dane NORWEGIAN German German German German Red Red Red Red White White White White Yellow Yellow Yellow Yellow Green Green Green Green BLUE Pall Mall Pall Mall Pall Mall Pall Mall Pall Mall Dunhill Dunhill Dunhill Dunhill Dunhill Blend Blend Blend Blend Blend Blue Master Blue Master Blue Master Blue Master Blue Master Prince Prince Prince Prince Prince

Not all clues are as easy to indicate in this partial table:

Another clue tells us thatthe Brit lives in the red house. This means he can't be in the blue house. Andthe German smokes Prince, so that can't be smoked by the Norwegian: House 1 House 2 House 3 House 4 House 5 ---------- ---------- ---------- ---------- ---------- Brit Brit Brit Swede Swede Swede Swede Dane Dane Dane Dane NORWEGIAN German German German German Red Red Red Red White White White White Yellow Yellow Yellow Yellow Green Green Green Green BLUE Pall Mall Pall Mall Pall Mall Pall Mall Pall Mall Dunhill Dunhill Dunhill Dunhill Dunhill Blend Blend Blend Blend Blend Blue Master Blue Master Blue Master Blue Master Blue Master Prince Prince Prince Prince I haven't included the drinks or the pets, but clues for those would work the same way.

Since not all possible tables have been built, some information can’t be shown yet; but, for example, once we find where the German lives, we’ll know Prince is smoked there and nowhere else. You might want to make one mark next to each clue that has been used up, and a different on for those that have been used partly, but not fully.

Note that you'll probably have to revisit some of the clues several times. A clue that seems to give you no information at first might prove to be useful later on, after the possibilities have been narrowed down. For example, the first clue, that the Brit lives in the red house, wasn't useful until we knew that he didn't live in the first house.

So a judicious choice of the order in which to use clues will be a major part of your strategy.

Also, you need touse ALL of the information given to you by each clue. For example,the clue 1. The Brit lives in a red house tells you all of the following: (1) If you know that the Brit lives in a house, then the house must be red. (2) If you know that a house is red, then the Brit must live in it. (3) If you know that a house isn't red, then the Brit can't live in it, (4) If you know that the Brit doesn't live in a house, then the house can't be red.

You might want to break up each clue in this way, and mark off the parts that have been used.

Now we come to the biggest hint here (which you may want to hide until you’ve given it a try on your own):

Just to make sure that the technique I'm suggesting actually works, I went ahead and solved the puzzle. Here arethe clues that I used, in the order that I used them: 9. The Norwegian lives in the first house. 14. The Norwegian lives next to the blue house. 8. The man living in the house right in the center drinks milk. 1. The Brit lives in a red house. 4. The green house is on the left of the white house (next to it). 5. The green house owner drinks coffee. 4. The green house is on the left of the white house (next to it). 1. The Brit lives in a red house. 7. The owner of the yellow house smokes Dunhill. 3. The Dane drinks tea. 2. The Swede keeps dogs as pets. 6. The person who smokes Pall Mall rears birds. 11. The man who keeps horses lives next to the man who smokes Dunhill. 15. The man who smokes blend has a neighbor who drinks water. 1. The Brit lives in a red house. 3. The Dane drinks tea. 2. The Swede keeps dogs as pets. 6. The person who smokes Pall Mall rears birds. 12. The owner who smokes Blue Master drinks beer. 13. The German smokes Prince. 2. The Swede keeps dogs as pets. 12. The owner who smokes Blue Master drinks beer. 15. The man who smokes blend has a neighbor who drinks water. 13. The German smokes Prince. 3. The Dane drinks tea. 2. The Swede keeps dogs as pets. 6. The person who smokes Pall Mall rears birds. 10. The man who smokes blend lives next to the one who keeps cats.

Clue 1, the Brit in the red house, which was mentioned above, is actually used fourth, and again two more times later on.

Note that I used many of the clues more than once. Sometimes this is because they yielded extra information the second time around; sometimes it may have been because I didn't notice something the first time I applied a particular clue. For this reason,just trying to use the list above may not work for you. You're going to have to come up with your own. In any case, I can tell you with confidence that the puzzle can be solved by this method (i.e., using a table like the one above), with some patience, some care, and about 30-60 minutes.

Have fun!

]]>This is from 2001:

Where and with What Weapon Was Each Man Murdered? One rainy evening, five military men (a general, a captain, a lieutenant, a sergeant, and a corporal) were murdered in the old mansion on Willow Lane. The murders took place in the bedroom, basement, pantry, den, and attic of the house. No two men were murdered in the same room or with the same weapon. The weapons used were poison, a poker, a gun, a knife, and a shovel. From the clues given, try to determine the room in which each man was killed and the weapon used to do him in. 1. The murder with the shovel was not done in the den or the attic; neither the captain nor the lieutenant was killed with the shovel, nor was either killed in the den or the attic. 2. The captain was not murdered in the bedroom. 3. The poker was not the murder weapon used in the attic. 4. Neither the general nor the corporal was murdered with poison, a gun, or a shovel. 5. The man murdered in the basement had just had dinner with the corporal, the captain, the man done in with poison, and the victim of the poker.

This is easier than some, because it has only three attributes. It will be a good opportunity to demonstrate the use of tables to organize the work, which we didn’t see last time. (Below, we’ll have a considerably harder problem with five attributes.)

Doctor Code answered:

Sarah, To do these types of problems, first set up a grid like this: B D A P B S P P G K _ _ _ _ _ _ _ _ _ _ general |_|_|_|_|_| |_|_|_|_|_| captain |_|_|_|_|_| |_|_|_|_|_| lieutenant |_|_|_|_|_| |_|_|_|_|_| sergeant |_|_|_|_|_| |_|_|_|_|_| corporal |_|_|_|_|_| |_|_|_|_|_| _ _ _ _ _ shovel |_|_|_|_|_| poison |_|_|_|_|_| poker |_|_|_|_|_| gun |_|_|_|_|_| knife |_|_|_|_|_| The columns across the top should be labeled: Basement, Den, Attic, Pantry, Bedroom for the rooms Shovel, Poison, Poker, Gun, Knife for the weapons I only had room for the first letter of the column names. Notice how the weapons appear twice, both as rows on the bottom-left and as columns on the top-right. We'll see why we need this in a moment.

Things get harder when there are more than three attributes (as in the next problem, below).

Now let's fill in the information from clue #1 into the table. First, "the murder with the shovel was not done in the den or attic." Put an 'O' in the shovel row and in the den and attic columns, like this: B D A P B S P P G K _ _ _ _ _ _ _ _ _ _ general |_|_|_|_|_| |_|_|_|_|_| captain |_|_|_|_|_| |_|_|_|_|_| lieutenant |_|_|_|_|_| |_|_|_|_|_| sergeant |_|_|_|_|_| |_|_|_|_|_| corporal |_|_|_|_|_| |_|_|_|_|_| _ _ _ _ _ shovel |_|O|O|_|_| poison |_|_|_|_|_| poker |_|_|_|_|_| gun |_|_|_|_|_| knife |_|_|_|_|_| The 'O' signifies that something isfalse; for example, the shovel wasn't used in the den, and the shovel wasn't used in the attic.

Both something we know to be true, and something we know to be false, give us important information! Blank cells are what we know nothing about; we hope to eventually banish them.

Now the 2nd part of clue #1: "Neither the captain nor the lieutenant was killed with the shovel": B D A P B S P P G K _ _ _ _ _ _ _ _ _ _ general |_|_|_|_|_| |_|_|_|_|_| captain |_|_|_|_|_| |O|_|_|_|_| lieutenant |_|_|_|_|_| |O|_|_|_|_| sergeant |_|_|_|_|_| |_|_|_|_|_| corporal |_|_|_|_|_| |_|_|_|_|_| _ _ _ _ _ shovel |_|O|O|_|_| poison |_|_|_|_|_| poker |_|_|_|_|_| gun |_|_|_|_|_| knife |_|_|_|_|_| Now you can see why we needed the weapons in two places, so that we can write down information about weapons vs. people, and about weapons vs. rooms.

I’m putting new information in red, which couldn’t be done in the original.

For the 3rd part of clue #1: "Nor was either killed in the den or attic." B D A P B S P P G K _ _ _ _ _ _ _ _ _ _ general |_|_|_|_|_| |_|_|_|_|_| captain |_|O|O|_|_| |O|_|_|_|_| lieutenant |_|O|O|_|_| |O|_|_|_|_| sergeant |_|_|_|_|_| |_|_|_|_|_| corporal |_|_|_|_|_| |_|_|_|_|_| _ _ _ _ _ shovel |_|O|O|_|_| poison |_|_|_|_|_| poker |_|_|_|_|_| gun |_|_|_|_|_| knife |_|_|_|_|_| That's all the information from clue #1.

That was a dense clue; the rest will go a little faster.

Now for clue #2: "The captain was not murdered in the bedroom." B D A P B S P P G K _ _ _ _ _ _ _ _ _ _ general |_|_|_|_|_| |_|_|_|_|_| captain |_|O|O|_|O| |O|_|_|_|_| lieutenant |_|O|O|_|_| |O|_|_|_|_| sergeant |_|_|_|_|_| |_|_|_|_|_| corporal |_|_|_|_|_| |_|_|_|_|_| _ _ _ _ _ shovel |_|O|O|_|_| poison |_|_|_|_|_| poker |_|_|_|_|_| gun |_|_|_|_|_| knife |_|_|_|_|_| Clue #3: "The poker was not the murder weapon used in the attic." B D A P B S P P G K _ _ _ _ _ _ _ _ _ _ general |_|_|_|_|_| |_|_|_|_|_| captain |_|O|O|_|O| |O|_|_|_|_| lieutenant |_|O|O|_|_| |O|_|_|_|_| sergeant |_|_|_|_|_| |_|_|_|_|_| corporal |_|_|_|_|_| |_|_|_|_|_| _ _ _ _ _ shovel |_|O|O|_|_| poison |_|_|_|_|_| poker |_|_|O|_|_| gun |_|_|_|_|_| knife |_|_|_|_|_| Clue #4 has a lot of information: "Neither the general nor the corporal was murdered with poison, a gun, or a shovel." B D A P B S P P G K _ _ _ _ _ _ _ _ _ _ general |_|_|_|_|_| |O|O|_|O|_| captain |_|O|O|_|O| |O|_|_|_|_| lieutenant |_|O|O|_|_| |O|_|_|_|_| sergeant |_|_|_|_|_| |_|_|_|_|_| corporal |_|_|_|_|_| |O|O|_|O|_| _ _ _ _ _ shovel |_|O|O|_|_| poison |_|_|_|_|_| poker |_|_|O|_|_| gun |_|_|_|_|_| knife |_|_|_|_|_|

We haven’t used the last clue yet, but there’s already some additional processing we can do, now that enough has been filled in; we’ve been watching for this to happen!

Now it gets interesting. Notice that the column for the shovel has 4 O's in it. The shovel was not used to kill the general, the captain, the lieutenant, or the corporal. That leavesonly one possibility, that the shovel was used to kill the sergeant. We'll mark that fact down with an X: B D A P B S P P G K _ _ _ _ _ _ _ _ _ _ general |_|_|_|_|_| |O|O|_|O|_| captain |_|O|O|_|O| |O|_|_|_|_| lieutenant |_|O|O|_|_| |O|_|_|_|_| sergeant |_|_|_|_|_| |X|_|_|_|_| corporal |_|_|_|_|_| |O|O|_|O|_| _ _ _ _ _ shovel |_|O|O|_|_| poison |_|_|_|_|_| poker |_|_|O|_|_| gun |_|_|_|_|_| knife |_|_|_|_|_|

Whenever we make an X, we can fill in the rest of the row or column:

Since we know that sergeant was definitely killed with the shovel, we know he wasn't killed with any other weapon, so we can mark O's in all the other columns: B D A P B S P P G K _ _ _ _ _ _ _ _ _ _ general |_|_|_|_|_| |O|O|_|O|_| captain |_|O|O|_|O| |O|_|_|_|_| lieutenant |_|O|O|_|_| |O|_|_|_|_| sergeant |_|_|_|_|_| |X|O|O|O|O| corporal |_|_|_|_|_| |O|O|_|O|_| _ _ _ _ _ shovel |_|O|O|_|_| poison |_|_|_|_|_| poker |_|_|O|_|_| gun |_|_|_|_|_| knife |_|_|_|_|_|

Now back to the last clue:

Finally we'll fill in clue #5: "The man murdered in the basement had just had dinner with the corporal, the captain, the man done in with poison, and the victim of the poker." First, the captain and corporal weren't killed in the basement, since they just had dinner with the man who was: B D A P B S P P G K _ _ _ _ _ _ _ _ _ _ general |_|_|_|_|_| |O|O|_|O|_| captain |O|O|O|_|O| |O|_|_|_|_| lieutenant |_|O|O|_|_| |O|_|_|_|_| sergeant |_|_|_|_|_| |X|O|O|O|O| corporal |O|_|_|_|_| |O|O|_|O|_| _ _ _ _ _ shovel |_|O|O|_|_| poison |_|_|_|_|_| poker |_|_|O|_|_| gun |_|_|_|_|_| knife |_|_|_|_|_| The man killed in the basement had dinner with the poison and poker victims, so that means those weapons weren't used in the basement: B D A P B S P P G K _ _ _ _ _ _ _ _ _ _ general |_|_|_|_|_| |O|O|_|O|_| captain |O|O|O|_|O| |O|_|_|_|_| lieutenant |_|O|O|_|_| |O|_|_|_|_| sergeant |_|_|_|_|_| |X|O|O|O|O| corporal |O|_|_|_|_| |O|O|_|O|_| _ _ _ _ _ shovel |_|O|O|_|_| poison |O|_|_|_|_| poker |O|_|O|_|_| gun |_|_|_|_|_| knife |_|_|_|_|_| The corporal and captain had dinner with the poison and poker victims too, so they weren't killed with either of those weapons: B D A P B S P P G K _ _ _ _ _ _ _ _ _ _ general |_|_|_|_|_| |O|O|_|O|_| captain |O|O|O|_|O| |O|O|O|_|_| lieutenant |_|O|O|_|_| |O|_|_|_|_| sergeant |_|_|_|_|_| |X|O|O|O|O| corporal |O|_|_|_|_| |O|O|O|O|_| _ _ _ _ _ shovel |_|O|O|_|_| poison |O|_|_|_|_| poker |O|_|O|_|_| gun |_|_|_|_|_| knife |_|_|_|_|_|

Once again, we now look for rows with only one empty cell. Here I’ll use red for what we fill in first (an X in a row, another in a column, and O’s filling out the rest of the column and row respectively), and green for a second round after those are done):

Now look at the people versus weapons grid. It's almost finished. We'll add X's to theonly open spotin all the rows thatalready have 4 O'sin them, and then the same thing for columns: B D A P B S P P G K _ _ _ _ _ _ _ _ _ _ general |_|_|_|_|_| |O|O|X|O|O| captain |O|O|O|_|O| |O|O|O|X|O| lieutenant |_|O|O|_|_| |O|X|O|O|O| sergeant |_|_|_|_|_| |X|O|O|O|O| corporal |O|_|_|_|_| |O|O|O|O|X| _ _ _ _ _ shovel |_|O|O|_|_| poison |O|_|_|_|_| poker |O|_|O|_|_| gun |_|_|_|_|_| knife |_|_|_|_|_| Now we know exactly who was killed with what weapon. We just have to figure the rooms out, so we'll add X's to the people vs. rooms grid: B D A P B S P P G K _ _ _ _ _ _ _ _ _ _ general |_|_|_|O|_| |O|O|X|O|O| captain |O|O|O|X|O| |O|O|O|X|O| lieutenant |_|O|O|O|_| |O|X|O|O|O| sergeant |_|_|_|O|_| |X|O|O|O|O| corporal |O|_|_|O|_| |O|O|O|O|X| _ _ _ _ _ shovel |_|O|O|_|_| poison |O|_|_|_|_| poker |O|_|O|_|_| gun |_|_|_|_|_| knife |_|_|_|_|_|

Here it gets a little tricky. We don't have any more columns or rows that have 4 O's, but that's okay. We cancombine some of the X's to form new facts. For example, we know the captain was killed in the pantry, and we know he was killed with the gun. That meansthe gun was the weapon used in the pantry, and we can fill in that information in the rooms vs. weapons grid: B D A P B S P P G K _ _ _ _ _ _ _ _ _ _ general |_|_|_|O|_| |O|O|X|O|O| captain |O|O|O|X|O| |O|O|O|X|O| lieutenant |_|O|O|O|_| |O|X|O|O|O| sergeant |_|_|_|O|_| |X|O|O|O|O| corporal |O|_|_|O|_| |O|O|O|O|X| _ _ _ _ _ shovel |_|O|O|O|_| poison |O|_|_|O|_| poker |O|_|O|O|_| gun |O|O|O|X|O| knife |_|_|_|O|_|

You can think of this mechanically, as filling out a rectangle in the diagram:

We can do the same thing with one O and one X. Look at the corporal row. We know he was killed with the knife, and we know he wasn't killed in the basement. That meansthe knife wasn't used in the basement. We'll record that fact in the weapons vs. rooms grid again: B D A P B S P P G K _ _ _ _ _ _ _ _ _ _ general |_|_|_|O|_| |O|O|X|O|O| captain |O|O|O|X|O| |O|O|O|X|O| lieutenant |_|O|O|O|_| |O|X|O|O|O| sergeant |_|_|_|O|_| |X|O|O|O|O| corporal |O|_|_|O|_| |O|O|O|O|X| _ _ _ _ _ shovel |_|O|O|O|_| poison |O|_|_|O|_| poker |O|_|O|O|_| gun |O|O|O|X|O| knife |O|_|_|O|_|

You can think of this, too, as a mechanical operation on the tables:

And now we know thatthe shovel was used in the basement(it's the only weapon left): B D A P B S P P G K _ _ _ _ _ _ _ _ _ _ general |_|_|_|O|_| |O|O|X|O|O| captain |O|O|O|X|O| |O|O|O|X|O| lieutenant |_|O|O|O|_| |O|X|O|O|O| sergeant |_|_|_|O|_| |X|O|O|O|O| corporal |O|_|_|O|_| |O|O|O|O|X| _ _ _ _ _ shovel |X|O|O|O|O| poison |O|_|_|O|_| poker |O|_|O|O|_| gun |O|O|O|X|O| knife |O|_|_|O|_| We know the shovel was used in the basement, and we know the sergeant was killed with the shovel. That meansthe sergeant was killed in the basement: B D A P B S P P G K _ _ _ _ _ _ _ _ _ _ general |O|_|_|O|_| |O|O|X|O|O| captain |O|O|O|X|O| |O|O|O|X|O| lieutenant |O|O|O|O|_| |O|X|O|O|O| sergeant |X|O|O|O|O| |X|O|O|O|O| corporal |O|_|_|O|_| |O|O|O|O|X| _ _ _ _ _ shovel |X|O|O|O|O| poison |O|_|_|O|_| poker |O|_|O|O|_| gun |O|O|O|X|O| knife |O|_|_|O|_|

No, we’re not going to fill in everything for you; but you’ve now seen all the kinds of reasoning you need. (This puzzle, at least so far, doesn’t require the trick we saw last time, assuming one of two possibilities is true and looking for a contradiction; you may need to refer back to that if you run across a dead-end in this or another puzzle.)

Even though we ran out of clues a long time ago, we can still get lots more information from the facts we already know, because of the way they were organized in the grid.Continuing in this fashion will allow you to complete the rest of the grid, and then you will have all the answers. Let me know if you need more help.

Give it a try!

A similar question came in the next month, from a reader who tried to apply the same method to a more complicated problem (so that the two discussions were combined):

Hello Dr. Math. From the following clues, can you determine the full name of each friend (one surname is Milnes), the sport on which he or she reported, and the number of cards that he or she has collected, as well as the type of container in which each person stores his or her cards? 1. The one surnamed Frede isn't Sally. 2. Peter and the one surnamed Clemont both own an even number of cards; the person whose oral report was about hockey (who isn't Betty) and the one who stores cards in a shoe box both have an odd number of cards. 3. The one surnamed Daly owns 5 more cards than the one who collects basketball cards, who has acquired more cards than Andy. 4. The one who stores cards in a manila envelope didn't give a report on the game of soccer. 5. The one surnamed Rousse (who isn't Betty) has more cards than Sally, who owns more cards than the collector who stores cards in a drawer. 6. The person who stores cards in an album owns more cards than Javier, who has acquired five more cards than the one whose favorite sport is soccer. 7. The one who collects baseball cards has fewer than 235 cards. I've mainly been trying to figure this out by trial and error. Some I've gotten from looking at the clues. I have a table so that way I can see what I am doing. Here is the information. First names: Peter, Andy, Sally, Betty, Javier Surnames: Milnes, Rousse, Clemont, Daly, Frede Sports: Baseball, hockey, soccer, basketball, football Numbers: 214, 219, 224, 229, 235 Container: drawer, tupperware, manila envelope, shoebox, albumI tried to use your methodto solve my problem, but it seems to me that it's a different kind of problem from the one shown above. For example: 3. The one surnamed Daly owns 5 more cards than the one who collects basketball cards, who has acquired more cards than Andy. How could I put that on my grid? Can you help me get started? Thanks for your time and consideration, Dr. Math!

This problem has five attributes, not just three! The student (whose first name is given only as D) has listed all the choices for each attribute from the problem; I initially thought the list of numbers was deduced from the clues, but since none of the clues give actual numbers, it must be that the list was actually given as part of the problem, not deduced from clues.

Doctor Code answered again, more briefly:

These can be tricky. Let's look at clue #3: 3. The one surnamed Daly owns 5 more cards than the one who collects basketball cards, who has acquired more cards than Andy. First you can get the following three facts from the clue: - Andy's last name is not Daly - Daly doesn't collect basketball cards - Andy doesn't collect basketball cards Put O's in these spots on the grid.

This is not *all* the information in the clue. The parts about numbers of cards is a little different from the previous problem, so it requires a different approach.

Next you can order the three people mentioned in clue #3 by the number of cards they have: Daly > Basketball > Andy Since Daly has more cards than at least two other people, he cannot have 214 or 219 cards. He must have at least 224 in order to have more cards than at least two other people. By this same logic, Andy cannot have 235 or 229 cards. Basketball cannot have 235 or 214 cards. Finally, Daly has 5 more cards than Basketball, which means Daly cannot have 235 cards. If Daly had 235, then Basketball would have 230, but 230 is not one of the numbers available. Therefore, Daly must have either 229 or 224. Since Basketball has 5 less than Daly, Basketball must have either 224 or 219. Since Andy has less cards than Basketball, Andy must have either 219 or 214. So now you've narrowed down Andy, Basketball, and Daly to two possibilities each for their number of cards. Clues 5 and 6 give you similar ordering relationships for the cards. Keep these three inequality sentences written down somewhere. After you make a first pass through all the clues, recording information as you go, you can discover more information just based on these three inequality sentences. Write back if you need more help.

Here is how we might arrange the table, which covers all ten pairs of attributes:

Surname Sport Container Number 2 2 2 2 2 1 1 2 2 3 C D F M R BsBkF H S A D E S T 4 9 4 9 5 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Andy |_|_|_|_|_| |_|_|_|_|_| |_|_|_|_|_| |_|_|_|_|_| Betty |_|_|_|_|_| |_|_|_|_|_| |_|_|_|_|_| |_|_|_|_|_| Javier |_|_|_|_|_| |_|_|_|_|_| |_|_|_|_|_| |_|_|_|_|_| Peter |_|_|_|_|_| |_|_|_|_|_| |_|_|_|_|_| |_|_|_|_|_| Sally |_|_|_|_|_| |_|_|_|_|_| |_|_|_|_|_| |_|_|_|_|_| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Clemont |_|_|_|_|_| |_|_|_|_|_| |_|_|_|_|_| Daly |_|_|_|_|_| |_|_|_|_|_| |_|_|_|_|_| Frede |_|_|_|_|_| |_|_|_|_|_| |_|_|_|_|_| Milnes |_|_|_|_|_| |_|_|_|_|_| |_|_|_|_|_| Rousse |_|_|_|_|_| |_|_|_|_|_| |_|_|_|_|_| _ _ _ _ _ _ _ _ _ _ Baseball |_|_|_|_|_| |_|_|_|_|_| Basketball |_|_|_|_|_| |_|_|_|_|_| Football |_|_|_|_|_| |_|_|_|_|_| Hockey |_|_|_|_|_| |_|_|_|_|_| Soccer |_|_|_|_|_| |_|_|_|_|_| _ _ _ _ _ Album |_|_|_|_|_| Drawer |_|_|_|_|_| Envelope |_|_|_|_|_| Shoebox |_|_|_|_|_| Tupperware |_|_|_|_|_|

This is a much more challenging problem than the other! There is more to learn as you work on it.

I’ll have another example, with somewhat different tools, next time.

]]>We’ll start with this question from 1997:

How Many Pieces of Candy in Each Jar? My Mom and I tried this logic question for about three hours and we still don't have the right answer. Here's the question: At the annual Cumberland County fair, one of the more popular booths is the Candy Contest.Five jars, each of which contains a differenttype of candy(one is bonbons) and has a different-coloredlid, arelined upon a shelf, and contestants guesshow many pieces of candyare in each jar. From the information provided, can you determine the color of the lid (one is pink) on each jar A, B, C, D, or E), the type of candy in the jar, and the number of pieces in it (125, 150, 175, 200, or 225)? 1.Gumdropsare in the jar to the immediaterightof the one with thebluelid and to theleftof the one containing175candies. 2. Thewhite-lidded jar is onone endof the shelf and the jar containing150pieces of candy is on theother end. 3. There are225 jellybeansin the jar to the immediaterightof thelicorice sticksand to theleftofat least one otherjar. 4. Thebutterscotchcandies are in the jar with theyellowlid. 5. The jar with thegreenlid, which isnotnext tothe jar with thewhitelid, is to the immediateleftof the jar containing200candies. 6. The jar with thewhitelid doesnotcontain125pieces of candy. The jars are: A B C D E The best we could do was this: green yellow blue pink white 150 200 225 125 175 bonbons L.S. jelly gum butterscotch beans drops A B C D E The butterscotch is supposed to be yellow and there never seems to be a place for it. Can you help?

Doctor Rob answered, stepping us through the initial steps of analyzing the problem. First, we have to think about what is implied by each clue, which may be more than you think:

Ahhh! Another logic puzzle. These are usually fairly straightforward. The clues give us various useful facts, and some less useful but important relations between the locations, numbers, colors, and candy types. I will deal with the clues in turn. Clue 1 ==> F1: Gumdrops are not in the jar with the blue lid. 1 ==> F2: Gumdrops are not in the jar with 175 candies. 1 ==> F3: The jar with the blue lid doesn't have 175 candies. 1 ==> F4: Gumdrops are not at A. 1 ==> F5: Gumdrops are not at E. 1 ==> F6: 175 candies are not at A. 1 ==> F7: 175 candies are not at B. 1 ==> F8: The blue lid is not at D. 1 ==> F9: The blue lid is not at E. (There is more location information, too.) 2 ==> F10: The white lid is not at B. 2 ==> F11: The white lid is not at C. 2 ==> F12: The white lid is not at D. 2 ==> F13: 150 candies are not at B. 2 ==> F14: 150 candies are not at C. 2 ==> F15: 150 candies are not at D. 2 ==> F16: The jar with the white lid doesn't have 150 candies. 3 ==> F17: There are 225 jellybeans. 3 ==> F18: There are not 225 bonbons. 3 ==> F19: There are not 225 licorice sticks. 3 ==> F20: There are not 225 gumdrops. 3 ==> F21: There are not 225 butterscotches. 3 ==> F22: There are not 125 jellybeans. 3 ==> F23: There are not 150 jellybeans. 3 ==> F24: There are not 175 jellybeans. 3 ==> F25: There are not 200 jellybeans. 3 ==> F26: The jellybeans are not at A. 3 ==> F27: The 225 candies are not at A. 3 ==> F28: The jellybeans are not at E. 3 ==> F29: The 225 candies are not at E. 3 ==> F30: The licorice sticks are not at E. 3 ==> F31: The licorice sticks are not at D. (There is more location information, too). 4 ==> F32: The butterscotches are under the yellow lid. 4 ==> F33: The bonbons are not under the yellow lid. 4 ==> F34: The licorice sticks are not under the yellow lid. 4 ==> F35: The jellybeans are not under the yellow lid. 4 ==> F36: The gumdrops are not under the yellow lid. 4 ==> F37: The butterscotches are not under the green lid. 4 ==> F38: The butterscotches are not under the blue lid. 4 ==> F39: The butterscotches are not under the pink lid. 4 ==> F40: The butterscotches are not under the white lid. 5 ==> F41: The green lid is not at E. 5 ==> F42: The 200 candies is not at A. 5 ==> F43: The 200 candies are not under the green lid. (There is more location information, too). 6 ==> F44: The 125 candies are not under the white lid.

In the answer to the next question, Doctor Rob will tell us about a visual way to organize such information.

Next, we find a fact that is almost known (with only a couple possibilities), and assume one possibility for the sake of argument; we’ll go back and change that if it leads to a contradiction.

Now we derive a fact from others: F21 & F32 ==> F45: The 225 candies are not under the yellow lid. Since there are just two places for the white lid,let's assume one of them. Assume:A1: The jar with the white lid is at A.Derive the following consequences: A1 & F44 ==> C1: 125 candies are not at A. A1 & F16 ==> C2: 150 candies are not at A. C1, C2, F6, F42 & F27 together are a contradiction. The conclusion is that theassumption A1 is wrong. Thus we have the following: F46: The white lid is not at A. F46, F10, F11 & F12 ==> F47: The white lid is at E. F47 ==> F48: The yellow lid is not at E. F47 ==> F49: The pink lid is not at E. F47 & F29 ==> F50: The 225 candies are not under the white lid. F47 & F30 ==> F51: The licorice sticks are not under the white lid. F47 & F28 ==> F52: The jellybeans are not under the white lid. F47 & F5 ==> F53: The gumdrops are not under the white lid. F40, F51, F52 & F53 ==> F54: The bonbons are under the white lid. F54 ==> F55: The bonbons are not under the green lid. F54 ==> F56: The bonbons are not under the blue lid. F54 ==> F57: The bonbons are not under the pink lid. F54 & F47 ==> F58: The bonbons are at E. F58 ==> F59: The bonbons are not at A. F58 ==> F60: The bonbons are not at B. F58 ==> F61: The bonbons are not at C. F58 ==> F62: The bonbons are not at D. F58 ==> F63: The butterscotches are not at E. 5 & F47 ==> F64: The green lid is not at D.

Again, we make an assumption, which will be found to be false:

Nowassume the blue lid is at A. By clue no. 1, the gumdrops would be at B. Since by clue no. 3 the licorice sticks and the jellybeans are adjacent, they must fit into C and D, so the licorice sticks would be at C, and the 225 jellybeans at D. That leaves the butterscotches at A, which means the yellow lid has to be at A, which contradicts the assumption. Thus: F65:The blue lid is not at A.

Keep in mind that assumptions are not things we consider actually true, only temporarily so. If it didn’t lead to a contradiction, we’d still want to come back and try the alternative, in order to be sure that our answer is not just one of several possibilities.

Nowassume the blue lid is at C. By clue no. 1, the gumdrops would be at D, and the 175 candies at E. Since the yellow lid covers the butterscotches, it must be at A or B, but if at B, no. 3 would be contradicted. Thus the yellow lid and the butterscotches would have to be at A, the licorice sticks at B, and the 225 jellybeans at C. Now the green lid cannot be at A (the yellow lid is) or at B (since the 200 candies would have to be at C, but the 225 are), or at C (the blue lid is) or at D (it is next to the white lid), or at E (the white lid is). Thus we have a contradiction, and so: F66:The blue lid is not at C. F8, F9, F65 & F66 ==> F67: The blue lid is at B. Now use the location information from clues numbers 1, 3, and 5 above to reason as in the above two paragraphs and finish figuring out what is where. I note that the solution is unique.

Like Doctor Rob, I’ll leave the rest to you. But knowing that there is a (unique) solution provides hope that your work will not be wasted. That’s part of the fun of puzzles; in real life, we can’t always be sure of that.

The following problem is also from 1997:

The Sportsville Teams Our teacher gives us these kinds of logic problems each week. They have to do with combining the clues, and I think they are really hard. Sometimes I solve some of a problem, but I am seldom able to finish all of it. Are there straightforward methods for solving logic problems like this one? Sportsville teams. There are four stadiums in Sportsville: Memorial, the Coliseum, Central, and All Saints. These are the homegrounds for football, soccer, baseball, tennis, and basketball teams. Two teams share the same stadium. The five teams are the Blazers, the Fireballs, the Streaks, the Flames, and the Demons. From the clues given, try to determine theNICKNAMEof eachsports teamand theSTADIUMSat which they play: 1) Neither theDemonsnor the team that plays atCentralmustshareits stadium but theFlamesmust. 2) Thefootballteam doesn`t play atCentralstadium and itsharesits stadium with theStreaks. 3) Thebasketballteam, thebaseballteam, and theFireballsdo not sharetheir stadiums. 4) Thesoccerteam isnotcalled theFireballsanddoesn`tplay atAll Saints. 5) Thetennisteam plays atMemorialstadium but thebaseballteam doesnotplay atAll Saints.

The stadium-sharing makes this a little different!

Doctor Rob answered again, starting with a way to organize his thinking, by making a table for each *pair* of attributes. (Next time, we’ll see an example of tables like these in use.)

To do problems like these, I make adiagramto help me keep track of what is known. In this case there arefour attributes: stadium, sport, nickname, and sharing. This means that my diagram will have 1 + 2 + 3 = 4*(4-1)/2 =6 parts. Each part will be a rectangular array. The first part will bestadium versus sport, so it will have four rows and five columns. Each row will be labeled with the name of a stadium, and each column with the name of a sport. In any cell in the array, I put a 1 if that sport is played in that stadium, and a 0 otherwise. The second part will bestadium versus nickname, so it will also have four rows and five columns. Each row will be labeled with the name of the stadium, and each column with the nickname of a team. In any cell in the array, I put a 1 if that team plays in that stadium, and a 0 otherwise. The third part will bestadium versus sharing, so it will be 4-by-1. The fourth part will besport versus nickname, so it will be 5-by-5. The fifth part will besport versus sharing, so it will be 5-by-1. The sixth part will benickname versus sharing, so it will be 5-by-1. Ineach row or columnof each array there will be either a single 1 and the rest 0s, because each sport is played in only one stadium, and so on; or else there will be exactly two 1s and the rest 0s, because one stadium hosts two teams, and so on. There should be exactly five 1s in the 4-by-5 and 5-by-5 arrays, two 1s in the 5-by-1 arrays, and one 1 in the 4-by-1 array.

Thinking through all of this from the start helps in carrying out the work; we’re setting the rules for our game, and planning how to recognize a valid solution.

Next, he copies the clues and breaks them apart, identifying facts as he did last time, which can be put into the tables, each Fact represented by a 1 or 0. Fill out your tables step by step to follow the reasoning:

Now we carefully analyze the clues for facts that they imply. I use the symbol "=>" to mean "implies". Each fact will allow us to put a 0 or a 1 in one of the six arrays. 1) Neither the Demons nor the team that plays at Central must share its stadium but the Flames must. 2) The football team doesn`t play at Central stadium and it shares its stadium with the Streaks. 3) The basketball team, the baseball team, and the Fireballs do not share their stadiums. 4) The soccer team is not called the Fireballs and doesn`t play at All Saints. 5) The tennis team plays at Memorial stadium but the baseball team does not play at All Saints. 5) => F1: The tennis team plays at Memorial stadium. F2: The tennis team does not play at the Coliseum. F3: The tennis team does not play at Central. F4: The tennis team does not play at All Saints. F5: The baseball team does not play at All Saints. 4) => F6: The soccer team is not the Fireballs. F7: The soccer team does not play at All Saints. 1) => F8: The Demons do not share their stadium. F9: Central is not the shared stadium. F10: The Flames share their stadium. 2) => F11: The football team doesn't play at Central. F12: The football team is not the Streaks. F13: The football team shares its stadium. F14: The Streaks share their stadium. F9 above. 3) => F15: The basketball team does not share its stadium. F16: The baseball team does not share its stadium. F17: The Fireballs do not share their stadium. F18: F10 & F14 => The Streaks and Flames share their stadium. F19: F10 & F14 => The Blazers do not share their stadium. F20: F13 & F12 & F18 => The football team is the Flames. F21: F20 => The football team is not the Blazers. F22: F20 => The football team is not the Fireballs. F23: F20 => The football team is not the Demons. F24: F20 => The soccer team is not the Flames. F25: F20 => The baseball team is not the Flames. F26: F20 => The tennis team is not the Flames. F27: F20 => The basketball team is not the Flames. F28: F18 & F16 => The baseball team is not the Streaks. F29: F18 & F15 => The basketball team is not the Streaks. Nowifthe Streaks played at All Saints, by F4, F5, and F7, they could not be the tennis, baseball, or soccer teams, and by F29 and F12, they are not the basketball or football teams. This is a contradiction, so F30: The Streaks do not play at All Saints. F31: F30 & F18 => All Saints is not the shared stadium. F32: F31 & F18 => The Flames do not play at All Saints. F33: F18 & F9 => The Flames do not play at Central. F33: F18 & F9 => The Streaks do not play at Central. F34: F32 & F20 => The football team does not play at All Saints. F35: F34 & F4 & F5 & F7 => The basketball team plays at All Saints. F36: F35 => The basketball team does not play at Central. F37: F35 => The basketball team does not play at the Coliseum. F38: F35 => The basketball team does not play at Memorial.

Sometimes English grammar is ambiguous, or the logic of a clue may not be identical to formal logic. The first clue, “Neither the Demons nor the team that plays at Central …”, doesn’t imply, to a mathematician, that the two teams mentioned are necessarily distinct; but in everyday language it does. Similarly, the third clue, “The basketball team, the baseball team, and the Fireballs …”, doesn’t logically demand that these are three different teams, but it would be unnatural to say that it if they weren’t. It’s always a good idea to note any questionable interpretations, rather than to just barge through your work without identifying places where you might be wrong (and might have to come back and change your opinion). So he points these things out:

Questions: Does 1) => The Demons do not play at Central? Does 3) => The Fireballs do not play basketball or baseball? These arequestions of semantics, not of mathematics or logic, I think. They need to be clarified with your teacher. In this case,the answer is not unique unless this is what is meant, so I suppose we can go ahead and assume that that is what is meant. 1) => F39: The Demons do not play at Central. 3) => F40: The Fireballs do not play basketball. F41: The Fireballs do not play baseball. These last three facts imply many further facts, starting with the Fireballs playing tennis (F6, F22, F40, F41).

The rest is up to you, after a brief explanation of the use of assumptions we saw in the first problem:

At some pointwe may have to make an assumption. Assume one of a small set of possibilities, and try to see what it implies. Call the assumption A1, and the consequences it implies C1, C2, ... If the assumption implies a contradiction, it must be false, and the set of possibilities is reduced in size. Then discard A1 and its consequences, and continue. This is what we did after F29 above. This is the way that these logic puzzles are worked out. Usually theyare constructed so that there is only one solution, and you are more or less forced to discover it by this method. With this start, you should be able to finish the problem.

Isak replied,

Thank you so much for the help with the logic problem!I was able to sort it out by keeping track of the information the way you taught me.I am sharing this help with some friends.

Just what we like to see!

Next time, I’ll have two more puzzles of this type, again with partial solutions.

]]>We’ll start with a 2002 question that is called an Order of Operations problem, but in fact is just like the 24 game we looked at last time:

Order of Operations Problems - a General Strategy My homework was really hard.Can you tell me the answerto this problem? Make an equation using 7, 26, 46, and 15 to equal 160. I have worked it out several different times and still cannot figure it out. Here's another one: how can you get 18, 9, 24, and 20 to equal 18? At first I thought they looked easy, but I was wrong. Please help me.

There are two different puzzles here, the first with a large target number, the other smaller.

Doctor Ian answered, starting with an important comment about the best type of help, which is *not* to just give the answer:

Hi Kara, For a question like this,the answer is unimportant. The purpose of the question is to get you to generate a lot of _wrong_ answers, since that will give youpracticein doing arithmetical operations (addition, subtraction, multiplication, and division). If we told you the answer, it would be sort of likegoing to soccer practice in your place. What would be the point?

The puzzle is meant for practice in evaluating using the order of operations; to give an answer would remove all its value. But it is also meant to develop perseverance and problem solving strategies, like many puzzles, and training in that is useful. So we will commonly solve a similar problem, sometimes one of those asked about, while leaving the rest for the student.

Doctor Ian first gives a strong hint for the smaller problem, using 18, 9, 24, and 20 to make 18:

In the second part, I can give you this hint: It's possible to use 9, 24, and 20 tomake 36; and 36 - 18 = 18.

This is the typical hint we give to someone struggling with the 24 game: Take them past some of the trial and error, and leave them with a smaller version of the same problem. This is the same “last operation first” strategy we used last time; if we make subtraction of 18 the last operations, can we get the required 36 from the other three numbers? This is not hard at this point; give it a try.

Now he explains the strategy itself for the first problem, using 7, 26, 46, and 15 to make 160, which is considerably harder:

That, by the way, is a general sort of strategy you can use. Pick out one number, and the result, and think about how you could get to the result in one step using that number. For example, to get to 160 from 15, you might do one of these: 160 =15+ 145 =15* 12 = 175 -15= 2400 /15So now you have a set of smaller problems: Can you use the other three numbers to make145, 12, 175, or 2400? If not, you can try again using one of the other numbers as your choice.

The harder problems of this type require a different kind of guess, but these will do for a start. We now have a set of four possible targets for only three numbers, 7, 26, 46, reducing the number of things to try.

… But now that I have explored this problem a little, filling my mind with some of the numbers I can make with pairs from our list, I have a different strategy to suggest: Rather than start with one of the *numbers*, start with a last *operation* only. If we suppose the last operation is multiplication, what possible factors could you multiply to get 160? Are any of them numbers in our list? Can any be made from two numbers in the list? How about three? If all these fail, we’d move on to another operation, such as addition. But we don’t need to; this strategy leads quickly to an answer.

Here is a very different one, also from 2002:

Order of Operations Puzzle What is _ + _ x _ - _ = 22? We're given the numbers 2, 3, 4, 8.

Doctor Ian answered with a hint to follow the order of operations:

Hi Laurel,You're going to do the multiplication first, so the possible multiplications are: 2*3 = 6 2*4 = 8 2*8 = 16 3*4 = 12 3*8 = 24 4*8 = 32 That means that the answer must be one of these: __ + 6 - ___ = 22 use 4, 8 __ + 8 - ___ = 22 use 3, 8 __ + 16 - ___ = 22 use 3, 4 __ + 12 - ___ = 22 use 2, 8 __ + 24 - ___ = 22 use 2, 4 __ + 32 - ___ = 22 use 2, 3 This is a pretty common problem-solving technique: You replace one hard problem with some easier ones. Can you take it from here?

Here it makes sense to consider the first operation first! Here’s an extra hint: We’ll be adding one of the remaining numbers and subtracting the other, so the net result is to add the *difference* of the two numbers (in some order) to the product in the middle. That can make the calculations quicker.

Did you find the answer yet?

The next (not explicitly called an order of operations puzzle) is from earlier in 2002:

Where to Put the Parentheses? I am stuck on where to put parentheses in a math expression to make the expression true. I tried to use the guess-and-check strategy but it wouldn't work for me. Here is a problem I need to put parentheses into to make the equation true: 9 - 6 + 4 * 6 / 3 = -2

The trouble with mere guess-and-check is that you can’t be sure whether you have missed any guesses. After trying that for a while (which is good to start with, if you’re optimistic), you need to switch over to *orderly* guesses.

I replied, explaining first why I was going to show the entire process rather than just give a hint:

Hi, Hennaysha. I can't think of any method you can use other than guess and check; you just have to come up with the right guess. That makes it hard for me to come up with a good hint other than giving you the answer. ButI'll go through the problem to illustrate how you might think.

The hope is that there are other problems that will require the same kind of thinking.

You have anegative answer, but there's onlyone negative signin the whole expression. If you just subtract 6 from 9, you'll get 3, and there will be no way to make a negative answer, so you must be subtracting some expression greater than the 6 alone from the 9: 9 - (6 + 4 * 6 / 3 = -2

I only put in the left parenthesis; but wherever I put the right parenthesis, the subtraction will be the last operation done. Or … maybe not! There might be another parenthesis before the 9. It’s important not to make assumptions as we move forward. (In fact, just pondering that possibility just now made me see the solution.)

But where can we put the right parenthesis? We can try all possible places: 9 - (6 + 4) * 6 / 3 = 9 - 10 * 6 / 3 9 - (6 + 4 * 6) / 3 = 9 - 34 / 3 9 - (6 + 4 * 6 / 3) = 9 - 14

Now I’m being systematic; but I may still have more parentheses to insert. These are not the only possibilities.

None of these gives -2; but looking back at them, I see that I can place another pair of parentheses in the first attempt and get the right answer: [9 - (6 + 4)] * 6 / 3 = 3 ==> [9 - 10] * 6 / 3 = -1 * 6 / 3 = -2

One of the things I often tell students is that they need to make a habit of asking themselves, “Am I finished? Is there more I can do?” Here, looking at the expressions on the right, with fewer numbers than the original, made it easier to see what more I could do.

The best "guess-and-check" works like this: you look for ways to restrict your guesses, make them, and then refine those based on the results. In this case, it worked out well to actually simplify each parenthesized version and then repeat the process by looking for places to add another pair; there probably won't always be such an obvious choice for the first pair, but this idea may help at least a little. Mostly it takes patience; if you haven't guessed, this kind of exercise is meant to give you LOTS of practice evaluating expressions with parentheses, soyou can expect to have to do a lot of checking.

Now I’ll give you, the reader, a little challenge: What if the number on the right, instead of -2, had been -11. Do you see the new answer?

The next is from 2003:

Where Do the Parentheses Go? I'm trying to help my daughter with some problems she's been given. Each one has a string of numbers and operations on one side, and a result on the other side. What you're supposed to do is insert parentheses around the numbers and operations in order to get the result. For example: 2 2 2 2 + 7 - 3 / 3 - 1 * 5 = 35 I know how PEMDAS works, butI don't see how to solve these problems without just doing a lot of guessing. Argh!

Exponents don’t really make this much harder, because the notation prevents them from being combined with anything else. The problem as written is “\(2+7^2-3^2\div 3^2-1\cdot 5 = 35\)“. If this had been written in the plain-text form “\(2+7\hat{ }2-3\hat{ }2/3\hat{ }2-1\times 5\)“, it would be possible to do things like “\(2+7\hat{ }(2-3\hat{ }2)/3\hat{ }2-1\times 5\)” (that is, “\(2+7^{(2-3^2)}\div 3^2-1\cdot 5 = 35\)“), which couldn’t be what was intended! So this isn’t quite as bad as it could be. On the other hand, as written we will not necessarily be squaring the 7 and 3’s, because we might have something like “\((2+7)^2-3^2/3^2-1\times 5\)“, changing the base of a power.

I answered, pointing out as we’ve seen that “a lot of guessing” is exactly what it’s all about:

Hi, Lynn. This sort of problem is just a puzzle -- there is no standard, straightforward way to solve it, you just have totry things out and make intelligent guesses. It may help to read what we have to say about the order of operations http://mathforum.org/library/drmath/sets/select/dm_order_op.html but there is no specific technique we can give you. I'll just try to get you started, thinking through the problem until I see where to go.

I often do this, just thinking off-the-cuff to demonstrate how I approach an unfamiliar problem without first knowing what the answer is.

Using our e-mail notation, your equation is 2 + 7^2 - 3^2 / 3^2 - 1 * 5 = 35 Looking at this, I notice that 35 = 5*7, and that there is a 7 and a 5 in the left side. So my first action is to add parentheses so thatmultiplication by 5 will be the last operation performed; if we can make the rest of the expression equal 7, we'll be in good shape.This is just a guess; it may turn out that we won't want to multiply by 5 at all. But we can try it: (2 + 7^2 - 3^2 / 3^2 - 1) * 5 = 35

Here I am starting off with the “last-operation” approach, and first trying multiplication, just as in a previous problem. I tend to do this when the target number is factorable.

Now, it's not obvious that we can get 7 out of that, or that the 7 that is there will in any way show through in the final form (since we can't undo the squaring, and we would have to divide by 7 to leave ourselves with just one 7). But I do see, at least, that7^2 is much too big, so we have to make it smaller, either by subtracting something big or by dividing.

Size is often a useful thing to focus on, in addition to factors.

As written, the division only affects 3^2; 3^2/3^2 is 1. So we'll want to have parentheses around at least part of 2 + 7^2 - 3^2 and we can decide eventually how much of 3^2 - 1 to divide by. If we used all of both, we'd have (2 + 7^2 - 3^2) / (3^2 - 1) = 42/10 which is in the right ballpark but not a whole number, much less exactly 7. It doesn't help if we divide 42 by 3^2 or by 3 rather than 3^2 - 1.

We needed a big enough number to subtract, and 1 didn’t help. But just subtracting the 9 didn’t either.

Now we can try either adding more parentheses inside (2 + 7^2 - 3^2) to change what we are dividing, or pull the 2 outside of the parentheses.

I might also think backward: If the divisor is as written, 8, then the dividend will have to be 56.

I’ve tried things blindly long enough; sometimes when I step back too long to explain my thinking, I forget to actually think, and miss things. So I sat back and actually tried to solve it.

At this point I've finally looked ahead enough to see the solution. I'll leave you with just a hint: you'll want to take the first choice I mentioned in the last paragraph, and you'll have to change what you divide by as well. See what you can do.

So you should add parentheses into the numerator, and do something else outside. But don’t be fooled and add parentheses into \(3\hat{ }2-1\) to get \(3\hat{ }(2-1)\); that wouldn’t make sense in the original form!

Have you found the answer yet?

]]>We received dozens, if not hundreds of questions about this game over the years; it happens that the only ones put in the archive for public view are the very hardest cases. So half of this post will be unarchived questions and answers that better introduce the puzzle, then work toward the hard ones.

This is from 2006:

How do I work a math problem in reverse?I need to end up with ananswer of 24. I am able to use the numbers5, 6, 7, and 7only once and am able to use addition, subtraction, multiplication or division without restriction. There are so many ways to configure those 4 numbers, the possibilities seem endless. I figure there has to be some logic to figure this out - I just don't know what it is! Example: 7*7 = 49*5 = 245/6 = 40.8 (we have tried this with all numbers). Example: 7+7 = 14*6 = 84/5 = 16.8 (again, we have tried this with all numbers).

Holly is right; there are very many ways to arrange the numbers and operations! We’ll later look at what it takes to try all possibilities; what we need is a way to more quickly find a solution, trusting that there is one. (The published game has a set of cards with groups of four numbers, graded by difficulty; if you were to choose four numbers at random, it might well be impossible.)

Holly’s attempts, written as expressions, are \((7\times 7)\times 5\div 6 \approx 40.8 \ne 24\) and \((7 + 7)\times 6\div 5 = 16.8 \ne 24\).

I answered:

We get lots of questions about the 24 game. There's no one quick way to solve them all; the only way I know to be sure to solve one is to try every possibility in an orderly way, and you know how hard that is. A "heuristic" method (using insight to try to find an answer quicker than that) will not be foolproof, but often helps. What I usually do is essentially anorderly search, but done in a way that hopefully will start with some of the more likely possibilities.

I offered one heuristic, for our example of 5, 6, 7, 7:

I often start by thinking aboutthe LAST operation being done. Suppose that is a multiplication. The easy cases would be when Imultiply a whole number by one of the given numbersand get 24. In this example, the only possibility is 6 times 4; so I would ask myself whether I can get 4 from 5, 7, and 7. Thatreduces the problem to one with only three numbers, so it's easier to see possibilities. I don't see a way; so I might either consider the possibility that we have tomultiply a FRACTION by one of the numbers, or that we will be multiplying together two numbers that are each obtained bycombining two of the given numbers. Both of those are harder to work with.

The first possibility I considered had the form $$(\text{something equal to 4})\times 6;$$ the harder ones are, for example, $$(\text{something equal to 24/5})\times 5,$$ and $$(\text{something equal to 3})\times(\text{something equal to 8}).$$ The latter are worth considering, but generally left for last.

So before I try the hard cases, I usually look for ways in which the last operation might be addition or subtraction. That is, if the last step isadding or subtracting 5, I need to be able to get 24+5=29, or 24-5=19, from the remaining numbers, 6, 7, 7. I don't see a way to do that, so I try 6, and so on. Having said all that, I can't find a solution yet! Keep trying, and I'll try again later, too.

Here I have tried possibilities like $$(\text{something equal to 29}) – 5$$ or $$(\text{something equal to 19}) + 5$$.

Twenty minutes later, I added this:

As soon as I left the computer I wrote down your numbers, looked at them, and almost immediately realized I'd missed the answer on the very first guess I mentioned. It turns out that you CAN make 4 from 5, 7, and 7. Can you see how?

Do you see it yet? I must have just been too focused on explaining my thinking, rather than actually thinking!

The next day, Holly wrote,

Just curious to see if what I came up with was the same thing that you did: 5 - (7/7) * 6 = 24 Thanks so much for your help.

She had the right idea, but the wrong notation, perhaps not being familiar with the order of operations. I answered,

That's what I got, but you have to place the parentheses differently to get the correct result: (5 - 7/7) * 6 This way it says to first divide 7 by 7, then subtract that from 5, and then multiply by 6. Your version would give -1, since you would have to divide 7 by 7, multiply that by 6, and then subtract. But you got the right answer.

So we both found that \(\displaystyle 5 – \frac{7}{7} = 4\), so we just had to multiply that by 6. In elementary-level form, this is $$(5 – 7 \div 7) \times 6 = 24$$

This one is from 2002:

Figure the total of 24How can you make the numbers 9, 2, 8, & 7 equal 24 by adding, subtracting, multiplying and/or dividing the numbers?

Doctor Schwa responded as we prefer to do on these, with a quick hint, suggesting a possible last operation:

Hi Sharon, Here's a hint:make 32 - 8.

That was enough; Sharon responded,

I figured out the answer to the question i asked you and we both have the same answer butyou did not explain how you got it. The children in my son's class are in a contest called 24 and the child that gets the most correct in a certain amount of time will win From the school a $50.00 savings bond. It will then be held Countywide and the winner will win a $1000 saving bond. My son came in 2nd place. (boo-hoo) Anyway the answer to my question was: 7 + 9 = 16 x 2 = 32 - 8 = 24 Have you ever heard of this thing called "24"?

This answer, as a single expression rather than a chain of calculations, is $$(7+9)\times 2 – 8 = 24$$

Now it was time to teach a strategy, which is just a little different from mine:

Yes, this 24 game is a lot of fun! Teachers around here use it, or variants of it, as a way to practice number sense and order of operations. Usually they use it as a start-of-class activity to get people warmed up and thinking mathematically. My method of solving these is togroup the numbers into pairs, or intosets of three and one, and then to try to figure out if there's anything I can make in the groups that I could then combine to make 24. It took a while to see that (2,7,9) and (8) could become 32 - 8, but eventually I noticed that. At first I was trying to make 3*8 or 16 + 8, neither of which worked out. I thinkone of the hardest problems of this type is 3,3,7,7. 5,5,5,1 is similar and perhaps just a tiny bit simpler.

We’ll be closing with those last two examples, once we’ve built up to them.

The typical problem uses only whole numbers, and often only single-digit numbers. But the game can be extended to provide practice with decimals or fractions.

Here is a very different one from 2001:

Finding 24Have to get 24 by using these numbers once: 2.8 2 1 .2 using addition, subtraction, multiplication or division. Don't know where to start.

Doctor TWE answered:

Interesting variant on the traditional 24 game! Here's a hint: We have toget rid of the decimal partsof 2.8 and .2. I can think of two ways of doing that, either add them: 2.8 + .2 = 3 or divide by .2: 2.8 / .2 = 14 (Note thatdividing by .2 is the equivalent of multiplying by 5.)

This fits a general strategy that is also useful in algebra: Find the “worst” thing about what we are given, and fix that first. Here, it’s the decimals. No other addition would accomplish this, but we could divide anything (including the result of some operation on the other numbers) by 0.2.

You may want to try doing some operations with the 2.8 before dividing by .2, for example: (2.8 - 1) / .2 = 9 and so on.

Can you find the answer now? Here’s one more hint: Nothing he wrote is part of the actual answer, but the last one came close. You can use my previous strategy in combination with his ideas.

The next one, from 2008, involves several modifications: We have **negative integers**, and a **different target** (20 instead of 24); also it appears that the allowed operations are extended, though we won’t need that.

Solve -5, -2, 6, 8 = 20Using the rule of Go 20 and given the above numbers they must equal 20. I have tried many combinations like the one below: (6+8) + (-5-2) = I have tried BEDMAS, exponents, etc

Doctor Ali answered, mostly giving general strategies:

Hi Philip! Let's talk first about how we can deal with this kind of problem. There are a finite number of operators, and a finite number of places to put them, so this creates a finite number of possible solutions.In theory, we could try them all, but the number of possibilities may be so great that we'd be unable to do this by hand. (A computer can help with this.) However, sometimes we can be clever, which lets usrule out lots of possibilitiesso we never even need to consider them.

He is going to suggest more heuristic methods.

(Note that sometimes a problem like thismay have no solution. An example would be to add basic operators to 1 ? 1 ? 1 = 10 But there's no way to do it. So we always have to be aware of this possibility.)

If we were allowed to concatenate and use decimals, as in Four Fours, this one could be done; but that wouldn’t just be inserting operations. We have received a number of 24 games over the years that a computer reports as impossible; for example, try 3, 5, 7, 7, or 8, 9, 9, 9. Rather, don’t!

Let me give you some examples of using cleverness to narrow the set of possibilities that need to be considered. This isn't a set of steps you can follow to just take you to the answer. (If there were such a set of steps, no one would bother to pose problems like this. The purpose of such problems is to give you practice at being organized in your searches... and to give you lots of practice with arithmetic!) If you're givensmall values, and you need to get alarge result, consider usingmultiplication(or exponents, or factorials if they're allowed by the problem), and of course,addition. If you're givenlarge numbers, and you need to get asmall result, consider usingdivision, or roots if allowed. Also, of course,subtraction.

These are valuable general rules that I follow in many puzzles, such as sequences.

Maybe the most useful thing I know is that, if you can get the result with SOME of the numbers, you can try toconvert the others into ones and zeros, since result + 0 = result and result * 1 = result So by getting ones and zeros, you canget some of the numbers to just 'disappear' from the problem! Here's an example: Use 3, 8, 2, and 1 to get 24. Since 3*8 is 24, we'd like the 2 and 1 to just go away. Since (2-1) is zero, we can do this: 24 = 3 * 8 * (2 - 1)

The hardest problems won’t allow for this, but if you want to solve an easy one quickly, be sure not to miss these possibilities! They are very useful in the Four Fours game.

Also, note that when all else fails, for small problemsyou CAN do a systematic search of every possibility!The hard part about that is making sure that you don't skip some possibilities, or waste your time considering others more than once. See Combining Numbers http://mathforum.org/library/drmath/view/64637.html

We’ll be looking at this page soon; it isn’t pretty.

Now, how about Philip’s own problem? Start with the working backward strategy:

The final tip I have for you is this. When I look at the problem Use -5, -2, 6, and 8 to get 20. I start looking forpartial solutions. For example, 20 = -5 * -4 So if I can use -2, 6, and 8 to make -4, that will work. 20 = -2 * 10 So if I can use -5, 6, and 8 to make 10, that will work. 20 = -5 + 25 So if I can use -2, 6, and 8 to make 25, that will work. 20 = -5 - -25 So if I can use -2, 6, and 8 to make -25, that will work. and so on. In fact, I can tell you right now that one of the four tips above will lead you to a solution...

Have you solved it yet?

Now let’s look at one of the hardest problems, and solve it the hardest way! This is the answer Doctor Ali referred to above, from 2002:

Combining Numbers Combine the numbers 3, 3, 8, and 8, using only addition, subtraction, multiplication, and division, to come up with the number 24.We appear to have used every combinationand have not come up with the answer 24. We just need to know how it is worked out please. Warm regards, Roger

This one where my usual advice is that the very last thing you’d think of is the answer!

Doctor Ian answered:

Hi Roger, What makes this kind of problem so difficult is that it's easy to just start trying things, without any good way ofkeeping track of what you've tried, or any way ofknowing when you've tried everything. Ultimately, all the operators (+, -, *, /) are binary, which means they have to work on two operands, so we have to begin bychoosing two operandsto work with. There are three ways we can do that: (3,3,8,8) -> ((3,3),8,8) ((3,8),3,8) ((8,8),3,3) Here are the results we can get by applying one operator to these pairs of operands: (a,b) a+b a-b b-a a*b a/b b/a Remaining (3,3) -> 6 0 0 9 1 1 (8,8) (3,8) -> 11 -5 5 24 3/8 8/3 (3,8) (8,8) -> 16 0 0 64 1 1 (3,3)

Those are all the possible results from the first operation you do. Note that some of them are fractions; normally you’d set those aside, but that turns out to be exactly what you *shouldn’t* do in this case!

Note that we can use each of the numbers in the center as a new starting point for a smaller version of the same problem: (3,3,8,8) -> ((3,3),8,8) => (6,8,8) (0,8,8) (9,8,8) (1,8,8) ((3,8),3,8) => (11,3,8) (-5,3,8) (5,3,8) (24,3,8) (3/8,3,8) (8/3,3,8) ((8,8),3,3) => (16,3,3) (0,3,3) (64,3,3) (1,3,3)

We’ve just reduced the problem to making 24 from only *three* numbers! What pair might the next operation work on?

Now we can do the same thing (i.e., pair the remaining operands in various ways) again: (3,3,8,8) -> ((3,3),8,8) => (6,8,8) -> ((6,8),8) ((8,8),6) (0,8,8) -> ((0,8),8) ((8,8),0) (9,8,8) -> ((9,8),8) ((8,8),9) (1,8,8) -> ((1,8),8) ((8,8),1) ((3,8),3,8) => (11,3,8) -> ((11,3),8) ((11,8),3) ((3,8),11) (-5,3,8) -> ((-5,3),8) ((-5,8),3) ((3,8),-5) (5,3,8) -> ((5,3),8) ((5,8),3) ((3,8),5) (24,3,8) -> ((24,3),8) ((24,8),3) ((3,8),24) (3/8,3,8) -> ((3/8,3),8) ((3/8,8),3) ((3,8),3/8) (8/3,3,8) -> ((8/3,3),8) ((8/3,8),3) ((3,8),8/3) ((8,8),3,3) => (16,3,3) -> ((16,3),3) ((3,3),16) (0,3,3) -> ((0,3),3) ((3,3),0) (64,3,3) -> ((64,3),3) ((3,3),64) (1,3,3) -> ((1,3),3) ((3,3),1)

Now we have to apply each possible operation to the inner parentheses in each of the 34 groups of numbers. There are 22 distinct pairs to operate on:

For the next step, we need to make up another table for the distinct pairs in the rightmost column: (a,b) a+b a-b b-a a*b a/b b/a Remaining (-5,3) -> -2 -8 8 -15 -5/3 -3/5 8 (-5,8) -> -3 -13 13 -40 -5/8 -8/5 3 (0,3) -> 3 -3 3 0 0 ~ 3 (0,8) -> 8 -8 8 0 0 ~ 8 (3/8,3) -> 27/8 -21/8 21/8 9/8 3/24 8 8 (3/8,8) -> 67/8 -61/8 61/8 3 3/64 64/3 3 (1,3) -> 4 -2 2 3 1/3 3 3 (1,8) -> 9 -7 7 8 1/8 8 8 (8/3,3) -> 17/3 -1/3 1/3 8 8/9 9/8 8 (8/3,8) -> 32/3 -16/3 16/3 64/3 8/24 3 3 (3,3) -> 6 0 0 9 1 1 0, 1, 16, 64 (3,8) -> 11 -5 5 24 3/8 8/3 -5, 3/8, 8/3, 5, 11, 24 (5,3) -> 8 2 -2 15 5/3 3/5 8 (5,8) -> 13 -3 3 40 5/8 8/5 3 (6,8) -> 14 -2 2 48 6/8 8/6 8 (8,8) -> 16 0 0 64 1 1 0, 1, 6, 9 (9,8) -> 17 1 -1 72 9/8 9/8 8 (11,3) -> 14 8 -8 33 11/3 3/11 8 (11,8) -> 19 3 -3 88 11/8 8/11 3 (16,3) -> 19 13 -13 48 16/3 3/16 3 (24,3) -> 27 21 -21 72 8 1/8 8 (24,8) -> 32 16 -16 192 3 1/3 3 (64,3) -> 67 61 -61 192 64/3 3/64 3

Now that we are near the goal, we can start writing down less and thinking more:

Okay, so what can we do with this? Well, the _only_ way we can end up with 24 is if we can do it in one by adding, subtracting, multiplying, or dividing something from the Remaining column in a given row with something else in the row. For example, let's look at the row (a,b) a+b a-b b-a a*b a/b b/a Remaining (-5,3) -> -2 -8 8 -15 -5/3 -3/5 8 There is no way to combine 8 with -2, -8, 8, -15, -5/3, or -3/5 to end up with 24. So we can forget about this row.

A quick scan handled that row.

Let's cherry-pick the easy ones: (a,b) a+b a-b b-a a*b a/b b/a Remaining (-5,3) -> -2 -8 8 -15 -5/3 -3/5 8 (No) (-5,8) -> -3 -13 13 -40 -5/8 -8/5 3 (No) (0,3) -> 3 -3 3 0 0 ~ 3 (No) (0,8) -> 8 -8 8 0 0 ~ 8 (No) (3/8,3) -> 27/8 -21/8 21/8 9/8 3/24 8 8 (No) (3/8,8) -> 67/8 -61/8 61/8 3 3/64 64/3 3 (No) (1,3) -> 4 -2 2 3 1/3 3 3 (No) (1,8) -> 9 -7 7 8 1/8 8 8 (No)(8/3,3) -> 17/3 -1/3 1/3 8 8/9 9/8 8 Yes!We have a winner: 8 divided by 1/3 is24. Now, how did we get here? Tracing back, we find that the corresponding expression is 8 8 ------- = ----- = 8*3 = 24 3 - 8/3 1/3

This, I often say, is the last thing you’d try, because it involves a fraction as an intermediate value, which our minds want to avoid. But it’s perfectly legal!

So, this wasn't pretty, but I knew that I was covering all the bases, and that I wasn't touching any of them more than once. It's nice when you can 'see' the answer directly, which sometimes happens; but when that doesn't work, it's good to have a backup plan.

In a much later comment, Doctor Ian said, after giving a link to this answer in response to an even harder problem, “Sorry I can’t be of more help, but as you can see, I’ve already been through this kind of thing once, and that’s more than enough for one lifetime.”

We usually just give hints to help a student discover these hard ones. Here is a question from 2002:

Make 7,7,3,3 into 24 Using + - * and / Make the numbers 7,7,3,3 equal 24 using the operations addition, subtraction, multiplication, and division.

Two of us answered. I got in first, with a very brief hint:

Hi, Jeremy. This is a tricky one, because the answer involves fractions. Think about the fraction 24/7.

Sometimes I merely say, “Don’t be afraid of fractions!” The number 24 is used for the game because it has many factors, so we have many whole numbers we can multiply by; but it isn’t wrong to multiply by a fraction!

Doctor Schwa answered almost simultaneously:

This is a really hard one! As a hint, here's how it works with 5,5,5,1: 5 * (5 - 1/5) = 24. Can you see a similar pattern that might work with your four numbers?

Neither of us gave the answer to the given problem, so I’ll leave that for you to figure out! But notice how this one works, and how it fits with my clue. In working backward, you normally look for factors of 24 that you can multiply by a number derived from the others. Here we have none (except 1, which doesn’t help); but we can still get 24 by multiplying \(\displaystyle 5\times\frac{24}{5}\). And we can get that fraction, which is equal to \(\displaystyle 4\frac{4}{5}\), by subtraction.

When all else fails, look for fractions.

Another hint for similar cases is given here:

Make 24

I’ll close with a list of problems we got over the years, which vary considerably in difficulty.

1, 2, 2, 6 1, 2, 5, 6 1, 4, 4, 6 2, 2, 6, 9 2, 3, 3, 6 2, 3, 5, 9 3, 4, 6, 8 5, 7, 8, 8 3, 3, 3, 5 1, 4, 6, 7 2, 2, 3, 5 2, 7, 8, 9 2, 5, 5, 8 3, 3, 5, 7 3, 3, 6, 8 2, 6, 6, 9

1, 4, 6, 10 4, 9, 10, 16 22, 20, 11, 9 1, 1, 2, 9 7, 7, 4, 1 7, 7, 4, 4 4, 5, 5, 7 1, 4, 5, 6 1, 3, 4, 6 1, 6, 6, 8 5/8, 1/4, 2/3, 7 3, 3, 6, 3/4 -7, -7, -4, 1

8, 9, 4, 12 = 12 2, 5, 7, 9 = 11, no solution? 2, 3, 4, 5 = 28 2, 3, 4, 5 = 26 2, 3, 4, 5 = 80 5, 5, 13, 13 = 70

I haven’t bothered to check this last group; the rest were checked with an online “24 game solver”.

]]>Here is a question from 1997 by way of introduction:

The Four Fours - an Ancient Problem My class is trying to solve the problem of the Four Fours. The problem allows you touse only four fours and as many operations as you likein order to create mathematical sums whichequal the numbers from 1 to as high as you can go. While it is possible to create some quite high numbers, you must have all the previous numbers before these become part of the answer. Can you help me by seeing how many you can get or should I only ask for the ones we cannot find? Alec Tibbitts

I’m not sure how “ancient” it is, but it could have been invented at any time in history. There are sites where you can find lists of answers, but you wouldn’t want to do that, would you? We have usually tried not to “help” in that way, which takes away all the fun … but if you find yourself stuck on 73, you can search the *Ask Dr. Math* archives to find an answer, because it’s really hard!

Let’s make a start, just to get a feel for the game. Here are my first thoughts for the first few numbers, each of which can be done in many ways:

$$1 = (4\div 4)\times (4\div 4) = \frac{4}{4}\times\frac{4}{4}$$

$$2 = (4\div 4) + (4\div 4) = \frac{4}{4} + \frac{4}{4}$$

$$3 = (4 + 4 + 4)\div 4 = \frac{4+4+4}{4}$$

(Children often know only the division symbol \(\div\), whereas older students are familiar with the fraction form; division can be written either way. Parentheses are needed for many expressions without the fraction bar.)

Doctor Chita answered:

I'm quite familiar with this problem. I was a math teacher and once when my husband and three children and I were driving to Florida (a 24 hour trip), playing this game took us through at least two states. I think we were stopped at 37 or thereabouts.

Above, I used only the four basic operations. But they aren’t enough to get every numbers you’d like to get. Sooner or later the question arises, **what operations are allowed?** The next operations you might want to use (and within a group you get to decide on the restrictions) might be **exponents** (\(4^4\), which in type we write as 4^4) and **square roots** (\(\sqrt{4}\)). Often we allow **concatenation of digits** and **decimal points**, like \(44\), \(.4\), \(4.4\).

Doctor Chita leaps over those and suggests a “cheat”:

I found that you could generate more of the more "difficult" numbers by knowing some specialized math functions. To my family's dismay and annoyance, I used thegreatest integer function. That is, the greatest integer value of an integer is the integer itself. The greatest integer value of a decimal number is the greatest integer immediately to the left of the decimal number. For example: a. [3] = 3 b. [2.6] = 2 c. [-5.4] = -6 d. [-4] = -4 This function obviously helps to truncate a number. You could also introduce the rounding function, using a rule about lopping off decimals less than 0.5, and rounding up for decimals greater than or equal to 0.5.

An example using this (also called the **floor function**) would be

$$5 = \left[\sqrt{44}\right]-4\div 4$$

But there are easier ways to get 5. (Can you see one?)

Another possibility is to use thefactorial function. Thus, 4! = 24. Different combinations of factorial expressions can be helpful. Obviously, thesquare root functionis nice to use as well. Depending on the mathematical sophistication of your students, you can also incorporatelog,ln, and/ortrig functionsas well. For example, [(sin 44 deg. x 4)^4] = 59 where the brackets indicate the greatest integer function.

The more advanced functions probably only work in conjunction with the floor function!

In practice, you will probably want to set your own rules as to what operations are allowed; but when you find a particularly stubborn number, that may be the time to set your imagination free and look for the oddest operations possible (**repeating decimals**, anyone?).

As for how to proceed when playing this game, you could let the students decide. In one case, have students continue generating numbers, marking the missing ones with blanks. Post these on a bulletin board so that they cango back and try to figure out the missing combinations. Alternatively, createteamsof students to play this game. See how far each team can go and how many missing numbers are encountered along the way. Decide the "winner(s)" by agreeing on the criteria ahead of time. Another interesting challenge is to seehow many different waysa given number can be generated using the four 4s. For example, 44/44 = 1 and 44^(4-4) = 1, 4-4+4/4 = 1 etc.

That last paragraph fits my own style of thinking … but you may find (especially if you allow the floor function) that the number of ways you can make becomes infinite!

Here is a question from a month later in 1997:

Four Four's, 2-10 The numerical expression 4 + 4/4 - 4 uses four 4s and has a value of 1. Find a numerical expression using only four 4s for each integer from 2 to 10.You may use any operations and grouping symbols. I do not know where to start on this problem. Can you please help me out? Thanks, Zachary

This is a smaller challenge, working only with small numbers, but it is still a challenge. Not wanting to give away the answers, Doctor Rob focused on a strategy, and chose one that’s better for the big game where you are looking, say, for all numbers up to 100 or 1000, rather than just to 10:

I would start out by figuring outwhat operationsI felt comfortable using. Certainly+, -, *, and /should be allowed, andpowers. What about thesquare rootoperation? What aboutdecimal points(like 4.4)? What aboutadjunction (like 444)? And so on .... Some of the operations require only one 4, like Sqrt[4]. These are called "unary operations" (pronounced "YEW-nair-y"). Others require two 4's, like 4/4. These are called "binary operations" (pronounced "BYE-nair-y").

Just talking about what is allowed makes an opportunity to develop vocabulary! (“Adjunction” means “adjoining” digits, which I called concatenation.) We considered all these possibilities, and a couple more, above. But it’s important always to realize that the rules of a game have to be defined clearly before you start playing it. (Does that sound a little like math? Yes, in a sense math, too, is a game.)

I would takeone fourandapply all the unary operationsto make a list of values that result: 4, .4, Sqrt[4] = 2, -4, and so on. Then I wouldapply all the unary operators again, to expand the list, then again, and again. If we continued this indefinitely, we would have a list of all numbers expressible with one 4, such as -Sqrt[-Sqrt[.4]]. Duplicates can be deleted, such as -(-4) = 4.

Note that he has implicitly added **negation** as a unary operation; that may or may not expand what you can do.

By the way, \(-\sqrt{-\sqrt{.4}}\) is not a real number, so not all combinations you make this way really need to be considered! And \(\sqrt{\sqrt{.4}} = 0.79527…\), so that, too, is out. Don’t try to continue indefinitely! There really won’t be many usable numbers you can make with a single 4.

Then I would combine these using all the binary operations and all numbers on the list to include numbers representable with two 4's, such as Sqrt[4]^(-4). Then I would apply all the unary operators, perhaps several times, to these results. This produces "all" numbers representable with two 4's. Part of the list for two 4's would contain: 4 + 4 = 8, 4 - 4 = 0, 4 * 4 = 16, 4 / 4 = 1, 4^4 = 256, 4^(-4) = 1/256 44, 4.4, .44, .4 / 4 = 1/10, Sqrt[4]^4 = 16 (duplicate of 4*4 = 16), Sqrt[4]^(-Sqrt[4]) = 1/4, and so on.

Again, Doctor Rob may be introducing Zachary to new ideas beyond his experience, perhaps intentionally as a teaser!

You may be noticing that there aren’t a lot of (whole) numbers you can make with only two 2’s; that may be why no one talks about the “two twos game”! A good puzzle has to be simple enough to be doable, but complicated enough to be a fun challenge.

If you continue this process until you have four 4's, you will have a list of "all" numbers representable with four 4's. Most of them will not be integers from 0 to 10, so you can discard them.

You may have observed that this is a “backward” strategy: Rather than start with a number you want, like 10, and find a way to obtain it from four 4’s, we are starting with all possible combinations of four 4’s and hoping to get each of the designated target numbers. With a limited set of goals, we would ignore huge numbers, fractions, and so on; but it is conceivable that some numbers might be obtainable only by way of, say, the difference of two huge numbers, each of which is obtained by raising a fraction to a negative power …

He closed with an example of a solution that you probably would not think of, working only forward:

If you are clever, you canstart with the number you want to writeand combine it with two 4's to create anumber on your two 4's list. For example, let's do 11. Now 11 and 44 are easily combined: 11/44 = 1/4 = Sqrt[4]^(-Sqrt[4]), the last from the list above, so 11 = 44*Sqrt[4]^(-Sqrt[4]). Understand?

(Notice how Doctor Rob nicely avoided getting one of Zachary’s own target numbers, leaving him to work it all out himself?)

Of course, 11 can be obtained more simply, but I, too, will leave that for you to find.

Here is a similar problem that is much more challenging; we’ve archived answers to it twice, and each time gave essentially the same hint:

Two 2s Make 5 I came across a challenge problem to which I cannot seem to find a solution. "Using only two 2s and any of the standard mathematical symbols, write an expression whose value is equal to exactly five." Is it a trick question and I can use another number as well as the two 2s?

This time we have just one target number, because there are fewer numbers you can make; but it’s a doozy.

Here is what I answered, carefully giving only a hint, but hopefully enough:

Hi, Jen. It took me a while to get this the first time I saw it. You'll need, besides the two 2's, a square root, a decimal point, a negative sign, and an exponentiation. See what you can do with that!

The main thing you need to know is that it is possible, so you may be willing to keep trying. (I suspect that not many other numbers can be made, but you might give that a try, too!)

The other archived instance of this question (three years later) is at

Challenging Puzzle Similar to the Four 4's

Let’s close with the best strategy I know of, from 2003:

A Bidirectional Search How can I get the numbers from 1-100 using only 4 eights? 1 = 8 divided by 8 = 1 plus 8 minus 8, and so on, for all the numbers from 1 to 100. I have got many of them and I need to get the others. I just can't figure them out.

Doctor Edwin offered the same method I tend to use for this sort of puzzle:

Hey, Nait! In a few pages in a notebook, write the numbers from 1 to 100 going down the left side. Now,instead of trying to get a specific number, just start playing with the 8's. 8+8+8+8? 32. Write 8+8+8+8 down next to 32. Put a check mark down next to 32. One down, 99 to go. 8+8+8-8? Write it down next to 16 and check that one off. 88/8-8? (88-8)/8? Just keep writing them down next to their values. Try to be systematic, liketrying everything you can think ofwith one 88 before moving on to some other approach.

This is both random and systematic: I will try something random (such as that very easy sum), and then vary it (replacing each “+” with a “-“, for example), then change something else (like concatenating two digits) and vary that similarly.

The next hint is much like Doctor Rob’s but less obsessive:

An important thing to do is torecord all your intermediate results. This will help you a lot. When you did 88/8-8, you had 11 there for a second, right? So next to 11, write down 88/8, but don't check off 11 (since you haven't solved 11 yet). Maybe you want to circle the ones that use four 8's, or maybe keep a separate list for intermediate results. I know it sounds like a lot of bookkeeping, but here's how it helps: You've played around and you've got maybe 60 numbers checked off and things are slowing down. You've tried most of the things you can think of, but you keep finding other ways to get the same numbers. So now youstart thinking about the numbers you haven't gotten yet. Like 19, for example. So you look at 19, and you wonder if it's 8 away from something you know how to make with three 8's. "Hey, I can make 11 with 3 8's, and so I add 8 and now I write down 88/8+8 next to 19 and check it off."

If you could have been fully systematic, you should perhaps have found that way to make 19 when you had made the 11; but you often will have been sidetracked and missed it. By keeping track of all the places you’ve been, you’ll have a chance to find the possibilities you’ve missed along the way.

We call this "bidirectional search." You're not just going from ways of combining 8's to numbers you need, and you're not just going from numbers you need to ways of combining 8's.You're working from both ends at the same time and that shortens your search by a LOT.When you show this project to your teacher, she'll be impressed.

Go have fun searching – for four 4’s, or four 8’s, or five 3’s, or whatever new puzzle you want to invent! We’ll have more puzzles next time.

]]>When I heard Thursday that the great mathematician John Conway had died (see the New York Times obituary here), I recalled not only his books I have read, but his involvement in *Ask Dr. Math*‘s early days. In addition to a couple dozen quotes from him, there were several questions in the very beginning of the service that he answered directly, probably through his heavy involvement in online math discussion groups. I want to look at one of his contributions that particularly demonstrates the kind of teacher he was (and his sense of humor).

If you bog down in the specific problem in view, skip to the last half of this post for his ideas on thinking and on teaching for understanding. That is the part I consider most interesting; but as the last half is comments on how he came up with his answer off the cuff, I can’t just skip to that without losing essential information.

This question came on what I believe was the very first day of the service (November 1, 1994), and brought in not one but two professors to discuss it. I’m going to skip over others’ contributions (it was a *long* discussion that is too big for a normal post even now) and focus on Doctor Conway’s. Here is the question:

Complex Roots We know it is possible to look at the graph of a polynomial and tell a great deal about its real roots by looking at the x-intercepts.What can be discovered about a polynomial's complex roots by looking at the graph?There seem to be some interesting "wiggles" at locations that appear to be related to the "average" of the complex pairs. Do you have any insights regarding this topic? Best Regards, Pre-Calculus Students J.C.M. High School Jackson, TN c/o Phillip Scott

Doctor Ethan elicited some specific examples from Mr. Scott:

One example is: x^4 - 6x^3 - 22x^2 + 56x - 64 This polynomial has a pair of complex roots (1 + i) and (1 - i). The average of these two roots (R1 + R2)/2 is the real number 1. If you look at the graph of the polynomial, there is "hill" very near x = 1. Another example is: 3x^4 - 4x^3 + 3x - 4 This polynomial has a pair of complex roots (1 + i*sqrt(5))/2 and (1 - i*sqrt(5))/2. The avg. of these two roots is the real number (1/2). If you look at the graph, there is a very slight "wiggle" near x = (1/2).

Here are their graphs, with red dots at the points of interest:

$$y = x^4 – 6x^3 – 22x^2 + 56x -64$$

$$y = 3x^4 – 4x^3 + 3x – 4$$

In a couple days professor Stephen Maurer of Swarthmore College (then the host of the *Math Forum* and *Ask Dr. Math*) joined in with some thoughts; then on the 6th Prof. Conway wrote (dealing only with cases like the first). In passing this on (because of course he wouldn’t have been registered as a regular Math Doctor), Steve Weimar, who headed our service, prefixed it with this:

(Well, you guys really hit pay dirt in the responses you've received! You may not realize just how amazing these are until you hear that Prof. Maurer is a professor at Swarthmore who is a leader in the field of Discrete Math and John Conway, who wrote this letter, is one of the most famous mathematicians living. I hope you'll contact both of them personally to let them know what you've done with their answers and what you think of their communication to you. -- steve)

Conway started by answering the wrong question (which can be illuminating):

A very interesting question! At first I misread it as asking what we can tell about the non-real roots bylooking at the x-interceptsof its graph, so let me answer that one first -essentially nothing! (this is because if a,b,c,... are the x intercepts of y = f(x), then all we can tell is that f(x) = (x-a)(x-b)(x-c)... times some g(x) which has only non-real roots, and of course, you can make the roots of g(x) be any collection of pairs of conjugate non-real complex numbers.

(Below, he will be commenting on how he wrote this, explaining that it is more or less stream-of-consciousness, written as he thought; I won’t make as many comments of my own as I usually do.)

Now back to the original question. I think we must add the information that thedegree of the polynomialis some known number, if we are to read off information very easily. Also,let's think what we mean by "looking at the graph". If we are allowed to make very precise measurements on the graph, then we can work out (in theory) just what function f(x) is, and soall its roots are actually determined by the EXACT shape of the graph. If you know the degree is n, you only need to measure n+1 points to be able to work out, at least in theory, all the coefficients of f(x). So are question is really a rather loose one - just take a casual glance at the picture, for example,see where the wobbles are, and use what you see to produce an "engineer's guess" at the complex roots.

Let's start with n = 2, and the equation y = (x-a)^2 + b. I'll suppose b > 0 to stop the roots from being real. Of course the roots are a +- root(-b), so we look for geometrical interpretations of a and b. Easy -a and b are the x and y coordinates of the minimum. So First easy theorem. If y = x^2 + ... has non-real roots, these are a +- root(-b), where (a,b) is its minimum. Corollary: If y = kx^2 + ... has non-real roots, these are a +- root(kb), where (a,b) is the minimum.

This gives the complex roots, *if* you know the leading coefficient *k*. (We’ll be correcting a small error here; he’s human! If he had explained his thinking, he might have pointed out that when a function is multiplied by *k*, that multiplies every *y* coordinate by *k*, including *b*; so that the “*b*” in the original function to which the theorem applies is actually *b*/*k* as we measure it on the graph. Therefore, the roots are \(a\pm\sqrt{\frac{b}{k}}\).)

So we need also an engineer's way of evaluating k. Here it is - k is the amount y would increase if you went 1 unit left or right of the minimum. This gives us the engineer's rule for quadratics: The real part is the x-coordinate of the minimum. The [imaginary] part is the geometric mean of two numbers you can see in this little picture: | | | | \ / ______\________/______ \ / \____/ _______________________ x-axis The two numbers I mean are theheight of the minimum, and the"extra height" above that, that's cut off by the horizontal line that meets the curve 1 unit left and right of the minimum. I never knew this before, although I did know that something vaguely like it was true.

Here is a better illustration:

Here the minimum is at (2, 3), so *a* = 2 and *b* = 3; *k* = 2 is the blue vertical dotted line, the rise from the vertex at 1 unit left or right of the vertex. The real part of the complex root is *a* = 2, and the imaginary part is not the geometric mean of *b* and *k*, as he said, but of *b* and 1/*k*, that is,\(\sqrt{\frac{b}{k}} = \sqrt{\frac{3}{2}}\). In fact, the equation is \(y = 2(x-2)^2 + 3\), and setting this to zero yields \(x = 2 \pm \sqrt{\frac{-3}{2}} = 2 \pm i\sqrt{\frac{3}{2}}\).

Now what about more general polynomials f(x). Well,really the quadratic case is all there is, in a sense, if you're only taking a rough glance. Let me explain why. Take your curve y = f(x), and fix your attention on a given minimum. Let y = q(x) be the best quadratic approximation near that minimum. Let's suppose for simplicity that the minimum is at x = 0. Then the curve y = a + bx + cx^2 + dx^3 + ... will be quite well-approximated by y = a + bx + cx^2 (period) near zero. So at the complex roots of the latter equation, f(x) will be quite near zero, so we can expect nearby roots of f(x) itself. So my exact "engineer's rule" for the quadratic will work roughly for any polynomial.

Note that he has expressed this in terms of behavior near zero, knowing that is sufficient as the function can be translated into that position without changing the quantities he’ll be looking at.

We can apply this to the first example above, \(y = x^4 – 6x^3 – 22x^2 + 56x -64\), which has a vertex (in this case a maximum) near *x* = 1. We can’t read off *y* accurately from the graph, but plugging in *x* = 1, we get the (approximate) point (1, -35).

Looking one unit left and right from there, *y* = -64 and -72. These are not exactly equal, but the two drops are about -29 and -37, so we can use their average, -33, for *k*. So we have \(a\approx 1, b\approx -35, k\approx -33\). Using our corrected formula, we expect zeros with real part about 1 and imaginary part \(\pm\sqrt{\frac{-35}{-33}} \approx \pm 1\).

What are the actual roots? Dividing out the factors corresponding to know real roots -4 and 8, we are left with the quotient \(x^2 – 2x + 2 = (x – 1)^2 + 1\), whose zeros are … \(1\pm i\). Not bad!

Notice that Conway’s ideas don’t apply to the second example, with a mere wiggle. That case was discussed by the others in the thread. Given that we have a turning point to look at at all, he next considered how far from it you can do his measurements:

However, you should be prepared to workat the appropriate scale. Let me discuss this. If I take a horizontal line a bit above the minimum (a,b) that cuts the curve roughly where x = a +- c, then the imaginary parts of the corresponding pair of roots will be the geometric mean of the two heights I mentioned, MEASURED IN UNITS OF c. How can you tell roughly what is the right scale? Well, at least you can tell if it's going wrong. If the horizontal line you take hits the curve at a - c1 and a + c2, where c1 and c2 are very different, you know the quadratic part is NOT a sufficiently good approximation out to this distance, and you'd better beware. On the other hand,if the curve looks very like a parabola for quite a long time around the minimum, you can guess the corresponding pair of roots with fair confidence.

Here we are reversing the process; rather than going 1 unit left or right from a vertex and looking at how far we move vertically, we are going some distance *d* above or below and seeing how far it goes horizontally, *c*. When *c* was 1, *k* was *d*, and the imaginary part was about \(\sqrt{\frac{b}{k}}\). With a different horizontal distance *c*, \(d = kc^2\), \(k = d/c^2\), and the roots are \(a\pm\sqrt{\frac{bc^2}{d}} = a\pm c\sqrt{\frac{b}{d}}\). (You can see the scaling by *c*.)

Let’s try it on our example. …

Here \(d = -65\), \(c_1 = 1.545\), and \(c_2 = 1.337\). These are reasonably close, and average about 1.4; so the imaginary part of the root should be about \(\pm 1.4\sqrt{\frac{-35}{-65}} = \pm 1.03\). Again, not bad.

In summary: if you are allowed to make precise measurements on the curve, then all the roots are in fact completely determined. If near some minimum the curvelooks like a parabola out to a distance d(say), and my quadratic "engineer's rule" givesroots whose imaginary parts are less than d, then it's probably going to be pretty close to the truth. What information can you get from other features, say from points of inflection? Well, these first arise when f(x) is a cubic polynomial, so you'd answer this question by working out in detail what happens in the cubic case, and then if f(x) doesn't look like a quadratic for long enough, but does look like a cubic, you could confidently use your "cubic engineer's rule".

We can see here that Conway has been giving, not a complete answer, but suggestions about how to approach the problem, starting with a simple case and looking ahead toward a potential full answer. That is really what is most important in helping these students!

Shortly after his initial response (perhaps in response to thanks from the class), Conway discussed how he wrote his answer, moving from intuition to specifics:

Yes,I learned something, too!I already vaguely "knew" something about how the complex roots were related to the shape of the graph, but hadnever thought about it in detail. Butto explain something to somebody else, you MUST really understand it yourself, and in full detail. This is whyI LIKE all of elementary mathematics, even though I really AM a professional mathematician. In this case, I sat at this machine typing out an answer (I'm quite proud of the fact thatI just came up with the answer as I was writing it- I only had to step away briefly to the blackboard to draw the general quadratic - otherwise it came straight out).

Real mathematics requires delving into details; but creativity starts with intuitions. How does one develop, and then pursue, such intuitions?

It might help to follow my thoughts, which were: i) CAN you do this?Is the desired information really there?This led to my remarks that from the x-intercepts you CAN'T determine the non-real roots, but from the exact curve you CAN. (That, to me, was the trivial bit.)

This is an example of a plausibility check, to focus one’s efforts.

ii) A minimum just above the x-axisobviously (to me)corresponds to a conjugate-complex pair of roots with small imaginary part (because if it were just below, they'd be real, and coincide if just one, and I know how pairs of real roots become pairs of complex ones "through" a coalescence).

This visual intuition comes from familiarity with quadratic functions, which starts with what I call “play”, just as children become familiar with the physical world through play.

The standard case of this is the quadratic one, so we'd better iii)work out the exact rule in the quadratic case! (which I'd never done before). This wasn't too hard.

A standard concept in problem solving (cf. Polya) is “try a simple case”. Here, the goal is an approximation, but understanding of that can be rooted in an exact solution.

Then iv) (which I really was aware of during ii) and iii)),the general case really IS the quadratic case, because in any given small region, your polynomial will be quite well approximated by a quadratic.

This intuition encapsulates the idea of Taylor polynomials.

Finally v) (which I'd never thought about before)can we guess roughly how far this quadratic approximation will work?If f(x) = q(x) + r(x), where q is the quadratic approximation to f, then (supposing the real part of the roots is 0), we can expect the size of r(iy) to be about the same as that of r(y) [because the dominant term of r(y) will probably be the first one, eg 5y^3, and this doesn't change in size if we replace y by iy]. This led to my rule of thumb that if it looks like a parabola out to a distance of about d, then our engineer's guess will be OK so long at it gives imaginary parts less than about d in size.

A deep knowledge of approximations includes knowing the importance of the magnitude of errors.

Then as a sort of PS I added vi) some general remarks about how one would develop better approximate guesses corresponding to higher-degree approximations. [All immediate to a professional.]

Once you’ve answered the basic questions, you can always map out possible future analyses.

Now he turns from teaching to giving advice about teaching, which to me is the most valuable part of Conway’s comments.

What's hard about learning mathematics(for a student),or teaching it(for a teacher)often is this "feel of the problem" stuff. What's this problem REALLY about? - sort-of-thing. It seems to be easy to learn how to manipulate formulae, but very very very hard to develop this "feeling" skill, and soit must obviously be very hard for teachers to learn how to teach this "feely" activity. Some ideas I use in this connection might be valuable.

How do you learn to understand beyond mere formulas? How do you help someone else do so? That is our real goal.

[Of course, I usually teach VERY bright undergraduates and graduate students - not exactly a typical audience - butI'm also quite good at teaching more typical "students", right down to very young children. I honestly believe that the real teaching problems are almost always the same, so I'll pass on my ideas anyway.]

I love that Conway can communicate clearly at any level; I, too, have found that teaching skills that work best for adults also work well for children.

When you teach something involving a formula (or, if we're talking about very young children, some concept that's a bit more abstract than they're used to), always 1)Find a picturethat relates to the formula, andteach both at once. If there are several really different "pictures", teach a few of them (unless this might lead to "overload". PLEASE do that!

Something visual gives us a place to hang abstract ideas that can’t be pictured. Even in grad school, I recall being impressed that the right picture let me think coherently about infinite-dimensional spaces, which in themselves can’t possibly be pictured!

2)Have lots of examplesinvolving these pictures, and get the students to understandhow the picture changesas the parameters in the formula [or maybe, the formula itself] changes.

Multiple examples are like looking at the same object from different perspectives, just like a child turning a block in different directions and trying different movements with it. Real understanding can’t come from only one direction!

3)Find what are the most important parameters! I mean the ones the engineer wants to know first, so that he can tell whether the cost is going to be millions of dollars, or only thousands. Don't worry too much about the things that will only affect the "conceptual price" by a few cents. [To use an example that came up in another one of these problems, every adult knows which are the most important digits in a price of $496.25. By the way, in that "rounding" problem,one should of course use the children's own developing "feel"for real prices - this might very well help them to stop rounding (say) this price to the nearest $10 and getting $90.]

When you have learned what makes the most difference, you can ignore inconsequential details (for the time being) and focus on what matters most. This is an important aspect of intuition, often thought of as “number sense” in children.

4)Use any "feel" for things that your students have already developed, for example this feeling for real prices, or what you've taught them in similar contexts earlier. [This will also help them to firm up on those earlier things.]

Connecting a new concept to familiar concepts helps make the new ones familiar, too.

5)Occasionally ask the students for information about teaching methods! (I've done this with 3-year-olds to very good effect.) Of course, you don't just ask them how you should teach such-and-such. And only for quite articulate students should you even ask which way they thought was best, when you've done something two ways, or done two similar things in different ways. But any good teacher will find all sorts of ways to "ask" the students which way was best.Children love to see their suggestions taken seriously, and affect the entire class.

This last idea of using the student’s own ideas, leads to a wonderful twist:

If you forget everything else here as a teacher, let this remain with you:

Marx was a great philosopher, even though not all his ideas have stood the test of time. One I think that really has is when he said something like "Honesty, and Sincerity are two of the most important things in life." "So, if you can fake those, you've got it made!" I often follow Groucho's advice in teaching. I often teach when I'm tired, or teach subjects with which I'm thoroughly bored. SoI just fake liveliness, or fake a total fascination with the subject I'm bored with.

I’ve read this piece many times, and I am always caught off guard by the joke.

But the principle is one I use heavily: When I teach or tutor, I want to make my interest in both the subject and the student tangible; a good “deskside manner” is essential. Sometimes that takes a little deliberate effort.

Often,when a student suggests some way I should do things, I "fake" a way of following this suggestion. The easiest one is when Sally suggestssomething I was going to do anyway. I say - "great" "We'll do it Sally's way! What a really wonderful idea!" and then every now and then call this "Sally's method". I have no moral qualms whatever about that one. The one that might get me burnt in Hell, or at least earn the disapproval of other teachers, now I'm letting the cat out of the bag, is when Jim suggests something, andI really don't do it, but find a way to pretend I do. In defence, let me say that I only do this sort of thing when Jim's suggestion is really a good one, given Jim's knowledge, but as a practical matter wouldn't quite work. The fakery is usually to modify Jim's idea a bit, tothe nearest idea that does work, and quietly ignore the necessary modifications.

Find what the student has done well, and make that visible! When they think like a mathematician, even just a little, we need to make them feel successful, so they’ll want to do it again. And when an idea came from them, even only partly, it *belongs* to them.

In the hope that it will help me to gain absolution for this sin, let me say thatI'm usually not quite so enthusiastic about Jim's ideas as I was for Sally's. I might say "That's a very good idea, Jim. Let's see how it works." but after that, it's just like my treatment of Sally's. Of course the thing that really pleases me no end is when Manuel produces a teaching idea (or any other idea)that I've never even heard of before. But strangely enough, Manuel's ideadoesn't get too much more of a star billing than Sally's. The reason is partly that it really was very clever indeed for Sally to come up with even the standard idea, so she fully deserves her praise. Another reason is that (probably) Manuel is a student who's getting plenty of praise already. Often more than half of the students produce ideas that really do affect the way the course goes, and most of the rest get that impression even though it might not quite be true. Suddenly, I'm feeling terribly guilty about this little fakery - maybe I should stop doing it?

Steve Weimar responded approvingly to these last comments:

I think an essential part of teaching is acting, and there are many forms of it which are just right for the classroom, but probably the most important isrecreating the experience of the learner. If I didn't do this, I would not find the language that works for my audience half the time and I would also misinterpret more than I already do what the student meant. For those situations where we are covering well-trodden ground, acting is called for andit's a great art that not only is good for the students but renews the possibility of new insights for the actor as well. One of my main interests as a teacher is tomodel the process of thinking, and this meansexternalizing what is most often hidden from sight. Running excitedly with Jim's idea but taking it to a place different than he anticipated is not fakery but representing the process we've been through. By being enthusiastic about Jim's idea you convey the notion thatit's good to trust one's instincts, that a good starting place is not necessarily what one uses in the final analysis. By thinking out loud and showing what to do with it to make it work, you showhow to shape good ideas from a reasonable beginning. If I were you I would keep up the acting and let them see the process of deciding why something needs to be modified. They would not be very bright students if they did not know you were acting and did not appreciate the performance.

This correlates to our desire as Math Doctors to let a student do the work, so we can start where they are, and show how much can be accomplished using the insights they already have. We encourage them to try *something*, even if it will not work out, because just getting moving can take you to a place of further insight.

The discussion continued with further ideas about graphs of polynomials; but the comments on teaching by Prof. Conway were well worth the price of admission.

He will be missed.

]]>