Games
Problems
Go Pro!

Ask Professor Puzzler


Do you have a question you would like to ask Professor Puzzler? Click here to ask your question!
Yearly archive for 2016.

I am Ben and I am in forth grade. I would like to know what a trojan horse is.


 

Well Ben, I notice that you said "a trojan horse," rather than "the trojan horse." That does make a difference in the explanation. First I'll review (in case you didn't know) what the trojan horse was, then we'll talk about how that phrase is used today in the world of computers.

Did you ever learn about the Trojan War? The Trojans were citizens of the city of Troy. The story of their war with the Greeks is recounted in Homer's Iliad, and other Greek literature. According to the story, the Trojans defended their city against the Greeks, but they finally lost when their enemies built an enormous wooden horse and hid a group of soldiers inside it. The Trojans thought it was a peace offering, so they brought it into the city and had a big party.

Then, in the middle of the night, while everyone was asleep, the soldiers climbed out of the horse and opened the city gates, letting in the Greek army. The Trojans were defeated because they were so gullible.

That's the trojan horse. But today we use that phrase to mean something similar, but different.

In computer terms, a Trojan Horse is a computer virus that is designed to fool people, just like the Trojans were fooled. It may be a program that is supposed to do something helpful, but really is also doing some unhelpful things.

Maybe you get an email that says "The attached file is an update from Microsoft. Open it to update your computer." Only, it's not really an update from Microsoft - it's a program that deletes all the files on your computer. But you believe the message, so you open the file. Now you're just like the Trojans. You thought you had something nice, but it turns out to be very nasty instead.That's a Trojan Horse.

Or you might be looking for a piece of software to do a particular job. Maybe you want some photo editing software, or screen capture software, or video conversion software. So you go looking online, and you find a free version of the software. You get excited about not having to pay anything, and you download it. But you don't realize that the software is actually spying on you, or damaging your computer in some way.

And by the way, that should be a good reminder to you of how cautious you should be when you download files from the internet, and when you open files attached to e-mails. Don't be like the Trojans - always be suspicious!

[Note: if you came to this post by way of DailyMail.co.uk, you should note that this article is based on a slightly different problem than the one they're talking about (look at the operations in the last line). Nevertheless, their proposed solution is still wrong (both for their problem and this one). Also, be sure to read our blog post about "Hard vs. Unsolvable!" Finally, if you're thinking about writing to us about this problem, please read the update at the bottom of this article.]

I should have known that after our write-up of the Apples, Bananas, and Coconuts problem went viral, we'd get asked to evaluate similar problems. Here's the latest one, and I wouldn't bother writing it up, except it has a fundamental difference from the banana problem. And people are taking the wrong lessons from the banana problem, and are still getting it wrong.

The correct answer to this question is, "No, I cannot solve this." There really is no other answer. If you came up with a numerical value, you were wrong (sorry!). Let me explain.

People who saw our write-up of the banana problem were quick to note that this problem has two similarities to that one: instead of two yellow flowers (as there are in the third line), there is only one in the last line, and instead of five petals (which it has in the second and third lines) the blue flower has only four petals in the last line.

The obvious (and erroneous) lesson to take here is that we're going to count petals instead of flowers. This leads people to the result of 25. So why is this wrong? Because the equations are not petal images; they are images of entire flowers.  We can calculate the value of a red flower, we can calculate the value of a yellow flower, and we can calculate the value of a blue flower with five petals, but we do not have any information with which to calculate the value of a blue flower with four petals. Unless we make the assumption* that the entire value of a flower lies in its petals. Ask a florist if he would sell a flower for the same price if the leaves and stem had been removed. I think you know what he'll say. 

Or we could make the assumption* that a flower is valued at the sum of its petals, stem, and leaves and also assume* that all petals, stems and leaves have the same value from flower to flower. In which case we could set up a system of three equations in 3 unknowns, with P representing the value of a petal, S representing the value of a stem, and L representing the value of a leaf:

36P + 3S + 3L = 60
22P + 3S + 3L  = 30
21P - 1S  - 3L = 3

And we need to find the value of 24P + 3S + 4L

If we subtract the second equation from the first, we get 14P = 30, or P = 15/7 (yuck).

You know what? I'm not going to follow through with this any further, because it's not a pretty system of equations, plus it's not inherently obvious that we should interpret the problem this way. So I think it's just a waste of my time.

* You will note that methods of attempting this problem will require us to make assumptions about the value of a stem, and the value of a leaf. And, furthermore, it requires us to make the assumption that each flower is worth the sum of its parts. Thus, the problem is unsolvable.

So I'm going to stick with my original answer: unlike the banana problem, this one is unsolvable.

So what is the big difference between the two problems? The difference is that in the bananas problem, each image was a representation of a number of fruits, so removing a fruit simply converts the image to another known quantity without fundamentally changing the nature of the objects represented, while in this problem the images are representations of entire flowers, so removing a petal doesn't convert it into a new known quantity; it fundamentally changes the nature of the object into something we don't know the value of.

That probably wasn't the answer the problem creator was looking for, but I don't really care - that's my answer, and I'm gonna stick to it!

Read more: Hard vs. Unsolvable!

Update June 17, 2016

This morning I received the following interesting email from Allan in Newcastle, Australia:

POLLEN PANDEMONIUM Why has nobody seen that the two yellow flowers are a multiplication (there is no + sign as there is in line 1), so that means one yellow flower is worth 1.4142.... (the sq.root of 2). The answer must therefore include .4142. I know you reject the following but . . .as the number of petals only matters for a blue flower, the answer is 25.4142.

Hi Allan! This is a fun way of looking at the problem. I don't think it's a correct way of looking at it, but it's still fun. I'll explain first why I don't think it's the correct way to look at it, but then, if you don't mind, I'll play a little game of "What if this WAS the correct way to look at it?"

Representing mathematical problems in a pictorial format is not a completely out-of-the-blue idea that the person who created this problem came up with. Math text books (especially at the younger grade levels) often use a pictorial format to illustrate math concepts. For example, in a lesson on place value, the number 27 might be represented by a picture of two rods (each representing 10), plus 7 squares (each representing one). In this case, the two rods represent exactly what they look like: two tens, not ten squared.

Similarly, if a textbook showed a picture of five dimes, a plus sign, and three more dimes, you should interpret that as a total of 8 dimes, not as 105 + 103.

So, even though I've never seen a rigorous definition of how we do pictorial mathematics, there's at least a "standard," and that standard suggests that a picture of two flowers really does represent two flowers, and not "flower squared."

Having said that, I've left a little loophole here; since I've never seen a rigorous definition, can we have some fun and see what happens if we choose to define it the way you did?

You said, in your e-mail, "the number of petals only matters for a blue flower," which is not strictly true. You see, one of the really important things we have to agree on in mathematics is that we be consistent in meaning, throughout a problem. Thus, if we need to deal at the "petal" level for blue flowers, in order to be consistent in notation, we need to deal at the "petal" level for all the flowers.

So the first equation is not 3r = 60, where r represents the value of a red flower. It's 3(12p) = 60, where p represents the value of a single red petal.

Except...if we agree to use your idea of using multiplication when no operation is presented, we now have to apply that at the petal level across the entire puzzle.

So it's not 3(12p) = 60; it's 3p12 = 60, because we have to multiply together all those petals!

So if 3p12 = 60,
p12 = 20

Which means p is actually the twelfth root of 20, which is about 1.284!

And then, of course, you need to follow the logic through on the other equations as well. :) I'm not going to do that; I'll leave it for readers to play around with the problem and see what answer they get. Thanks for your e-mail, Allan; this was a fun way to look at the problem.

Update June 21, 2016

When this post went viral, we started getting a large number of e-mails from helpful people who wanted to make sure we knew how to do the problem. This was exceedingly bizarre, since the article is pretty clear that it's not that we don't know how to solve the problem, but rather that there is not enough information to solve the problem without making unwarranted assumptions and therefore it cannot be solved. With the exception of the message from Allan in Newcastle (see June 17 update), each of these e-mails has done nothing but make one of the assumptions which was already addressed in this post. It makes it very evident that people are responding to this article without reading it. For this reason, we're no longer replying to emails about this post; Professor Puzzler is getting tired of simply redirecting people back to the article they should have read in the first place! Click here to read more about ambiguous math problems.

This will Mess With Your Head. 3 MEN GO INTO A MOTEL. THE MAN BEHIND THE DESK SAID THE ROOM IS $30, SO EACH MAN PAID $10 AND WENT TO THE ROOM. A WHILE LATER THE MAN BEHIND THE DESK REALIZED THE ROOM WAS ONLY $25, SO HE SENT THE BELLBOY TO THE 3 GUYS' ROOM WITH $5. ON THE WAY, THE BELLBOY COULDN'T FIGURE OUT HOW TO SPLIT $5 EVENLY BETWEEN 3, SO HE GAVE EACH MAN A $1 AND KEPT THE OTHER $2 FOR HIMSELF. THIS MEANT THAT THE 3 MEN EACH PAID $9 FOR THE ROOM, WHICH IS A TOTAL OF $27, ADD THE $2 THAT THE BELLBOY KEPT = $29. WHERE IS THE OTHER DOLLAR? SEND THIS TO 5 PEOPLE AND THE ANSWER WILL APPEAR ON YOUR SCREEN.


First of all, let's clear up a misconception here. It doesn't matter how many people you forward this email to - the answer will never appear on your screen, unless someone decides to take pity on you and reply to your email.

Now, regarding the question of the three men and the bellboy, if this one stumps you, don't feel bad. I remember as a child puzzling over this one for a long time before I finally saw through the "trick". Believe it or not, the answer is exceedingly simple, and you don't need any advanced mathematics to figure it out.

What you've got to ask yourself is: If the men paid 27, and the boy took 2 from that, why in the world are you adding those two numbers instead of subtracting them? 27 - 2 = 25, which is the total amount paid. 27 + 2 is completely meaningless addition problem.

The thing that fools you into thinking it's a meaningful problem is the fact that the answer is close to 30, so you think it should add up to that. But there's no reason for that addition to add up to anything meaningful, because addition is not a meaningful thing to do with those two numbers in the context of the problem.

Also, the fact that there's an additional exchange (involving the man behind the desk) confuses the issue, and helps to distract you from the fact that the bellboy is really taking money from the guests.

Let me put it this way. If I gave you twenty seven apples, and someone took two away from you, would you then have 29? Of COURSE NOT! But that's exactly what the problem writer is trying to get you believe!

So when someone asks you "Why doesn't this add to 30?" just give them a puzzled look and say, "Why do you think it should?"

Added note: If you would like to see a similar problem click here: Guy Buying a Car.

Hi, I want know about 2-tier architecture and 3-tier architecture. Please explain me with some examples. Regards, Chandra

Chandra, The easiest way to explain this is, as you suggest, by an example. So I'll give you an example.

Let's suppose I'm going to write a piece of software that students at a school can use to find out what their current grade is in all their classes. I structure the program so that a database of grades resides on the server, and the application resides on the client (the computer the student is physically interacting with).

When the student wants to know his grades, he manipulates my program (by clicking buttons, menu options, etc). The program fires off a query to the database, and the database responds with all the student's grades. Now my application uses all this data to calculate the student's grade, and displays it for him.

This is an example of a 2-tier architecture. The two tiers are:

  1. Data server: the database serves up data based on SQL queries submitted by the application. 
  2. Client application: the application on the client computer consumes the data and presents it in a readable format to the student.

Now, this architecture is fine, if you've got a school with 50 students. But suppose the school has 10,000 students. Now we've got a problem. Why? Because every time a student queries the client application, the data server has to serve up large queries for the client application to manipulate. This is an enormous drain on network resources. So what do we do? We create a 3-tier architecture by inserting another program at the server level. We call this the server application. Now the client application no longer directly queries the database; it queries the server application, which in turn queries the data server. What is the advantage to this? Well, now when the student wants to know his final grade, the following happens:

  1. The student asks the client application.
  2. The client application asks the server application.
  3. The server application queries the data server.
  4. The data server serves up a recordset with all the student's grades.
  5. The server application does all the calculations to determine the grade.
  6. The server application serves up the final grade to the client application.
  7. The client application displays the final grade for the student.

It's a much longer process on paper, but in reality it's much faster. Why? Notice step 6. Instead of serving up an entire recordset of grades, which has to be passed over a network, the server application is serving up a single number, which is a tiny amount of network traffic in comparison. There are other advantages to the 3-tier architecture (for example, a three tier architecture allows you to do load balancing, by having multiple servers that can function as the middle tier).

Incidentally, this website is a 3-tier application. The client application is your web browser. The server application is the php code which queries the database (the third tier) for the question-and-answer you requested. I hope that helps!

Phil's question is about the image below, and the blog post that goes with it (click the image to read the other blog post).

Professor Puzzler, in your answer to the "Genius" puzzle you showed a function that gave the right values for 8, 7, 6, and 5, but 3 wasn't in the domain. (I see how you did that, by the way - you multiplied the function by (x - 3), and then divided it by (x - 3) -- that gives you the same function, except with a hole in it!).

But my question is: can you come up with a function that matches all the data points given in the problem, but has a DIFFERENT value for x = 3? I'd like to be able to tell people that the answer is [some number besides 6]  and watch them squirm when I show them the function that gave that answer.


Hi Phil, I can absolutely give you a function that matches the data points given, and gives you an answer other than 6 when you plug in three!

Of course, you'll need to do a bit of memorizing, because it's kind of an ugly function. Are you ready?

g(x) = x- 26x+ 252x- 1067x + 1680

It's not pretty, is it? When you plug in 3, you get g(3) = 126, which is wonderful for what you want; it's quite startling that you get a result that's so big in comparison to the other data points. Your friends will think you're crazy for coming up with a number so big!

Are you wondering how I came up with this beast of a function? That actually wasn't too difficult. I was helped by the fact that I already had a function which matched the data points: f(x) = x2 - x.

In order to create a new function that has all those same data points, I just need to find some function h(x) such that h(8) = 0, h(7) = 0, h(6) = 0, and h(5) = 0. If I have a function like that, I can just add f(x) + h(x), and I'll have my new function that keeps those same data points.

So what function h(x) meets the criteria of having zeroes at 8, 7, 6, and 5? EASY!

h(x) = (x - 8)(x - 7)(x - 6)(x - 5)

Multiply this thing out and you get:

h(x) = x- 26x+ 251x- 1066x + 1680

h(x) + f(x) = g(x) = x- 26x+ 252x- 1067x + 1680

Keep in mind that this is not the only such function; there are an infinite number of ways of generating your h(x), and different h functions will produce different values for g(3). For example, we could take our h(x) and multiply it by 1000, before adding f(x), and we'd still have a function that works. Or we could multiply it by some random polynomial like x7 + 17x3 - 11 (just make sure your polynomial doesn't have (x - 3) as a factor!). By doing this, we haven't changed the fact that the function has zeroes at 8, 7, 6, and 5. However, we've significantly changed the value of f(3)!

In fact, we could make g(3) equal anything we want to, just by manipulating our h(x) with a numerical multiplier.

Suppose we want to have g(3) = k. Then our function g(x) will be: 

g(x) = ((k - 6)/120)h(x) + f(x).

I'll leave it to the reader to figure out how I came up with that, and verify whether or not it works.

Now go annoy your friends, as only a math geek can!

Older posts

Blogs on This Site

Reviews and book lists - books we love!
The site administrator fields questions from visitors.
Like us on Facebook to get updates about new resources
Home
Pro Membership
About
Privacy