From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: math problem: 28, 39, and 55 days Date: Fri, 19 Jan 2018 03:26:31 +0100 Organization: Aioe.org NNTP Server Message-ID: <86fu724m94.fsf@zoho.com> References: <86607z5okl.fsf@zoho.com> <8bbb0aaa-a1f4-4698-8b5f-9787e44735ca@googlegroups.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1516328934 15494 195.159.176.226 (19 Jan 2018 02:28:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 19 Jan 2018 02:28:54 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 19 03:28:50 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ecMQ6-0003Je-K5 for geh-help-gnu-emacs@m.gmane.org; Fri, 19 Jan 2018 03:28:42 +0100 Original-Received: from localhost ([::1]:44966 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecMS5-0004MD-1U for geh-help-gnu-emacs@m.gmane.org; Thu, 18 Jan 2018 21:30:45 -0500 Original-Path: usenet.stanford.edu!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail Original-Newsgroups: alt.tv.survivor,gnu.emacs.help,sci.math Original-Followup-To: alt.tv.survivor,gnu.emacs.help Original-Lines: 97 Original-NNTP-Posting-Host: zRXoCvQ6k9fneBfYPnB6lQ.user.gioia.aioe.org Original-X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:Yh91zNdu7vUvx4lkrs+DF9xl0lw= Mail-Copies-To: never Original-Xref: usenet.stanford.edu alt.tv.survivor:403189 gnu.emacs.help:221663 sci.math:1606843 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:115780 Archived-At: darrellhicks450 wrote: >> The first Survivor ever, in Sweden, was only >> 28 days. (Later it was extended to 40.) >> >> Today's US Survivor is 39. >> >> Australian S04 was 55! >> >> If we define the difficulty of surviving day >> x as a function of the number of days >> preceeding it, i.e. >> >> 1, 2 ... (x - 1) >> >> then how much more difficult is it to >> survive/complete Australian Survivor than >> the US version, and the original >> Swedish version? > > 55 days is approximately 40% longer than > 39 days. > > I would estimate difficulty exceeds 40%‼️ > > 55 days is 💯% longer than 28 days IOW A LOT > HARDER‼️ Intuition: pass Math: fail :) I redefined the problem just a bit so that at day x, that day will also count, i.e. +x, as otherwise, day 1 will have a zero cost. Anyway here (last in the post) is some Lisp (Elisp) to do the computation. The answer, if the software is correct, is: ;; Australia vs USA: 197% ;; Australia vs Sweden: 379% That is, the AU version is almost twice as difficult as the US one, which corresponds to my intuition as well. (require 'cl-lib) ;; naive first attempt ;; (that does work) (defun cost-at-day-loop (day) (let ((cost 0) (n 0) ) (cl-loop for n from 0 upto day do (cl-incf cost n) ) cost) ) ;; example: 5 -> (+ 1 2 3 4 5) = 15 ;; testing: ;; (cost-at-day-loop 5) ; 15 ;; (cost-at-day-loop 1) ; 1 ;; (cost-at-day-loop 0) ; 0 ;; better second attempt (defun cost-at-day (day) (apply #'+ (number-sequence 1 day)) ) ;; testing: ;; (cost-at-day 5) ; 15 ;; (cost-at-day 1) ; 1 ;; (cost-at-day 0) ; 0 ;; compute difficulty (defun compare-difficulty () (let*((au (cost-at-day 55)) ; 1540 (us (cost-at-day 39)) ; 780 (se (cost-at-day 28)) ; 406 (au-vs-us (* (/ au (* us 1.0)) 100)) (au-vs-se (* (/ au (* se 1.0)) 100)) (au-vs-us-str (format "\n\n;; Australia vs USA: %.0f%%\n" au-vs-us)) (au-vs-se-str (format ";; Australia vs Sweden: %.0f%%\n" au-vs-se)) ) (insert au-vs-us-str) (insert au-vs-se-str) )) ;; (compare-difficulty) ;; Australia vs USA: 197% ;; Australia vs Sweden: 379% -- underground experts united http://user.it.uu.se/~embe8573