1. Home
  2. Explore
  3. Computer Science
  4. Recursion and Factorials

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Recursion and Factorials

  • 13Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Factorial Basics
For a positive integer nnn, the product definition of n!n!n! multiplies nnn by each descending integer until it reaches
.

13 questions

  1. 1
    For a positive integer nnn, the product definition of n!n!n! multiplies nnn by each descending integer until it reaches
    _____
    .
    Hint

    The product ends at the smallest positive integer.

    Answer

    1

  2. 2
    Using the product definition, 4!4!4! equals
    _____
    .
    Hint

    Multiply 4×3×2×14 \times 3 \times 2 \times 14×3×2×1.

    Answer

    24

  3. 3
    Using the product definition, 2!2!2! equals
    _____
    .
    Hint

    Multiply 222 by the positive integer immediately below it.

    Answer

    2

  4. 4
    The value of 1!1!1! is
    _____
    .
    Hint

    The product contains just one factor.

    Answer

    1

  5. 5
    By definition, the value of 0!0!0! is
    _____
    .
    Hint

    This special factorial value is defined rather than calculated by multiplying downward.

    Answer

    1

  6. 6
    In computer science, recursion solves a problem by having a function
    _____
    .
    Hint

    Think about what the function does to invoke another instance of its own process.

    Answer

    calling itself

  7. 7
    The factorial function described in the content accepts a positive integer or
    _____
    as its argument.
    Hint

    It includes the special factorial value defined as 111.

    Answer

    zero

  8. 8
    For n≥1n \geq 1n≥1, the recursive relationship rewrites n!n!n! as nnn times
    _____
    .
    Hint

    The remaining product is the factorial of the integer immediately below nnn.

    Answer

    (n−1)!(n - 1)!(n−1)!

  9. 9
    The recursive rule n!=n×(n−1)!n! = n \times (n - 1)!n!=n×(n−1)! applies when nnn is
    _____
    .
    Hint

    Check the condition that prevents the rule from reaching a negative factorial.

    Answer

    greater than or equal to 1

  10. 10
    Applying n!=n×(n−1)!n! = n \times (n - 1)!n!=n×(n−1)! at n=0n = 0n=0 would require evaluating
    _____
    .
    Hint

    Substitute zero for nnn and calculate n−1n - 1n−1.

    Answer

    (−1)!(-1)!(−1)!

  11. 11
    To make the recursive factorial definition complete, its separate case for n=0n = 0n=0 sets n!n!n! equal to
    _____
    .
    Hint

    Use the special value assigned to zero factorial.

    Answer

    1

  12. 12
    Using the recursive rule for n=2n = 2n=2 gives 2!=2×1!2! = 2 \times 1!2!=2×1!, which evaluates to
    _____
    .
    Hint

    Use the value of 1!1!1! to finish the calculation.

    Answer

    2

  13. 13
    Using the recursive rule for n=1n = 1n=1 gives 1!=1×0!1! = 1 \times 0!1!=1×0!, which evaluates to
    _____
    .
    Hint

    The recursive step reaches the defined value of 0!0!0!.

    Answer

    1

1 of 13
Question 1 of 13

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent