Saturday, December 8, 2012

A Riddle part two

I've had some time to formalise the notes a little more nicely - I think they look a lot better and are easier to understand if they're latexed.


Wednesday, December 5, 2012

A Riddle

So for my slog problem, what I really want to do is talk about the relationship between context-free grammars, context-sensitive grammars, and regular expressions, but I have a lot of notes for those and I don't know if I'll have time to type up those notes.

In the absence of that, here's something a friend and I were discussing...

Consider a plane consisting of 100 seats. Unfortunately, the airline company which is probably American Airlines has managed to botch up all the boarding passes, so nobody who boards the plane has anything printed under the 'seat' field on their boarding pass. If they don't know their seat number, they have been instructed to select at random. Luckily, most people recall their original seat number, and everybody on the plane is extremely non-confrontational (maybe they're Canadian): if they approach their seat and find someone already sitting in it, they won't make a fuss, they merely select another seat at random.

If the first person who boards the plane is the only one who forgets where he's sitting, and therefore picks a seat at random, what is the probability that the last passenger to board will be sitting in his originally-assigned seat?


Tuesday, December 4, 2012

So I haven't updated this in a while...

...or have I???

What actually happened is my computer died so I've been hiding out in the CDF labs more and more often until Boxing Day rolls around and I can maybe buy a new computer a little more cheaply. (Ah, the joys of being flat broke.) In other news, I really really love the CDF labs.

So I've backdated the posts that I had written up and saved in blogger until such time that I got a moment to properly format and publish them.

Sunday, December 2, 2012

I love Latex

No, really. I really, really love Latex. As in it's a little bit pathetic how sad I got when I found out I couldn't use it for one of my essays in another class because they are jerks insisted on Times New Roman.

(In retrospect I think you can actually finagle Latex into showing a Times New Roman like font face but at that point, what's the use, it already looks like something from Word. Luckily Cog Sci doesn't seem to mind if I don't use Times as long as my citations are still okay. Come to think of it I really should be working on Cog Sci at the moment...)

But that's not why I love Latex. No, I love Latex because of how amazingly easy it can be to create mathematical formulae and things, and it even has IPA symbols for geeky wannabe linguists like me, which is just so awesome, and and and and then, when we started automata, I found a site that helped me make this for assignment 3:

which just looks so pretty.

Here's some code!

First you have to add the tikz package and tell Latex what you want from it:














And then, you can just go to town:

























You can also make the arrows dashed and dotted and such (although I didn't). All you need to do is change the [->] bit to [->, dashed] or dotted, as you like. Double-headed arrows with [->>].

(In all fairness, Latex has its shortcomings - in that it compiles really strangely and hitting make sometimes requires you to make several times over because Bibtex isn't complying or things like that. But I can't even imagine how painstaking it would be to overthrow all of Tex live to make the underlying code neater, so I'll happily forgive others for not doing it either. Also unlike Microsoft Word it's free. Freeeeeeee.)