Saturday, October 6, 2007

15-251 Great Theoretical Ideas in Computer Science Problem Set 1

1. Suppose you were only allowed to shower once a day. When would you do it? Why?

2. Write an algorithm that inputs a sequence of random numbers and outputs a Wesley Willis song.

4 comments:

Hobbes said...

If i had to shower once a day, not saying I do, but if i did, i would shower at night. a clean night's sleep is most important for the single male because waking up refreshed and able to attack the world is a big part of any working man's life. also if you bring a girl (or guy) home the last thing you want is to have a bedroom that reeks because your bed is filthy from you sleeping in it without showering. showering before bed will also increase the lifespan of your bedsheets and your mattress because fewer washes would be necessary and less filth from your own shedding would get into the actual mattress. so by all means, shower before bed as long as you're single. if you have to share your bed every night then its a totally different story. not totally different... just tweaked a bit i guess.

as for number two: math sucks. but wesley willis does not. therefore the two are utterly incompatible and the whole conflagration must be a trick question ergo i am your boss quid fresh pro duce. the end.

Hobbes said...

and on top of that you have to consider the time savings in the morning for the man who showers at night! he's able to get up and go while the morning showerer gets nothing but the "benefit" of a refreshing shower. i say "benefit" in quotes because even if he did shower he is still likely not going to feel awake till his morning cigarette or cup of coffee, just like the evening showerer, so the "benefit" of "waking up" in the "morning" by using a "shower" is misleading and wrong in too many cases to ignore.

Jieren Chen said...

I dunno. I always see it like this: showering is so you don't smell like ass when you're interacting with people all day. So showering in the morning would do the most for not smelling like ass. Although this could be irrelevant if you don't sweat a huge deal since you're not going to be acquiring too much extra smell during the night.

But I sort of just like feeling clean during the day. I also like the feeling of being clean while I sleep. So I sort of just cheat the system and shower twice. Don't ask me to pick which one I like better. I hate you.

Jieren Chen said...

For number two (using a bastard hybrid of cpp and java because I know neither syntax very well):

int main()
{
int randoms[20]
for (i = 0; i<20; i++)
{
randoms[i] = math.random()
}
cout<< wwillis (randoms[20]

return 0
}

string wwillis (int aynrand[20])
{
ROACJAHFAIK AND OARORRLRR AJMECDOANAOFJAEOFNDA

afadsjfioajweoijaweoifjawef

dafjioajioretaewtuaweiohfa
f
afaefioerauithera
fawe
faewiorioretuioeatjrtjkarejtatjwaeta
wetjk


return wwillis (aynrand[20])
}