HP Forums
sigma function in solvers - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: sigma function in solvers (/thread-147835.html)



sigma function in solvers - Don Shepherd - 03-03-2009

Yesterday a college student asked me if it was possible to use the solver in the 17bii+ to implement the following equation:

I created the following solver formula:

ERLANG=(R^M/FACT(M)) / (1+SIGMA(I:1:M:1:R^I/FACT(I)))

Since many formulae require the summation, or sigma, function, I was wondering why it was not included in the 33s and 35s. Did the designers assume that, since those models allow keystroke programming (so you could "roll your own" sigma function), it just was not necessary? I would think it would have been nice to include the sigma function in the solver without requiring the user to learn keystroke programming.


Re: sigma function in solvers - Peter A. Gebhardt - 03-03-2009

Don,

how do you solve for M (the # of servers in the ERLANG B formula, if given R "Erlangs")???

Just tried it on my 200LX - and get "Bad guesses".

Best regards,

Peter A. Gebhardt


Re: sigma function in solvers - Katie Wasserman - 03-03-2009

Don,

We explored the possibilities of the 35S solver here and concluded the it needs a G() function to solve equations like this but has a functional L() and can iterate. I don't know why they allowed for STO in equations but not RCL, it make no sense at all.

-Katie


Edited: 3 Mar 2009, 6:16 p.m.


Re: sigma function in solvers - Don Shepherd - 03-03-2009

Peter, the student that asked about this, he knows R and M, and he solves for ERLANG. I don't know enough about it to say more than that, but it seemed to be an easy formula for the 17bii+, given the sigma function.


Re: sigma function in solvers - Allen - 03-03-2009

Quote:
Since many formulae require the summation, or sigma, function, I was wondering why it was not included in the 33s and 35s.

Don, Greetings! Excellent post! Two quick observations:

1. The sigma function can be implemented in loops if not explicitly accessible. This is often faster since many of the Calcs that have a SIGMA function also incorporate single/double/x^2/y^2 etc into the Sigma+ key (e.g. 42s). I think most of the time these are not needed, so it's faster to run a summation loop to sufficient accuracy.

2. For many (I think not all..) summations, there is a general closed-form solution. (e.g the Change for a Dollar solution that Egan Provided)


Re: sigma function in solvers - David Hayden - 03-03-2009

The hard part about calculating the Erlang formula is that it's easy to exceed the precision of the calculator if you do the calculations in the wrong order.

Dave


Re: Sigma function in equation editors - Karl Schneider - 03-04-2009

Hi, Don --

Quote:
Since many formulae require the summation, or sigma, function, I was wondering why it was not included in the 33s and 35s.

The crux of the matter is that the HP-33s/35s equation editor is fundamentally the one ported from the algebraic HP-22S into the RPN HP-32SII in 1991 and subsequently carried forward; it is not the more-advanced implementation of the HP-17B/27S.

The Sigma operator for the HP-17B/27S equation editor will, by looping, compute finite series using an expression that defines every term. (Sigma+, by contrast, only adds a single datum to a summation.) The HP-17B/27S does not use summation for statistics, so there is no Sigma+ function.

The HP-22S equation editor allowed only programmable calculating operations -- or most of them -- defined on its keyboard. Sigma+ is one that was not supported, because it is not very practical for an equation. Sigma as a construct used in equations, however, might have caused confusion with Sigma+.

-- KS


Edited: 4 Mar 2009, 3:19 a.m.


Re: Sigma function in equation editors - Don Shepherd - 03-04-2009

Thanks for the background, Karl. It makes me apprerciate the 17bii solver all the more. What a gem!


Re: sigma function in solvers - Peter A. Gebhardt - 03-04-2009

Thx. Don.

So I repost my above question to the other readers:

What causes the HP200LX solver (and I guess the 17b/19b-family solvers too) to refuse to calculate M in Don's above implementation?

Is this a problem of the solver 'per se' or a mathematical 'impossibility'?

Best regards,

Peter A. Gebhardt




Re: sigma function in solvers - Marcus von Cube, Germany - 03-04-2009

My 19Bii fails early: It does not seem to allow the FACT function in a solver equation. :(

EDIT: That must have been a typing mistake, now the formula works. It looks like the problem does not have a solution for certain combinations of R end ERLANG.

What does the formula compute and what would be reasonable input?


Edited: 4 Mar 2009, 8:46 a.m.


ERLANG B Was: sigma function in solvers - Peter A. Gebhardt - 03-04-2009

Marcus,

pls. take a look here:

http://www.abstractmicro.com/erlang/helppages/mod-about.htm

Best regards,

Peter A. Gebhardt


Re: ERLANG B Was: sigma function in solvers - Marcus von Cube, Germany - 03-04-2009

Thanks Peter!

Now I know that the function is Erlang B, just an intermediate step in calculating Erlang C which is the probability that a customer has to wait for a server. But the article doesn't help with the proper values for Erlang B so that I can test the formula for solvability? :(

Can somebody shed some more light on the subject?


Re: ERLANG B Was: sigma function in solvers - Don Shepherd - 03-04-2009

Marcus, the student that asked me about this provided a copy of a page of his textbook which showed that, for r=0.67 and m=3, the probability is 0.0255 (from a lookup table in the textbook). My formula returned probability 0.0258. I can send that page to you if you want, because is does describe this function with a bit more detail.


Re: ERLANG B Was: sigma function in solvers - Marcus von Cube, Germany - 03-05-2009

Just offer a scan for download here. I'm hopefully not the only one who is entertaining his brain with some "new" math. :)

With the given values, the 19BII solves happily for M. If I change the value of ERLANG to the result given in the original paper, the solver approaches 3 but cannot reach the exact value for ERLANG, due to the fact that FACT returns an error for non integer arguments which makes the solver retry.

I've modified the equation slightly:

ERLANG=(R^M/FACT(IP(M))) / (1+SIGMA(I:1:M:1:R^I/FACT(I)))
Now I get 3,02707 for ERLANG. It's the continuous R^M part that makes this possible.

Edited: 5 Mar 2009, 3:15 a.m.


Re: ERLANG B Was: sigma function in solvers - Don Shepherd - 03-05-2009

Here is that little textbook writeup on this function, along with the lookup table.


Re: ERLANG B Was: sigma function in solvers - Peter A. Gebhardt - 03-05-2009

Marcus,

Thx. a lot! From your findings an advice given (independently of SIGMA) could be:

"One should check the usage of variables that are supposed to stay integers during the whole calculation."

Best regards,

Peter A. Gebhardt




Re: ERLANG B Was: sigma function in solvers - Marcus von Cube, Germany - 03-05-2009

OK, I got it. Erlang B is the probability of loss (all servers busy) where R is the ratio of service time : average arrival rate and M is the number of servers.

Thanks for the link.