Sorting algorithm for inconsistent (non-transitive) human preferences -


suppose have file one-liner (joke) on each line. want sort jokes how funny find them. first thought implement sorting algorithm (preferably 1 makes few comparisons possible) , having comparison algorithm take input; i'd sit there , choose of each pair of jokes presented me funnier.

there's problem that. joke preference not total order. lacks transitivity. example, might think b funnier when presented them, , c funnier b, when presented , c somehow find funnier c. if “>” means “is funnier than,” means c > b , b > not imply c > a. sorting algorithms’ correctness depends on this.

but still seems there should algorithm sorts list of jokes 1 @ top most preferred on other jokes, , 1 @ bottom least preferred on other jokes, if there individual exceptions.

i don’t know how google this. there algorithm kind of preference sorting? answer here not applicable because forces user’s preference transitive.

if represent decisions directed graph, each joke node , each directed edge indicates 1 joke being better other, can retrieve ordering constructing path follows edges , visits each node once.

this type of graph called tournament, , path hamiltonian path. i've got news bub, hamiltonian proven exist if graph connected. connected means every node can reached every node, obeying direction of edges, keep adding edges until true.

tournament: https://en.wikipedia.org/wiki/tournament_(graph_theory)

hamiltonian path: https://en.wikipedia.org/wiki/hamiltonian_path


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -