Can you solve the demon dance party riddle Edwin Meyer

Once each year, thousands of logicians
descend into the desert for Learning Man,

a week-long event they attend
to share their ideas,

think through tough problems…
and mostly to party.

And at the center of that gathering
is the world’s most exclusive club,

where under the full moon,
the annual logician’s rave takes place.

The entry is guarded
by the Demon of Reason,

and the only way to get in is to solve
one of his dastardly challenges.

You’re attending with 23
of your closest logician friends,

but you got lost on the way
to the rave and arrived late.

They’re already inside, so you must
face down the demon alone.

He poses you the following question:

When your friends arrived,
the demon put masks on their faces

and forbade them from communicating
in any way.

No one at any point could
see their own masks,

but they stood in a circle where they
could see everyone else’s.

The demon told the logicians that he
distributed the masks in such a way

that each person would eventually be able
to figure out their mask’s color

using logic alone.

Then, once every two minutes,
he rang a bell.

At that point, anyone who could
come to him

and tell him the color of their mask
would be admitted.

Here’s what happened:

Four logicians got in at the first bell.

Some number of logicians, all in red
masks, got in at the second bell.

Nobody got in when the third bell rang.

Logicians wearing at least two different
colors got in at the fourth bell.

All 23 of your friends played
the game perfectly logically

and eventually got inside.

Your challenge, the demon explains,

is to tell him how many people gained
entry when the fifth bell rang.

Can you get into the rave?

Pause here to figure it out yourself.

Answer in 3

Answer in 2

Answer in 1

It’s initially difficult to imagine
how anyone could,

using just logic and the colors
they see on the other masks,

deduce their own mask color.

But even before the first bell, everyone
will realize something critical.

Let’s imagine a single logician
with a silver mask.

When she looks around, she’d see
multiple colors, but no silver.

So she couldn’t ever know that silver
is an option,

making it impossible for her to logically
deduce that she must be silver.

That contradicts rule five, so there must
be at least two masks of each color.

Now, let’s think about what happens

when there are exactly two people wearing
the same color mask.

Each of them sees only one mask
of that color.

But because they already know
that it can’t be the only one,

they immediately know that their own mask
is the other.

This must be what happened
before the first bell:

two pairs of logicians each realized
their own mask colors

when they saw a unique color in the room.

What happens if there are three people
wearing the same color?

Each of them—A, B and C—
sees two people with that color.

From A’s perspective, B and C would be
expected to behave the same way

that the orange and purple pairs did,
leaving at the first bell.

When that doesn’t happen,

each of the three realizes that they are
the third person with that color,

and all three leave at the next bell.

That was what the people
with red masks did—

so there must have been three of them.

We’ve now established a basis
for inductive reasoning.

Induction is where we can solve
the simplest case,

then find a pattern that will allow
the same reasoning

to apply
to successively larger sets.

The pattern here is that everyone
will know what group they’re in

as soon as the previously sized group
has the opportunity to leave.

After the second bell,
there were 16 people.

No one left on the third bell,

so everyone then knew there weren’t
any groups of four.

Multiple groups,
which must have been of five,

left on the fourth bell.

Three groups would
leave a solitary mask wearer,

which isn’t possible,
so it must’ve been two groups.

And that leaves six logicians outside
when the fifth bell rings:

the answer to the demon’s riddle.

Nothing left to do but join your friends
and dance.

每年一次,成千上万的
逻辑学家为了Learning Man而进入沙漠,

他们参加了为期一周的活动
,分享他们的想法,

思考棘手的问题……
而且主要是参加聚会。

在那次聚会的中心
是世界上最高级的俱乐部,

在满月之下
,一年一度的逻辑学家狂欢会在这里举行。

入口
由理性恶魔守卫

,进入的唯一方法是
解决他的一项卑鄙挑战。


和你最亲密的 23 位逻辑学家朋友一起参加,

但你在去狂欢的路上迷路
了,迟到了。

他们已经在里面了,所以你必须
独自面对恶魔。

他向您提出以下问题:

当您的朋友到达时
,恶魔将面具戴在他们的脸上,

并禁止他们
以任何方式交流。

任何时候都没有人能
看到自己的面具,

但他们站成一个圆圈,在那里他们
可以看到其他人的面具。

恶魔告诉逻辑学家,他
以这样一种方式分配面具

,每个人最终都能够单独使用逻辑
来弄清楚他们面具的颜色

然后,他每两分钟
敲一次门铃。

到那时,任何可以
来找他

并告诉他他们面具的颜色的人
都会被接纳。

事情是这样的:

四名逻辑学家在第一声响起时进来了。

一些逻辑学家,全都戴着红色
面具,在第二声钟声响起时进来了。

当第三声铃声响起时,没有人进来。

穿着至少两种不同
颜色的逻辑学家在第四声钟声中进来了。

你所有的 23 位朋友都
完美地玩了这个游戏

并最终进入了游戏。

恶魔解释说,你的挑战

是告诉他
在第五次铃声响起时有多少人进入。

你能进入狂欢吗?

在这里停下来自己弄清楚。

回答 3

回答 2

回答

1 最初很难
想象任何人如何能够

仅使用逻辑和
他们在其他面具上看到的颜色来

推断他们自己的面具颜色。

但即使在第一个钟声之前,每个人
都会意识到一些关键的事情。

让我们想象一个
带着银色面具的逻辑学家。

当她环顾四周时,她会看到
多种颜色,但没有银色。

所以她永远不可能知道白银
是一种选择

,这让她无法从逻辑上
推断出她一定是白银。

这与规则五相矛盾,因此
每种颜色必须至少有两个面具。

现在,让我们想想

当正好有两个人
戴着相同颜色的面具时会发生什么。

他们每个人只看到一个
该颜色的面具。

但是因为他们已经
知道它不可能是唯一的,

所以他们立即知道自己的面具
是另一个。

这一定是
在第一声钟声之前发生的事情:当

两对逻辑学家

在房间里看到一种独特的颜色时,他们各自意识到了自己的面具颜色。

如果三个人
穿着相同的颜色会发生什么?

他们每个人——A、B 和 C——都
看到两个有这种颜色的人。

从 A 的角度来看,B 和 C 的行为

应该与橙色和紫色对的行为相同,
在第一个钟声时离开。

当这没有发生时,

三个人中的每个人都意识到他们是
具有该颜色的第三个人,

并且三个人都在下一个钟声离开。

那些戴着红色面具的人就是

这么做的——所以他们应该是三个人。

我们现在已经建立
了归纳推理的基础。

归纳法是我们可以解决
最简单情况的地方,

然后找到一种模式,该模式将允许
将相同的推理

应用于连续更大的集合。

这里的模式是,

一旦之前规模较大的小组
有机会离开,每个人都会知道他们所在的小组。

第二声钟声响起,一
共有16人。

第三个钟没有人离开,

所以每个人都知道
没有四人一组。

多组
,必须是五个,

留在第四个钟声上。

三组会
留下一个单独的面具佩戴者,

这是不可能的,
所以一定是两组。

当第五声铃声响起时,六名逻辑学家留在外面:

恶魔之谜的答案。

除了和你的朋友
一起跳舞,别无他法。