Sunday, May 22, 2005

pthread

The pthread library (libpthread) provides interfaces for developing multi-threaded applications.

Summary of Change

The pthread library now provides support for the dynamic loading of shared libraries containing thread local storage (TLS).

Details of Change

The pthread library has implemented interfaces and modules to provide support to the linker, loader and compiler components for this functionality. These interfaces handle allocation and initialization of thread local storage for dynamically loaded shared libraries containing TLS variables.

Thursday, May 19, 2005

exponential distribution

from http://www.itl.nist.gov/div898/handbook/apr/section1/apr161.htm

Next PagePrevious PageHomeTools & AidsSearch Handbook
8. Assessing Product Reliability
8.1. Introduction
8.1.6. What are the basic lifetime distribution models used for non-repairable populations?

8.1.6.1.

Exponential


All the key formulas for using the exponential model Formulas and Plots

The exponential model, with only one unknown parameter, is the simplest of all life distribution models. The key equations for the exponential are shown below:

CDF: F(t) = 1 - EXP(-lambad*t);     RELIABILITY: R(t) = EXP(-lambda*t);     PDF: f(t) = lambda*EXP(-lambda*t);     MEAN: 1/lambda;     MEDIAN: LN(2)/lambda (approximately 0.693/lambda);     VARIANCE: 1/(lambda**2);     FAILURE RATE: h(t) = lambda

Note that the failure rate reduces to the constant lambda for any time. The exponential distribution is the only distribution to have a constant failure rate. Also, another name for the exponential mean is the Mean Time To Fail or MTTF and we have MTTF = 1/lambda.

The Cum Hazard function for the exponential is just the integral of the failure rate or H(t) =lambdat.

The PDF for the exponential has the familiar shape shown below.

The Exponential distribution 'shape' Plots of sample exponential PDF functions
The Exponential CDF Plots of sample exponential CDF functions

Below is an example of typical exponential lifetime data displayed in Histogram form with corresponding exponential PDF drawn through the histogram.

Histogram of Exponential Data Plot of exponential PDF with overlaid histogram
The Exponential models the flat portion of the "bathtub" curve - where most systems spend most of their 'lives' Uses of the Exponential Distribution Model
  1. Because of its constant failure rate property, the exponential distribution is an excellent model for the long flat "intrinsic failure" portion of the Bathtub Curve. Since most components and systems spend most of their lifetimes in this portion of the Bathtub Curve, this justifies frequent use of the exponential distribution (when early failures or wear out is not a concern).
  2. Just as it is often useful to approximate a curve by piecewise straight line segments, we can approximate any failure rate curve by week-by-week or month-by-month constant rates that are the average of the actual changing rate during the respective time durations. That way we can approximate any model by piecewise exponential distribution segments patched together.
  3. Some natural phenomena have a constant failure rate (or occurrence rate) property; for example, the arrival rate of cosmic ray alpha particles or Geiger counter tics. The exponential model works well for inter arrival times (while the Poisson distribution describes the total number of events in a given period). When these events trigger failures, the exponential life distribution model will naturally apply.
Dataplot and EXCEL functions for the Exponential model DATAPLOT and EXCEL Functions for the Exponential

The Dataplot commands EXPPDF and EXPCDF calculate the exponential PDF and CDF for the standardized case with = 1. To evaluate the PDF and CDF at 100 hours for an exponential with = .01, the commands would be

LET A = EXPPDF(100,0,0.01)
LET B = EXPCDF(100,0,0.01)
and the response would be .003679 for the pdf and .63212 for the cdf.

Dataplot can do a probability plot of exponential data, normalized so that a perfect exponential fit is a diagonal line with slope 1. The following commands generate 100 random exponential observations (lamda = .01) and generate the probability plot that follows.

LET Y = EXPONENTIAL RANDOM NUMBERS FOR I = 1 1 100
LET Y = 100*Y
TITLE AUTOMATIC
X1LABEL THEORETICAL (NORMALIZED) VALUE
Y1LABEL DATA VALUE
EXPONENTIAL PROBABILITY PLOT Y
Dataplot Exponential probability plot Plot of exponential probability plot

EXCEL also has built-in functions for the exponential PDF and CDF. The PDF is given by EXPONDIST(x,lambda, false) and the CDF is given by EXPONDIST(x,lambda, true). Using 100 for x and .01 forlambda will produce the same answers as given by Dataplot.

HomeTools & AidsSearch HandbookPrevious PageNext Page

examples on poisson distribution

A particularity of the Poisson distribution is that the convolution of m such distributions with parameters a1, ..., am is again a Poisson distribution with parameter a = a1+a2+...+am, and it is the only distribution with this convenient property.

http://www.absoluteastronomy.com/encyclopedia/P/Po/Poisson_process.htm

The number of telephone calls arriving at a switchboard during any specified time interval may have a Poisson distribution, and the number of calls arriving during one time interval may be Quick Facts about: statistically independent
Quick Summary not found for this subject
statistically independent of the number of calls arriving during any other non-overlapping time interval. This is a one-dimensional Poisson process. In simple models, one may assume a constant average rate of arrival, e.g., λ = 12.3 calls per minute. In that case, the Quick Facts about: expected value
The sum of the values of a random variable divided by the number of values
expected value of the number of calls in any time interval is that rate times the amount of time, λt. In messier and more realistic problems, one uses a non-constant rate function λ(t). In that case, the expected value of the number of calls between time a and time b is
The number of bombs falling on a specified area of London in the early days of the Second World War may be a random variable with a Poisson distribution, and the number of bombs falling on two areas of the city that do not overlap may be statistically independent. This is a 2-dimensional Poisson process.
Astonomers may treat the number of stars in a given volume of space as a random variable with a Poisson distribution, and the numbers of stars in any two or more non-overlapping regions as statistically independent. This is a 3-dimensional Poisson process.

Wednesday, May 18, 2005

transitive closure algorithm

http://www.boost.org/libs/graph/doc/transitive_closure.html
The time complexity (worst-case) is O(|V||E|).

Sunday, May 15, 2005

mono

http://www.mono-project.com/Main_Page

Mono is a platform for running and developing modern applications, based on the ECMA/ISO Standards. Mono can run existing programs targeting the .NET or Java frameworks.

Thursday, May 12, 2005

iMode

iMode is a brand and a service of wireless Internet connection at the touch of a button on a cell phone. NTT DoCoMo[1]started this service in February 1999 in Japan and obtained over six million subscribers 14 month later.

Wednesday, May 11, 2005

random number generation

in the linux manual of rand( )

In Numerical Recipes in C: The Art of Scientific Computing (William H.
Press, Brian P. Flannery, Saul A. Teukolsky, William T. Vetterling; New
York: Cambridge University Press, 1992 (2nd ed., p. 277)), the follow-
ing comments are made:
"If you want to generate a random integer between 1 and 10, you
should always do it by using high-order bits, as in

j=1+(int) (10.0*rand()/(RAND_MAX+1.0));

and never by anything resembling

j=1+(rand() % 10);

(which uses lower-order bits)."

Friday, May 06, 2005

literate programming

Literate programming is a methodology that combines a programming language with a documentation language, thereby making programs more robust, more portable, more easily maintained, and arguably more fun to write than programs that are written only in a high-level language. The main idea is to treat a program as a piece of literature, addressed to human beings rather than to a computer. The program is also viewed as a hypertext document, rather like the World Wide Web.

Wednesday, May 04, 2005

euclidean graph

Euclidean Graph


A weighted graph in which the weights are equal to the Euclidean lengths of the edges in a specified embedding (Skiena 1990, pp. 201 and 252).