De Bruijn sequences: Difference between revisions

Content added Content deleted
m (→‎{{header|REXX}}: added a 2nd REXX version.)
m (→‎programmatically removing of a node: elided an outdated comment.)
Line 160: Line 160:
<lang rexx>/*REXX pgm calculates the de Bruijn sequence for all pin numbers (4 digit decimals). */
<lang rexx>/*REXX pgm calculates the de Bruijn sequence for all pin numbers (4 digit decimals). */
$= /*initialize the de Bruijn sequence. */
$= /*initialize the de Bruijn sequence. */
/* ··· is skipped near the cycle end. */
do j=0 for 10; $= $ j; jj= j || j /*compose the left half of the numbers.*/
do j=0 for 10; $= $ j; jj= j || j /*compose the left half of the numbers.*/
$$= space($, 0) /* [↓] " right " " " " */
$$= space($, 0) /* [↓] " right " " " " */
do k=jj+1 to 99; z= jj || right(k, 2, 0)
do k=jj+1 to 99; z= jj || right(k, 2, 0)