Thursday, July 2, 2009

Crypto-Human Interest.

So I wanted to share a fun story with Two Centuries On, a Cryptologist Cracks a Presidential Code

However, I think this article really misses a opportunity to explain the importance and nature of cryptography and misses some very important points of how cryptography matters to our daily life as opposed to being just the playthings of presidents and friends as a exercise for the mind.

the very nature of our modern lives is build on a foundation of cryptography. all modern financial systems rely on the strength of modern cryptography. and modern cryptography is very goddamn strong. and quantum cryptography is unbreakable.

The code-breaking effort the allies unleashed in WWII is one of the greatest stories of ingenuity, hard work and very possibly more than any other factor, defeated the axis powers.


All online purchases rely on the modern public-key system for encryption, one that cannot be attacked like we would attack enigma, we know how the system works, without the key to find what you needed to decrypt the message would take all of the computers on earth working non-stop for thousands of years. I think to sell cryptography short is to fail in your responsibility to educate the public, and the fact that they spent time talking about simple substitution cyphers but don't mention the massive impact crypto plays in our day to day life is intellectually disingenuous.

None-the-less, by the current standard of media and what sort of job we can expect the 4th estate to do on our behalf(a terrible one) it is a fun article, that you should read.

Monday, June 22, 2009

Great Quantum Turing Machine Batman!

Ah, dear reader, It has been a while, not that time particularly matters to you, what with the whole not-existing thing you got going on, not that I blame, you, its not like I update this thing with any regularity, although I would like to change that... and with that note, lets get down to the entry....


So, while i was living in that terrible cess-pit known as the world sans internet I had time to read Programming the Universe by Seth Lloyd. This book is a must read for anyone who is interested in computability and the world as we understand it. Following up in the tradition of Wolfram's A New Kind of Science and Rucker's The Lifebox, the Seashell, and the Soul(which i cant recommend highly enough) Programming the Universe is an exploration of what information science and the mathematical underpinnings of computation mean to how the world works and how to explain the universe in terms of a new physical entity (information) that must be considered when trying to understand what base forces and rules control and manage the universe.

However, Lloyd, a leading researcher in quantum computing, takes an interesting approach viewing the universe as not merely something that can be imitated by any old Universal Turing Machine, but rather, the universe is a giant quantum supercomputer that is constantly computing itself.

This is a elegant way around dealing with the problem of Chaos theory and quantum interaction that plagues most attempts at determinism by Universality of Turing machines. Chaos theory showing that if our measurements are even just a tiny bit off from the real value of the event we are measuring it would be impossible to predict its course, and the quantum interference that puts a minimum bound on how precise our measurements or even any measurements can be.

Lloyd also makes a very interesting point about entropy, viewing entropy as an increase in information, an increase in all those bits, that make up the universe as a complete and wonderful whole. is i think particularly thrilling,

Furthermore, Like Rucker's Work, Lloyd's work reads like a great lecture, anticipating questions and givng a phenomenal overview of the theory and its consequences. I give this book my highest recommendation. It is a fascinating read and has shaped the way I personally, understand the fundamental forces and interactions of the universe.

Sunday, February 1, 2009

Solution to Problem 2 of Project Euler

My solution to problem 2 was done shortly after solving problem 1, so you can see the progression of my Scheme programming, still not as sharp as it could be, (and I didn't even try to explore the interesting mathematical attacks on the problem, I'm still using the problems as exercises in coding and not yet looking at them as math problems, something I imagine I wont be able to keep up for long...

(define (fib n)
(fib-iter 1 0 n))
(define (fib-iter a b count)
(if (= count 0)
b
(fib-iter (+ a b) a (- count 1))))
(define (fib< n)
(fib<-iter n 1 empty))
(define (fib<-iter n count l)
(cond ((> n (fib count)) (fib<-iter n (+ count 1) (cons (fib count) l)))
(else l)))
(define (euler2 n)
(euler2-iter (fib< n) 0))
(define (euler2-iter l sum)
(cond ((not (empty? l))
(cond ((even? (car l)) (euler2-iter (cdr l) (+ (car l) sum)))
(else (euler2-iter (cdr l) sum))))
(else sum)))


then I call the function by (euler2 4000000)

Code for My Solution the the First Euler Problem

This was basically the first scheme program I have ever written and the first program i have written in about 4 years, so yes, I know the code is very sloppy...

(define (testdiv n f)
(cond ((= (remainder n f) 0) 1)
(else 0)))
(define (buildlist n m)
(cond ((> n 0) (buildlist (- n 1) (cons n m)))
((= n 0) m)))
(define (test2div n f1 f2)
(cond ((= (testdiv n f1) 1) n)
((= (testdiv n f2) 1) n)
(else 0)))
(define (euler1 n f1 f2)
(cond ((not (empty? (cdr n))) (+ (test2div (car n) f1 f2) (euler1 (cdr n) f1 f2)))
(else (test2div (car n) f1 f2))))


It worked but due to the fact that its been 2 weeks since I wrote it and the code is ugly as hell I cant for the life of me remember how I call it. sure, I could probably figure out how, but if I had any desire to go back to this problem I would almost certainly scrap this and rewrite the code entirely..

Saturday, January 24, 2009

A bit of a change of pace...

Well its been a while, a while since you, oh non-existent reader and i sat down here on this masturbatory exercise of a blog and had a catch up and the obligatory change of pace.

So, to start, lets get caught up. I am enjoying myself in Oakland, have a nice new apartment and a job that while is not great affords me time to think, Time to study, Time to relax. In that time i have started working on getting my math up to par, to this end I have begun some slight work on the Project Euler problems. to accomplish this I have begun to learn the programming language SCHEME. I have started this by working my way though MIT's "Structure and Interpretation of Computer Programs".To that end i will be posting here my solutions to both the exercises of that book and the Project Euler problems.

Friday, November 28, 2008

keach, contemplative

ryan keach deep in thought
laying back

me
Posted via Pixelpipe.

Saturday, May 10, 2008

Why I Am An Atheist.

I was raised in a fairly secular home, going to church on Easter and Christmas, when I was about 8 me and my sister, liking Christmas and Easter a lot, and in fact, liking the church atmosphere, convinced my parents to take us to church weekly (in retrospect, not the best idea). After about a year and a half to two years of church, my parents separated, one of the many catalysts was my father falling in love with my stepmother to be, the choir director and organist. After my parents separated, I still continued going to church with my father, my mother changed churches and went every Sunday and when I was about 13 or so, felt the call to ministry.

My Father, on the other hand, has always been what he calls a "High Church Atheist", and with my stepmother being the choir director, we ended up going to church a lot. I am not sure if I ever believed in god, but I know that I certainly thought I believed, I never really prayed for things, but I had some sort of deist feelings about the world.

In High school, I, Being the dork that I am, found out about Buddhist philosophy and read about it a lot; it made, in my mind, some sort of sense. I didn't classify myself as Buddhist, I was still, at least in my own mind, an Episcopalian, but the philosophy really said something to me, in my second semester at college I took a course on the philosophy of religion, by far the least informative and worthwhile course of my college career (well at least tied with the bowling course that I forgot to attend (funny story for a different time perhaps)). The complete lack of substance of the philosophy of religion class who's main idea is that "God" or "Spirit" or whatever, that there is something that is above and separate from the phenomenological world, that there is some sort of numenon that you just couldn't question was unsettling, I became, for all intents and purposes an agnostic.

During this time, a New youth group director took over at my church, my church was a liberal moderate church that didn't really push the whole Christianity thing very far, we were there for community, wine and crackers and we knew it, or at least that was my feeling, the church was pro-gay, pro-life, accepting and open. The new youth group leader decided to set us up on a Christian work-camp thing. Now if you don't know what work camps are, they are where a bunch of evangelical youth gets together to praise the lord and fix the houses of poor people. The first two years I went were fairly tame, I mean the leaders of these things were clearly insane, but the people my age were cool (for the most part) and the work was fun and rewarding (the music however, was god-awful). The Third year, however, that year marked the moment I became, like Douglas Adams, a Radical Atheist.

The Third year I was pegged with two other people to lead a much larger group of kids from our parish to this work-camp, so this time I actually had to pay attention to the daily services/propaganda. What I saw was disgusting. The underlying message of these theatrical abortions was not to question authority and that anyone who disagrees with the literal interpretation of the bible is a sinner and is going to hell. After these services we are supposed to take our kids aside and reinforce the lesson, I however, along with making my kids laugh by making an ass out of myself (its a gift), condemned the message and subtext in the strongest possible terms (not to mention my rails against the quality of the music (Christian Rock is by far the worst thing in the world. and prompts my favored disproof of the Christian god, a loving god would never inspire these abortions that are put out as rock. QED) But this was just the beginning.

On the last day, after a week of roofing (possibly the worst job ever, I respect anyone who does it for a living), up on the roof I was drawn into a theological debate where I admitted that I was agnostic. Upon hearing this, two of the other people both evangelicals urged me to read the book "The Case for Christ", I agreed on the supposition that they read "Living Buddha, Living Christ" by Vietnamese Zen Monk, Thich Nhat Hanh. At this suggestion they were flabbergasted, claiming that there is only one true way and that way is through Christ. My response was, straight out of my religious philosophy class, that everything is partially true and partially false, religions are shades of grey and it matters most on what you do to be a good person. They would not concede this point, one of them saying: "Things are either right or they are wrong. When you flip a coin it comes up heads or it comes up tails, it is never both!" Now before I respond, I want you the reader to understand, I'm an asshole. I wasn't going to let that line stand, not with my very very small understanding of quantum physics behind me. I mean I have read popular science books about the subject! So with that said, I made what I consider to be one of my hallmark remarks of all time saying: "Well, that’s not technically true, according to quantum physics, when you flip a coin it comes up both heads and tails and you only observe one outcome" (I know not technically true for coins, but you get my gist) their response to this latest hurdle to their philosophy marks the exact minute I became a atheist.

I really cannot give this remark enough fanfare; it is in my mind the height of ignorance, wrongheadedness and villainy that I have ever encountered. And i assure you that it is a 100% direct quote, it has been engraved on my brain ever since word for word. I know you are thinking with all this buildup the actual remark will never live up to my claims but I assure you that it does. So, without further ado, here is their response "You see, Galen, that’s your problem, you read all these science and math books, and science leads to the Devil. You need to take all of your science and math books and burn them."


Now I pride myself on having a remark for any situation. And in my entire life I cannot recall ever being so completely speechless as I was at that moment. My brain just couldn’t comprehend the fact that anyone could ever say this. Who would even think such a thing, much less think that it might convince me of anything. The only thought I had was "So this is where blind faith leads." I felt like the gauntlet had been thrown, no longer could I even pretend faith, much less respect it unconditionally. The line in the sand has been drawn and the choice is clear, either put yourself behind faith and superstition and view the idea that science is from the devil is an acceptable thought in the modern era, or you must renounce all forms of superstition and faith. You must be willing at all times to change your ideas in the face of new evidence. That idea to me, perfectly encapsulates why religion is a problem.

Well, thank you all for reading this post. Feel free to leave any comments.