Computational recreations: the n days of Christmas

Jonathan Doyle
{"title":"Computational recreations: the n days of Christmas","authors":"Jonathan Doyle","doi":"10.1145/1315325.1315334","DOIUrl":null,"url":null,"abstract":"In what will likely become a regular feature, this issue of Crossroads introduces the Computational Recreations column. These columns will include puzzles, games, and brainteasers intended to challenge and tickle the mind. In the well-known song The Twelve Days of Christmas, each verse builds upon the previous one to describe an ever-increasing influx of gifts. But why stop after a mere twelve days when we can extend the song? Instead of a fixed number, we can continue for some arbitrary number of days! This new song, The n Days of Christmas, continues the pattern established in the original version: 1. On the first day, you receive a present of type T 1. 2. On the second day, you receive two presents of type T 2 , plus one of type T 1. 3. On the third day, you receive three presents of type T 3 , two of type T 2 , and one of type T 1. ... 4. On the n th day, you receive n presents of type T n , plus n-1 of type T n-1 , n-2 of type T n-2 , and so forth, down to one present of type T 1. Questions 1. How many presents do you receive on day n?","PeriodicalId":429016,"journal":{"name":"ACM Crossroads","volume":"26 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2007-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"ACM Crossroads","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1315325.1315334","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

In what will likely become a regular feature, this issue of Crossroads introduces the Computational Recreations column. These columns will include puzzles, games, and brainteasers intended to challenge and tickle the mind. In the well-known song The Twelve Days of Christmas, each verse builds upon the previous one to describe an ever-increasing influx of gifts. But why stop after a mere twelve days when we can extend the song? Instead of a fixed number, we can continue for some arbitrary number of days! This new song, The n Days of Christmas, continues the pattern established in the original version: 1. On the first day, you receive a present of type T 1. 2. On the second day, you receive two presents of type T 2 , plus one of type T 1. 3. On the third day, you receive three presents of type T 3 , two of type T 2 , and one of type T 1. ... 4. On the n th day, you receive n presents of type T n , plus n-1 of type T n-1 , n-2 of type T n-2 , and so forth, down to one present of type T 1. Questions 1. How many presents do you receive on day n?
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
计算娱乐:圣诞节的n天
这期《十字路口》将介绍计算娱乐专栏,这可能会成为一项常规功能。这些专栏将包括谜题、游戏和脑筋急转弯,旨在挑战和刺激大脑。在著名的歌曲《圣诞节的十二天》中,每一节都建立在前一节的基础上,描述了不断增加的礼物涌入。但是为什么在仅仅十二天之后就停止了呢?而不是一个固定的数字,我们可以继续一些任意天数!这首新歌《圣诞节的n天》延续了原来版本的模式:第一天,你会收到类型t1的礼物。2. 第二天,你收到两份t2类型的礼物,外加一份t1类型的礼物。3.第三天,你收到三份t3型礼物,两份t2型礼物,一份t1型礼物. ...4. 在第n天,你收到n份T型礼物n,加上n-1份T型礼物n-1, n-2份T型礼物n-2,以此类推,直到1份T型礼物。问题1。你在第n天收到多少礼物?
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Modeling object states and behaviors using a state action manager Superhuman speech by 2010: an interview with Jennifer Lai At a crossroads: TA-ing first-year computer science Introduction: computer vision and speech Getting started on natural language processing with Python
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1