• MinekPo1 [She/Her]@lemmygrad.ml
    link
    fedilink
    arrow-up
    1
    ·
    5 months ago

    if I’m not mistaken , a example of a problem where O(n!²) is the optimal complexity is :

    There are n traveling salespeople and n towns . find the path for each salesperson with each salesperson starting out in a unique town , such that the sum d₁ + 2 d₂ + … + n dₙ is minimised, where n is a positive natural number , dᵢ is the distance traveled by salesperson i and i is any natural number in the range 1 to n inclusive .

    pre post edit, I realized you can implement a solution in 2(n!) :(