Entries Tagged 'College' ↓

Life Update

So, I am now trying to while away time in this totally freaking awesome thanksgiving break when its just too hard to find vegetarian food (I don’t know why people are hell bent on making life difficult for vegetarians, aren’t plants easier to grow than animals?), or people in this dorm. Well, here is a life update — I have managed to get into the A slot (not the A+ though :( ). I applied to an REU and got rejected after which I decided to wait it out and apply for an REU in spring, it sure would be nice to take grad school admissions head on (considering I am still a lazy freshman, I should probably keep that enthusiasm for later).

I’ve managed to make life difficult for TAs by conveniently neglecting to read the homework description. This discrete math class I was in had an assignment on modular arithmetic and it contained the brilliant RSA…… I like this great dude submitted a program and the output to the TA who then told me that I had made life infinitely more difficult for him and that I should have used a pen and paper like everyone else (I hate pensĀ / papers / pencils, I can’t understand what I write myself). Here is the worst RSA implementation in the world: http://shriphani.com/RSA/rsa.html.

Then I applied for an REU and got turned down thanks to the fact that it was just my first semester… anyway, I just hope I manage an A in CS etc…..

Got to get back to finishing a GUI programming assignment, ascend the PE ratings and finish watching 30 rock season two. It is just weird, it is snowing outside and I’ve got a fan running at full blast in my room thanks to our hyperactive heater.

Je Suis Excentrique

As I sit here sipping my 10th cup of coffee ( a clear indication that my coffee drinking habits border on “poisoning” ), I whip up the last remaining lines of code for a Problem on project euler. I can’t help but wonder that my blogging, project euler problem solving frequency has dipped way too low. I also can’t answer why. Maybe it is because life is not treating me too well. Let us now imagine what conjuctivitis + fever feel like on the eve of an exam….. considering that I am weird (everyone tells me I am eccentric and weird… so many people can’t be wrong), I decide to go sit through the exam just because I want to be done with it.

So here is a list of my characteristics:

1. Nocturnal: (Ever since school, I realized that I could get anything done in the night. Hence, I have made it a point to occupy the Lawson CS Building at night for reading / homework etc., it is really quiet and lets me make awesome progress in w/e I want to do). The downsides are that I sleep in the morning, something that doesn’t fly too well with my Tuesday and Thursday Math recitations and leads other people to just assume that I am weird

2. Caffeine: Needless to say, I consume a lot of this substance and believe that it is God’s gift to mankind.

3. Bashing Most Non-*nix based OSes: Lots of targets, doesn’t get you a great reputation.

4. Theory fanboyism - I really love TCS. That is not a view most budding computer scientists seem to share….

5. Low levels of personal hygiene (however, dental, hands and other such departments are taken good care of).

So, I am weird.

Anyway, wikipedia says that eccentric dudes are pretty intelligent (usually) and that is some consolation.

Suffix Trees

Since I was quite bored this week (thanks to an October break I spent entirely in my room) and a homework assignment that quite seriously sucked balls, I decided to read something about strings and read about Suffix trees and decided to whip up an algorithm that would create a neat suffix tree by walking over a string and failed incredibly to get it to split at the right positions. Which means that while the suffix tree for “mississippi” is:

       |(1:mississippi)|leaf
tree:|
      |     |       |(6:ssippi)|leaf
      |     |(3:ssi)|
      |     |       |(9:ppi)|leaf
      |(2:i)|
      |     |(9:ppi)|leaf
      |
      |     |      |(6:ssippi)|leaf
      |     |(4:si)|
      |     |      |(9:ppi)|leaf
      |(3:s)|
      |     |     |(6:ssippi)|leaf
      |     |(5:i)|
      |     |     |(9:ppi)|leaf
      |
      |     |(10:pi)|leaf
      |(9:p)|
      |     |(11:i)|leaf

all I can get is a single level tree and I have no motivation whatsoever to get it to work correctly considering that we are covering computational complexity theory and that kenneth rosen makes it so hard for mankind to put his book down. By the way, here is my partial (decent word for “wrong”) suffix tree generator:

#!/usr/bin/env python
#Author: Shriphani Palakodety
#Mail: shriphani@shriphani.com
import sys
tree = {}

#Algorithm:
#Move through the string and pick characters and make splits where appropriate.

def parseString(stringName):
    stringName = stringName.lower() #Make it all bloody lowercase
    for i in xrange(len(stringName)):
        if tree.has_key(stringName[i]):
            appendChar(stringName[i],[stringName[i+1:]]) #Add a new branch if this character didn’t exist previously
        else:
            tree[stringName[i]]=[stringName[i+1:]]
    return tree

def appendChar(char, stringName):
    ‘Add a new branch to a tree’
    tree[char].append( stringName[0])

if __name__ == "__main__":
    stringName = sys.argv[1]
    print parseString(stringName)

And this is what I get for a bunch of strings:

shriphani@linux-s359:~/scripts/Strings> python suffix.py mississippi
{'i': ['ssissippi', 'ssippi', 'ppi', ''], 'p': ['pi', 'i'], 's': ['sissippi', 'issippi', 'sippi', 'ippi'], 'm': ['ississippi']}

shriphani@linux-s359:~/scripts/Strings> python suffix.py shriphani
{'a': ['ni'], 'i': ['phani', ''], 'h': ['riphani', 'ani'], 'n': ['i'], 'p': ['hani'], 's': ['hriphani'], 'r': ['iphani']}

shriphani@linux-s359:~/scripts/Strings> python suffix.py palakodety
{'a': ['lakodety', 'kodety'], 'e': ['ty'], 'd': ['ety'], 'k': ['odety'], 'l': ['akodety'], 'o': ['dety'], 'p': ['alakodety'], 't': ['y'], 'y': ['']}

shriphani@linux-s359:~/scripts/Strings> python suffix.py scrappycoco
{'a': ['ppycoco'], 'c': ['rappycoco', 'oco', 'o'], 'o': ['co', ''], 'p': ['pycoco', 'ycoco'], 's': ['crappycoco'], 'r': ['appycoco'], 'y': ['coco']}

Bingo.

Anyway, I was listening to a bunch of Erik Demaine lectures courtesy OCW (and I am extremely jealous of Demaine, he got his BS at age 14 !) and I sort of wondered when he mentioned that the Big O didn’t work when we had a chain of functions such as n2 = O(n3) = O(n4) but this doesn’t carry on indefinitely.

I couldn’t help wondering:
big-o-vs-small-o

So n = o(n2) and then I am left wondering, but I wrote n = O(n2);c=1, n0=1 and here I am stating that I have n is << n^2 so it is no longer an asymptotic upper bound…. So my question is, am I getting everything wrong here?

Leaving all that aside, I am setting new records for low personal hygiene standards (although I am quite careful about dental, hand and the rectal departments)… college life rocks….

Huge Anagram List

It is my first time in a large laboratory and I am loving the silence (although I don’t know how silent this place will be next week and I am also quite apprehensive about letting other majors roam about Computer Scientist territory) Ahem, I am in the Lawson CS Building, in an air conditioned Linux Lab where all the machines run Gentoo and after having created my home account, the first thing I did was get all my scripts (the ones I’ve got on this blog) over to my account. Then, I ran a very huge file full of words through my anagram detector and the results were astonishing, a record 1.93 seconds to parse over 10000 words and pick anagrams. Okay, that isn’t too fast but still, I love sitting amidst these machines and it gives me an exhilarating feeling like I am the owner of this place or something like that.

At purdue, I haven’t really done any memorable stuff aside from the fact that I met Daniel Tang in the same lab as I am now yesterday and I thoroughly enjoyed the two hours I spent talking to him.

You can view all the words I ran through my anagram generator at: http://www.speech.cs.cmu.edu/sphinx/models/hub4opensrc_jan2002/language_model.vocabulary

And I’ve uploaded the file containing the anagrams here.

Besides that, here are the courses I have taken:

CS 180 (Intro to java seemingly)

CS 191 (Foundations of Computing)

CS 182 (Turns out that 180 is a prerequisite to 182 but since I am super-smart…)

MATH 162 (A non-honors Calc 2 cuz the honors class doesn’t really operate in comfortable timings)

Psychology 120 (An intro psychology course. you know that Alonzo church attributed his invention, lambda calculus to his background in philosophy and how it helped him literally make a career out of mastering foundation theory which so many have failed at. This is not to say that I am anywhere as smart as Church but I still plan to be like him).

So, that makes 16 credits. Turns out that there are conflicting views about this foreign language thingy and I plan to test outta that soon (others think I shouldn’t). Anyway,this was my first post from Purdue University, West Lafayette, home of RCS, DTella, Debian and Shriphani Palakodety.

Oh and yes, my name is pronounced: Shree Funny(shriphani) Pala Code ate EEE(palakodety)

And now I am going to gloat over this empire of a lab that in completely in my control.