Tuesday, December 24, 2013

Hard to kill this crazy love I have for you,
anywhere in Europe I can hear you cry out,
for what we shared.

It seems like it will be a miracle for a whole continent
when we reunite.


Saturday, December 21, 2013

A brief history of the theory of computation

Somewhere in the beginning of the 20th century,
the notion of a computer was mathematically formalized.
(The name `computer' came from people whose job it was to perform mathematical
computations on a piece of paper - they were called computers)

It was asked first: Is there something a computer can't compute? Even
if it is given an unbounded amount of time and space to use?
Alan Turing showed that even in such a case a computer cannot solve the following problem:
You give it a code of some computer program and ask it: If I run this program will it go
on running forever? Or will it stop after some finite amount of time?
Turing showed that whatever program you write to answer this question, it will always
give the wrong answer on some computer program it gets as input.

But it seemed that pretty much any problem you would want to solve
you could write a computer program for.
So the next big question was: Out of the problems a computer *can* solve, are there problems it can't solve in a reasonable amount of time?
A good way to think of reasonable is : Suppose I give the computer an input to the problem that is 800 bits long. Then if it can solve the problem before the universe ends using just the resources inside the universe
then this is reasonable.

Using the Theory of NP-Completeness it was shown that the following problem probably cannot be solved in a reasonable amount of time:
We have a map with n cities. Between each 2 there is a train. We start in the first city.
We ask what is the fastest way to go through all the cities and return to the first one.
That is, in which way order should we go through the cities to minimize the total travel time.
This problem is called - The Travelling Salesman Problem - or TSP
But, alongside theory who said this problem is hard, on many of the maps and sets of n cities that people cared the problem was and is being solved in practice.
So, now the next big question: Characterize which instances of TSP can be solved in reasonable time and which cannot.
One example - suppose the n cities are located in log(n) different states that are very far away from each other. And furthermore, inside the states it is clear what the best route is. Then we can prove an efficient algorithm exists.

Friday, December 20, 2013

He was rational, open minded
but had the need to be a fanatic.

She would become his religion..
When they first met, they joked that she would be a cult leader
and he would be the most devoted member.

But it was no joke,
worshiping her was like a drug..
and he did not care about it's insanity..
as long as that feeling could make him do one more push up
work harder, run faster,
he thought.. as drugs go you could do much worse.

He wished she would become just as addicted to this insanity..
They would be so caught up into it, they would barely notice as their bodies
turned to dust..

It would not change for a moment the way they looked at each other..
even as only bones and skulls were left.

Thursday, December 19, 2013

It's spreading like wildfire! A big Israeli coffee chain has added a new vegan menu to all its branches after a survey indicated 40% of its customers were interested in more vegan options.

http://www.facebook.com/photo.php?fbid=773717525976385&set=a.130957563585721.24388.126099790738165&type=1&theater

Wednesday, December 18, 2013

Most of the time we take for granted that Technology works..
and doing computer science research you take for granted most of the time
that mathematics works.
But there are moments when you feel how remarkable it is.
You look at a string of 0's and 1's.
For example (1,0,1,0,0,0,1)
And you look at all it's cyclic shifts (where you move all bits one place to the right and move the last one back to the start)
The first shift gives you      (1,1,0,1,0,0,0)
The second shift gives you (0,1,1,0,1,0,0)
and so on..
You would like to prove that the 1's of the different shifts intersect with the original string on at most one coordinate:
For example: The original string has a one on the 1,3,7 indices.
                     The first shift has a one on the 1,2,4 indices
       so indeed they intersect on only one place.
Can you prove the intersection is always at most of size one without checking?
It turns out the following thing works.
There are these things called Galois fields
which are groups of numbers that are different from regular numbers.
For example in the Galois field GF(8)  we have 1+1 =0. Also, as the name implies - we have only 8 different numbers in this field - rather than infinitely many as we are used to with rational or real numbers.
In this field GF(8) there are special elements called generating elements.
These are elements g with the property that when you take their powers g,g^2,g^3...
they will run over all elements in the field except the 0 element.
Now say we take such a generating element g and compute the polynomial
whose roots are the powers of g corresponding to the 1's of our string - 1,3,7
and also 0
That is the polynomial
(x-g)*(x-g^3)*(x-g^7)*x  
It's easy to see this polynomial has degree 4.
What will be the coefficient of x^3?
It turns out that whenever it is 0, the cyclic shifts of the string will indeed intersect at atmost one place.
in the case above the polynomial we get (when doing computations in this field GF(8)) is
x^4 + (g^2 + g + 1)*x^2 + (g^2 + g)*x 

Which indeed has 0 as the coefficient of x^3
You can try it yourself here:
just plug in the powers you want when evaluating poly, and then press evaluate.
This corresponds to the fact that subspaces have an intersection size that is a power of 2 over GF(2)and polynomials whose roots are a subspace over GF(2) will only contain powers that are powers of 2.

Monday, December 16, 2013

It's so exciting how Veganism is getting into the mainstream in Israel.
Domino's Pizza are now selling a vegan Pizza..
too bad I missed it by becoming a more fanatic gluten-free vegan.

http://www.facebook.com/photo.php?fbid=578500882218402&set=a.366969066704919.78153.346896375378855&type=1&theater
What if before we were born God told us..
`I am going to given you exactly the experiences you need.. so that you can,
in the shortest time possible, reach a state of happiness and love.'

What if we knew this? How differently we would face each challenge.

I am happy when I feel each experience is a learning towards the union with you
that I dream about.

Sunday, December 15, 2013

Something I find it hard to relate to is how people can claim
to do something they are not able to do.
You have these Java libraries
XStream and JSON-io where their websites claim they are able to save any Java object to a file,
doesn't matter how complicated it is, or whether it is serializable.
But it's not true.. and surely they noticed it if I and other people have run into examples where it doesn't
the first time we try.
Their claims make you spend hours trying to make their libraries work.. when you could  have written the program you need yourself in an hour - which is what you end up doing of course..

Saturday, December 14, 2013

I was shocked to discover today that there is no generic way to save an object to a file in Java.
There is this thing called the Serializable interface, but it doesn't work well with complex objects -
like parameterized objects where the parameters are complex objects themselves.
My example: An instantiation of DirectedSparseGraph < Vertex, Edge >

Anyway.. while programming today, and thinking about search problems,
I was thinking how the universe from particles to atoms to molecules to brains
is now evolving, through the internet and search algorithms, to one big brain
where the individual neurons themselves are complex and self-aware -
knowing they are in this brain and able to change the way they connect to other neurons
when there is need.

And how this brain is evolving to be used to solve a new level of mathematical problems,
or explore the next level of musical compositions.

I am also thinking now that quinoa seeds are wusses.
If you put them in a pan of hot water with over things - like lentils or oats,
they will not take any of the water until the other things are done using it.


Two things I have discovered from trying to be gluten-free.

For the first time I have a consistent way to get the belly I have had for more than 20 years down.
Trying to not eat late, or too much, or fatty things never worked for me (partly cause I couldn't do it consistently). But now since I don't eat pastries and bread and pitas it's going down automatically.

Second - a great way to make wraps or sort of sandwiches - use this thing called rice paper.

Did I invent you?
Are you just my imagination?
It's been so long since we met in reality. By now I am like a religious fanatic, believing I am preparing for the day we meet again with no proof that it will come.. perhaps even with some evidence that it won't.

But that belief gives me an extra push of willpower throughout many small junctions during each day.

I come to the office. My instinct is to spend another 20 minutes browsing the web before starting to work.
I feel at first there is no chance I have the energy to avoid that temptation.
But then, sometimes, I think to myself: How will the decision I make at this moment affect how well things go between us if and when we meet in who knows how many years.
Amazingly to me, I find that if I feel making the harder decision will help things go better by 0.1% with a 0.1% probability, I can make the hard choice not only without effort, but with enthusiasm thinking about it as yet another small brick being placed in the construction of this future I dream about.

Wednesday, December 11, 2013

So sweet, for every taste of you
I walk a hundred years in the desert.
Your shining eyes assure me, time is not lost,
this is the road you must take.
Each day, in the afternoon, every cell of my body wants to be
closer to you.

Blog Archive