Advanced Math/26


Another geocaching puzzle that's giving me grief:-

1. All six digits of three 2-digit numbers are different.  What is the largest sum of three such numbers?  A=the sum of the digits in your answer.

2. B= the last digit of 3^2014

3. A cube is made of 27 smaller cubes, each of which is either red or yellow.  They are arranged so that no cubes of the same colour meet face to face.  C= the difference between the largest number and the smallest number of red cubes possible.

4. If z=x^2+y^2+2xy+6x+6y+4, then D=the minimum value of z.

5. A bracelet is made by threading four identical black beads and four identical white beads onto a string.  E=the number of different bracelets that can be made.

1: Use 9, 8 and 7 as the first digits and 6, 5 and 4 as the second digits to give a sum of 255 and A = 12.

2: The last digits of the first four powers are 3, 9, 7 and 1 and then they repeat. 2014 = (503 * 4) + 2 so I figure B = 9.

3: I think 13 of one colour and 14 of the other, so C = 1.

4: Now here I really do need your help!

5: I tried writing them all out and got 65! I'm sure that's wrong. Looking ahead at what I need to do with the answers I can see that E is a multiple of 4, which in any case seems reasonable. It also looks as though it ought to be a lot smaller, which seems unlikely. Anyway, I also need to pass this one over to you.

Your answers for 1 through 3 are very good. So let's talk about #4 first:

You have a complicated function of x and y, and you want to get the minimum value.

Well, what you want to do is "complete the square" for each of the variables x and y. Because you know this function will have a minimum value, you know that what you get will be something like these functions:

(x+y)^2 + x^2 + 7


(3x+2y+1)^2 + (y-5)^2 + 7

so that no matter what, these functions will be at least 7 (the squared parts cannot be negative). You could not have a function like this:

x^2 + 4y + 7

because using very negative values of y will give very negative values of z too.

So here's what we can start with:

x^2 + 2xy + y^2 + 6x + 6y + 4

There are more complex mathematical ways to tackle this problem "from scratch" but let's look for the simplest answer possible. If you have an "xy" term in your function, you'll need an x+y type term, which could be (most generically):

(ax+by+c)^2 = ? = x^2 + 2xy + y^2 + 6x + 6y + 4

Now, if we expand this square out, you have:

a^2 x^2 + 2ab xy + b^2 y^2 + 2ac x + 2bc y + c^2 = ? = x^2 + 2xy + y^2 + 6x + 6y + 4

If you match up the x^2 term, you get a=1. When you match up the y^2 term, you get b=1.

Plugging in a=b=1 throughout, we now have:

x^2 + 2xy + b^2 y^2 + 2c x + 2c y + c^2 = ? = x^2 + 2xy + y^2 + 6x + 6y + 4

That's pretty close to being right! If we want to match up the x and y terms, we can say c=3. That's almost right, because we don't have the c^2 correct (c^2=9, not 4). So we get:

x^2 + 2xy + b^2 y^2 + 6x + 6y + 9 = ? = x^2 + 2xy + y^2 + 6x + 6y + 4

That is, of course, wrong. We are off by 5. So what is actually correct is:

[x^2 + 2xy + b^2 y^2 + 6x + 6y + 9] - 5 = x^2 + 2xy + y^2 + 6x + 6y + 4

Now, that looks silly, but don't forget, we can rewrite everything in the [brackets] as:

( x + y + 3)^2 - 5 = x^2 + 2xy + y^2 + 6x + 6y + 4

So if z is really this expression, the squared part can be zero (and not lower). Thus the minimum value of z is -5.

Amazingly, not only can computers do all of this algebra for you, you can even shortcut everything by asking the computer to minimize this function for you!

For #5, there is a complex way of solving this problem called Burnside's counting lemma that can be used to solve this problem.

Using those methods, the summation given would be:

70 + 0 + 2 + 0 + 6 + 0 + 2 + 0 + 6 + 6 + 6 + 6 + 6 + 6 + 6 + 6 = 128

while the number of those is 16, giving the answer 128/16 = 8.

Now, deriving that answer uses a complex mathematical methodology and gives a very small answer, so maybe we can count them on our own.

I suspect you got the answer 65 was your attempt to count all of the possible ways to assign the colors white or black to each bead. (The answer would be 70, which is one of those terms.)

But if you count all arrangements, which I can start to list here:


then you are counting lots of configurations that are the same. For example:


are the same configuration (the one that perfectly alternates). Remember, this is a necklace. It's round, so any "rotation" of the necklace is the same, which corresponds to a "shift" in the necklace. So if you had 7 beads white, one black, you could write down these:


etc... but all of those are the same. There's only one possible necklace there.

You can also "flip" the necklace, so that:


is the same as:


because the necklace can be flipped over.

Now, we can break it down (without using the complicated math) using this idea:

Let's count how big the "clusters" of white beads are.

If there is a cluster of size 4, then there's only one necklace:


(You can "rotate" or otherwise manipulate that one to get other equivalent ways of writing it, but it's only one necklace.)

Now, if there's a cluster of size 3 (but not 4) then you get:


that's the incomplete necklace. You have three remaining spots, one of which is white. Either the new white one goes next to one of those black ones shown, or it doesn't. You get:


Those are the only two possibilities. Now, this sounds like it's getting complicated, so I'm going to do the rest of this as an image. (See attached.) But you'll get 8 as the total this way too (of course, it has to agree with the previous answer).

Advanced Math

All Answers

Answers by Expert:

Ask Experts


Clyde Oliver


I can answer all questions up to, and including, graduate level mathematics. I am more likely to prefer questions beyond the level of calculus. I can answer any questions, from basic elementary number theory like how to prove the first three digits of powers of 2 repeat (they do, with period 100, starting at 8), all the way to advanced mathematics like proving Egorov's theorem or finding phase transitions in random networks.


I am a PhD educated mathematician working in research at a major university.


Various research journals of mathematics. Various talks & presentations (some short, some long), about either interesting classical material or about research work.

BA mathematics & physics, PhD mathematics from a top 20 US school.

Awards and Honors
Various honors related to grades, various fellowships & scholarships, awards for contributions to mathematics and education at my schools, etc.

Past/Present Clients
In the past, and as my career progresses, I have worked and continue to work as an educator and mentor to students of varying age levels, skill levels, and educational levels.

©2017 All rights reserved.