Hi, here is a package that originated from my magic square attempts. Now it can do even more: filling crosswords of many forms. The desired form is in a file called 'pattern'. You can change it, of course by editing the makefile. Originally it will produce all magic sqares of size 7x7. Editing the pattern file (by inserting some spaces, adding rows, making them longer, as you wish) is easy and determines the shape of your resulting crosswords. The program generator 'mfg' gerates a C++ source file that has to be compiled. When you run it, mu expects your wordlists in a specific format. For that for every length prepare a text file of the words of that length and feed it to the programs dawg and repack2. E. g. for length 7: grep "^.......$" mywords|sort -u >all7.txt dawg all7.txt rdawg7 repack2 rdawg7 rm all7.txt rdawg.dwg The programs work for words of small letters and the german umlauts ä,ö,ü. They might work for other settings. But dawg needs an alphabetically sorted list. For all lengths you need in your crossword prepare the rdawgs and run mu. Progress is printed on stdout, expressing the first four letters of your grid. The results are also put into a file 'pattern.res'. The name depends on the pattern file name you feed to mfg. The algorithm is putting letters strictly line by line. But mfg.c is ready to be fed with another order (where gibtext() is used). Be careful when experimenting that when the source for a square (i,j) is generated the source for the squares (i-1,j) and (i,j-1) (left and above) should already have been generated. Please generate nice crosswords at will. Feel free to send me your nicest results. Neither of the source files, even if modified, may be used in a commercial product without the permission of the author. Greetings, Martin. laeuter@mathematik.uni-leipzig.de ------------------------------------------------------------------- Jean-Charles Meyrignac wrote: Attached, an optimized version of Martin Läuter's code generator for MSQ. I already sent him this version, and he suggested that you archive it. The new version outputs a standalone C source, instead of C++ with includes, and has several optimizations added: 1) relocation of the DAWG 2) save/restore (if you break the program then rerun it, it will restart where the computation stopped !) 3) skipping some square symmetries 4) the output files are updated when a new solution is found (under Windows, a file cannot be opened until the end of the program). 5) several small optimizations in the doform() routine JC [JC's other contributions are in ../../jean-charles ]