Showing posts with label mathematics. Show all posts
Showing posts with label mathematics. Show all posts

Friday, January 12, 2007

Crush or remote face

Do you know that it is possible to play crush or face remotely? I choose crush or face and the other player launches the coin… but how to check that the other does not lie? Just use mathematics razz In fact just use a function F difficult to reverse (hash function) : i.e.
  1. if I choose x and that I calculate y=f (x) and that I give you y, it is impossible for you to find x.
  2. if you choose x and x' different, it is quasi impossible that f (x) =f (x').
Let us now see how can wemake: we agree: crush corresponds to the even numbers and face the odd numbers… Thus if I choose x=346432113344662: that means that I chose crush… Now I calculate Ff(X) and I send it to you: it is impossible for you to find my x twisted, I let you launch the coin and announce me the result… To prove to you that I chose crush well, I give you x, you calculate f(x) and you can check that by calculating y=f (x) I cannot lie you: there exists only one x such as f(x) = y, if it is face… I lost: it is impossible for me to find a x' such f(x') =y. You thought that it was impossible: mathematics did it cool.

Thursday, January 11, 2007

LaTeX on Blogger

I have finally succeded to implement a LaTeX compiler for Blogger based on Greasemonkey: for example arrow : in fact the display is not really good on this blog, but on a blog with a white background, it is really good. I have written a quick Howto, just follow this link: Howto have LaTex equation on Blogger biggrin. Finally Blogger is becoming more math friendly... Enjoy lol

Thursday, January 04, 2007

Equations in Blogger???

Some times to make understand an idea, a little more complicated, it is necessary to use good tools: arrow mathematics… When I must write a report, I use LaTeX biggrin, but on my blog how can I make??? Have you ever tried to represent an integral on blogger: it is quite impossible. This is why I seek everywhere to find a solution… for example jsmath which is a javascript code and which modifies the LaTeX code directly in the end-user browser… nevertheless, that requires that all the code is located on Blogger: which is not the case… the only solution in the long term will be to modify the script wink… Another solution a little less elegant consists in transforming beforehand all the equations into images (png) for example with this LaTeX editor on line, but that is not very user friendly… Notice that I did not speak yet about MathML, this language based on the XML should answer this problem as soon as it is completely finalized and that all the browsers will understand it… We can say that it is not for tomorrow cry… So if you have an idea, tell me razz


Tags: , , , , , ,

Wednesday, December 20, 2006

The Chinese Theorem

Following a little discussion with Wendell, a little presentation of the Chinese theorem. At the 3rd century, Sun Tsu developed an elegant way to count the number of soldier of the Great Army of China. It makes them be aligned on 13, 17, 19, 23 columns and count only the number of soldier who does not form a complete row: a small diagram to explane on 3 rows:
razzrazzrazzrazzrazzrazzrazz

razzrazzrazzrazzrazzrazzrazz

razzrazzrazzrazzrazzrazz

result: Sun Tsu counts only up to 2… Let us note N the number of soldier of the large army and A the product it a1.a2.a3… the problem is then:
NR = n1 [a1]
NR = N2 [a2]
NR = n3 [a3]
...
if a1, a2, a3… are chosen to be prime 2 to 2 then N can be written as:
cool N=n1.n1.(A/a1) + n2.n2.(A/a2) + n3.n3.(A/a3)...
How to calculate e1, e2, e3….? In fact it is very simple: just use the correct identity of Bezout:
idea e1 such as e1.a1 + n1. (A/a1) = 1
and so arrow n1.n1.(A/a1) = 1 [a1]
from there you can easily check that the solution is the good one modulo A.
Voila Wendell: this is the Chinese theorem… razz