Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2015-04-10 07:04:13

khushro
Member
Registered: 2015-04-10
Posts: 2

Starter puzzle on this site "12 Days Of Christmas"

The solution was very disappointing. It was just a straight-forward counting of the number of objects, which even an idiot with a calculator can do. There was nothing puzzling about it.
I was expecting a more mathematical solution, which would give the correct answer for n days instead of 12, and then substitute n=12 in the answer. Would not remain a starter, but would at least be a puzzle.

Offline

#2 2015-04-12 03:45:32

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,810

Re: Starter puzzle on this site "12 Days Of Christmas"

Hi khushro,

Yes, the given solution method is rather starter-ish.

A more satisfying solution exists, however, which by way of a nice mathematical formula in terms of n eliminates all that counting and will instantly display the answer for n (eg, n=12) days.

The formula can be found on the net, but, if you'd like to have a go at constructing it yourself, then here are a couple of hints (should you need them):

Last edited by phrontister (2015-05-20 13:58:17)


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#3 2016-06-07 20:15:02

Laatokka
Member
Registered: 2016-06-07
Posts: 1

Re: Starter puzzle on this site "12 Days Of Christmas"

Hi,

And if you want, you can try making a little program smile and modify it

(JavaScript)
var x = 1;
var y = 2;
var days = 1;
var PresentsPerDay = 0;

while (days < 13){
  PresentsPerDay=x+PresentsPerDay;
  x=x+y;
  y++;
  days++;

Offline

#4 2016-06-07 20:55:37

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,810

Re: Starter puzzle on this site "12 Days Of Christmas"

True! up

A similar program in BASIC:

    x=1
    y=2
    d=1
    ppd=0
    WHILE d<13
        ppd=ppd+x
        x=x+y
        y=y+1
        d=d+1
    WEND
    PRINT ppd

And...welcome to the forum! smile

Last edited by phrontister (2016-06-07 23:10:17)


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#5 2018-08-08 17:57:19

chinnu03
Member
Registered: 2018-08-08
Posts: 1

Re: Starter puzzle on this site "12 Days Of Christmas"

I have found the general solution for this puzzle,

For number of days = n
Total Presents = n(n+1)(n+2)/6

This can be derived as follows
Presents for n'th day = n(n+1)/2 because it is the sum of numbers from 1 to n.
Total presents till n'th day = Σ n(n+1)/2
Simplifying we will get the above formula

Hope it is helpful.

Offline

#6 2018-08-08 21:27:33

Bob
Administrator
Registered: 2010-06-20
Posts: 10,052

Re: Starter puzzle on this site "12 Days Of Christmas"

hi chinnu03

Welcome to the forum.

Good result.  But I'm afraid it has been done before.  This was, for a while, a GCSE maths project in the UK.  You'd get a grade 'C' for what you have posted but would need to show the whole proof and try possible extensions to get an 'A'. smile

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

Board footer

Powered by FluxBB