Shlemiel the Painter Shlemiel gets a job as a street painter, painting the dotted lines down the middle of the road. On the first day he takes a can of paint out to the road and finishes 300 yards of the road. "That's pretty good!" says his boss, "you're a fast worker!" and pays him a kopeck.
Joel Spolsky
I don't get it? What rules (other than that the first number [300] has to be ten times the last number [30]) are in effect?
Michael Pryor
The constraint is that you can assume he walks at a constant rate, paints at a constant rate, and needs to return to the paint can every time he paints a constant number of yards...
Joel Spolsky
BTW it may be the case that there are lots of combinations of three numbers that work, but also lots of combinations of three numbers that don't work. I don't actually know the answer to this puzzle but somebody needs to work it out so I can tell this joke in a mathematically plausible way.
Joel Spolsky
The big thing we're missing is how much can he paint on a refill. If we get that answer, we can find out how far he walks in a day. If we assume that he painter one yard on a refill then:
Joseph Erickson
OK, let's put down some values:
Pierre Baillargeon
Since we have to start with some assumptions about how fast Shlemiel works, let's just say that he actually did paint 300 yards in the first day. Let's also assume that he has to go back to the paint can after every yard painted. Let's not make things anymore confusing either by getting into details about what kind of lines he's painting (since, because we're working out relative numbers, and not absolutes, it's not really relevant). Assume it is a straight line, 300 yards long. We're also going to assume that his walking rate and painting rate are the same.
Brad Greenlee
Looking at it from another direction (not that this actually works, but food for thought): How fast would Shlemiel have to walk & paint to paint 300, 150, and 30 yards each day, respectively?
Darryl Ballantyne
This is why I ain't a programmer. ;)
Meryl
Obviously Shlemiel walks farther the more trips he makes back to the paint can. If he did the entire 300 yards all in one shot, that would be a lot less walking than painting the 300 yards but making a trip back to the can every inch or so. We can make assumptions about the length of the line he paints, but I would generalize it out with an integral to get at the fundamental "n squaredness" of the problem. The first job is figuring out what one day's work is equal to:
Alyosha`
Ethan Herdrick
I believe that there is a problem with the logic in the prior response. If Schlemiel walks out x yards to paint his strip, doesn't he walk back x yards + the length of the stripe?
Luke Miller
Shlemiel is being paid in kopecks, and it is late enough that have paved roads with dotted lines down the middle, so the units should be meters, not yards.
Aron Insinga
Luke: The length of the stripe is just part of the total stripe interval. The stripe interval is just the length of a stripe plus the space to the next stripe. So, longer stripe, shorter space, shorter stripe, longer space; same thing as long as total length is static.
Ethan Herdrick
One complication we ignore is that the act of painting is different from the act of walking. Painting is intuitively slower. However, if we use physics, we can use "work" equations, and not deal with messy velocity-laden equations. In fact, it makes more sense, since a person doesn't do a fixed Distance per day, she does a fixed amount of physical Work per day. With just minor variations during some small interval of workdays.
forgotten gentleman
Another thing I don't see anoyone account for is paint dripping off / drying between each of his trips. This would reduce the amount of work he could accomplish on the second and third day. Perhaps one of the math literate could introduce a dry rate variable, and calibrate it so the second day really did work out to 150, then we'd see how much he would be able to do on the third day...
Noah Bast
What about the fact that he gets more tired each day or had a big night out on the second day? Can we assume a constant level of stamina/fitness?
Paul Berger
I have what I think is a reasonable method for solving this problem, but in the grand tradition of great mathematicians I'm not going to give an answer. Instead, I'm going to let the engineers get the actual numbers for themselves. First: the tedious algebra!
Chris Hooper
hi joel,
Jawahar Mundlapati
Further to Noah Bast's comment about drying and dripping of the paint. The drying factor would be affected by the psychrometric conditions as Shlemiel worked. The temperature and humidity would change through the day and would change more dramatically if a weather front passed through. However, a simple formula based on average values for the time of year could be used. To account for these factors, you would probably have to rely on empiricaly derived drying rates provided by the paint manufacturer. The relative wind speed as Shlemiel walked would be another factor, which would be further affected by the "wash" as vehicles drove past him.
Max Hudson
guys, you have waaaay too much time in your hands ;)
eV
Someone's project is running late !
Matt
Software engineers, I knew the answer from the moment I read this. Shlemiel painted 80% of the road on the first day, and took the next few months painting the remaining 20%.
Christopher Shepherd
It was just the helplessness factor what made Shlemilel work less hard each day. (Having to walk back to the paint can each time must be pretty frustrating). So 300, 150 and 30 are, in that sense, realistic numbers. I bet the fourth day he quit.
sergio acosta
nice to read it
:-)
You do realize, we're trying to sum up Stupidity as a Mathematical Equation.
Danny B
That's all OK, but nobody has found the real question:
Tarek Zein
On the first day he paints 300 yards. This is the most he can paint in one day.
Andrew
all of you are wrong
Pak
Of course, everyone has ignored that the further he walks, the more paint he looses by the dripping and the more paint dries on the brush, requiring him to clean his brush more often, so the original numbers are easily possible...
Hauke
The definitive answer:
Syed
So, people, you don't know about integral calculation?
Alexander
A! Is need also to say, that for this solution Shlemiel get time only for _transport_ a paint from bottle to point to paint. In another case (if painting get a big part of total work time), result will be... bether ;-). Why - this means, that speed of Shlemiel is more that calculated 90000 'yards' (realy there are 'yards' only if they paint one yard each time ;-)) per day, because they take a littler part of time for walking, and more - for painting. This give us a more opthimistic result. In case, if they walk two times faster, and other time paint - this means, that they will paint a next day not 124, but about 160-170 yards, using day at 3/4 for walking, and other time for painting.
Alexander
To Andrew:
Astrid
You guys sure know how to ruin a joke.
Whats purple and Concord the World? Alexander the Grape!
Speaking of which: the answer is, of course, "whatever distances make the joke the funniest".
Ray Trent
The answer is 42, of course.
T.J.
Of course, the answer is 42. But do you know the question?
Peter
There are no correct numbers.
Evgeny
Since there is still no GENERAL and exact SOLUTION:
Basil Achermann
Hi, all!
Peter Huggy
> 2*(1+2+...+300) = 301*300 ~= 90,000 meters = 90 km - impossible!!
rjp
The answer that I got was 300 yards on the first day, 125 yards on the second day, 96 yards on the third day, and 81 yards on the fourth day. It really doesn't matter how fast the painting is compared to the rate of walking as the walking quickly becomes the majority of the work.
Ralph Miner
Basil is right, too bad, I liked the joke very much.
Marc-Andre Lafortune
What the joke does not account of is that each day, Shlemiel adds less and less distance to be covered on the following day, because he only ever paints a constant length before another trip back and forth. Indeed, the sharpest drop-off happens after the very first strip. Let me explain:
Aristotle Pagaltzis
You could possibly fix the joke if the section of road he was painting was an increasingly steep hill.
J Thomas
I think the 'walks back to paint can and paints X yards before refilling' approach is definitely the easy way to do the problem, and interesting because whether he can paint 1 yard or 1000 yards on a brush, you converge to the same answers of 300, 150, and 75 if you use 300 and 150 like givens.
William Cox
must be 3 integers from a expnonencial series, that's all
radomiro
Perhaps Shlemiel's job description is putting people off the original purpose of this example, that is to say, the traversal to the end point took much longer than the doing of the thing at the end.
Gorf
Fog Creek Home |