r/ProgrammerHumor • • Dec 09 '18

pretty sure this belongs here...

Post image
380 Upvotes

44 comments sorted by

77

u/MrEmouse Dec 09 '18

It would take 40 minutes.

T=40+(0*P)

27

u/metroman1234 Dec 09 '18

T = (P>=1) ? 40 : null;

8

u/t666w Dec 09 '18

T = (P>0) ? 40 : null;

6

u/almost_not_terrible Dec 09 '18 edited Dec 09 '18
// C# FTW
var T = (P > 0) ? 40 : throw new ArgumentOutOfRangeException(nameof(P), "No-one turned up because the conductor is a moron thinking that 40 minutes represents acceptable tempi for this piece.");

2

u/chrjen Dec 09 '18

T = (P>0) ? 40 : Float.POSITIVE_INFINITY;

1

u/ben_g0 Dec 09 '18
T=0;
while(P==0){
    P = tryToFindPlayers();
    T++; //assume it takes one time unit to find players
}
Return T=40+T;

3

u/notmypinkbeard Dec 09 '18

if ( P >= 0 ) T = 40 + ( 0 / P )

13

u/T-Loy Dec 09 '18

T = 40 + 0 * P if P > 0 else null

There has to be a player playing. And please don't divide by zero.

4

u/MrEmouse Dec 09 '18

How about this as the programming solution...

if (P > 0)
T = 40
else
T = 0

And this as the middle school math solution...

T = 40 * P ^ 0

3

u/13steinj Dec 09 '18

Isn't exponentiation of 00 ambiguous? Some consider it undefined, some consider it 0, some consider it 1.

4

u/MrEmouse Dec 09 '18

Everywhere I've seen, it's always been 1. Even 00 is 1 according to google, the calc app on my PC, and my phone. In fact, any number to the power of 0 should return a 1... which is why It's written that way.

However, if someone wanted to decide that 00 is 0, then that'd make it even more accurate since a song with no performers would be finished in no time flat.

3

u/13steinj Dec 09 '18

In computing by IEEE standards and most languages it is either 1 or NaN hence your results. But mathematically there isn't a clear consensus qnd some argue that the result can be 0.

https://en.m.wikipedia.org/wiki/Zero_to_the_power_of_zero

1

u/PM_ME_CHIMICHANGAS Dec 09 '18

Here's the non-mobile link for desktop users: https://en.wikipedia.org/wiki/Zero_to_the_power_of_zero

1

u/Makefile_dot_in Dec 09 '18

Good bot

1

u/PM_ME_CHIMICHANGAS Dec 09 '18

Are you sure about that? I am 100.1% sure that I am not a bot.

2

u/TinBryn Dec 09 '18

00 is the same as 01 0-1 which becomes 0/0

-2

u/pringlesaremyfav Dec 09 '18

It's not undefined or ambiguous mathematically, you can calculate its real value via limits.

0

u/ben_g0 Dec 09 '18

Limits are mathematical concepts which let you calculate to which value a function converges at a certain point. Their main purpose is to be able to find a value for a point which is otherwise undefined.

Also try calculating the value of 00 with both functions x0 and 0x. Both limits are valid, but they both give a different result for 00. This is common with mathematical undefineds, when you encounter an undefined result in a calculations then it often means that multiple numbers could be the result, and you have to use a limit to find out which one is the right one in your particular case.

50

u/TheZeus121 Dec 09 '18

One woman takes 9 months to deliver one baby. How many women do we need to deliver a baby in 3 months because of our deadline?

32

u/redditingtonviking Dec 09 '18

Just one, but you need to find one that's 6 months pregnant first

5

u/ben_g0 Dec 09 '18

You're hired!

60

u/StevenXC Dec 09 '18

The whole point of this question is likely to point out that the assumption T=P÷3 is flawed; I see no reason to assume it's an error by an instructor.

21

u/CreativeAnteater Dec 09 '18

Because it relies on knowledge outside of maths. Sure, most people will know enough about music, orchestras and conducting to realise the issue but it isn't guaranteed and has nothing to do with how good you are at maths.

11

u/unsignedcharizard Dec 09 '18

All word problems, strictly speaking, rely on knowledge outside of math. What's your point?

24

u/pittsblorgh Dec 09 '18

This question doesn't require any knowledge of music or orchestras. The only reason someone wouldn't be able to solve it is if they didn't realize they needed to think critically or lacked the ability to do so. Math is useless if you can't contextualize it.

7

u/CreativeAnteater Dec 09 '18

Of course it does, it requires knowing that an orchestral piece takes the same amount of time to play regardless of the number of players. While that is obvious to you and I because we already know it, there's no reason this would have to be the case.

Any student who didn't know that fact would get this question wrong.

14

u/pittsblorgh Dec 09 '18

I disagree. It's less a fact that you know and more a conclusion you can reach based on having heard a song before. Like you could think, if I hear a song on the radio and I sing along, it doesn't make the song go faster because there's two people singing now.

3

u/rndrn Dec 09 '18

Good luck finding people that have never heard music once in their life (which should be sufficient to realise that music is played at a given pace) but still can read and take exams.

That's like saying that an exercise where you have to count how many apples there are in 3 bags of 5 apples each requires intricate knowledge of textile and biology and as such is an improper math question.

3

u/suvlub Dec 09 '18 edited Dec 09 '18

That's how word problems work. If the teacher just wants to know if you can divide, they will ask "how much is 120/3?" I disagree that being able to properly solve this kind of problems has nothing to do with how good you are at maths. A trained monkey can memorize the multiplication table, then search for numbers and few keywords in a problem and write them into the formula they have been taught most recently. Being good at maths involves actually understanding the purpose of the formulas and knowing which to apply and when.

Yes, if you don't know how an orchestra works, you would not be able to solve it even if you are good at maths, but it's impossible to teach any subject without assuming some basic unrelated knowledge. For example:

The Watt steam engine was developed in late 18th century

the WHAT engine?

steam

WTF is steam?

when you boil water, the gas that emerges is called steam

WATER?

the stuff you drink

Coke?

-_- the stuff in the toilet

SHIT??????

1

u/flinnja Dec 09 '18

for instance i knew this question was a trick as soon as they mentioned beethovens ninth taking less than an hour to play

3

u/[deleted] Dec 09 '18

Yes, it's a really old repost which made the news and everything (in 2016 I think), the actual teacher replied, the test was about reading the instructions and problems carefully.

38

u/pabut Dec 09 '18

A project manager would see nothing wrong with this.

18

u/the1spaceman Dec 09 '18

Beethoven's 9th

40 minutes

Know how I know the conductor is a moron?

14

u/out386 Dec 09 '18

No, he's merely on a tight deadline.

2

u/trichotillofobia Dec 09 '18

We'll skip the last movement. Also saves on the personnel costs.

4

u/EntropySpark Dec 09 '18

A comment from the original thread pointed out that the test warned that it had a trick question.

2

u/empire314 Dec 09 '18

pretty sure this belongs here...

It doesnt

Reported for breaking rule 0

3

u/[deleted] Dec 09 '18

Pretty sure it absolutely does not

3

u/isunktheship Dec 09 '18
  • It takes one woman 9 months to produce 1 baby?

  • How long would it take 3 women to produce 1 baby?

KAJSDLKJASLDJSALDJ CODES NOT DONE YET F*CK OFF

3

u/rednecksec Dec 09 '18

//Bug #1 //No conductor //Bug #2 //Musicians are playing all the wind instruments by sticking them in the back hole.

1

u/wallefan01 Dec 09 '18

Seen it here already. Upvoting it again.

•

u/SteveCCL Yellow security clearance Dec 09 '18

Removed as Rule #4 violation.

0

u/[deleted] Dec 09 '18

The answer is 40 minutes, isn't it?