Many thanks to all readers who submitted answers to this issue’s puzzles!

### A Linux Rebus

**Tom Hebb **and **Harry Hochheiser** both submitted the same correct solution to the pop-culture rebus from the movie *Alien*:

In space, no one can hear you scream

### Divide By 3

An implementation can be found here and is reproduced below:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
int add(int x, int y) { while(x) { int t = (x & y) << 1; y ^= x; x = t; } return y; } int divideby3 (int num) { int sum = 0; while (num > 3) { sum = add(num >> 2, sum); num = add(num >> 2, num & 3); } if (num == 3) sum = add(sum, 1); return sum; } |

### 3 Stacks

A simple solution would be to partition the array and utilize variables corresponding to the indices in the array that are the “top” and “bottom” of each stack. However, this requires that we keep 6 auxiliary variables. A potentially more space efficient solution would be to interleave the stacks. That is, the elements of the first stack would be at indices **i** where **i % 3** is equal to **0**, the elements of the second stack would be at indices **j** where **j % 3** is equal to **1**, and the elements of the third stack would be at indices **k** where **k % 3** is equal to **2**. This algorithm allows us to use only one counter for the top of each stack, halving the additional space we need.

### Deconstructing Triangles

To remove the minimal number of edges, we can treat the triangle as a graph. Each point where lines meet is a vertex and of course lines are edges. If we perform Breadth First Search from any arbitrary vertex, we will get a spanning tree of the graph. Any edges that are not in the spanning tree can be removed to eliminate cycles (and by extension any complete polygons in the original shape).

### Sticks and Triangles

We take the length of our stick to be 1 unit, as such, we can use **X** to denote the location of the first break and **Y** to denote the location of the second break. We now know that (**X**, **Y**) is uniformly distributed on:

1 |
S = [0, 1]^2 |

For the broken pieces of the stick to form a triangle, the sum of the lengths of two pieces must be greater than the length of the third. This occurs when **T1**∪**T2**:

1 2 |
T1={(x,y)∈S:y>1/2,x<1/2,y−x<1/2} T2={(x,y)∈S:x>1/2,y<1/2,x−y<1/2} |

This event is given by the plot below, which shows us that the total probability is **1/4**.

*Thumbnail Image Provided by Maraya Rodostianos via Flickr*