First page Back Continue Last page Graphics
Beer example 8
S.b(sS.k = V.k
(S ´ (k(S) - k(V L ((k(S) ´ b(L)) - S)))))
The (k(S) ´ b(L)) (or S.k,L.b(S ´ L)) gives all bars combined with all beers. Subtracting S gives each bar with the beers they do not serve.
The large join gives bars with their visitors and the beers they like but that are not served by the visited bar. We then project on the bar. This gives us the bars that have a visitor who likes a beer not served in that bar.
The complement gives bars that only have visitors who can get everything they like in that bar.
The S.b(sS.k = V.k(S ´ (... part is used to find the matching beers.
This yields the answer to beer question (n).
Notes:
Deze vraag komt van Kevin Verbeek en is een correcte uitwerking van vraag n.
Hoera!