• virku@lemmy.world
      link
      fedilink
      arrow-up
      8
      arrow-down
      1
      ·
      edit-2
      il y a 15 jours

      0! is 0.

      Edit. I remembered wrong. Keeping it like this as it is funnier that way.

      • arctanthrope@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        il y a 15 jours

        factorials are mostly encountered in combinatorics, which is problems like, how many ways are there to put 3 objects of different colors in a row? well, the first can be any of the 3, the second can be either of the other 2, and the last is whichever 1 is left, so 3×2×1=3!=6

        so how many ways are there to put 0 objects in a row? well there’s 1, it’s this one:


        that’s why 0!=1

        • virku@lemmy.world
          link
          fedilink
          arrow-up
          3
          ·
          il y a 15 jours

          Wow, that was a really great explanation! Thanks! I could have needed this twenty years ago and maybe we wouldn’t have had this interaction.

          • aaa@piefed.ca
            link
            fedilink
            English
            arrow-up
            2
            ·
            il y a 15 jours

            Caught me by complete surprise too, when I first learned it. It’s undefined in most areas of math, I think, but in some it’s just following the convention, it seems:

            • 42 = 16,
            • 41 = 4,
            • n0 = 1,
            • 0 x 0 = 0