Skip to main content
58 votes

(-a) × (-a) = a × a

18 Steps ...
Etoplay's user avatar
  • 3,401
46 votes

Construct a pentagon avoiding compass use

2 circles, 13 lines, 17 points Try it on GeoGebra Let circle(A, B) intersect circle(B, A) at C and D. Let AB intersect circle(A, B) again at E. Let AB intersect circle(B, A) again at F. Let AD ...
Anders Kaseorg's user avatar
38 votes

(-a) × (-a) = a × a

18 steps Different from the already posted 18-step solution. ...
Emil Jeřábek's user avatar
38 votes

Machine Learning Golf: Multiplication

21 13 11 9 weights This is based on the polarization identity of bilinear forms which in the one dimensional real case reduces to the polynomial identity: $$ x\cdot y = \frac{(x+y)^2 - (x-y)^2}{4}$$ ...
flawr's user avatar
  • 43.8k
36 votes

Is this number an exact power of -2: (Very) Hard Mode

C++, 15 operations I have no idea why while loops are allowed as they destroy the whole challenge. Here is an answer without any: ...
orlp's user avatar
  • 39.1k
35 votes

Tribute to John Conway: Collatz in FRACTRAN

9 8 7 fractions $$\frac{5}{4}, \frac{63}{22}, \frac{14}{55}, \frac{66}{35}, \frac{1}{7}, \frac{2}{3}, \frac{44}{5}$$ Takes input as \$3^n\$. Try it online! How it works The first transition is $$...
Anders Kaseorg's user avatar
33 votes
Accepted

Make 1s using a bunch of 1s

score = 82 71 69 (34 ‘1’s + 23 ‘+’s + 12 parenthesis pairs) $$\begin{multline*} 11111111111 = 1 + (1 + 1) \cdot {} \\ (1 + 1 + 1 + (1 + 1)^{(1 + 1)^{1 + 1 + 1}}(1 + ((1 + 1)(1 + 1 + 1))^{1 + 1 + 1})) ...
Anders Kaseorg's user avatar
32 votes
Accepted

Google's doodle on kids coding: shortest program solving all the levels

Not my answer 6 blocks The user Alex found a shorter solution, of length 6. I can confirm that their solution works: O(O(Br G G, 6) Br, 5) They attempted to ...
Reinis Mazeiks's user avatar
32 votes

Machine Learning Golf: Multiplication

7 weights ...
xnor's user avatar
  • 145k
29 votes

(-a) × (-a) = a × a

29 26 Steps No lemmas! Comment if you see anything wrong. (It's very easy to make a mistake) ...
H.PWiz's user avatar
  • 11.6k
29 votes

Write it into number theory style

671 ...
Anders Kaseorg's user avatar
26 votes

Is this number an exact power of -2: (Very) Hard Mode

Python 2, 3 operations def f(n): while n>>1: while n&1:return 0 n=n/-2 return n Try it online! The operations are ...
xnor's user avatar
  • 145k
22 votes

Drive a hexadecimal 7-segment display using NAND logic gates

30 NANDs I am quite sure there are no simpler solutions to this problem, except perhaps by changing the symbols on the display, but that would be another and different problem. Since this is actually ...
KimOyhus's user avatar
  • 711
22 votes

(-a) × (-a) = a × a

18 steps Not the first 18-step proof, but it’s simpler than the others. ...
Anders Kaseorg's user avatar
22 votes

Machine Learning Golf: Multiplication

33 31 weights ...
Grimmy's user avatar
  • 15.7k
20 votes

Final tribute to John Conway: FRACTRAN self-interpreter

30 fractions ...
m90's user avatar
  • 10.5k
18 votes

Construct a pentagon avoiding compass use

7 6 circles, 3 lines This is a classical pentagon construction, a proof of its correctness can be found here.
flawr's user avatar
  • 43.8k
17 votes

Shortest "arithmetic" formula to output 1000 primes

Score 1164 883 835 772 601 574 554 506 ...
Anders Kaseorg's user avatar
17 votes

Shortest "arithmetic" formula to output 1000 primes

Score 424 193 ...
Max Kubierschky's user avatar
16 votes

Tribute to John Conway: Collatz in FRACTRAN

9 fractions 13/11 22/39 1/13 7/5 320/21 1024/7 3/4 5/6 22/3 Try it online! Input is a power of 2. It's probably easier to think about FRACTRAN code in terms of ...
xnor's user avatar
  • 145k
15 votes
Accepted

Build a multiplying machine using NAND logic gates

39 gates I am quite sure there are no simpler designs than mine here. It was very difficult to make. I make other minimal circuits too. Transmission delay is indicated by downward position of each ...
KimOyhus's user avatar
  • 711
15 votes

(-a) × (-a) = a × a

23 steps ...
Antony's user avatar
  • 393
15 votes

Hexcellent Minesweeping

7 5 vertices, 14 10 edges (Graph made with this online tool and paint.) A-F are our six nodes, and ...
Laikoni's user avatar
  • 26.2k
15 votes

Machine Learning Golf: Multiplication

43 weights The two solutions posted so far have been very clever but their approaches likely won't work for more traditional tasks in machine learning (like OCR). Hence I'd like to submit a 'generic' ...
Stefan Mesken's user avatar
15 votes

SKI calculus golf: Half of a Church numeral

40 combinators S(S(SI(K(S(S(KS)K)(K(S(S(KS)(S(KK)S))(K(S(KK)(S(S(KS)K)))))))))(K(S(SI(K(KI)))(K(KI)))))(KK) Try it online! Generated with a little help from a ...
Anders Kaseorg's user avatar
15 votes

Make 1s using a bunch of 1s

By hand -  118 112 111  82 $$(1+(1+1)^{(1+1)^{1+1}}(1+(1+1)(1+(1+(1+1)^{1+1})^{1+1})^{1+1}))(1+(1+1+(1+1+1)^{1+1})(1+1+(((1+1)(1+1+1))^{1+1})^{1+1+1}))$$ Try it at Wolfram Alpha This was ...
Jonathan Allan's user avatar
15 votes

SKI calculus golf: Hello, World!

Score = 192 ...
Anders Kaseorg's user avatar
14 votes

Final tribute to John Conway: FRACTRAN self-interpreter

24 fractions $$\frac{2}{3}, \frac{5}{7}, \frac{7^{12} 41}{5^{12} 23}, \frac{7^{13}}{5^{13} 37}, \frac{3^{10} 7^3 13}{5^{13} 31}, \frac{3^2 7^{11} 19^1 41}{2^2 5^{11} 29}, \frac{3^3 7^{10} 19^1 23}{2^3 ...
benrg's user avatar
  • 719
14 votes

Shortest "arithmetic" formula to output 1000 primes

Score 163,162 ...
gsitcia's user avatar
  • 3,301
13 votes

Google's doodle on kids coding: shortest program solving all the levels

Actually, I found a solution with 8 blocks O(O(O(G,4)R,4)GGR,4)
samuellealb's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible