Dear Monks
I have a design and algorithm problem. I am looking for efficient ways to solve this problem which is a part of game programming.

Given the word: I would like to find another words which try to maximize fit above or below the given word so that all the words created by columns also constitute 2 letter words.

ex.

  PAN
 RATES
Above is just an example when the word PAN given and one of the 'below' answer is 'RATES' ( I have a set of 2 letter words which includes PA, AT,NE,TO,IN,AN etc..)

Restrictions can be imposed as a set of rules for finding the answer. Rules could be like ..
1. No repeat letters
2. Construct the answers only from specific letters
3. More letters are better etc.

'Above' and 'Below are just one of the 'patterns'. Other could be like this

 
 APE
 RATE
 ENS
Where RAT is a word which can come under 'Between' pattern, given the words 'APE' and 'ENS' as where they are.

If this is not the right place to post let me know. Also in that case, I think that we should start 'design and algorithm' section here, which can definitely steer coding in the right direction. Internet links to other places for such discussion would be helpful too.

Desiging
an
artist


In reply to Words Fun by artist

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.