Dating Explained in Terms of Priority Queues

Boyfriend
Credit: xkcd

From The Algorithm Design Manual (Amazon):

Many naturally occurring processes are accurately modeled by priority queues. Single people maintain a priority queue of potential dating candidates – mentally if not explicitly. One’s impression on meeting a new person maps directly to an attractiveness or desirability score. Desirability serves as the key field for inserting this new entry into the “little black book” priority queue data structure. Dating is the process of extracting the most desirable person from the data structure (Finding-Maximum), spending an evening to evaluate them better, and then reinserting them into the priority queue with a possibly revised score.

Leave a Reply