The following question is from the "OECD Pisa questions"
[I found it via a link from the guardian newspaper].
It is Alan's birthday and he is having a party. Seven other people will attend: Amy, Brad, Beth, Charles, Debbie, Emily and Frances. Everyone will sit around the circular dining table. The seating arrangement must meet the following conditions: • Amy and Alan sit together • Brad and Beth sit together • Charles sits next to either Debbie or Emily • Frances sits next to Debbie • Amy and Alan do not sit next to either Brad or Beth • Brad does not sit next to Charles or Frances • Debbie and Emily do not sit next to each other • Alan does not sit next to either Debbie or Emily • Amy does not sit next to Charles Arrange the guests around the table to meet all of the conditions listed above.
If I were to use each name as a variable name, and their seat number as the value of that variable (wrapping 8's to 1's - yes I realize there's still an issue around that); and arbitrarily assigning Alan = 1, we have:
- Alan = 1
- Amy = (2 or 7)
- Brad = (Beth + 1) or (Beth - 1)
- Charles = (Debbie + 1) or (Debbie - 1) or (Emily + 1) or (Emily-1)
- ...and now we get into a bunch more
or'sand equations stating inequalities.
I'm not really sure if I could solve it this way...or whether this is even be a good way of looking at the problem. When I solved it by trial-and-error, I treated the pairs that had to sit together as one, and just swapped their positions whenever some inconsistency came up. I think I was basically just solving via brute force. Is there a better way?
I'm not really interested in the actual solution per se (I found a solution through trial and error in a few minutes), but an algebraic way of finding a solution to these types of problems in general. And by these types of problems, I guess I mean this class of word problems. Is this still just a bunch of linear equations when it involves inequalities and logical operators?