This is a solution to problem 33 on the hard interview questions node:

The problem basically asks you to create four equilateral triangles of the same size with six toothpicks. A bit of analysis will tell us that four triangles require twelve toothpicks, and since we only have six to work with, that means each toothpick must appear in two triangles. So every triangle has to border three other triangles (one on each side).

Think outside of the plane. It's a tetrahedron (a three-sided pyramid).

While the above solution is perfectly valid, something different first came to my mind. Using this solution avoids the nasty reality of trying to balance three toothpicks against one other.

Simply allow the toothpicks to overlap. Your first triangle is in the center of the three toothpicks, as shown below:

```
\  /
\/
/\
____/__\____
/    \
/      \

```

Making three more triangles with three more toothpicks becomes simple when you start with this. Here's what it looks like:

```   ____________
\  /
\/
\      /\      /
\____/__\____/
\  /    \  /
\/      \/
\      /
\    /

```

Presto, bingo, bango, four triangles. Eyeballing it should get you triangles of fairly equal size. If you're not satisfied with that, use a ruler.

Hey, the original question doesn't say anything about using the entire toothpick.

sam512 notes, "Or just make a Star of David shape - two equilateral triangles superimposed - and you have SIX equilateral triangles!"

Touché.

To which Professor Pi retorts, "The star of David solution is wrong. The additional triangles are not the same size as the original. But your solution is neat."

Which is true, if you start with one of the big triangles. The original question demanded one triangle be created first, followed by an additional three of equal size. However, if you start with a different triangle, it still works. Observe:

```
/\
____/__\____
/    \
/      \
/        \
/          \

```

Starting with this gives you a starter triangle the same size as the remaining five in the Star of David:

```
/\
____/__\____
\  /    \  /
\/      \/
/\      /\
/__\____/__\
\  /
\/

```

Three additional toothpicks, five additional equilateral triangles the same size as the first.

The question doesn't state that the original toothpicks can't be used in the remaining three triangles (which most of the above solutions rely on also).

You can lay the three extra toothpicks on top of the original ones, making a triangle formed by the new toothpick and two original toothpicks

``` Original     Two       Three      Four
/\        //\        /\\        /\
/  \      //  \      /  \\      /  \
/____\    //____\    /____\\    /====\
```

Log in or register to write something here or to contact authors.