# Men and megaphones (with a lot more)

Imagine a grid of infinite size. In each cell can be placed one of three things:

• A man: who will listen for a sound from any direction and pass it to adjacent* men.
• A megaphone: which will take in sound from one end and send it in the other with more amplitude but will still only reach one square.
• A wall: which is an obstacle, but a flow of sound or a megaphone can send sound through it.

"Adjacent" refers to grid squares that share an edge. Diagonals will not work.

Examples:
(M=man, ^v<>=megaphone (in one of 4 directions), O=wall)

M>OMO>


will send a signal from left to right as a flow of sound is created so it can pass through the walls.

M>OM
O
v


is a variation of example 1 in which the "flow" follows a corner pattern.

"Flow" is an event in which a man that is adjacent to a wall but does not have any men to his sides can pass a sound into that wall. A megaphone can pick up this sound from one of the sides of the wall.

MMO>


will pass sound through due to flow however

MMO>
M


will not as the man next to the wall is not passing the sound into the wall but instead around to the other man next to him.

M^M


will not send a signal as the megaphone is facing in the wrong direction to accept sound from either man.

MOM


will not send a signal as there is a wall, but can if there is a flow as shown in the first example.

M>OM
M


will pass a signal into the wall and the two men will hear it as it is amplified into the wall by the megaphone.

>v


will not send a signal. The megaphone cannot receive sound from its side. It receives sound from the open end of the symbol and sends it out the "point" end of the signal.

The challenge is to create an arrangement based on 15 directly adjacent vertical lanes. If a Man makes a sound at the beginning of a lane, the sound must be passed around such that, at the end of the lanes, the sound is in all lanes to the left of the original and itself (e.g. if lane 5 sent a sound, at the end, there would be lanes 1 - 5 with sound but not 6 - 15).

This is possible in 29* tiles length but what is the shortest distance you can achieve this task in? And what is the layout?

*Was 31 but I noticed an error (sorry)

To give you a start, here is the 29 tile solution:

>OMO>OMO>OMO>OMO>OMO>OMO>OMO>
>M>OMO>OMO>OMO>OMO>OMO>OMO>O>
>>MM>OMO>OMO>OMO>OMO>OMO>OMO>
>O>>MM>OMO>OMO>OMO>OMO>OMO>O>
>OMO>>MM>OMO>OMO>OMO>OMO>OMO>
>O>OMO>>MM>OMO>OMO>OMO>OMO>O>
>OMO>OMO>>MM>OMO>OMO>OMO>OMO>
>O>OMO>OMO>>MM>OMO>OMO>OMO>O>
>OMO>OMO>OMO>>MM>OMO>OMO>OMO>
>O>OMO>OMO>OMO>>MM>OMO>OMO>O>
>OMO>OMO>OMO>OMO>>MM>OMO>OMO>
>O>OMO>OMO>OMO>OMO>>MM>OMO>O>
>OMO>OMO>OMO>OMO>OMO>>MM>OMO>
>O>OMO>OMO>OMO>OMO>OMO>>MM>O>
>OMO>OMO>OMO>OMO>OMO>OMO>>MM>

• Maybe I missed something, but can't you just put a single man in lane 1 with a wall to the south of him? All the zero lanes to the left have a sound at the end, and the rest do not. – GentlePurpleRain Apr 10 '16 at 12:28
• That would work but the challenge is 15 lanes and the required mechanic should work for all lanes – user21102 Apr 10 '16 at 12:53
• What is a "flow of sound", exactly? Does a wall essentially act as a man if a megaphone sends sound into it? Also, I assume (given example 4) that two squares sharing only a corner are considered adjacent? – Zandar Apr 10 '16 at 12:59
• Does >v work? – You Apr 10 '16 at 13:09
• You have edited this question an awful lot. There are only two edits from other people, and both of those were formatting. – f'' Apr 11 '16 at 4:41

I think I go it:

__________________________O<M
________________________O<M
______________________O<M
____________________O<M
__________________O<M
________________O<M
______________O<M
____________O<M
__________O<M
________O<M
______O<M
____O<M
__O<M
O<M
M

EDIT: I am not sure how the OP is counting but I believe this is one of the configurations

• This is a working model, however this is the 31 tile solution. Can you find a shorter one? – user21102 Apr 10 '16 at 13:20
• @OlieAyre This is 22 Tiles. Unless you count differently – stackErr Apr 10 '16 at 13:22
• each lane uses 2 cells length so 2 * 15 makes 30. Then a row of megaphones across them to send out the final signal makes 31 – user21102 Apr 10 '16 at 13:24
• @OlieAyre nitpicking but I still count 30 since the 15th lane only uses 1 tile not 2 – stackErr Apr 10 '16 at 13:36
• ok I'll give you that one. Now try and get it below 20. – user21102 Apr 10 '16 at 13:41