Four Fours and Friends

This has been a good time for doing puzzles to stay busy (as a family, or a class, or as distanced friends, for instance). The next few posts will present various mathematical puzzles and games you might enjoy. Although often when a problem I quote was originally left unsolved, I have filled in the gap by completing the work, here I will leave things as open as possible so you can challenge yourself; I’ll typically start with some explained examples or hints to get you started, but leave the main problem to be “solved by the reader”. Today, we’re looking at the Four Fours game and some variants on it.

Introduction

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 to use only four fours and as many operations as you like in order to create mathematical sums which equal 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 the greatest 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 the factorial function. Thus, 4! = 24. Different combinations of factorial expressions can be helpful.  

Obviously, the square root function is nice to use as well. 

Depending on the mathematical sophistication of your students, you can also incorporate log, ln, and/or trig functions as 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 can go back and try to figure out the missing combinations. 

Alternatively, create teams of 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 see how many different ways a 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!

An extreme strategy: building up to four

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 out what operations I felt comfortable using. Certainly +, -, *, and / should be allowed, and powers.  What about the square root operation?  What about decimal points (like 4.4)? What about adjunction (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 take one four and apply all the unary operations to make a list of values that result:  4, .4, Sqrt[4] = 2, -4, and so on. Then I would apply 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 can start with the number you want to write and combine it with two 4's to create a number 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.

A variation: two twos

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

Four 8’s, and a powerful strategy

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, like trying everything you can think of with 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 to record 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 you start 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.

2 thoughts on “Four Fours and Friends”

  1. Pingback: The 24 Game and Kin – The Math Doctors

  2. Pingback: Impossible? Try anyway! – The Math Doctors

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.