Differences between revisions 10 and 11
 ⇤ ← Revision 10 as of 2007-10-27 00:22:42 → Size: 1298 Editor: RogerHui Comment: ← Revision 11 as of 2008-12-08 10:45:31 → ⇥ Size: 1298 Editor: anonymous Comment: converted to 1.6 markup Deletions are marked like this. Additions are marked like this. Line 8: Line 8: [[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]][[BR]] <
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
><
> Line 18: Line 18: || ` 1#.v `[[BR]]` v p. 1` || power series evaluated at 1 || || ` 1#.v `<
>` v p. 1` || power series evaluated at 1 || Line 20: Line 20: || ` *&.^/v `[[BR]]` */&.:^v ` || works if` v `are real numbers |||| ` #v#1 `[[BR]]` #I.v ` || works if` v `are non-negative integers || || ` *&.^/v `<
>` */&.:^v ` || works if` v `are real numbers |||| ` #v#1 `<
>` #I.v ` || works if` v `are non-negative integers || Line 23: Line 23: || {{{ (>:@\$: <:)`[@.(0=])/v }}}[[BR]]` (>:@\$: <:)~^:(0<[)/v ` || works if` v `are non-negative integers; based on the Peano axioms || || {{{ (>:@\$: <:)`[@.(0=])/v }}}<
>` (>:@\$: <:)~^:(0<[)/v ` || works if` v `are non-negative integers; based on the Peano axioms ||

Find the sum of a non-empty numeric vector v without using the character + . Currently, 10 essentially different solutions are listed below.

Solutions

 Expression Comment ".(43{a.)'/v' a "cheat" (--)/v the dyad (--) is plus -/v*(#v)\$1 _1 alternating sum 1#.v   v p. 1 power series evaluated at 1 v%.1 *&.^/v   */&.:^v works if v are real numbers #v#1   #I.v works if v are non-negative integers >:@[&0/v works if v are non-negative integers (>:@\$: <:)`[@.(0=])/v   (>:@\$: <:)~^:(0<[)/v works if v are non-negative integers; based on the Peano axioms ((*.,0:) \$:&#. ~:)/@#:@,^:(0<[)/v works if v are non-negative integers; implements addition on binary representations

Puzzles/Sum of a Vector (last edited 2008-12-08 10:45:31 by anonymous)