399
you are viewing a single comment's thread
view the rest of the comments
[-] magic_lobster_party@kbin.run 37 points 2 years ago

You have two lists of size n. You want to find the permutations of these two lists that minimizes a certain distance function between them.

[-] catastrophicblues@lemmy.ca 2 points 2 years ago

Surely you could implement this via a sorting algorithm? If you can prove the distance function is a metric and both lists contains elements from the same space under that metric, isn’t the answer to sort both?

[-] jjagaimo@lemmy.ca 7 points 2 years ago

It's essentially the traveling salesman problem

this post was submitted on 22 Jun 2024
399 points (97.2% liked)

Programmer Humor

33186 readers
1994 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS