Find Jobs
Hire Freelancers

Chinese Remainder Theorem in C++

$30-5000 USD

En curso
Publicado hace alrededor de 20 años

$30-5000 USD

Pagado a la entrega
The goal of this assignment is to implement the Chinese Remainder Theorem in C++. It is pretty straightforward. I am totally comfortable with the math part of this assignment so If you have any questions or run into any problems while coding it, I'll be glad to work with you. Chinese Remainder Theorem: A system of linear congruences modulo pairwise relatively prime integers has a unique solution modulo the product of these modulli. Let m1, m2,.....mn be pairwise relatively prime positive integers. Then the system x= a1 (mod m1) "The equal sign represents congruency not x=a2 (mod m2) equality." x=an (mod mn) has a unique solution modulo m= m1*m2*.....mn. (That is there is a solution x with 0 <= x <= m and all other solutions are congruent modulo m to this solution. INPUT: our program would ask the user to enter positive integers a, b and nonzero m and n ( m and n are the modulli)Then the program would check that m and n are relatively prime that is their Greatest common divisor is 1, if it is then it will proceed. The program must also be able to detect invalid input and should display an error message if the input is invalid. OUTPUT: The program would output the unique solution 'x' to the system of congruences that the user has input. ## Deliverables Here is an example of how the Chinese remainder theorem works: Suppose we have a system of congruencies. x=2 (mod 3) "Again equal represents congruencies" x=3 (mod 5) x=2(mod 7) To solve this system of congruencies, first let m=3.5.7=105 M1= m/3 =35 M2=m/5 =21 M3=m/7 =15 We see that 2 is an inverse of M1=35 (modulo 3) since 35.2=1 (mod 3) Similarly 1 is an inverse of M2=21 (modulo 5) since 21.1= 1 (mod 5) Again 1 is an inverse of M3 =15 (modulo 7) since 15.1=1 (mod 7) The solution to this system are those x such that x=[login to view URL] + [login to view URL] + a3. M3. y3 = 2.35.2 + 3.21.1 + 2.15.1 233= 23 (mod 105) So 23 is the smallest positive integer that is a simultaneous solution. ## Platform The program must compile on a g++ compiler. THE DUE DATE IS THURSDAY FEB. 26TH 04. Again If you have any questions regarding the Chinese remainder theorem, or congruencies or modulli or greatest common divisors or any general questions regarding the assignment, please feel free to contact me.
ID del proyecto: 3108795

Información sobre el proyecto

16 propuestas
Proyecto remoto
Activo hace 20 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
See private message.
$2 USD en 4 días
5,0 (100 comentarios)
5,6
5,6
16 freelancers están ofertando un promedio de $15 USD por este trabajo
Avatar del usuario
See private message.
$20 USD en 4 días
5,0 (159 comentarios)
6,0
6,0
Avatar del usuario
See private message.
$21,25 USD en 4 días
5,0 (63 comentarios)
5,2
5,2
Avatar del usuario
See private message.
$4,25 USD en 4 días
5,0 (60 comentarios)
5,0
5,0
Avatar del usuario
See private message.
$25,50 USD en 4 días
5,0 (38 comentarios)
5,0
5,0
Avatar del usuario
See private message.
$7,65 USD en 4 días
5,0 (36 comentarios)
4,9
4,9
Avatar del usuario
See private message.
$25,50 USD en 4 días
5,0 (52 comentarios)
4,9
4,9
Avatar del usuario
See private message.
$6,80 USD en 4 días
4,9 (45 comentarios)
4,6
4,6
Avatar del usuario
See private message.
$8,50 USD en 4 días
5,0 (17 comentarios)
4,3
4,3
Avatar del usuario
See private message.
$51 USD en 4 días
4,7 (18 comentarios)
4,0
4,0
Avatar del usuario
See private message.
$17 USD en 4 días
5,0 (42 comentarios)
3,7
3,7
Avatar del usuario
See private message.
$8,50 USD en 4 días
4,8 (32 comentarios)
3,7
3,7
Avatar del usuario
See private message.
$4,25 USD en 4 días
4,6 (5 comentarios)
1,5
1,5
Avatar del usuario
See private message.
$12,75 USD en 4 días
5,0 (1 comentario)
0,2
0,2
Avatar del usuario
See private message.
$3,40 USD en 4 días
0,0 (1 comentario)
0,0
0,0
Avatar del usuario
See private message.
$17 USD en 4 días
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de UNITED STATES
United States
4,8
27
Miembro desde oct 17, 2003

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.