Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I believe I'm looking for some kind of preference algorithm.

Imagine we have three lists. List 1 is appetizers, List 2 is main courses, and List 3 is deserts. Lets assume each list has 50 options in it. I want to randomly present the user with a combination of three items, one from List 1, one from List 2, and one from List 3. The user will give a thumbs up or down to the combo, and over time I'd like the to be able to "learn" the user's preferences, so a chicken fingers > fried chicken > fried ice cream combo that gets a thumbs down the first time should never be suggested again. However, a combo consisting of chicken fingers > fried chicken > sorbet would still be valid.

That all seems pretty simple: I could just maintain a list of rejected combos. However, I'd like the algorithm to have some sense that chicken fingers > friend chicken might be a problem, regardless of what desert it is paired with. This "sense" of those two being a bad combo would get stronger if the chicken fingers > fried chicken > sorbet option was rejected as well.

Are there any types of algorithms that are used for this sort of thing?

share|cite|improve this question
up vote 1 down vote accepted

The algorithm cannot have the sense, you have to give it the sense while computing it. The list of rejected memories is the best idea, but to reduce the problem like you want to, you need to tell the algorithm the minimum number of chicken fingers > friend chicken combos that you want to be rejected before it can be considered as a bad combo.

    if(chicken fingers > friend chicken > anyoption in rejected_list_of_3)
    if(count>= minimum_reject)
          add chicken fingers > friend chicken to new_reject_list_of_2

Note that for this to help the algorithm, you will have to give the reject list of 2-combo a priority over the reject list of 3-combo since it contains less data. That is a reject list of 2-combo contains a maximum of $n^2$ data while a reject list of 3-combo contains a maximum of $n^3$ data.

share|cite|improve this answer

If you would like to understand buyers' purchasing patterns, and you have enough data, then you may want to have a look at Market Basket Analysis.

The term market basket analysis in the retail business refers to research that provides the retailer with information to understand the purchase behaviour of a buyer (Wikipedia).

MBA elaborates buyers' purchases data to discover patterns. For example, it may find that 80% of the purchases involve chicken fingers and sorbet, and only 1% of the time chicken fingers and fried chicken are bought together.

It may works also on-line (with continuosly generated data). You can google it for the possible algorithms.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.