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": "Identify base case and recursive relation"
        }
      ],
      "goal": "Understand factorial definition"
    },
    {
      "children": [
        {
          "children": [],
          "goal": "Choose iterative or recursive approach"
        }
      ],
      "goal": "Plan computation strategy"
    },
    {
      "children": [
        {
          "children": [],
          "goal": "Check against known factorial values"
        }
      ],
      "goal": "Validate result"
    }
  ],
  "goal": "Calculate the factorial of a positive integer"
}
    

Generated Goals

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

  • Plan computation strategy
  • Determine the number of trailing zeros in a factorial
  • Understand factorial definition
  • Understand the growth rate of the factorial function
  • Validate result
  • Identify base case and recursive relation
  • Explore the relationship between factorial and the gamma function
  • Check against known factorial values
  • Choose iterative or recursive approach