Brian,
I don't have the energy to write up a longer answer, but is this the following
what you seek?
P =: verb define
4 P y
:
dc =. <: card =. x
N =. y
'm n' =. N #:~ 0 , dc
|: (1 , n) + (1 , dc) * (,:&:i. -) m
)
For a given N , that verb will produce all the pairs of inc,width which
satisfy your cut-stipulations:
P 38
1 35
2 32
3 29
4 26
5 23
6 20
7 17
8 14
9 11
10 8
11 5
12 2
8 14 e. P 38
1
98 106 e. P 400
1
The optional stipulation is satisfied with {:@:P .
-Dan
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm