• Narrow screen resolution
  • Wide screen resolution
  • Increase font size
  • Decrease font size
  • Default font size
  • default color
  • green color
  • blue color
Member Area
You are here:
FireBoard
Welcome, Guest
Please Login or Register.    Lost Password?
frequency distribution Seeking reference for O(1) random variable lookup algorithm (1 viewing) (1) Guests
Go to bottom Post Reply Favoured: 0
TOPIC: frequency distribution Seeking reference for O(1) random variable lookup algorithm
#9792
me13013 (Visitor)
Click here to see the profile of this user
Birthdate:
frequency distribution Seeking reference for O(1) random variable lookup algorithm  
There is a clever algorithm stuck in my memory, for which I have forgotten the reference (and the author to credit).  I have had no success searching for a reference online either.  I am hoping someone here can point me to a reference.  I know a reference exists, because I remember discovering the algorithm in some journal paper, probably written in the 60s or 70s.  I didn't stumble upon it until about 2000. The algorithm solves the problem of picking a random variable from a finite number of classes, with the probability of each class being arbitrary (but given, and constant over time.  It is able to do a lookup in constant time, after some pre-computation to create a lookup table. How it works is best described by an example.  Suppose I have ten classes and the probabilities are these: p(A) = .077 p( = .093 p(C) = .044 p(D) = .091 p(E) = .126 p(F) = .147 p(G) = .016 p(H) = .168 p(I) = .169 p(J) = .069 It builds a table with 10 entries (shown below).  Conceptually each entry is a unit bar, divided into two pieces (the dividing points are generally different for each bar).  The left piece is assigned to one class, the right to another (some bars may have both pieces assigned to the same class).  To convert a unit random value r to a random selection, we multiply r by the number of classes, lookup the corresponding table entry (using as index the floor of the scaled r). Then we compare the scaled r to the entry's split value to decide which side of the bar we're on, and which symbol to emit. For example, r=.503 scales to 5.03;  entry [5] is D 5.91 H , and since 5.03 is less than 5.91, we select D. [0]  G  0.16  I [1]  C  1.44  H [2]  J  2.69  F [3]  A  3.77  E [4]  I  4.85  F [5]  D  5.91  H [6]  B  6.93  H [7]  H  7.96  E [8]  E  8.99  F [9]  F  9.50  F Table construction is not difficult but I'll leave that unexplained unless anyone wants to see it. Does this algorithm ring a bell? Thanks for any help, Bob H
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop
 

Who's Online

We have 41 guests online
Age of an elephant

Age is related to the elephant teeth. Teeth of the elephant is six left best.motorization4u.co.uk best.moto-used.co.uk reviews.elegant-auto.co.uk and six right-hand molars - but they do not grow simultaneously and successively. The front surface of the tooth, where clashes between crumbles, gradually fall off from it are small, thin plates and consequently the tooth decreases. Then in his place moves to the next tooth. The first three teeth of the elephant, the milk teeth. They consume in the first nine Christmas ornaments Used cars villas to buy years of age. The fourth tooth has used the elephant to complete the 20 - Up 25 years. Sixth tooth - the last, which is the size of bricks appear in the age of 45 years and his job is to serve the elephant for 20 years. Then the elephant becomes toothless. Due to the large (approximately 150 kg) required a daily ration of food, this situation does not end well - elephant dies quickly, since it is able to provide the body enough food.

What is a perfect number?

Prime number is called the integer which is equal to the sum of all blog.moto-hobby.co.uk mercedescarsite.co.uk Lighthouse Tower smaller than itself. In antiquity, formerly known 6,28,496,8128 four such numbers. Another fifth of the number 33550336 was a great German mathematician Regiomontanus. Another German mathematician, was the sixth and seventh perfect number. Euler had found eighth prime number. With the mathematical machinery found another perfect number. So far, 39 were found excellent numbers.

Water-powered mobile phones on the market in 2010

Samsung Electro-Mechanics has developed a battery powered water into the cells. According to Apartment For Rent In Motor City Al Nakheel automobile.excellent-car.co.uk what we read on the Samsung, when incorporated into the cell, metal and water in the phone react, formed hydrogen. Gas flows into the cell, where he reacts with oxygen. New this so that other hydrogen cells need methanol to produce a Samsung device, only water. One micro-cell can produce three watts of power and as the Samsung is able to power the phone for carfinanceaddicted.co.uk reviews.excellent-car.co.uk used cars 10 hours non-stop conversation. This with an average of four hours per day talks, hydrogen cartridge would have to be replaced every five days. Samsung engineers from laboratories are confident that they could simplify the procedure, reducing load the phone for occasional topping up the water. The first device on the market may already be there for two years.


Ceramika
Ceramika
stron
stron, strona
kredyt bez BIK
kredyt bez BIK
organizacja konferencji
organizacja konferencji
biustonosze dla mam
biustonosze dla mam