Suppose you maintain a database of cocktail recipes. You want to write a applicationthat asks a user for their favorite cocktail and returns a cocktail that they might like. To do so, you definethe distance between two cocktails to be the symmetric distance between their ingredient lists. Then, for theinput cocktail, you compute the distance to every cocktail in your database and return one of the cocktailsthat minimizes this distance.1. Prove that this distance is a metric. (Note: first, formally write out what the distance function is,including the domain and codomain)

Solved
Show answers

Ask an AI advisor a question