-
Notifications
You must be signed in to change notification settings - Fork 2
[Article] Josephus Problem #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+81
−3
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
3fbe031
Add files via upload
ZFCarrotFDH 7f46528
Update josephus.md
ZFCarrotFDH 02255f3
larex upload josephus.md
ZFCarrotFDH 7279621
test FDH Catogry.md
ZFCarrotFDH f5058b3
categry upld josephus.md
ZFCarrotFDH 40db52e
categry upldwrongarrange.md
ZFCarrotFDH 1e253b8
color of fdh change.md
ZFCarrotFDH a9a2b47
br fix josephus.md
ZFCarrotFDH 95a7321
biaodianfujao fix josephus.md
ZFCarrotFDH 45211d1
update format
xieyuen 79aebcc
rename: wrong arrange -> derange
xieyuen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| --- | ||
| title: FDH | ||
| title: Femboy's Dessert House | ||
| description: | ||
| Femboy's Dessert House with Delicious Math Goody (-3-) | ||
|
|
||
| style: | ||
| background: "#ff348f8f" | ||
| color: "#fff" | ||
| color: "#ff66ccff" | ||
| --- | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| --- | ||
| title: "你能在约瑟夫的山洞里活下来吗?" | ||
| description: 简化约瑟夫问题推导 | ||
| date: 2026-04-22 | ||
| image: | ||
| math: true | ||
| license: All Right Reserved, 河源中学数学研究协会 | ||
| hidden: false | ||
| comments: true | ||
| darft: false | ||
| categories: | ||
| - Femboy's Dessert House | ||
| - Articles | ||
| tags: | ||
| - Femboy's Dessert House | ||
| - 约瑟夫问题 | ||
| --- | ||
|
|
||
| > 我的平分三角形问题呢?😡😡😡 | ||
| > | ||
| > 在做了在做了✋😭🤚 | ||
|
|
||
| ## 导入 | ||
|
|
||
| 我叫追风卡洛特, 是河中的超气人~~娼年~~小南梁. | ||
|
|
||
| 今天我参加了一个节目. 节目现场共有1300人, 全部人围成一个大圈, 每个人站的位置有编号 $n,n=1,2,3, \cdots, 1300$. 游戏规则是这样的: 从1号位开始按顺时针方向 $1,2,1,2, \cdots$ 报数, 报到2的人自行出局, 如此循环, 直到剩下最后一个人. 留到最后的人赢得现场的一件礼品, 我看中了一条可爱的洛丽塔裙子😍😍😍🥰🥰🥰🤗🤗🤗😚😚😚🥺🥺🥺. 请问我该站在几号位才能获得礼品? | ||
|
|
||
| ## 正片开始 | ||
|
|
||
| 这里描述的是经典的**约瑟夫问题**.原问题表述如下: | ||
|
|
||
| > 在罗马人占领乔塔帕特后, 39 个犹太人与Josephus及他的朋友躲到一个洞中, | ||
| > 39个犹太人决定宁愿死也不要被敌人抓到, 于是决定了一个自杀方式, | ||
| > 41个人排成一个圆圈, 由第1个人开始报数, 每报数到第3人该人就必须自杀, | ||
| > 然后再由下一个重新报数, 直到所有人都自杀身亡为止. | ||
| > 然而Josephus 和他的朋友并不想遵从. 首先从一个人开始, | ||
| > 越过 $k-2$ 个人(因为第一个人已经被越过), 并杀掉第 $k$ 个人. | ||
| > 接着, 再越过 $k-1$ 个人, 并杀掉第 $k$ 个人. | ||
| > 这个过程沿着圆圈一直进行, 直到最终只剩下一个人留下, 这个人就可以继续活着. | ||
| > 问题是, 给定了和, 一开始要站在什么地方才能避免被处决. Josephus 要他的朋友先假装遵从, 他将朋友与自己安排在第16个与第31个位置, 于是逃过了这场死亡游戏. | ||
|
|
||
| (我这个问题还简化了呢 | ||
|
|
||
| 节目整这一出我也没招了. 迫于无奈, 小南梁打算在心里先列举. | ||
|
|
||
| - 1个人时, 胜者在1号位; | ||
| - **2个人时, 胜者在1号位;** | ||
| - 3个人时, 胜者在3号位; | ||
| - **4个人时, 胜者在1号位;** | ||
| - 5个人时, 胜者在3号位; | ||
| - 6个人时, 胜者在5号位; | ||
| - 7个人时, 胜者在7号位; | ||
| - **8个人时, 胜者在1号位;** | ||
| - $\cdots$ | ||
| - **16个人时, 胜者在1号位** | ||
|
|
||
| 这么一列举, 我们已经找到了规律: 当总人数为 $2^{n},(n\in \mathbb{N})$ 人时, 总是1号位的人赢得胜利. | ||
|
|
||
| 下面进行证明. | ||
|
|
||
| ## 问题解决 | ||
|
|
||
| 设现场有 $2^n$ 人 $(n\in \mathbb{N}^*)$ | ||
|
|
||
| 经过一圈循坏后, 现场剩余 $2^{n-1}$ 人, 而此时, 依旧从1号位的人开始报"1".于是我们可以认为开始了一场有 $2^{n-1}$ 人的游戏, 接着重复上述过程, 直到剩下2个人, 此时容易知道留下的那个人就在1号位. | ||
|
|
||
| 面对目前1300人的情况, 只需先进行游戏直到剩下离它最近且小于它的 $2^n$ 数, 即 1024 人时, 再以这时报"1"的人的位置为1号位, 便能找到获胜者会站在的位置. | ||
|
|
||
| 计算, 得该位置为**第553号位.** | ||
|
|
||
| 卡洛特站在这个位置上, 如愿以偿得到了她喜欢的小裙裙.🤤🤤🤤 | ||
|
|
||
| ## 后记 | ||
|
|
||
| > 本题改编于河源中学2025年高一年级数学竞赛废稿题目. | ||
|
|
||
| 更多疑问可致信河中数协官方邮箱<hyzxmath@outlook.com>或者在下方评论区留言, 小南梁会耐心为您解答♡ | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.