All posts by Adrian

Pumping Lemma

Way way off the beaten path here, but this is the best example of usage of the pumping lemma I've seen. Just need somewhere to put it... The below is taken from here. Theorem: Let L be a regular language, and w be a string. Then there exists a constant c s.t. \forall w \in L, |w| \geq c. We can break w into three strings, w=xyz, s.t.:
  • |y| > 0
  • |xy| \leq c
  • \forall k \geq 0, xy^{k}z \in L
Method to prove that a language L is not regular:
  • At first, we have to assume that L is regular.
  • So, the pumping lemma should hold for L.
  • Use the pumping lemma to obtain a contradiction:
  • Select w s.t. |w| \geq c.
  • Select y s.t. |y| \geq 1.
  • Select x s.t. |xy| \leq c
  • Assign the remaining string to z.
  • Select k s.t. the resulting string is not in L.
  Problem: Prove that L=\{a^{i}b^{i} | i \geq 0\} is not regular. Solution:
  • At first, we assume that L is regular and n is the number of states.
  • Let w=a^{n}b^{n}. Thus |w|=2n\geq n.
  • By the pumping lemma, let w=xyz, where |xy| \leq n.
  • Let x=a^{p}y=a^{q}, and z=a^{r}b^{n}, where p+q+r=n, p \neq 0q \neq 0r \neq 0. Thusly |y| \neq 0.
  • Let k=2. Then xy^{2}z=a^{p}a^{2q}a^{r}b^{n}.
  • Number of a\text{'s}=(p+2q+r) = (p+q+r)+q=n+q.
  • Hence, xy^{2}z=a^{n+q}b^{n}. Since q\neq 0, xy^{2}z is not of the form a^{n}b^{n}!!!!!!!!!!!!!!!
  • Thus, xy^{2}z \notin L. Hence L is not regular.

Vectors

Unit 2 is "Vector algebra and statics". I opened this thinking "Ah yup. I know vectors. Easy". I see "dot product" and "cross product" explained in it, and considered how crazy-basic this unit must be. I saw arrows on force diagrams. Yup. Simple. This will be a non-unit. A breeze. Though it turns out... after getting a few pages in, I've not been asked to present vectors quite like this before, and these force diagrams look a lot different to the ones I remember somehow. Seems I do actually have to read this all carefully... I'm also used to using vectors in programming, so the fact that every vector I'm given is unnormalised also makes me feel dirty. Right, we'll see how this goes then... :/

Unit 1 COMPLETE!

My first unit is done! I managed to find time to complete the first assignment too. This is timely, as the course officially starts tomorrow.

This unit was interesting. Looking at the title "differential equations" I thought "Oh, okay, fine. I've done this before". Then opening up the book, I realised "Oh wait. I haven't quite done THIS before". That's when the fear crept in... how much of a learning curve would I be facing in this new unit?!

Forging through, I had to concede defeat on one or two examples, but I came out the other end confident about all the material I'd covered. Only now I've completed the assignment do I feed confident about my ability on the subject matter, but it's also one of those areas where I need to keep up the practise. 

All too often, it's the first unit that you return to at revision time and think "what IS all this?!". It's been hinted at that themes of second order differential equations reoccur throughout the module so I'm hoping I'll stay in practise. 

So I'll give the assignment a final proof-read and then submit it tomorrow on the first official day of the module. Good start.

Mechanics

After taking a much needed break from study for a year, today is the day I start my next module! Mathematics methods, models and modelling (which essentially amounts to "Mechanics").

Over the past year, I've been trying to keep my brain moderately agile by reading up on automata theory, which in some respects is a continuation of group theory from my previous Pure Mathematics module. If I ever have time, I'll write some findings up here about it. Though given I haven't even found time to write up my results of my Analysis work from my last module, this may too fall by the wayside!

Though despite the fact that my brain hasn't been entirely switched off over the past year, I'm still a bit nervous about starting this new module given that I haven't looked at calculus in such a long time. Here's hoping it all comes flooding back!

It seems that in this module there's yet another type of mathematics software that's been introduced. This one is called Maxima. It appears to perform the same role as Mathematica or Maple. Though it's another type of software, it shouldn't take too long to become familiar with it. 

First section is on first and second-order differential equations, and the first assignment appears to contain a merciful count of three questions. Time to dive in!

WebGL Test!

Under the assumption that this may be useful at some point, I spent a while hunting online for the best way to get WebGL running in WordPress.

Your browser does not support the canvas tag. This is a static example of what would be seen.

After reading lots of articles, blog posts, stackoverflow posts and doing my own editing, I ended up with the code below!

First, upload three.js to your /js directory on your webserver. Then paste all the code below into a blog post as HTML.

<canvas id="canvas" width="550" height="375">Your browser does not support the canvas tag. This is a static example of what would be seen.</canvas>

<script src="js/three.js"></script>

<script type="text/javascript">
   var canvas = document.getElementById('canvas');    
    
   var renderer = new THREE.WebGLRenderer({canvas: canvas});
   canvas.width  = canvas.clientWidth;
   canvas.height = canvas.clientHeight;

   renderer.setViewport(0, 0, canvas.clientWidth, canvas.clientHeight);
	
   var scene = new THREE.Scene();
      
   var camera = new THREE.PerspectiveCamera(75, canvas.clientWidth/canvas.clientHeight, 0.1, 1000);
   camera.position.z = 3;
   var geometry = new THREE.BoxGeometry(1, 1, 1);
     
   var material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
   var cube = new THREE.Mesh(geometry, material);
   scene.add(cube);
    
   function animate() {
      requestAnimationFrame( animate );
      cube.rotation.x += 0.01;
      cube.rotation.y += 0.01;
      renderer.render(scene, camera);
   };
   animate();

</script>

Last Assignment Submitted

In just over a month and a week I've submitted two 20+ page assignments. I'm exhausted.

The last section on Real Analysis was incredibly challenging. I was so short on time I realised I would've have enough time to type up the assignment for it in LaTeX, so I re-wrote all my answers neatly on paper just like the old days. In fact, I was SO tight on time, even after all this, I almost didn't make the submission. Never been so close to missing a deadline.

But overall, that whole month was incredibly stressful. I'm not sure how to avoid that kind of stress in future other than making sure I'm way ahead of the deadlines for the whole academic year. -and that's incredibly hard to do for a double-credit module like this one if you're working full-time. Yeah, that was unpleasant.

 

Anyway. Luckily, after all that, I had booked two weeks off for Easter. This meant my final assignment wouldn't be so much of a rush. The final assignment consisted of questions on everything from the entire academic year. There was no new material to learn for it, hence the two week deadline. Though if I hadn't taken this holiday, I don't think I would have been able to find the time to complete this last assignment. There was still a very large amount of work to do.

However... today I have submitted this last assignment too. That's it. All seven assignments complete. Material learnt. Course done.

All that's left is six weeks of revision, which will include a revision weekend off at the Open University campus in Milton Keynes. A rare chance to sit amongst fellow maths students. Although it very much isn't a break, I'll be treating it like one as I get to escape from London for a couple of days.

In fact, on the Friday I drive up I'll be stopping off at Bletchley Park! Expect photos in a few weeks...

In the mean time, I'm going to make an attempt to relax a little in my final week of vacation before going back to work and starting my revision period. Let's see if I can get my mind refreshed before the final push...

The Last Group Theory Feedback

My fifth assignment has been returned! And with it, the usual amount of feedback!

In this assignment, I failed to realise that a subgroup is normal if it is a union of conjugacy classes. So rather than form subgroups and state they were a union of conjugacy classes, I went through the process of proving each group was a sub group.  Too long-winded, and frankly a waste of time. (for reference, this refers to Theorem 3.5 on properties of subgroups, p.74 in the handbook for M208).

There was another question where I had to show that a particular group had no subgroup of order 4. I took this rather literally, and found the only 4 possible combinations of elements that could be a subgroup of order 4, and then individually proved each one did not qualify either as a subgroup or as normal.  Again, although I received full marks for this as it was correct, it was long-winded. It seems that all I needed to notice that a group of order 4 is either a typical cyclic group of order 4 ( C_{4} ), or a Klein group ( K_{4} ). A property of C_{4} is that it contains an element of order 4. But the question says the group has no subgroup of order 4! Therefore, my possible subgroups must be isomorphic to K_{4}. Property of K_{4}: it contains three elements of order 2. This cuts the number of possibilities in half. Amazing how mindful you have to be of the properties of everything...

When having to write down subgroups of a matrix group I thought I'd written two different subgroups, but they were actually the same. One of the entries in one subgroup was p-\frac{1}{p}, and the other was \frac{1}{p}-p. Now, these ARE both different. But they don't constitute as different general entries in my matrix, because they are both in \mathbb{R}-\{0\}. The correct answer had the second matrix with an entry that read 2\left(p-\frac{1}{p}\right), which of course has a different domain: 2\mathbb{R}-\{0\}, so it forms a different sub group. My brain had clearly just seen two different formulas and had gone "there we go, they're different!". Not so. Domains for subgroups must be checked!

This is incredibly easy to forget: When trying to prove something is not true, don't leave it at the generalised proof that it's not true. If it's not true, provide a specific counter-example. With numbers! Remember those? The things that you count with that aren't letters? Duh! Yes, so I know to be vigilant now...

I had some trouble explaining a mapping of complex numbers in English. This is problematic. I could've programmed it and shown you the mapping and in an instant you would've thought "ah yeah!". But with lengthy explanations about how we get to the point where the real part gets mapped to the inverse of the imaginary etc etc... things can get a bit muddled. It seems I need to resort to explaining things mathematically more often, using the facts I already have.

I need to do more reading on the Isomorphism Theorem (specifically with regard to the domain of the Image that the quotient group is isomorphic to). Wow, that was a bit wordy... Ultimately I need to be more mindful about domains of Images...

So that's it! Again, happy with my high mark, but lots to remain mindful of...

Group Theory Returns (with the Triforce)

I've just finished the first draft of my second Group Theory assignment. I am exhausted. I think of all my assignments, this is my most logic-dense. Just proof-reading the damn thing is causing brain burn. Though doing this kind of thing when you're tired never works, so I'll look at it over lunch tomorrow.

Some of the more complex concepts are so abstract and don't follow intuitively. Some do, but others don't. It's been fun, but I'm glad I don't have to dive any deeper into Group Theory right now.

What made this weekend's work more difficult was the recent release of Nintendo's Zelda: Breath of the Wild. Trying to concentrate on my study knowing that game was underneath my tv was tricky. What was particularly unfair was turning the page in my coursework to see they'd set a question about the Triforce.

UNFAIR. THANKS A LOT MATHEMATICS.

(also, #maybeTooMuchZelda)