?

Log in

No account? Create an account
 
 
19 May 2004 @ 02:32 am
演劇部の疑問 ーーー 女と話す事!  
I stayed up hella late talking to a girl on AIM.
I also talked to alex.
Alex is not a girl, although he would make a fine husband for my stage manager kimi. they have the same last name just like me and my dream boat Kendel webster!
blah. tired. tired. this entry gets the seperoph icon even though I'm not pissed off. I need more new icons. I slowing running out of the ability to use the "shirt-day" icon. even though it is masterful! um. yeah. fuck fuck fuck fuck. soooo close. I don't care what happenes at this point. I feel like I have a lot to pursue. yeah!

the end.

ps give me more comments.
 
 
Current Mood: tiredtired
Current Music: パスコーンのファンの音です!!!
 
 
 
fusakofusako on May 19th, 2004 03:04 pm (UTC)
we MUST do hella video work this summer, or i will cry in the EMO style.
MegaManmegaman on May 20th, 2004 10:01 am (UTC)
import tio.*;
import java.util.*;

class Birthday60N {


public static void main(String[] args) {
Random random = initializePeople(args);
float numTrials = 0, trueTrials = 0;
int numSharing = 0, maxPeople = 0, seed = 0, numTrialsInt = 0 ;
boolean exit = false;
if (args.length == 4) {
seed = Integer.parseInt(args[0]);
numSharing = Integer.parseInt(args[1]);
maxPeople = Integer.parseInt(args[2]);
numTrials = Integer.parseInt(args[3]);
numTrialsInt = Integer.parseInt(args[3]);
}
else{
System.out.println("Inscrutible Error -2222B.");
System.out.println("program terminating.");
exit = true;
}

if(exit != true){

for (int i = 1; i <= numTrials; i++) //this runs the trials
{
trueTrials = trial(args, i) + trueTrials;
}
float result = trueTrials / numTrials;
System.out.println( "The estimated probability of " + numSharing + " people having the same birthday if ");
System.out.println(maxPeople + " are in the room is " + result + " after " + numTrialsInt + " trials." );
}
}


static int trial( String[] args, int iTrials )
{
int numSharing = Integer.parseInt(args[1]);
int maxPeople = Integer.parseInt(args[2]);
int numTrials = Integer.parseInt(args[3]);
int[] theYear = new int[365];
int seedEvolution = Integer.parseInt(args[0]) + iTrials;
Random random = initializePeopleB(seedEvolution); // this makes the trials different from each other but still rely on the seed.


for(int mp = 0; mp < maxPeople; mp++)
{
int oneGuy = random.nextInt(365);
theYear[oneGuy] = theYear[oneGuy] + 1;
// System.out.print("seed evo:" + seedEvolution); //debug step: view the seed used.
}

for(int i = 0; i < theYear.length; i++)
{
// System.out.print( theYear[i]); //debug step: view the number per "day" of the year.
if (theYear[i] >= numSharing)
{

// System.out.println("greater than numSharing!"); //debug step: easy refrence to see the result of a trial.
return 1;
}
}

for(int i = 0; i < theYear.length; i++)
{
// System.out.print( theYear[i]); //debug step
if (theYear[i] > 1)
{

}
}
// System.out.println("end of trial. fail."); //debug step: easy refrence to see the result of a trial.
return 0;
}


// This method initilizes a new random using the seed incramented in each trial.
static Random initializePeopleB(int seedEvolution) {
return new Random(seedEvolution);
}

// This method initilizes the random using the command line seed.
static Random initializePeople(String[] args) {
if (args.length == 0) {
return new Random();
}
else {
return new Random(Integer.parseInt(args[0]));
}
}
}