Permutation sans variable intermédiaire
Soient 3 variables a, b, c. Pour réaliser une permutation circulaire sans variable intermédiaire, on fait ceci : a = - a - b - c ; b = - a - b - c ; c = - a - b - c ; a = - a - b - c.
Dimanche 09 octobre 2011 à 21:32:21 - Aucun commentaire
Dans de nombreux environnements, on ne dispose pas toujours de variables intermédiaires. Il est donc nécessaire de recourir à des subterfuges.
Avec une variable intermédiaire
Soient deux variables a et b qu'il faut permuter. L'opération est classique si on dispose d'une variable intermédiaire X :
a = b
b = X
En déroulant l'exécution à la main, cela donne :
| action | a | b | X |
| initialisation | 4 | 7 | |
| X = a | 4 | 7 | 4 |
| a = b | 7 | 7 | 4 |
| b = X | 7 | 4 | 4 |
Sans variable intermédiaire
Il y a un problème avec
b = a
qui ne marche pas car la valeur de b est simplement copiée dans a.
Alors, peut faire ceci :
b = a - b
a = a - b
Ça marche, mais il y a deux formules différentes : a + b et a - b.
On peut faire plus simple :
b = - a - b
a = - a - b
Ce qui donne l'exécution suivante :
| action | a | b |
| initialisation | 4 | 7 |
| a = - a - b | -11 | 7 |
| a = - a - b | -11 | 4 |
| a = - a - b | 7 | 4 |
Généralisation
Aux entiers
La permutation circulaire se généralise avec un nombre arbitraire de variables. Soit x1, x2, ..., xn les variables sur lesquelles on veut effectuer une permutation circulaire. Pour mettre la valeur de x1 and x2, x2 dans x3, ..., xn dans x1, on applique l'algorithme suivant :
x1 = - ∑(Xj;j;1;n)
Aux booléens
Le symbole ⊻ (XOR) a la même principe que le ∑ car l'opérateur ⊻ possède les propriétés d'associativité et de commutativité.
x1 = - ⊻(Xj;j;1;n)
Primes, 26 letters inequality
An inequality with 26 letters to generate all the primes. Here is the price of comprehensiveness, but there's a trap...
Samedi 08 octobre 2011 à 20:35:27 - Aucun commentaire
This inequality with 26 letters generates all the primes! But there's a trap. First, not all n-uples of the 26 variables return a prime. Second, there's no way to guess what subset of variable values returns primes.
(k + 2)*(1 − (w*z + h + j − q)^2 − ((g*k + 2*g + k + 1)*(h + j) + h − z)^2 − (16*(k + 1)^3*(k + 2)*(n + 1)^2 + 1 − f^2)^2 − (2*n + p + q + z − e)^2 − (e^3*(e + 2)*(a + 1)^2 + 1 − o^2)^2 − ((a^2 − 1)*y^2 + 1 − x^2)^2 − (16*r^2*y^4*(a^2 − 1) + 1 − u^2)^2 − (n + l + v − y)^2 − ((a^2 − 1)*l^2 + 1 − m^2)^2 − (a*i + k + 1 − l − i)^2 − (((a + u^2*(u^2 − a))^2 − 1)*(n + 4*d*y)^2 + 1 − (x + c*u)^2)^2 − (p + l*(a − n − 1) + b*(2*a*n + 2*a − n^2 − 2*n − 2) − m)^2 − (q + y*(a − p − 1) + s*(2*a*p + 2*a − p^2 − 2*p − 2) − x)^2 − (z + p*l(a − p) + t(2*a*p − p^2 − 1) − p*m)^2) > 0
Indeed, k + 2 is prime if and only if this equation has a solution in the natural numbers (cf Wikipedia). Yes, it's a detail, but all the variables must be natural numbers ;-)
The question is: did anyone tried to develop this expression?
Yes, using giac :
expand((k + 2)*(1 − (w*z + h + j − q)^2 − ((g*k + 2*g + k + 1)*(h + j) + h − z)^2 − (16*(k + 1)^3*(k + 2)*(n + 1)^2 + 1 − f^2)^2 − (2*n + p + q + z − e)^2 − (e^3*(e + 2)*(a + 1)^2 + 1 − o^2)^2 − ((a^2 − 1)*y^2 + 1 − x^2)^2 − (16*r^2*y^4*(a^2 − 1) + 1 − u^2)^2 − (n + l + v − y)^2 − ((a^2 − 1)*l^2 + 1 − m^2)^2 − (a*i + k + 1 − l − i)^2 − (((a + u^2*(u^2 − a))^2 − 1)*(n + 4*d*y)^2 + 1 − (x + c*u)^2)^2 − (p + l*(a − n − 1) + b*(2*a*n + 2*a − n^2 − 2*n − 2) − m)^2 − (q + y*(a − p − 1) + s*(2*a*p + 2*a − p^2 − 2*p − 2) − x)^2 − (z + p*l(a − p) + t(2*a*p − p^2 − 1) − p*m)^2))
32*c*d*k*n*u*x*y*(-2*u^2)^2+16*c^2*d*k*n*u^2*y*(-2*u^2)^2+64*c*d^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(-(-m)^2-1-1)-2*p^2*(l(-p+2))^2+72*o^2*exp(3)-2*n^4*(-2*u^2)^4-12*n^4*(-2*u^2)
^2-2*n^4*u^16+16*n^4*u^14-16*n^4*u^12+96*n^4*u^10-172*n^4*u^8+176*n^4*u^6-48*n^4
*u^4+96*n^4*u^2-4*n^2*(-2*u^2)^2+12*n^2*x^2-4*n^2*u^8+16*n^2*u^6-16*n^2*u^4+32*n
^2*u^2-2*l^2*(-n)^2+12*l^2*m^2+4*l^2*n-256*k^9*n^4-1024*k^9*n^3-1536*k^9*n^2-
1024*k^9*n-3072*k^8*n^4-12288*k^8*n^3-18432*k^8*n^2-12288*k^8*n-16128*k^7*n^4-
64512*k^7*n^3-96768*k^7*n^2-64512*k^7*n-48640*k^6*n^4-194560*k^6*n^3-291840*k^6*
n^2-194560*k^6*n-92928*k^5*n^4-371712*k^5*n^3-557600*k^5*n^2-371776*k^5*n-116736
*k^4*n^4-466944*k^4*n^3-700640*k^4*n^2-467392*k^4*n+k^3*(-j^2-h^2-22048-1)-96512
*k^3*n^4-386048*k^3*n^3-579680*k^3*n^2-387264*k^3*n+2*k^2*(-j^2-h^2-22048-1)-
50688*k^2*n^4-202752*k^2*n^3-304928*k^2*n^2-204352*k^2*n+2*k^2*l-2*j^2*k^2-6*j^2
*k-4*h^2*k^2-13*h^2*k-8*g^2*j^2-8*g^2*h^2+128*f^2*n^2+32*f^2*k^5+224*f^2*k^4+608
*f^2*k^3+800*f^2*k^2+256*f^2*n+514*f^2*k-4608*d^4*y^4-192*d^2*y^2+4*c^2*u^2-2*b^
2*(-n^2)^2+8*b^2*n^3-16*b^2*n-4*b^2*k-4*z*t(-p^2+4*p-1)+4*z*exp(1)+4*x*y+4*v*y-8
*s*y+8*s*x+4*q*exp(1)-4*q*z-4*q*y+4*q*x-8*q*s+4*p*exp(1)+4*p*y^2-16*p*s^2-4*p*z-
4*p*q+8*n*exp(1)-8*n*z+4*n*y-4*n*v-8*n*q-8*n*p+4*m*p+4*l*y-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-6*i)*k-2186-4*i
Une fourmi heureuse et productive
Une fable tellement énorme qu'aucun événement réel ne peut la reproduire.
Samedi 01 octobre 2011 à 16:11:58 - Aucun commentaire
Il était une fois , une fourmi heureuse et productive qui tous les jours arrivait de bonne heure à son travail. Elle passait toute sa journée à travailler dans la joie et la bonne humeur, poussant même la chansonnette. Elle était heureuse de travailler et son rendement était excellent mais, malheur !, elle n'était pas pilotée par un manager...
Le frelon, PDG de l'entreprise, considérant qu'il n'était pas possible que la situation puisse perdurer, créa un poste de manager pour lequel il recruta une coccinelle avec beaucoup d'expérience.
La première préoccupation de la Coccinelle fut d'organiser les horaires d'entrée et de sortie de la fourmi. Elle créa également un système de compte-rendu et de fiches navettes. Très vite, il fallut engager une secrétaire pour l'aider à préparer les dossiers et le reporting, si bien qu'elle recruta une araignée qui mis sur pied un système de classement et qui fut chargée de répondre au téléphone.
Pendant ce temps là, la fourmi heureuse et productive continuait de travailler, travailler, travailler. Le frelon, PDG de l'entreprise, était ravi de recevoir les rapports de la coccinelle, si bien qu'il lui demanda des études comparatives avec graphiques, indicateurs et analyse de tendance. Il fallut donc embaucher un cafard pour assister le manager et il fallut acheter un nouvel ordinateur avec une imprimante.
Assez vite, la fourmi heureuse et productive commença à baisser de rythme et à se plaindre de toute la paperasserie qui lui est dorénavant imposée. Le frelon, PDG de l'entreprise, considéra qu'il était temps de prendre des mesures. Il créa donc le poste de chef de service pour superviser la fourmi heureuse et productive.
Le poste fut pourvu par une cigale qui changea tous le mobilier de son bureau et qui demanda un nouveau fauteuil ergonomique ainsi qu'un nouvel ordinateur avec écran plat. Seulement, avec plusieurs ordinateurs, il fallut aussi installer un serveur réseau. Le nouveau chef de service ressenti rapidement le besoin de recruter un adjoint (qui était son assistant dans son ancienne entreprise) afin de préparer un plan stratégique de pilotage ainsi que le budget de son nouveau service. Pendant ce temps-là, la fourmi était de moins en moins heureuse et de moins en moins productive.
« Il va nous falloir bientôt commander une étude sur le climat social », dit la cigale.
Mais, un jour, le frelon, PDG de l'entreprise, en examinant les chiffres, se rendit compte que le service dans lequel la fourmi heureuse et productive travaille n'était plus aussi rentable qu'avant. Il eut donc recours aux services d'un prestigieux consultant, M. Hibou, afin qu'il fasse un diagnostic et qu'il apporte des solutions. Le hibou fit une mission de trois mois dans l'entreprise à l'issue de laquelle il rendit son rapport : « il y a trop de personnel dans ce service ». Le Frelon, PDG de l'entreprise, suivit ses recommandations et... licencia la fourmi !
Moralité
Ne t'avise jamais d'être une fourmi heureuse et productive. Il vaut mieux être incompétent et ne servir à rien. Les incompétents n'ont pas besoin de superviseur, à quoi cela servirait puisque tout le monde le sait ! Si malgré tout, tu es productif, ne montre pas que tu es heureux au travail, on ne te le pardonnerait pas.
Si tu t'obstines à être une fourmi heureuse et productive, monte ta propre entreprise : au moins tu n'auras pas à faire vivre les frelon, coccinelle, araignée, cigale, hibou et autre cafard.
Lamentablement, tout ceci est basé sur des études scientifiques universitaires qui démontrent que la majorité des être humains tendent à devenir des parasites...
© Auteur inconnuNeŭtrinoj je 300006 km/s
Ĵurnalistoj firme afirmas ke luma rapido estas je 300000 km/s ekzakte. Do neŭtrinoj rapidas je 300006 km/s.
Vendredi 30 septembre 2011 à 21:01:17 - Aucun commentaire
Ĵurnalistoj nekredeblas! Kutime ili redaktas artikoljn pli proksimajn de feko ol miaj sidvangoj... Tamen nun, mi eĉ sentas ion, tro proksiman.
Aperis artikoloj pri eblo malveriĝo de la speciala teorio de relativeco de Ajnŝtajn. Pro tio ke kelkaj neŭtrinoj iri pli rapide ol la lumo. La teorio postulas tion, ke ne eblas iris pli rapide ol la lumo. Ĉu neŭtrinoj esceptoj? Mi ne scias nun, nek ĵurnalistoj.
Rapido de lumo estas ekzakte 299 792 458 metroj posekunde. Ĉar ĝi estas limo por ĉiuj, oni nomas ĝin unuvorte: lumrapido. kompreneble, oftas numbro 300 000 000. Ĉiutage tio sufiĉas, eĉ al ĵurnalistoj, krom nun.
Raportoj pri tiu afero afirmas ke neŭtrinoj superpaŝis lumon, je 6 km/s, serioze kaj precise. Sed, ĵurnalistoj afirmis tion: neŭtrinoj iris je 300 000 006 km/s ĉar luma rapido egalas al 300 000 000 km/s.
Jen kelkaj hontigaj arktikolj per gugla serĉo: https://encrypted.google.com/search?q=neutrino+300006&ie=utf-8&oe=utf-8Speciala teorio de relativeco: https://secure.wikimedia.org/wikipedia/eo/wiki/Speciala_teorio_de_relativeco
For how many states, there's more than one Googolplex of turing machines?
A Turing machine with almost one Googol states means one Googolplex possibility of Turing machines.
Mardi 27 septembre 2011 à 05:36:51 - Aucun commentaire
This is a great way to enter the world of great numbers, with a bit of theory and practical sort of innovation...
Main terms
What is a Turing Machine?
A Turing Machine is a very simple computer which was designed by Alain Turing in 1936. A Turing Machine is described by states, each states pointing to other states according to some conditions. You may read a bit more about Turing machines in order to fell all the taste of this article.What are Googol and Googolplex ?
A Googol is a number represented by 1 followed by 100 zeroes. That is, 10^100. A Googolplex is 10 power Googol - that is, a number represented by 1 followed by a Googol of zeroes : 10^(10^100). Somewhat huge.What is the Log function ?
The Log function approximatively gives the number of digits of a number. It's the reciprocal function of y = 10^x. So, x = Log(y). This function is important here because of one of its main properties. It turns multiplications into additions. So, the calculations will involve far less huge numbers.So what?
A resolution
The question is: how many states do I need to be able to build one Googolplex Turing Machines? Winter's cold, brain's hot.
The Turing Machine considered here is the more simple one: two different values and two different directions. Two values and two directions make 4 possibilities. To this, let's add the number of possible jumps: k+1 if there's k states. The +1 is due to the terminal state. So, we've got 4*(k+1) possibilities for a given value. A state having two values (0 or 1), it's (4*(k+1))^2 each state. As there is k different states, we get: (4*(k+1))^(2*k).
The problem is that this expression is obviously over k^k and that the question becomes:
k | (4*(k+1))^(2*k) >= 10^(10^100)
I must admit that I didn't have any clue on how to cleanly solve this. Trying as many values of k as possible is hopeless. Here comes the Log. As a strickly growing function the order between the left part and right part is unchanged by the Log:
k | Log( (4*(k+1))^(2*k) ) >= Log ( 10^(10^100) )
So, k | 2*k * Log( 4*(k+1) ) >= 10^100
So, k | 2*k * (Log(4) + Log(k+1)) >= 10^100
Let's Log again:
k | Log(2) + Log(k) + Log(Log(4) + Log(k+1)) >= 100
Now, it's just about using Log(k) and Log(k+1) against 100. I'm sure that it's feasible, but let's do it by a program.
The program
The program, in the Python language, browse the values using an exponential scale. Once it gets over, then it turns back a try a 10th less scale. And so on until the Log of the Log of the number of possible Turing Machines reaches 100. The formatting disappears there, I replaced tabs by underscores.
# Python
# -*- coding: utf-8 -*-
# For how many states, there's more than one gogolplex of turing machines?
from math import log
def logLogNbTuring(k): return log(2.0*k,10)+log(log(4.0,10)+log(k+1.0,10),10)
# A value of 100 means that we're searching for a number of machines greater than 10^(10^100), more than a gogolplex.
nbTenPowerTen = 100
step = 1
while logLogNbTuring(step)
print "log(step,10) set to %i" % log(step,10)
i = 1
belowValue = i
while (step>=1):
_if logLogNbTuring(i)>=nbTenPowerTen:
__i = belowValue
__step /= 10
_belowValue = i
_i+=step
i = belowValue + 1
print "nbTenPowerTen=%i, solution=%i" % (nbTenPowerTen, i)
print "log(solution,10)=%f" % log(i,10)
The result
anwser = 50 860 333 466 396 650 825 817 657 241 650 242 602 634 644 785 968 021 580 236 147 821 863 292 723 816 479 721 264 913 714 249 728
I think that because of rounds that this number is not strictly the exact solution. But that's not the point: Log(answer) = 97.70 means that answer almost equals 10^100, a Googol.