Home
Cosmic Flame
10 April 2009 @ 06:56 pm
This has to be the geekiest, most beautiful expression of love ever. Unless you don't know maths :)

http://www.floodgap.com/hdnr/?10
 
 
Current Location: My flat
 
 
Cosmic Flame
07 October 2007 @ 09:45 pm
Well, it looks like my Digital Fountain Encoder is working! However, I have no easy way of testing that short of writing a Digital Fountain Decoder, which is a lot more difficult.

All the encoder has to do is select a random number of source packets from the file to be encoded, XOR them together and output them, along with enough meta-information to know which packets have been used.

The Decoder has to read each Drop and work out which source packets it's made of. Easy enough so far. In then has to store the Drop in a digraph (Source Packets:Drops) and wait until it has sufficient drops to retrieve a source packet.

Let's learn a nice bit of information theory, shall we?

Firstly, what is XOR? XOR stands for Exclusive Or. It's the type of OR that we use in everyday speach - "One OR the other BUT NOT both OR neither." The truth table for XOR is thus:

aba XOR b
000
011
101
110


XOR holds an interesting property: a XOR b XOR b == a
This holds true for any number of operations:
a XOR b XOR c XOR d = x
x XOR d XORc XOR b = a

Oh, and the numbers don't have to be XOR'd together in any particular order:
a XOR b XOR c XOR d = x
x XOR b XOR d XOR c = a

Any number is retrievable from the sum:
a XOR b XOR c XOR d = x
x XOR d XOR a XOR c = b

And that's precisely what it is - a sum. XOR has the same truth table as modulus 2 addition.

Here's the XOR'ing of two binary numbers:
000111000111
XOR
101010101010
------------------- =
101101101101


That's basically what the encoder does - it takes binary data from the file in several places and XORs it together.

The decoder needs to keep track of which source packets are contained in each drop and wait for situations such as the following:

Source Packets = {a,b,c,d,e,f,g}
XOR = X

Drop 1 = aXbXcXd
Drop 2 = bXcXdXeXfXg
Drop 3 = eXfXg
Drop 4 = eXg

We can only do a couple of operations here:
Drop 4 X Drop 3 => f
Drop 3 X Drop 2 => bXcXd = k
k X Drop 1 => a
f X Drop 2 => bXcXdXg

This doesn't decode the file, as we don't have enough drops. However, we have managed to decode 2 source packets and simlify our remaining drops.


If you have managed to follow me through this entry, give yourself a pat on the back and 3 gold stars.

Oh, and on a related note? Today I learnt how to do random file access in Java! (That's reading from any given point within a file without having to read all the data up to that point) It's with the RandomAccessFile class, believe it or not.... ¬_¬
 
 
Current Location: Kingswood II
I'm Feeling: mathmatical
 
 
Cosmic Flame
03 July 2006 @ 11:55 pm
In case anyone is interested, my first year results are:

Course Code Course Title What I call it Mark (%)
CS1111 Logical Foundations For Computer Science And Artificial Intelligence Logic 84
CS1211 Introduction To Programming And Professional Issues Java 87
CS1320 Computer Engineering I Engineering 95
CS1511 Web And Internet Technologies Web 76
CS1710 Theory Of Computer Languages And Infinite Structures Maths 94


To make up for my poor mark in Web, I thought that I'd better practise some HTML, hence the table ;)


Goodnight.
 
 
Current Location: My room
I'm Feeling: pleased
I've Been Listening To: None
 
 
Cosmic Flame
So today I'm feeling a little better. I had a nice night last night, and today my first lecture was canceled by pre-arrangement. So I got an extra hour at home, which I'm told involved sleep. but to be honest, I hardly remember it...

My sore throat is mostly gone, and all that really remains is the snifflyness. I'm going to see if I can pick up some Karvol in town for that. Also, it'll make my room smell just soooo nice :)

In a few minutes I'm going into town to do my shopping (food). There isn't really that much to get, so I'm going to get randomy stuff as opposed to stuff for proper meals. This is good. I next have to go shopping on Saturday, and I'm probably not going to need to get much. I'm going to get next weet of the bank today, so on Saturday I can listen to Rick's Place in the morning, then shop in the afternoon. (Dude - we should soooo e-mail him to ask about the hand puppet and wind-up toy dinosaur on the Tales Tour...) Should be fun!

Tonight I'm going to work on my CS1111 coursework - Mathsy stuff - while listening to music that I should have listened to more, or something like that... Also, at some point, I'm going to take a look at Nick's Tascam 4-track tape studio that he's brought to Uni. Nick is the other guy I know who plays Tibia, and he's not so good wih technology ^^. I'm going to figure out how to use his studio (actually, I'll probably check out the Tascam website as they have all the manuals there in PDF) and teach him. I <3 technology.

Well then, I've finished dinner (eaten while typing - I am sooo good :)) so I guess that means it's shopping time. To Iceland and Tescos, then!

Brian :)
 
 
I'm Feeling: determined
I've Been Listening To: None yet....
 
 
Cosmic Flame
15 November 2005 @ 12:21 am
Woo! What a day it's been...

I got to bed kinda earlyish last night....2:40. Am. I know, that's actually late, but it seemed early at the time. I woke up today feeling refreshed and full of energy, and I had a good shot at being actually awake in lectures. This is a good thing. I saw Amy right before my first lecture, which is always a good thing. She slept round a friend's house last night, so I didn't see her much... Her first lecture on a Monday is in ALT1, which is where my first lecture is also. Hers is at 9:00, mine at 10:00. So that was a good start.

All my friends showed up, and we were all happy and bouncy. Well....I was. We then had a tutorial in which we did Maths! Of the logic-algebra kind. FUN FUN FUN!!! I miss maths :(

Then at dinner time, Viv and Nick, my two German friends from Historical Reenactment and Anime & Manga showed up. Because I had three books of Love Hina for Viv to borrow. Then Seb, one of my CS friends, showed up too. He lives in the same hall as Viv and Nick, so they're all friends. They then walked me to my next lecture, which was really sweet of them :D

The next lecture, Computer Engineering, Rocked. I reiterate, it ROCKED. I <3 Assembly Language. So simple, so sweet. A nice easy example - put five lines of Assembly code into the right order to make a program that does what we want it to do. Done in about two minutes. We were given eight minutes. And then to add insult to injury, Hugh, the lecturer, set it as homework, to be handed in next time. I went and gave him my one straight away, and he said it was perfect (naturally!). Only one other person handed it in then.... :)

Then another lecture with Jackie, a continuation of my first lecture of the day. It was a bit....confusing? Yes. Not well handled at all, really. Me and Seb had a chat to Jackie after the lecture, and she listened to what we had to say, which hopefully is quite promising.

Then, to the Tolansky lab for the Jackie-course lab session. I got on with my coursework, and made quite a nice start on it. Just have to right the XHTML part of it, including an XSL stylesheet.... :/ I also have to do the next bit of Java coursework.....! Life can be tough, eh?

And then - Absolute Harmony! The acapella choir who I sing with. Just the boys at 5->6ish, then all of us until 8. I left at 7:35 ish so I could get the bus, which I skillfully caught.

Then home! And book 3 of A.I Love You, a manga by Ken Akamatsu, the guy who did Love Hina. <3. Part of some stuff I ordered online, it arrived on Saturday. Problem - we can't check our post at the weekends :/ Ah well, I've got it now :D <3

Then Amy got home and we watched the last three episodes of Eva. ~No Spoilers~ )

And now she's gone - to bed, poor, sleepy Amy - and I'm updating my LJ.

I'm going to go and wash up now, and then go to bed myself. I might have a bit of food first, though, as Pocky doesn't really fill you up very well...

Until next time,

Goodnight.
 
 
I'm Feeling: satisfied
I've Been Listening To: None :(
 
 
Cosmic Flame
19 August 2005 @ 02:34 am
I'll get to the point. The results were not what I was hoping for, nor were they what I needed to get into my top choice university - The University of Cambridge, No. 1 in the UK for Computer Science, and something like No. 3 or 4 in the world. I needed A's in Maths, Physics and Chemistry, but I got A's in Maths and Physics yet only a B in Chemistry. I then had to wait ages, like all afternoon, to hear back from them about whether they'd take me anyway, which turned out to be a no. Sucks to be me.

On the slightly plus side, I'm now going to Royal Holloway, University of London, which is actually outside London, in a little town called Egham, but possibly not spelt like that....-.- One plus side is that I'll get the London Student Loan, yet not be paying London prices - think, more money. It's a nice place, and it's a good university, but - darnit - it's not where I had my heart set on going to. There'll be less pressure at RH, and I'll only have to take Computer Science, not the like the Cambridge first year - 50% CompSci, 25% Maths, 25% A Natural Science (Physics, if I'd have got in...). I mean, yeah, I'll do some maths at RH, but it won't really be quite the same. Also, to get there I'll have to go through London, which I'm not really looking forward to... On the plus side of things, the Cambs reading list is no longer important. That means free time to work on my guitar skills and to play Tibia...



Even so....I think I'd rather have taken the pressure and be living in the city where Claire works than be down south, hours away from her and home.... Also, I'm not guaranteed to get Uni accomodation :/ I really hope that they find me a room in a no-smokers hall of residence, as I really don't want to be living off-campus, or worse, as a lodger...

I'm going to bed. There are tonnes and tons of little flies up near my ceiling near the light, and I don't know where they all came from, but I suspect that when mum opened my back window, they all blew in....darn the outside world. Darn the sheer lack of justice in the world. Darn the flies. Darn the large amount of people getting really good grades and getting in, preventing the people who only just missed to get in. Darn it all.

Goodnight, and thanks for all the good luck you sent me....at least I got really good marks in maths and physics, shame that I was never much good at Chemistry. A middle B was a miracle...I told them at the interview I wasn't sure if I could get an A....


Goodnight .
 
 
I'm Feeling: depressed
I've Been Listening To: Stuff earlier....Beatles? I played along.