Catalog/gt-secretary-problem

Game Theory

Secretary problem API

Computes the optimal stopping cutoff (reject-then-pick rule) and exact success probability for the secretary/best-choice problem of size n. Answers 'How many candidates should I observe before hiring?', 'What is the optimal stopping rule and its win chance?'.

Price$0.06per request
MethodPOST
Route/v1/gametheory/secretary-problem
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
decision-theorysecretary-problemoptimal-stoppingbest-choice1-over-ehiringprobabilitystrategy
API URLhttps://x402.hexl.dev/v1/gametheory/secretary-problem
Integration docs
Example request
{
  "n": 100
}
Example response
{
  "n": 100,
  "optimalRejectCount": 37,
  "optimalCutoffPosition": 38,
  "rejectFraction": 0.37,
  "successProbability": 0.37104278,
  "asymptoticFraction": 0.367879,
  "interpretation": "Observe and reject the first 37 candidate(s) (≈37%), then accept the next one better than all seen. Success probability ≈ 37.1% (asymptote 1/e ≈ 36.8%)."
}
Input schema
{
  "type": "object",
  "required": [
    "n"
  ],
  "properties": {
    "n": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000000,
      "examples": [
        100
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}