we have discussed this problem before pls check the archives On Sun, Sep 12, 2010 at 7:37 AM, sourav <[email protected]> wrote:
> You are given a random no. generator function rand04() that generates > random numbers between 0 and 4 (i.e., 0,1,2,3,4) with equal > probability. You have to design a random no. generator function > rand07() that generates numbers between 0 to 7 (0,1,2,3,4,5,6,7) using > rand04() such that rand07() generates all numbers between 0 to 7 with > equal probability. > > How will you do that? > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<algogeeks%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- yezhu malai vaasa venkataramana Govinda Govinda -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
