labia

Sunday 13 September 2003

Spent a few hours over the weekend playing about with Games::Set in an attempt to make it generate puzzles like the Set Daily Puzzle. I wrote some extra methods but haven't sent Richard patches since I've failed to make practical use of them yet due to having forgotten far too much maths. I did think at one point that I could attack it with group theory, but eventually realised that a group is not a group without an identity. Duh.

Now I know that Set's been around for long enough that other people are already going to have thrown maths at it, but I want to have a play on my own and see how far I can get.

Let the number of:

  characteristics per card be c
  cards per set be n
  different values each characteristic can take be v

So for a standard Set deck we have c = 4, n = 3, v = 3

The size of the deck will then be v**c (v to the power of c), since the value of each characteristic is independent of the values of the others - we have v choices for the first characteristic, v choices for the second characteristic, etc, all the way to v choices for the cth characteristic.

Here are some definitions I felt the need to invent and/or formalise. The terminology is complicated by the fact that the word "set" has been taken to describe something specific. So I'm going to use "collection" instead. A collection has no internal structure; the structured entities are going to be called decks and subdecks.

A card is a set of c characteristics, each of which can take one of v values.

A collection of cards is one or more cards.

A subcollection F of a collection E is a collection of cards such that every member of F is also a member of E.

The deck D is a collection of cards such that every possible value of every possible characteristic is held by at least one card in D.

A Set is a collection of cards such that for each characteristic, either each card has the same value, or each card has a different value.

A completion of a collection E of size c - 1 is any card which when added to E forms a Set.

A collection E is complete if for each subcollection F of E of size c - 1, every completion of F is also a member of E.

A subdeck is a complete subset of a deck.

A subdeck is proper if its size is smaller than the size of the deck.

So far I've just been playing with definitions and proving simple propositions, for example:

Sets cannot exist unless v >= n.

For the case n = 2, every collection of size n is a Set, so completions are not unique, and there are no proper subdecks.

This is fun.

< Thursday 18 September 2003 Wednesday 10 September 2003 >

foo

HTML generated from pod with podblog