
Title:
0619 Anchors

Description:

Now let's be a little bit more precise about what the rules are and what it means

to play a word within a row and how that hooks up to the other columns.

Now, the rules say that at least one letter that you play has to be adjacent

to an existing letter on the board. We'll mark with red asterisks such squares.

We call these anchor squares. These are the squares that we can start from.

Then we build out in each direction, forming consecutive letters into a single word.

Now, the anchor squares do have to be adjacent to an existing letter,

but they don't have to be adjacent all within a row.

They can be adjacent in either direction.

Let's expand the board beyond a single row and let's populate this with some more letters.

Imagine that this board goes on in both directions.

There's probably an E here or something like that.

If we restrict our attention just to this row, notice that we've now introduced a new anchor point.

This square is adjacent to an existing letter, and so that also counts as an anchor.

Now we want to find a word, which consists of a prefix plus a suffix.

We get to define the game.

We can say that for every anchor point, the prefix is going to be zero or more letters

to the left of the anchor point, not counting the anchor point itself.

Then the suffix will be the anchor point and everything to the right.

Of course, we have to arrange so that prefix plus suffix together form a word

which is in the dictionary.

Now here's a cool play that comes from the dictionary.

BACKBENCH is a word, and note that if we just have this rule

of word equals prefix plus suffix where the suffix has to start with an anchor,

then there'd be four possible ways of specifying this one move.

We could anchor it here with no suffix.

We could anchor it here with these three letters as a suffix.

We could anchor it here with these letters as a suffix.

Or we could anchor it here with all these as a suffix and just H as the prefix.

Now, it seems wasteful to degenerate the same result four times,

so we can arbitrarily and without loss of completeness make up a rule which says

there's no anchor within a prefix.

We couldn't use this as a the anchor, because then there'd be anchors within the prefix.

Likewise, we couldn’t use this one or this one.

We can only use this one as the prefix in order to generate this particular word.

The anchor will also come from the hand,

and the suffix can be a mix of hand and board.

Here, this is the anchor.

The prefix is empty. The anchor letter comes from the hand.

Then there's a mix of letters for the rest of the word.

Now, what are the rules for a prefix. Let's summarize.

A prefix is zero or more characters, can't cover up an anchor square,

and they can only cover empty squares.

For example, for this anchor square here, the prefix can go backward,

but it can't cover this anchor.

So the possible lengths for this prefix are zero to two characters.

Any prefix can be zero characters, and here there's room for two,

but there's not room for three, because then it would cover up an anchor.

In that case, all the letters in the prefix come from the hand, but consider this anchor.

For this anchor, we're required to take these two letters as part of the prefix,

because we can't go without them because this abuts.

These two must be part of the prefix,

and this one can't be part of the prefix because it's an anchor.

If we wanted that we generate it from this anchor, rather than from this one.

That means the length of a prefix for this anchor has to be exactly two.

Similarly, the length of the prefix for this anchor has to be exactly one,

has to include this character, because if we place a letter here, this is adjacent

it's got to be part of the wordand this is an anchor so we can't cover it.

So we see that a prefix either the letters come all from the hand o

or they come all from the board.

What I want you to do is for the remaining anchors here, tell me what the possible lengths are.

Either put a single number like this or a range of numbersnumbernumber.