## Thursday, June 23, 2011

### Is HTML5 going to replace Silverlight?

Is HTML5 going to replace Silverlight? Windows 8, facts and rumours from TechRepublic (with various links to other sources):

http://www.techrepublic.com/blog/programming-and-development/windows-8-native-apps-and-html5-facts-and-conjecture/4313

And, a quite unusual turn around from Microsoft ... C++ Renaissance, I guess as a reaction to Object C:

http://channel9.msdn.com/Shows/Going+Deep/Craig-Symonds-and-Mohsen-Agsen-C-Renaissance
http://channel9.msdn.com/Shows/Going+Deep/Mohsen-Agsen-C-Today-and-Tomorrow
http://blogs.msdn.com/b/somasegar/archive/2011/06/15/targeting-heterogeneity-with-c-amp-and-ppl.aspx

## Thursday, June 2, 2011

### Regarding the square root of n

Have you ever caught yourself (assuming you like maths) proving that numbers like √ 2  or √ 5  etc. are irrationals. Here is, more or less, a general statement with the proof.

For ∀n ∈ N (natural numbers), either √ n  ∈ N or √ n  ∈ I (irrational numbers, i.e. real numbers minus rational numbers).

There are two possible cases:

1. If n = p2, p ∈ N ⇒ √ n  = p ∈ N

2. If n ≠ p2 or there is no such a p ∈ N that would satisfy n = p2, then √ n  is irrational.

Let's suppose the contrary, i.e. there ∃p,q ∈ N and (p,q) = 1 (greatest common divisor) so that
.
This means that n·q2 = p2. From (p,q) = 1 ⇒ (p2,q2) = 1.

From the Bézout’s theorem, there ∃z,t ∈ Z (integers) so that
z·p2 + t·q2 = 1 ⇔ z·n·q2 + t·q2 = 1 ⇔
q2·(z·n + t) = 1
which means q2 divides 1, but this is possible only if q = 1. As a result n = p2 - contradiction with our initial assumption.

This proves the statement.