DMUG-Archiv 1998

Frühere

 

Chronologischer Index

 

Spätere

Vorherige

 

Thematischer Index

 

Nächste

Re: Periodischer Dezimalbruch 2

Das in meiner letzten Mail gesagte koennte man mit Mathematica wie folgt herausbekommen :

In[1]:= $Version
Out[1]= Convex 2.2 (May 10, 1993)
In[2]:= gleichung=(100 e+10 v+e) 9999==(100 d+10 i+d)*(1000 t+100 a+10 l+k)
Out[2]= 9999 (101 e + 10 v) == (101 d + 10 i) (100 a + k + 10 l + 1000 t)
In[3]:= Solve[{gleichung,Modulus==101},{e,v,d,i,t,a,l,k},Mode->Modular]
Solve::svars: Warning: Equations may not give solutions for all "solve"
     variables.
Solve::svars: Warning: Equations may not give solutions for all "solve"
     variables.
Out[3]= {{Modulus -> 101, i -> 0}, {Modulus -> 101, t -> 10 a - 10 k + l}}
In[4]:= Solve[{gleichung,Modulus==11},{e,v,d,i,t,a,l,k},Mode->Modular]
Solve::svars: Warning: Equations may not give solutions for all "solve"
     variables.
Solve::svars: Warning: Equations may not give solutions for all "solve"
     variables.
Out[4]= {{Modulus -> 11, d -> -5 i}, {Modulus -> 11, t -> a + k - l}}
In[5]:= gleichung/.{i->0,t->a+k-l}
Out[5]= 9999 (101 e + 10 v) == 101 d (100 a + k + 1000 (a + k - l) + 10 l)
In[6]:= Simplify[%]
Out[6]= 9999 (101 e + 10 v) == 1111 d (100 a + 91 k - 90 l)

Jetzt muesste man Datentypen "Integer im Bereich von 1 bis 9" definieren koennen
und den Rest mit Solve loesen unter der Bedingung "alle verschieden".

Mit freundlichen Gruessen

Hans-Joachim Spitzer



Verweise:
Re: Periodischer Dezimalbruch
Dr. H.-J. Spitzer, 12.12.1996

Frühere

 

Chronologischer Index

 

Spätere

Vorherige

 

Thematischer Index

 

Nächste

DMUG-Archiv, http://www.mathematica.ch/dmug-liste.html; Letzte Änderung: 08.09.2003 20:44