Présentation du problème

Factorial


Calculate the factorial of a positive integer.

medium
Generate Goal Tree Build Plan

Goal Tree Generated by LLM

{
  "children": [
    {
      "children": [
        {
          "children": [],
          "goal": "Recognize factorial as product of all positive integers up to n"
        }
      ],
      "goal": "Clarify the mathematical definition of factorial"
    },
    {
      "children": [
        {
          "children": [],
          "goal": "Decide between iterative multiplication and recursive accumulation"
        }
      ],
      "goal": "Determine the computational approach"
    },
    {
      "children": [
        {
          "children": [],
          "goal": "Check against known factorial values for small n"
        }
      ],
      "goal": "Validate the computed result"
    }
  ],
  "goal": "Calculate the factorial of a positive integer"
}
    

Generated Goals

Mixed goals generated by the LLM (correct + distractors).

  • Recognize factorial as product of all positive integers up to n
  • Determine the computational approach
  • Analyze the factorial function's behavior under modular arithmetic
  • Investigate the growth rate of the factorial function for large inputs
  • Validate the computed result
  • Clarify the mathematical definition of factorial
  • Check against known factorial values for small n
  • Decide between iterative multiplication and recursive accumulation
  • Explore the relationship between factorial and combinatorial identities