Saturday, July 2, 2016

Mathematics

Post from 4 Mar, 2016:
I have been watching a mathematical history series on Netflix, called The Story of Maths with Oxford professor Marcus du Sauto as the presenter.
The second episode was eye opening - he alludes to Carl Frederick Gauss getting his inspiration from two prior non-western mathematicians - an Indian mathematician, Brahmagupta, and a Chinese mathematician, Qín Jiǔsháo 秦九韶. Brahmagupta was responsible for the first recorded solutions to quadratic equations, and Qín Jiǔsháo for the Chinese Remainder Theorem and Horner's Method to get roots of polynomials https://en.wikipedia.org/wiki/Horner's_method. By the way, the Wikipedia page on Qín Jiǔsháo really needs more material on him. Apparently, he was a corrupt scoundrel who liked to poison people and had to move around the country as a result. Interesting story there.
I'm really going to have to watch that episode again, I'm sure I'm missing some things.

https://www.youtube.com/watch?v=RGrmEWj38bs - Youtube video on Horner's method.

This is the book Qin Jiushao wrote: https://en.wikipedia.org/wiki/Mathematical_Treatise_in_Nine_Sections, which was in turn incorporated into an encyclopedia commisioned by a Ming dynasty emperor: https://en.wikipedia.org/wiki/Yongle_Encyclopedia


---------------

Post from 2 Mar, 2016:
Today I, between working on a charting function, got to play with the Monty Hall problem. This is a question of probability which is not obvious at all, and people get it wrong when just guessing.
Monty Hall was the game show host on Let's Make a Deal. The contestant would have three doors, one of which had an awesome prize. The contestant would pick a door, and Hall would pick another door that didn't have a prize to open. He'd ask the contestants whether they wanted to switch to the final door or stay with their guess. Apparently, switching always has a 66% probability of success and staying only a 33%. It's not at all obvious, and I couldn't believe what I was reading on Quora.com, so I made a simulator. Then I wrote another function to spam the cap out of the strategy tester, with millions of attempts. Nothing like finding out for yourself.


---------------

Post from 27 Feb, 2016:
Link shared: http://motherboard.vice.com/read/welcome-to-the-turkish-village-dedicated-to-maths

---------------

19 Sep, 2015: The Zipf Mystery (word frequency in language):
https://www.youtube.com/watch?v=fCn8zs912OE


---------------

1 Aug, 2015: When I took Linear Algebra, one of the hardest things to wrap my head around was the concept of basis. I found this really good explanation on this link under the header transformations:
Basically, if you imagine holding a coordinate system (like you have a set of 3 axis lines), and imagine an object projected by hologram inside it, I think those axises would be the basis for the space. Then, when you perform a transformation, you're really taking those axises and moving them around or rotating them - when you do that, it affects the hologram inside them.

http://www.codinglabs.net/article_world_view_projection_matrix.aspx
Still reading about OpenGL/3d math. Got an artist sketch pad to keep the most notes possible together, and have collected all matrices for all the transform types on the first page. Next up - projection transformation.

-----------------

24 Jul, 2015 Introduction to Quaternions: https://www.youtube.com/watch?v=mHVwd8gYLnI

I think that learning about these may explain the w term (4th term in matrices / vectors), which are somehow related to matrix rotations.

-----------------

23 Jul, 2015:
Found this: https://www.youtube.com/watch?v=LvLZfs2qxcE

So I'd been doing a bunch of reading earlier about the Fourier transform. I still haven't gotten the FFT down. The FFT (Fast Fourier Transform) is the fast version of the DFT (Discrete Fourier Transform). Apparently, you can use this algorithm to simulate ocean waves. Check out the video for a look (there's better results out there after different lighting operations are done). The algorithm which uses the FFT to simulate ocean waves is named after the guy who wrote a paper on it, Jerry Tessendorf (here it is):
http://graphics.ucsd.edu/courses/rendering/2005/jdewall/tessendorf.pdf
The results of this algorithm are awesome, and there are plenty of resources out on the web about different people using it.

Reason I'm looking at this is that I don't want to hand type a bunch of triangles into OpenGL - so I need a bit of logic / math to have the computer generate a list on its own. First thing for me to look at is terrain. Static terrain is boring. Ocean waves are a kind of dynamic terrain...so...

--------

20 Jul, 2015:
The talk tonight on HAAR Wavelets went very well. I spoke for about twenty minutes, took ten minutes of questions. The Odroid booted up fine and the LCD screen in the conference room worked perfectly with it, unlike my two at home. I got there about half an hour early to set up, drew an additional white board full of algorithm notes. I didn't have everything I wanted as far as Python code - had spent a lot of that time changing out computers and getting environments setup / actually took a good part of today configuring yet another image for the Odroid.

In the end, there were only three questions (two were not fully formed) which I felt I didn't have the knowledge to answer. They serve as good reference points for further reading. I think I gave them an extremely good overview of the HAAR wavelet / they probably all know exactly how to implement one now. I know a lot of times people are just being nice when they say that a talk was good, but quite a few thanked me and said that.

One interesting thing is that normally I don't do this well in talks - didn't practice the talk at all / have an exact outline for what I was going to say - but when I started putting out the algorithm implementation notes on the white board, I did that entirely from memory - no stopping to reference anything. Six months of preparation goes a long way.

I think I'll do more talks for the group in the future. I'm looking forward to Kyle Pointer's talk - he told me beforehand that he was probably going to do it on matrix math / Linear algebra. For future talks, I'm going to try harder to have more colors / running Python code.

--------

20 Jul, 2015 The US team wins worldwide Math Olympiad for the first time in 21 years: http://www.maa.org/news/us-team-takes-first-place-at-international-mathematical-Olympiad

--------

21 Jun, 2015:
So the clock is ticking - I have until July 20th to finish preparing my talk to Papers We Love, Saint Louis.

Last time, I was supposed to give the talk in April, but due to some miscommunication with the coordinator, had the talk delayed. Didn't sound very confident in my IMs and emails with him, so he didn't schedule it. This time, it's already set.

It's probably a good thing - last time I was getting on a serious tangent reading about Fourier instead of really digging into wavelets. I also didn't understand wavelets very well at all.

It'll be interesting to see how I handle this talk - I really shouldn't get too deep into the math, but it's a mathematical process / algorithm (so is Fourier). If I do a bunch of algebraic operations to show points, people may get lost quickly or bored. I can talk about the history, but the talk should really be more about what subjects it can be used with and what it relates to. My Comments:
http://www.e-reading.club/bookreader.php/141448/Wavelets_and_Their_Applications.pdf
http://uprt.vscht.cz/prochazka/ps/08ISCCSPa.pdf
And the last link, which I thought I'd lost when I logged out: http://feihu.eng.ua.edu/NSF_TUES/w7_1a.pdf This one has so far been my favorite.
I'm basically trying to use these as a way to generalize the process of looking through an image (can be used for any data source) and simplifying it as much as possible without losing anything important. It's used a lot for compression, but I think I see the ability to use it in real time as well. One thing I especially like about it is that when you output the data, you get many levels, at the top not very detailed, and at the bottom as detailed as it gets. So once the first step of getting those levels is done, you can have classification / sorting logic that can run a lot faster and step up and down through the levels - only when there's something there to look at / ignoring any large spaces with no detail or no changes.
Another really cool thing about wavelets is that it uses some of the same math that physicists use when studying quantum mechanics. I like having more universal methods. That's not to say I understand quantum mechanics at all - I don't. Just that it's neat that studying one thing could possibly lead to more understanding in another.


--------

18 Apr, 2015:
Oh my goodness, check out what I've found! The lady who came up with the concept of wavelet families. Here she is giving a talk, and it directly relates to performing wavelets on images! https://www.youtube.com/watch?v=Y_aPcoRKUz0

This woman is very accomplished - definitely deserves a read: https://en.wikipedia.org/wiki/Ingrid_Daubechies

The first bit she talks about with averaging is the concept behind HAAR wavelets - getting these is a very simple algorithm, just split all the pixel values into pairs, and average them. That gives you a new list of pixels. Do it again and get another one...and so on until you end up with just one value. All the lists you generate along the way are each a level of detail of the image.

The cool thing about wavelets is that they allow you to at first look at the image very briefly, and based on that, decide whether the very course information warrants a closer look. Because this process is very well defined as well as simple, it's easy to bake into programs.

--------

18 Apr, 2015:
So apparently, both the Heisenberg Uncertainty Principle and Nyquist Sampling arise from the math behind Fourier, which physicists use to measure energy at the atomic level, treating it like any other wave function. I still am not understanding all the math (I have forgotten/never completely mastered all the rules of integration), but it's certainly a very interesting study area. I've also moved on to studying wavelets, and the HAAR wavelet transform is very simple. However, there are many types of wavelet functions, so I have only just entered that.

--------

22 Mar, 2015:
So, I've been watching video after video on Fourier transforms, reading on it, and on imaginary numbers. I figured something kind of cool out.

So imaginary numbers are used to move in a circle by doing simple multiplication (they give an angle and distance when you combine an imaginary number and a real number). If you keep multiplying by i, you'll be moving around the axis clockwise.

I hate imaginary numbers with a passion. I don't like the name, I don't like the notation, and I don't like the idea of having an "imaginary" number. I see that you can do the same thing with cross products. If you take the cross product of x and y, that puts you out on z. Then z and x puts you out on y. Then y and z puts you out on x. So basically, cross product the newest vector with the one before it, and you'll keep moving around in the same way with no screwy concepts like imaginary numbers.

--------

21 Feb, 15:
This site has a lot of lego machines, some of which remind me of Babbage's machine (has mechanical calculator with carry functions).
http://www.nico71.fr/small-mechanical-loom/
This is actually my weakest area - even though I can visualize things in 3 dimensions very well, I have no experience with mechnical workshops / terms. I think given the automatic fourier analysis machine based on Michelson's device that I posted about earlier, I should look into this more. It might provide a new way for me to look at the process so I could simply program based on the mechanistic process, then take another look at the math algorithms. Most of the obstacles I've seen so far have been my lack of understanding of the math background, with its many disparate systems of notation and terms that require a lot of further study.

--------

16 Feb, 2015:
So once again - thinking about the Fourier transform and what I'm going to do to understand it. The reason I need it is that it reduces any signal to a much simpler pattern, which is easier to compute on / easier to match patterns with others.

I've been reading more about Fourier, as well as about complex numbers. One thing that I've noticed is that when you're reading about mathematical concepts, while doing Google searches, always include the word "intuition" in the search. That results in better explanations, especially if you are not up to speed on the math (having intuition on the subject will help you get there).

So this is where I am: I've learned that the complex number 'i' basically involves telling you about rotations. It can have four values. If you are using it to describe information in a sinusoidal wave, then these four values can be the top of the wave, the next zero point, the bottom of the wave, and the final zero point (and it just repeats, cycling through the four values). In fact, using complex numbers is the simplest way to describe waves, or circular direction / angles (where the angle can describe any direction in 360 degrees).

So the easiest way to describe the Fourier transform is the equation with the complex number. I'm still really stuck with the math on it. I just need to approach the Calculus again...

Found a cool video about how Michelson's machine is related to Fourier (the machine used in the experiment to find the speed of light):
https://www.youtube.com/watch?v=NAsM30MAHLg
Comments:
(me): It's really neat - the video shows how each part in the machine relates to a specific portion of the equation.
(me): It's a four video set for starters, then they have a PDF that goes through the machine and a guide video talking about every page of the PDF. The machine resides at the University of Illinois's Department of Mathematics.


-------

Feb, 2015:
http://www.mersenne.org/various/works.php

No comments:

Post a Comment