Update Portmantout.ipynb
This commit is contained in:
@@ -35,7 +35,7 @@
|
|||||||
"- **Unused word step**: using a word for the first time. (Once we use them all, we're done.)\n",
|
"- **Unused word step**: using a word for the first time. (Once we use them all, we're done.)\n",
|
||||||
"- **Bridging word step**: if no remaining unused words overlap the previous word, we need to do something to get back on track to consuming unused words. I call that something a **bridge**: a step that **repeats** a previously-used word and has an ending that matches the start of some unused word. Repeating a word may add letters to the final length of $S$, and it doesn't get us closer to the requirement of using all the words, but it is sometimes necessary. Sometimes two words are required to build a bridge, but never more than two (at least with the 100,000 word set we will be dealing with). \n",
|
"- **Bridging word step**: if no remaining unused words overlap the previous word, we need to do something to get back on track to consuming unused words. I call that something a **bridge**: a step that **repeats** a previously-used word and has an ending that matches the start of some unused word. Repeating a word may add letters to the final length of $S$, and it doesn't get us closer to the requirement of using all the words, but it is sometimes necessary. Sometimes two words are required to build a bridge, but never more than two (at least with the 100,000 word set we will be dealing with). \n",
|
||||||
"\n",
|
"\n",
|
||||||
"There's actually a third type of word, but it doesn't need a corresponding type of step: a **subword** is a word that is a substring of another word. If, say, `ajar` is in $W$, then we know we have to place it in some step along the path. But if `jar` is also in $W$, we don't need a separate step for it—whenever we place `ajar`, we have automatically placed `jar`. The program can save computation time save time by initializing the set of **unused words** to be just the **nonsubwords** in $W$. (We are still free to use a subword as a **bridging word** if needed.)\n",
|
"There's actually a third type of word, but it doesn't need a corresponding type of step: a **subword** is a word that is a substring of another word. If, say, `ajar` is in $W$, then we know we have to place it in some step along the path. But if `jar` is also in $W$, we don't need a separate step for it—whenever we place `ajar`, we have automatically placed `jar`. The program can save computation time by initializing the set of **unused words** to be just the **nonsubwords** in $W$. (We are still free to use a subword as a **bridging word** if needed.)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"(*English trivia:* I use the clumsy term \"nonsubwords\" rather than \"superwords\", because there are a small number of words, like \"cozy\" and \"pugs\" and \"july,\" that are not subwords and also not superwords.)\n",
|
"(*English trivia:* I use the clumsy term \"nonsubwords\" rather than \"superwords\", because there are a small number of words, like \"cozy\" and \"pugs\" and \"july,\" that are not subwords and also not superwords.)\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user