Warning: Declaration of action_plugin_captcha::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /homepages/3/d170528928/htdocs/dokuwiki/lib/plugins/captcha/action.php on line 20

Warning: Declaration of action_plugin_translation::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /homepages/3/d170528928/htdocs/dokuwiki/lib/plugins/translation/action.php on line 36

Warning: Declaration of action_plugin_wrap::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /homepages/3/d170528928/htdocs/dokuwiki/lib/plugins/wrap/action.php on line 22

Warning: Cannot modify header information - headers already sent by (output started at /homepages/3/d170528928/htdocs/dokuwiki/lib/plugins/captcha/action.php:15) in /homepages/3/d170528928/htdocs/dokuwiki/inc/auth.php on line 384

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /homepages/3/d170528928/htdocs/dokuwiki/inc/auth.php on line 670

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /homepages/3/d170528928/htdocs/dokuwiki/inc/auth.php on line 670

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /homepages/3/d170528928/htdocs/dokuwiki/inc/auth.php on line 670

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/3/d170528928/htdocs/dokuwiki/inc/parser/handler.php on line 1378

Warning: preg_match(): Compilation failed: invalid range in character class at offset 3526 in /homepages/3/d170528928/htdocs/dokuwiki/inc/parser/lexer.php on line 115
A PCRE internal error occured. This might be caused by a faulty plugin

Warning: Cannot modify header information - headers already sent by (output started at /homepages/3/d170528928/htdocs/dokuwiki/lib/plugins/captcha/action.php:15) in /homepages/3/d170528928/htdocs/dokuwiki/inc/actions.php on line 203
pg3003:bijection_de_n_n_vers_n - Wiki Jeux et Mathématiques
Wiki Jeux et Mathématiques

<html> <script src="http://linenn.davalan.eu/data/js/mathtex4.js" type="text/javascript"> </script> <style type="text/css"> input.tt0, input.tt1 { height:24; font-size:14px;font-weight:bolder;BORDER:2px solid #7F9DB9; PADDING: 1px 2px } input.tt0, tt0 { width:30;color:#3f00ff;} input.tt1 { width:180;color:#3f00ff;} </style> </html> [[pg3001:Ensembles]] [[pg3002:bijection_de_n_n_vers_n|Bijection de N^n vers N - Partie I]] - [[pg3003:bijection_de_n_n_vers_n|Partie II]] - [[pg3004:bijection_de_n_n_vers_n|Partie III]] <html> <script type="text/javascript"> var p=[]; function pinit() { var l=10, k=18 for(var i=-1; i<=l; i++) p[i]=[] for(var i=0; i<=k;i++) { p[-1][i]=0 p[0][i]=1; p[1][i]=i } for(var i=1; i<=l; i++) { p[i][0]=0 p[i][1]=1 p[i][2]=i } for(var i=1; i<=l; i++) { for(var j=1; j<=k; j++) { p[i][j]= p[i][j-1]+ p[i-1][j] } } } pinit() /* y 0 1 2 3 4 5 0 0 0 0 0 0 n 0 0 1 1 1 1 1 1 0 1 2 (3) 4 5 p[1][3]=3 = C(3,2) 2 0 1 3 6 10 15 p[n][y]= C(n+y-1, y-1) 3 0 1 4 10 20 35 4 0 1 5 15 35 70 5 0 1 6 21 56 126 6 0 1 7 28 84 210 T(n,y) = p[n][y] = binomial(n+y-1, n) y = s = x1 + x2 + x3 + ... P(sn, y) = binomial(sn + y-1, n) = (sn+ y-1)(sn+ y-2)...(sn+ y-n)/(1*2*3*...*n) */ function T(x,y) { if(p[x]==null) { for(var i=1; i<=x; i++) { if(p[i]==null) { p[i]=[]; p[i][0]=0; p[i][1]=1; p[i][2]=i; } } } if(p[x][y]==null) { if(x==-1) p[x][y]=0 else if(x==0) p[x][y]=1 else if(x==1) p[x][y]=y-1 else p[x][y]=T(x,y-1)+T(x-1,y); } return p[x][y]; } function cantor(m, n, regle) { var tb=[], x=n, rg=regle.split(/\s+/g) tb[0]=0 for(var i=m; i>0; i--) { var j=0; while (T(i,j+1)<= x) j++; tb[i]=j if(i==1 || rg[i]==1)x=x-T(i,j) else x= T(i,j+1)-1-x } var s="" for(var j=1; j<=m; j++) { s = s +(tb[j]-tb[j-1])+" " } return s } function polynomial(m, regle) { var tb=[], rg=regle.split(/\s+/g) tb[0]=0 for(var i=m; i>0; i--) { var j=0; while (T(i,j+1)<= x) j++; tb[i]=j if(i==1 || rg[i]==1) x = x-P(i,j) else x = P(i,j+1)-1-x } var s="" for(var j=1; j<=m; j++) { s = s +(tb[j]-tb[j-1])+" " } return s } function inversecantor(m, s, regle) { var rg=regle.split(/\s+/g) var u = s.replace(/^\s+/,""), u = u.replace(/\s+$/,""), l = u.split(/\s+/g); var c= 1*l[0], v; if(rg[1]==0) v=-v v=p[1][c]; for(var i=2; i<=m; i++) { c += 1*l[i-1] if(i==1 || rg[i]==1) v += 1*p[i][c] else v = 1*p[i][c+1]-1-v //print(c+" "+v } return v } function litn() { var n = parseInt(document.frm1.n.value) if(n<1) n=2 document.frm1.n.value=n; return n; } function litrg() { var r = document.frm1.r.value r = r.replace(/^\s+/,"") r = r.replace(/\s+$/,"") r = r.replace(/\s+/g," ") document.frm1.r.value = r; return "1 1 1 "+r; } function f1ton() { var n = litn() var x = parseInt(document.frm1.x.value) if(x<0) x=0 document.frm1.x.value = x var r = litrg() var l = cantor(n, x, r) document.frm1.l.value = l; } function fnto1() { var n = litn() var l = document.frm1.l.value var r = litrg() var x = inversecantor(n, l, r) document.frm1.x.value = x; } function polynome() { var n = litn() var r = litrg() var x = polynomial2(n, r) document.getElementById("IdPoly").innerHTML = x; } function sumv(k) { s="x1" for(var i=2; i<=k; i++) s = s+"+x"+i return s } function elemt(k,x) { if(k==1) return "x1" var s="", s1, v=sumv(k), f=1 for(var i=1; i<=k; i++) { s1=((i>1)?"*":"")+"("+v if(k-i+x>0) s1=s1+"+"+(k-i+x) s1 = s1+")" s = s+s1 f *= i } if(f != 1) s = s+"/"+f return s } function polynomial2(n, u) { var positif=true, s = "", nsig="-", sig="+" var t = u.split(/\s+/g) for(var i=n; i>=1; i--) { if(t[i]==1) { s = s + ((i<n)? sig :"")+elemt(i,0) } else { s = s + ((i<n)? sig :"")+elemt(i,1)+ nsig+"1" positif = !positif nsig=sig sig=(positif)? "+" : "-" } } return s } </script> </html> <html> <h1>Partie II &ndash;&nbsp;&nbsp; $ 2^{n-2} $ bijections de $\mathbb N $ vers <span class="math" id="math2">$\mathbb N^n $</span></h1> Les règles seront données sous la forme d'une suite de $ n - 2 $ chiffres 0 et 1, séparés par des espaces. Le nombre de règles différentes est donc $ 2^{n-2} $ qui correspondent à autant de bijections différentes. <br /><br /><br /> <form name="frm1" action="" > $n =$ <input class="tt0" type="text" value="6" name="n" onKeyPress="if (event.keyCode == 13) cycles()" /> &nbsp;&nbsp; Règles $r =$ 1 1 <input class="tt0" type="text" value="1 0 0 1" name="r" onKeyPress="if (event.keyCode == 13) cycles()" /><br /><br /> $x =$ <input type="text" class="tt0" value="41732" name="x" onKeyPress="if (event.keyCode == 13) cycles()" /> $\in \mathbb N $ &nbsp;&nbsp; <input type="button" name="factHtml" onclick="f1ton()" value="-->" /> &nbsp;&nbsp; <input type="button" name="factHtml" onclick="fnto1()" value="<--" /> &nbsp;&nbsp; ntuple $ = $<input type="text" class="tt0" value="0 0 2 1 7 5 " name="l" onKeyPress="if (event.keyCode == 13) cycles()" /> $\in \mathbb N^n $&nbsp;&nbsp; <br /><br /> <input type="button" name="poly" onclick="polynome()" value="Polynome P(x1, x2, ...) " /> &nbsp;&nbsp; <br /><br /> <div id="IdPoly"> </div> </form> <br /> </html> <html> <script type="text/javascript"> //window.mathPreamble = '\newcommand{\RR}{\mathbb{R}}\usepackage[usenames]{color}\color{} \gammacorrection{1.3}\png \normal '; replaceMath( document.body ); </script> </html>


Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /homepages/3/d170528928/htdocs/dokuwiki/inc/auth.php on line 670
Please fill or disable this placeholder (:wiki:navigation_sidebar) ]
QR Code: URL of current page
Sauf mention contraire, le contenu de ce wiki est placé sous les termes de la licence suivante : GNU Free Documentation License 1.3