POV-Ray : Newsgroups : povray.off-topic : Some math problems Server Time
5 Sep 2024 09:24:17 EDT (-0400)
  Some math problems (Message 13 to 22 of 32)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Neeum Zawan
Subject: Re: Some math problems
Date: 23 Sep 2009 00:06:51
Message: <4ab99edb$1@news.povray.org>
On 09/22/09 15:44, clipka wrote:
> Thus, the number of trailing zeros can be expressed as:
>
> floor(n/5) + floor (n/(5^2)) + floor(n/(5^3)) + ...
>
> which is a perfectly valid, non-recursive (albeit infinite) mathematical
> formula for the desired thing. (Unfortunately the floor() function

	While he didn't state it in his original phrasing, he meant closed form.


-- 
I think animal testing is a terrible idea. They get all nervous and give 
the wrong answers.


Post a reply to this message

From: clipka
Subject: Re: Some math problems
Date: 23 Sep 2009 09:06:41
Message: <4aba1d61$1@news.povray.org>
Neeum Zawan schrieb:
> On 09/22/09 15:44, clipka wrote:
>> Thus, the number of trailing zeros can be expressed as:
>>
>> floor(n/5) + floor (n/(5^2)) + floor(n/(5^3)) + ...
>>
>> which is a perfectly valid, non-recursive (albeit infinite) mathematical
>> formula for the desired thing. (Unfortunately the floor() function
> 
>     While he didn't state it in his original phrasing, he meant closed 
> form.

This being a mathematical puzzle, I'm adhering to the /definition/, not 
the /intention/ :-P


Post a reply to this message

From: Warp
Subject: Re: Some math problems
Date: 23 Sep 2009 15:02:22
Message: <4aba70be@news.povray.org>
andrel <a_l### [at] hotmailcom> wrote:
> >> 8 is less than 24
> > 
> >   So? How does that answer the question?

> that is obvious, I would think.

  Care to explain? It's not obvious to me.

> Ok I read that wrong. Can you give an algorithm for 'and so on'?

  "I said it's <n> of <n*2-1>" with consecutive values of n.

> No it has 2 both 10 and 5 have a factor of 5. So if you want your 
> algorithm:
> sum_k floor(x/(5^k)) over all k from 1 till 5^k<=x

  But I want a closed-form function, not a recursive function or summation.

-- 
                                                          - Warp


Post a reply to this message

From: Warp
Subject: Re: Some math problems
Date: 23 Sep 2009 15:18:32
Message: <4aba7488@news.povray.org>
Neeum Zawan <m.n### [at] ieeeorg> wrote:
> On 09/22/09 15:44, clipka wrote:
> > Thus, the number of trailing zeros can be expressed as:
> >
> > floor(n/5) + floor (n/(5^2)) + floor(n/(5^3)) + ...
> >
> > which is a perfectly valid, non-recursive (albeit infinite) mathematical
> > formula for the desired thing. (Unfortunately the floor() function

>         While he didn't state it in his original phrasing, he meant closed form.

  If we allow recursive functions, then the simplest answer would be:

f(0) = 0
f(n) = floor(n/5) + f(floor(n/5))

-- 
                                                          - Warp


Post a reply to this message

From: Warp
Subject: Re: Some math problems
Date: 23 Sep 2009 15:22:30
Message: <4aba7576@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> >   3) Assume two people, person A and person B, who want to decide who gets
> > a price by tossing a coin.
> > 
> >   Person A is a bad loser and a bully, so if he loses he says "I said it's
> > two out of three". So they play it like that. If A loses again, he says
> > "I said it's three out of five", and so on, until he wins.
> > 
> >   How many tosses is this game expected to last, in average?

> I think that very much depends on whether the sequence is

>    1 - 3 - 5 - 7 -  9 - ...

> or

>    1 - 3 - 5 - 9 - 17 - ...

  How would "four out of nine" work? If there are nine tosses, four wins
wouldn't yet be decisive.

  Of course it's "4 out of 7", "5 out of 9", "6 out of 11" and so on.

-- 
                                                          - Warp


Post a reply to this message

From: andrel
Subject: Re: Some math problems
Date: 23 Sep 2009 16:22:29
Message: <4ABA8384.2000000@hotmail.com>
On 23-9-2009 21:02, Warp wrote:
> andrel <a_l### [at] hotmailcom> wrote:
>>>> 8 is less than 24
>>>   So? How does that answer the question?
> 
>> that is obvious, I would think.
> 
>   Care to explain? It's not obvious to me.

See Tim Cook.

>> Ok I read that wrong. Can you give an algorithm for 'and so on'?
> 
>   "I said it's <n> of <n*2-1>" with consecutive values of n.

where? This formula does not match your problem for n=1.
Strange bully to incrementally decrease his changes.
Or am I still not getting it?

>> No it has 2 both 10 and 5 have a factor of 5. So if you want your 
>> algorithm:
>> sum_k floor(x/(5^k)) over all k from 1 till 5^k<=x
> 
>   But I want a closed-form function, not a recursive function or summation.
> 
you said you didn't want a recursive function. You never said anything 
about summations.
I am afraid we enter into a semantic discussion here, where I might take 
another POV than you about what is a closed-form. I'll for the moment 
assume that you had stated it as you have now modified it and think again.


Post a reply to this message

From: andrel
Subject: Re: Some math problems
Date: 23 Sep 2009 16:27:38
Message: <4ABA84B9.3070809@hotmail.com>
On 23-9-2009 22:22, andrel wrote:
> On 23-9-2009 21:02, Warp wrote:
>> andrel <a_l### [at] hotmailcom> wrote:

> 
>>> Ok I read that wrong. Can you give an algorithm for 'and so on'?
>>
>>   "I said it's <n> of <n*2-1>" with consecutive values of n.
> 
> where? This formula does not match your problem for n=1.
> Strange bully to incrementally decrease his changes.
> Or am I still not getting it?

Am was indeed not getting it.


Post a reply to this message

From: Warp
Subject: Re: Some math problems
Date: 23 Sep 2009 16:44:09
Message: <4aba8899@news.povray.org>
andrel <a_l### [at] hotmailcom> wrote:
> >   "I said it's <n> of <n*2-1>" with consecutive values of n.

> where? This formula does not match your problem for n=1.
> Strange bully to incrementally decrease his changes.
> Or am I still not getting it?

  The game starts with "1 out of 2" (regular coin toss). But if the bully
loses, he declares "I said it's 2 out of 3" and the game continues. If he
loses again, he declares "I said it's 3 out of 5", and so on.

  In general, when he loses the n'th time, he declares "I said it's <n+1>
out of <(n+1)*2-1>".

-- 
                                                          - Warp


Post a reply to this message

From: Warp
Subject: Re: Some math problems
Date: 23 Sep 2009 16:52:40
Message: <4aba8a97@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
>   3) Assume two people, person A and person B, who want to decide who gets
> a price by tossing a coin.

>   Person A is a bad loser and a bully, so if he loses he says "I said it's
> two out of three". So they play it like that. If A loses again, he says
> "I said it's three out of five", and so on, until he wins.

>   How many tosses is this game expected to last, in average?

  Actually this problem isn't so "relatively easy" is it first seemed.
It's actually quite complicated.

  AFAIK the answer lies on whether the sum of probabilities for a game
lasting a certain number of rounds forms a convergent or a divergent series.
If it forms a divergent series, then the average is infinite. However,
proving that the series is divergent is, AFAIK, not trivial at all.

  Anyways, maybe you could want to consider two variants with finite
solutions:

  3a) Like above, but after n losses the bully gets tired and declares himself
a winner anyways. In other words, rather than saying "I said it's <n+1> out
of <(n+1)*2-1>" he just ends the game.

  Question: How many coin tosses does a game have in average, with an upper
limit of n round losses for the bully?

  3b) Like 3a, but instead of tossing a coin, they play rock-paper-scissors.
How many hand throws in average does a game last with an upper limit of n
round losses for the bully?

-- 
                                                          - Warp


Post a reply to this message

From: clipka
Subject: Re: Some math problems
Date: 23 Sep 2009 19:26:16
Message: <4abaae98$1@news.povray.org>
Warp schrieb:
>   The game starts with "1 out of 2" (regular coin toss).

Isn't that "1 out of 1"?


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.