Thanks, David.
I cheated a bit, giving up "solving" for q, and deciding to force
a couple of arbitrary but sudoku-compliant colums in qq:
load 'c:/users/mike_/j902-user/sudoku.ijs'
[q =. (1 7 1 # 1 0 1) expand >: (i.~{.)a.i.'tensorial',:'orientals'
1 2 3 4 5 6 7 8 9
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
5 6 7 2 3 1 8 9 4
NB. Stopped an attempt to solve after some minutes. Probably too many
solutions?
NB. Force some extra feasible values-
[qq =. 2 3 8 1 5 6 7 (_1,.~>:i.7)} 4 6 7 8 9 2 3 (0,.~>:i.7) } q
1 2 3 4 5 6 7 8 9
4 0 0 0 0 0 0 0 2
6 0 0 0 0 0 0 0 3
7 0 0 0 0 0 0 0 8
8 0 0 0 0 0 0 0 1
9 0 0 0 0 0 0 0 5
2 0 0 0 0 0 0 0 6
3 0 0 0 0 0 0 0 7
5 6 7 2 3 1 8 9 4
$qqq =. sudoku qq NB. quite a lot of solutions!
113786 9 9
'tensorial'{~<:{.qqq
tensorial
sionaltre
rlateison
iotrselna
aneilorst
lsratneio
ealoisntr
ntslraoei
orientals
I wondered about sneaking another word in, but haven't yet
seen how to do it, given my current anagrams for 'tensorial':
>anag'orientals' NB. "anag" is my crossword assistant
orientals
orleanist
relations
serotinal
tensorial
tiroleans
I thought I'd written a solver which dealt with arbitrary numbers or
characters, so
that there wouldn't be a need to render your challenge into a numerical
one.
I've just retrieved my old APL workspace, but haven't got it to work yet!
Cheers,
Mike
On 08/11/2020 18:09, David Lambert wrote:
create a sudoku with
TENSORIAL ORIENTALS
in parallel.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm