Perimeter of an equilateral triangle drawn with respect to a square. Here's a question that was asked in the International Kangaroo Math Contest 2016. The question goes like this:

If the perimeter of the square in the figure is 4 units, then what is the perimeter of the equilateral triangle?


What I did:
Well I tried something very naïve and it was the supposition that the equilateral triangle cuts the top side of the square at its midpoint. Hence giving the following result.

By Pythagoras' Theorem, 
$$\overline{AB} = \overline{MC} = \sqrt{\overline{BC}^2 + \overline{BM}^2} = \sqrt{\left(1\right)^2 + \left(\frac12\right)^2} = \frac{\sqrt5}{2}$$
So perimeter of the triangle is:
$$\begin{align}
P&=\overline{AF} +\overline{FM}+\overline{MC}+\overline{CD}+\overline{DE}+\overline{EA}\\
&= \frac12+\frac12+\frac{\sqrt5}2+1+\frac12+\frac{\sqrt5}2\\
&= \frac52+\sqrt5
\end{align}$$
However this is not the correct answer and I know that the problem is with the supposition that $M$ is the midpoint of $\overline{AB}$. So what is the correct method and answer?
Thanks for the attention.
 A: We only need to know that the $\angle ABC=30°$, the rest is just straight forward.

A: $M$ is NOT the midpoint of $AB$. Note that the angle $\angle MCB$ is equal to $90^{\circ}-60^{\circ}=30^{\circ}$, therefore 
$$|MB|=|BC|\tan(30^{\circ})=\frac{1}{\sqrt{3}}.$$
Moreover $|ED|=|MB|$ (why?).
Can you take it from here?
A: Note that the angle AED is $\frac{\pi}{3}$ radians (or 60 degrees if you prefer). Since the side opposite that angle is $1$, and $\tan(\frac{\pi}{3})$ is $\sqrt{3}$, we know that the side ED must be of length $\frac{\sqrt{3}}{3}$.  The triangle MBC is similar to  EAD, so the side MB is also $\frac{\sqrt{3}}{3}$. You can use Pythagorean's Theorem and the fact that each side of the square is 1 to find the lengths of all the remaining sides needed.
A: Given a horizontal segment with length $L$ and two lines 
$$
\begin{cases}
y_1 = x \tan(\frac{\pi}{2})\\
y_2 = (L-x)\tan(\frac{\pi}{3})
\end{cases}
$$
their intersection is at 
$$
y_1=y_2\Rightarrow x = \frac{\tan(\frac{\pi}{3})L}{\tan(\frac{\pi}{3})+\tan(\frac{\pi}{2})}
$$
hence the equilateral triangle has perimeter $3L$ and the square has perimeter $4 x = \frac{4L\tan(\frac{\pi}{3})}{\tan(\frac{\pi}{3})+\tan(\frac{\pi}{2})} = \frac{4L\sqrt3}{\sqrt 3+1}$
A: Referring to the figure, let $x$ and $h$ be half-side and height of equilateral triangle, resp.:
$\hspace{3cm}$
For the equilateral triangle:
$$h^2+x^2=(2x)^2 \Rightarrow h^2=3x^2 \Rightarrow h=x\sqrt{3}.$$
From the similarity of triangles:
$$\frac{h}{4}=\frac{x}{2x-4} \Rightarrow \frac{x\sqrt{3}}{4}=\frac{x}{2(x-2)} \Rightarrow x=\frac{2\sqrt{3}}{3}+2 \Rightarrow P=6x=4\sqrt{3}+12.$$
Addendum: It was stated the perimeter of the square is $4$, not the side. So, the answer must be divided by $4$ to get $3+\sqrt{3}$.
