Re: need help on this problem.
- From: "Oliver Wong" <owong@xxxxxxxxxxxxxx>
- Date: Thu, 08 Dec 2005 17:46:22 GMT
"Ingo R. Homann" <ihomann_spam@xxxxxx> wrote in message
news:43985484$0$27903$9b4e6d93@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> > Suppose that you have a computer that has 64
>> processors. Write a program to compute Pi in java for that computer.
>> But run it on your computer.
>
> OK, now you can throw the pen yourself, or you can write a simulation that
> simulates how a pen is thrown. There is a x-coord and an angle a which are
> randomly distributed. From x and a you can calculate if the pen crosses
> one of the lines (*). By repeating this N times, you can approximate Pi.
>
> (*) I suppose, for calculating this simulation, you need Pi! ;-)
This last point is the part that confused me the most. I assumed that
you had to simulate throwing the pen, but for this simulation you need Pi,
but since you're trying to compute pi, presumably you don't know Pi yet!
It did not occur to me that perhaps the assignment was to throw the pen
in real life, and then write a computer program that kept track of how many
line-crosses you got, and approximate Pi that way.
I'm also not sure where the "64 processors" part comes into play, unless
this is actually an assignment on parallel programming.
- Oliver
.
- Follow-Ups:
- Re: need help on this problem.
- From: Ingo R. Homann
- Re: need help on this problem.
- References:
- need help on this problem.
- From: Edward . Huerta
- Re: need help on this problem.
- From: Ingo R. Homann
- need help on this problem.
- Prev by Date: Re: Simple code, but confusing answers
- Next by Date: Re: Simple code, but confusing answers
- Previous by thread: Re: need help on this problem.
- Next by thread: Re: need help on this problem.
- Index(es):
Relevant Pages
|