Abstract Algebra July 3, 2008

Abstract Algebra

As you’re reading this, I’m taking a makeup midterm exam for my grad school Abstract Algebra class (I missed the actual test while in Canada).

Sample problem:

When multiplying out 5,000,000!, how many zeroes are at the far right?

Correct answer? 1,249,998.


Gotta love tests that count for 50% of your grade.

I’ll be spending the rest of my day crying in the fetal position.

Browse Our Archives

What Are Your Thoughts?leave a comment
  • Iztok

    Hm… I don’t get it… unless it meant factoring five million?

  • ubi dubius

    In law school, the final exams are typically 100% of the grade! And, they’re all essay. One exception was my gift, trust & estate taxation final, which was a take home test: here’s the fact pattern, complete the estate tax return with all the schedules and attachments.

    Anyway, I hope that you did well on your final. Either way, it’s over!

  • If I ever got a question like that I’d try and be smart and give the answer as infinity (since any whole number has a decimal place followed by an infinite number of zeroes).

  • Jason

    I thought the answer was “six”, although I do know what “!” means. But I would have certainly put “There are six zeros on the right side of 5,000,000!, the fact that it is an excited 5,000,000 wouldn’t change the zeroes.”

  • Arlen

    The “!” symbol means multiply by every integer smaller than the number before the “!”. So 3! = 3*2*1 = 6.

    The correct answer to Hement’s question is actually 1, because only one zero can be on the *far* right.

  • Rob

    I dunno if I could count all the zeros on the far right… Dobson… Limbaugh…

    (Seriously, I was waiting for the politically-themed punchline!)

  • What a beautiful question! I love it.

    Great answer from Arlen.

    But to see how to get the second best answer, as provided by slower students, proceed as follows.

    What matters is the number of times 5 is a factor of 5000000! There will be more 2s than 5s, so the number of 5s governs the number of consecutive zeros on the right.

    5000000! is a product of 5000000 numbers, and the number of those which have 5 as a factor is
    5000000 / 5 = 1000000
    But the number which have 25 as a factor is
    1000000 / 5 = 200000
    Just keep dividing by five (and rounding down) to get the number of times 5^n is a factor in the sequence 1,2,3… 5000000

    Then add up all the results of your divisions. (Think about it…)

    5000000 / 5 = 1000000
    1000000 / 5 = 200000
    200000 / 5 = 40000
    40000 / 5 = 8000
    8000 / 5 = 1600
    1600 / 5 = 320
    320 / 5 = 64
    64 / 5 = 12
    12 / 5 = 2
    2 / 5 = 0

    Adding up 1000000 + 200000 + 40000 + 8000 + 1600 + 320 + 64 + 12 + 2 gives…


    Is there an easier way? The sum of the series 1 + 1/5 + 1/25 + … is
    1.25, and so we know the answer is going to be really close to 1250000

    It all comes down to how much we round down in the divisions. Twice, as it turns out. So the answer is 1250000 – 2 = 1249998

    Homework; in the style of Tom Lehrer. Do the same problem, but in base 8. How many consecutive zeros on the right hand side of 5000000! , when the question and the answer is in base 8?

  • DC

    Heh, I enjoy problems like that. It reminds me of the AMC 12 and AIME in high school.

    Your answer makes sense, basically you just keep dividing by 5, drop the remainder, and add each result:


    [EDIT: beaten by 4min]

  • That one’s actually not so bad. Each zero is due to a factor of 10, which is a 2 and a 5. There’s a ridiculously large number of 2’s, so we just need to count the 5’s. So then if x=5,000,000 just to avoid writing it out, this is just going to be the sum from 1 to infinity of the floor function of x/5^n. (The reason is that we get one five from each fifth number, then a second from each 25th, and so on). The terms are only nonzero up to x/5^n, and work out to be 1,000,000+200,000+40,000+8,000+1,600+320+64+12+2=1,249,998. This in fact works for any number x, not just 5,000,000.

  • Damn, Duae beat me to it by mere moments and posted while I wrote up the solution.

  • Duae apparently got there first. What I want to know is how is this “abstract algebra” and not “high school math competition” material, and how is it at all difficult if you *gasp* know the definition of factorial??

  • Iztok

    Ugh? I said it first that it was factoring 5 million! 🙂

  • Here is another fun math problem (this time involving addition).
    What is 1 + 2 + 3 + … + 99 + 100 ?

    Yes, there is a trick.

  • Iztok

    Jeff, that is an easy one 🙂

    (1+100)+(2+99)…. 🙂

  • That didn’t take long 🙂

    (1+100)+(2+99)…. = 50 * 101 = 5050

  • Ok, here is a psychic mind-reading trick. My kids love this (they don’t understand even basic algebra yet).

    Pick a number between one and ten and keep it to yourself.
    Double it.
    Add six.
    Divide your answer by two.
    Subtract your original number.

    The number left is three!!!

    Am I psychic or what!!!

  • Scott

    The number left is three!!!

    Am I psychic or what!!!

    You must be God!

  • I independently hit upon the same approach as Duae, DC, and Charles. Really Hemant, don’t tell us that *that* little problem made you cry. I could have done that in like 10th grade.

  • Bartlettman


    Maybe they’d enjoy this slightly more complicated puzzle then.


    If you know the trick you can do it in your head and really shock people.

    Then there’s the trick of reeling off the top of your head a huge number that is divisible by 9, you just make sure that pairs of digits sum to 9 (except 0 or 9, which you can use to change the number of digits to an odd number to throw them off)

    I love a bit of grandstanding but I get the most enjoyment explaining how these things work to those who will listen (except I don’t want to be a teacher).

  • I independently hit upon the same approach as Duae, DC, and Charles. Really Hemant, don’t tell us that *that* little problem made you cry. I could have done that in like 10th grade.

    Fair enough. That was the only problem from the practice test I could actually type into a computer. The rest of it was much more complicated.

    So there!

  • I’ve done that kind of question before. You just have to count the fives! What’s so hard about that?

  • Bartlettman said,

    I really like that one. Although I haven’t derived the trick yet, I do recognize what the trick is… This will be a fun one to do on people. Definite proof of revelation through the Holy Spirit!!! 😉

  • Steven

    I hate to say it, but I have no idea what you folks are talking about. My last math class was 20 years ago when I bid a, well, less than fond farewell to high school math. I’m going to have to do a lot of catching up in the future to help my kids with their homework.
    Is there a “Math for English Majors” handbook out there somewhere?
    The most useful bit of “math” I ever learned? How to quickly calculate change due – I never get shortchanged. Sadly, it’s not something they mentioned in school – except for the whole addition thing…

  • BoxerShorts

    I love math… in principle.

    In practice, I lack the mathematical aptitude to be successful at it. I once had aspirations of becoming a physicist, but I gave up on math after first-year calculus and pursued journalism instead.

    Which really sucks, because I’m fascinated by math, and I want to be able to understand advanced mathematics. But I can’t. I’m just not smart enough.

  • Crap. I probably could have solved it in grade 10, but now? Holy crap am I bad at math now (and I’m an engineer). Though, to be honest, factorials don’t come up to often when you’re designing a bridge.

  • Ok, for those whose math was a long time ago:

    5,000,000! = 5,000,000 x 4,999,999 x 4,999,998 x….x 10 x 9 x 8 x 7….x 2 x 1

    For example: 5! is 5 x 4 x 3 x 2 x 1 = 120

    How many zeros to the right of 5,000,000 ! written as a whole number means: “how many times does 10 “go into” that number?
    10 = 5*2 so this amounts to “how many times does 5 divide this number” since there are more 2 factors than 5 factors.

error: Content is protected !!