The Museum of HP Calculators

HP Forum Archive 19

[ Return to Index | Top of Index ]

sigma function in solvers
Message #1 Posted by Don Shepherd on 3 Mar 2009, 12:36 p.m.

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
Message #2 Posted by Peter A. Gebhardt on 3 Mar 2009, 4:18 p.m.,
in response to message #1 by Don Shepherd

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
Message #3 Posted by Don Shepherd on 3 Mar 2009, 7:15 p.m.,
in response to message #2 by Peter A. Gebhardt

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
Message #4 Posted by Peter A. Gebhardt on 4 Mar 2009, 6:47 a.m.,
in response to message #3 by Don Shepherd

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
Message #5 Posted by Marcus von Cube, Germany on 4 Mar 2009, 8:27 a.m.,
in response to message #4 by Peter A. Gebhardt

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
Message #6 Posted by Peter A. Gebhardt on 4 Mar 2009, 9:44 a.m.,
in response to message #5 by Marcus von Cube, Germany

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
Message #7 Posted by Marcus von Cube, Germany on 4 Mar 2009, 3:08 p.m.,
in response to message #6 by Peter A. Gebhardt

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
Message #8 Posted by Don Shepherd on 4 Mar 2009, 9:05 p.m.,
in response to message #7 by Marcus von Cube, Germany

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
Message #9 Posted by Marcus von Cube, Germany on 5 Mar 2009, 2:58 a.m.,
in response to message #8 by Don Shepherd

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
Message #10 Posted by Don Shepherd on 5 Mar 2009, 4:12 a.m.,
in response to message #9 by Marcus von Cube, Germany

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

                                                            
Re: ERLANG B Was: sigma function in solvers
Message #11 Posted by Marcus von Cube, Germany on 5 Mar 2009, 9:51 a.m.,
in response to message #10 by Don Shepherd

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.

                                                      
Re: ERLANG B Was: sigma function in solvers
Message #12 Posted by Peter A. Gebhardt on 5 Mar 2009, 5:11 a.m.,
in response to message #9 by Marcus von Cube, Germany

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: sigma function in solvers
Message #13 Posted by Katie Wasserman on 3 Mar 2009, 6:11 p.m.,
in response to message #1 by Don Shepherd

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
Message #14 Posted by Allen on 3 Mar 2009, 8:29 p.m.,
in response to message #1 by Don Shepherd

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
Message #15 Posted by David Hayden on 3 Mar 2009, 8:47 p.m.,
in response to message #1 by Don Shepherd

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
Message #16 Posted by Karl Schneider on 4 Mar 2009, 3:05 a.m.,
in response to message #1 by Don Shepherd

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
Message #17 Posted by Don Shepherd on 4 Mar 2009, 6:35 a.m.,
in response to message #16 by Karl Schneider

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


[ Return to Index | Top of Index ]

Go back to the main exhibit hall