Single-component scheme of Neville Holmes may be to generalize
(IBM Journal of Research and Development vol.22 no.4 1978)

(0) The number system
=================
vabc=: 'oABCDEFGHIJKLMNOPQRSTUVWXYZ'   NB. letter-digits: identificators for
the 27 individual
base=: +3                              NB. little cubes in the big Rubik's
Cube.
(1) Tacit forms of the conversions
=========================
afd=:vabc{~[:(,0#~0=$)&(}.~0={.)&(3#.3|3+*)[:*[:|:[:|.**[:(((1|.])+[-3*])(2=]))^:_"1&(0,.3&#.^:_1)|

afd _234551858153411 _201631712929166 874525391204903x
IQITNYHAKNHUPQERFEPNHKZQUQIBTMHV                 NB. afd = alfa form from
decimal (coordinate) form

dfa=:[:(3#.[:|.[:|:]-3*2=])3 3 3#:vabc i.]
0":dfa 'IQITNYHAKNHUPQERFEPNHKZQUQIBTMHV'        NB. dfa = decimal
(coordinate) form from alfa form
_234551858153411 _201631712929166 874525391204903

(11) alfa_from_decimal "step by step"
============================
afd_1=:[:(0,.3&#.^:_1)|           NB. magnitude, conversion to ternary and
append leading zero
]t=.afd_1 _234551858153411 _201631712929166 874525391204903x
0 0 1 0 1 0 2 0 2 1 1 0 2 2 1 1 0 0 0 2 1 1 1 1 1 0 1 0 1 0 2 0 2
0 0 0 2 2 2 1 0 2 2 2 0 2 1 0 2 0 0 2 0 2 1 0 1 0 2 0 2 2 2 2 0 2
0 1 1 0 2 0 2 0 0 1 0 2 2 1 0 2 2 0 0 1 1 0 0 2 0 2 1 0 2 2 0 2 2

afd_2=:(((1|.])+[-3*])(2=]))^:_"1
 NB. conversion to symmetric (balanced) ternary
]st=.afd_2 t
0 0 1 0  1  1 _1 1 _1 1  1 1  0 _1 1  1  0 0  1 _1  1 1 1  1 1  0 1 0 1  1
_1 1 _1
0 0 1 0  0 _1  1 1  0 0 _1 1 _1  1 1 _1  0 1 _1  1 _1 1 0  1 1 _1 1 0 0  0
_1 1 _1
0 1 1 1 _1  1 _1 0  0 1  1 0 _1  1 1  0 _1 0  0  1  1 0 1 _1 1 _1 1 1 0 _1
1 0 _1

afd_3=:*                          NB. save of signs
]s=.afd_3 _234551858153411 _201631712929166 874525391204903x
_1 _1 1

afd_4=:*                          NB. change of signs
]cs=.s afd_4 st
0 0 _1 0 _1 _1  1 _1 1 _1 _1 _1  0  1 _1 _1  0  0 _1  1 _1 _1 _1 _1 _1  0 _1
0 _1 _1 1 _1  1
0 0 _1 0  0  1 _1 _1 0  0  1 _1  1 _1 _1  1  0 _1  1 _1  1 _1  0 _1 _1  1 _1
0  0  0 1 _1  1
0 1  1 1 _1  1 _1  0 0  1  1  0 _1  1  1  0 _1  0  0  1  1  0  1 _1  1 _1  1
1  0 _1 1  0 _1

afd_5=:|.                         NB. reverse
]r=:afd_5 cs
0 1  1 1 _1  1 _1  0 0  1  1  0 _1  1  1  0 _1  0  0  1  1  0  1 _1  1 _1  1
1  0 _1 1  0 _1
0 0 _1 0  0  1 _1 _1 0  0  1 _1  1 _1 _1  1  0 _1  1 _1  1 _1  0 _1 _1  1 _1
0  0  0 1 _1  1
0 0 _1 0 _1 _1  1 _1 1 _1 _1 _1  0  1 _1 _1  0  0 _1  1 _1 _1 _1 _1 _1  0 _1
0 _1 _1 1 _1  1

afd_6=:3|3+*                      NB. conversion from symmetric to
asymmetric ternary
]at=:afd_6 r
0 1 1 1 2 1 2 0 0 1 1 0 2 1 1 0 2 0 0 1 1 0 1 2 1 2 1 1 0 2 1 0 2
0 0 2 0 0 1 2 2 0 0 1 2 1 2 2 1 0 2 1 2 1 2 0 2 2 1 2 0 0 0 1 2 1
0 0 2 0 2 2 1 2 1 2 2 2 0 1 2 2 0 0 2 1 2 2 2 2 2 0 2 0 2 2 1 2 1

afd_7=:3&#.@:|:                   NB. transpose and conversion to decimal
]d=:afd_7 at
0 9 17 9 20 14 25 8 1 11 14 8 21 16 17 5 18 6 5 16 14 8 11 26 17 21 17 9 2
20 13 8 22

afd_8=:}.~0={.                    NB. remove of leading zero
]i=:afd_8 d
9 17 9 20 14 25 8 1 11 14 8 21 16 17 5 18 6 5 16 14 8 11 26 17 21 17 9 2 20
13 8 22

afd_9=:{&vabc                     NB. indexing from vabc
afd_9 i
IQITNYHAKNHUPQERFEPNHKZQUQIBTMHV

(12) decimal_from_alfa "step by step"
============================
vabc=:'oABCDEFGHIJKLMNOPQRSTUVWXYZ' NB. vector_abc from letter-digits

dfa_1=:vabc &i.  NB. indices of the letter-digits     ]i=:dfa_1
'IQITNYHAKNHUPQERFEPNHKZQUQIBTMHV'
9 17 9 20 14 25 8 1 11 14 8 21 16 17 5 18 6 5 16 14 8 11 26 17 21 17 9 2 20
13 8 22

dfa_2=:[:|:3 3 3&#:               NB. conversion to ternary
]t=:dfa_2 i
1 1 1 2 1 2 0 0 1 1 0 2 1 1 0 2 0 0 1 1 0 1 2 1 2 1 1 0 2 1 0 2
0 2 0 0 1 2 2 0 0 1 2 1 2 2 1 0 2 1 2 1 2 0 2 2 1 2 0 0 0 1 2 1
0 2 0 2 2 1 2 1 2 2 2 0 1 2 2 0 0 2 1 2 2 2 2 2 0 2 0 2 2 1 2 1

dfa_3=:[:|.[:|:]-3*2=]
]st=:dfa_3 |:t                    NB. conversion to symmetric ternary
0 _1 0 _1 _1  1 _1 1 _1 _1 _1  0  1 _1 _1  0  0 _1  1 _1 _1 _1 _1 _1  0 _1 0
_1 _1 1 _1  1
0 _1 0  0  1 _1 _1 0  0  1 _1  1 _1 _1  1  0 _1  1 _1  1 _1  0 _1 _1  1 _1
0  0  0 1 _1  1
1  1 1 _1  1 _1  0 0  1  1  0 _1  1  1  0 _1  0  0  1  1  0  1 _1  1 _1  1
1  0 _1 1  0 _1

dfa_4=:3&#.                       NB. conversion to decimal coordinates
0": dfa_4 st
_234551858153411 _201631712929166 874525391204903

(2) Explicit forms of the conversions
==========================
   afd=: 3 : 0                    NB. alfa form from decimal (coordinate)
form
if. 0=+/|y do. a=.'o' else. a=.''
while.+./0~:y do.a=.a,~vabc{~3#.|.j[y=.3%~y-j-3*2=j=.3|y end.end.
)
   afd _234551858153411 _201631712929166 874525391204903x
IQITNYHAKNHUPQERFEPNHKZQUQIBTMHV

   dfa=:3 :'3#.|.|:j-3*2=j=.3#.^:_1 vabc i. y'      NB. decimal (coordinate)
form from alfa form
0":dfa 'IQITNYHAKNHUPQERFEPNHKZQUQIBTMHV'
_234551858153411 _201631712929166 874525391204903

   My questions:
1. Are there possibilities for simplification the - for me yet rather
strange - tacit style?
2. May be whatsoever uses of the such coordinateless vector representations?
3. Is there any significance of the such integrated (disposable with "hidden
dimension") nouns?
4. May be such kind of nouns something "tacit nouns" near the "tacit verbs"?
  Thank in advance for any answers.:

  Any your questions or remarks?

  István
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to