Newest Older 
Sign the Guestbook

2005-04-27 - 10:58 PM

Almost in the clear, at least as far as this week is concerned.
Spent from 11:00 AM to 5:00 AM Monday to Tuesday morning, coding. Long past when it was time to stop, I wasn't done, and afraid I wouldn't be able to start again. I didn't end up starting the 8-queens problem until around 11:00 PM, but it wasn't until about 3:00 in the morning that I had figured out how to write the algorithm.
I'll describe this so the non-geeky could understand. Basically, take out a chessboard. Place 8 peices on the board, pretend each of them is a queen. Now, arrange them on the board so that none of them can make a queen-type move which would kill another queen. So none of them can be in the same row, column, or diagonal from eachother.
Incidentally, there are about 21 trillion (50! / 43!) different ways to put those peices on that board.
If you want to be slightly more intelligent about it, none of them can be in the same row and column as eachother. Put a queen anywhere in the first column. There are now 7 places in the second column where you can put a queen, and 6 places in the third column, etc.
So we only have to examine 40320 (8!) possibilities.
Now, imagine an 8 digit number that represents 1 of those possibilities. (24681357) means the queen in column 1 is in row 2, the queen in column 2 is in row 4, etc. There are 40,320 of these.
I spent 3 hours trying to figure out how to write just the part of the program that generated all possible 8 digit numbers where each digit was 1-8 and no two digits were unique. It took 2 hours and 45 minutes of thinking and failing, and then when I hit it, about 15 minutes of actual thinking.
At some point, 3:15 in the morning or so, I ran into Andrew's room (He was working on Networking, which I'd finished at that point.)
"Andrew... ," I felt like my old roommate at that point, bursting into someone's room, exhausted, disoriented, impassioned with a recent enlightenment.
"One." I held out my hand and clutched an imaginary space in front of me to designate that space as 1, speaking the number solomnly.
"Two." I held out my right hand next to the right of the one space.
"One, Two." I squeezed each peice of air in succession. Then I raised my eyebrows conspiratorially and switched the two space to the other side of the one space.
"Two, One!"
Then, below my two and one space, I placed a "Three" at the beginning, in between, and at the end of both the 1 and 2 space, and then the 2 and 1 space, giving six solutions in all.
"Recursion..." I said.
He looked at me, nodded slowly, and clutched little peices of air in front of him, thinking.
"Yeah," he said, "Works."
I thanked him for confirmation that I wasn't completely mad... well, wasn't completely wrong. I had to be mad at that point, I was too exhausted to sleep at that point, too aware to be awake. Dancing death, riding a manic high of the power to create, success in which would yield the ultimate prize, a straight 5 hours of sleep.
I bolted back and was done with the networking layer AND the board checking logic in the next hour and a half. Right as I was finishing up, he came and sat down next to me, laptop in tow.
"Doesn't print..." He frowned. "Doesn't receive."
I pulled up my source code for that assignment. "You do this?" I pointed at some obscure lines in the depths of the system we had to change. He grunted, edited, compiled, and said thanks, returning to his room.
"Goodnight" I heard him say, closing the door to pass out.
Nikki walked into the front room, she'd woken up to go to work. Starbucks opens at 4:30, so she gets up at 4. She saw me and gave a small, worried smile. Like I've never seen one of those before. I hugged her, mostly 'cause I needed it.
"I'm tired" she said, stumbling into the living room. I gave her a challenging smirk, which she returned. Eventually she broke into a grin, as did I. We were both tired. She in the morning way, me in the unstable way.
She kissed me. "Finish up. Get some sleep..." and with that, she was off to work.
I fell onto the mattress at 5:15 or so, watched the clock tick until it read 5:48, and closed my eyes for a moment. When they opened, it was 10:58. I stumbled out of bed, took a wiz, ate some ramen, chugged some Bawlz, and watched an episode of Star Trek. Then I was out and off to class. The worst was over, fury had been unleashed, I was good to face the day.
-Alex

|

Slide back | Stumble forward
The end of all things. - 2005-05-21
It doesn't have to make sense. - 2005-05-12
Skin o' my teeth. - 2005-05-09
Limos and Mullets - 2005-05-05
Seeing the movie I've read a thousand times - 2005-05-02

It Has Begun Proudly an Elitist Snob
The Band Page 
The art of Slak Fu
Alexander
is a
Beef-Eating Magic Monkey


...with a Battle Rating of 8.4



To see if your Food-Eating Battle Monkey can
defeat Alexander, enter your name:

dland