27.12.2012 Views

Introducción a la teoría de números. Ejemplos y - TEC-Digital

Introducción a la teoría de números. Ejemplos y - TEC-Digital

Introducción a la teoría de números. Ejemplos y - TEC-Digital

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

}<br />

int j;<br />

v[0]=Uis[0];<br />

for(int k=1; k=0)<br />

{temp = ((temp.multiply(Ms[j])).add(v[j])).mod(Ms[k]);<br />

j=j-1;<br />

}<br />

v[k]= (Uis[k].subtract(temp)).multiply(gamma[k]).mod(Ms[k]);<br />

}<br />

u = v[n];<br />

j = n-1;<br />

while(j >= 0)<br />

{u = (u.multiply(Ms[j])).add(v[j]);<br />

j = j-1;<br />

}<br />

return u;<br />

}<br />

public static void main(String[] args)<br />

{<br />

System.out.print("\n\n");<br />

PCR obj = new PCR();<br />

BigInteger uis[]={new BigInteger("49"),new BigInteger("-21"),<br />

new BigInteger("-30")};<br />

BigInteger mis[]={new BigInteger("99"),new BigInteger("97"),<br />

new BigInteger("95")};<br />

System.out.println(""+obj.Z_ACR(uis, mis));<br />

System.out.print("\n\n");<br />

}<br />

EJERCICIOS 177

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!