Recurso · Guía o artículo
Euclidean algorithm
Presenta el método de Euclides para el MCD mediante restas sucesivas, con ilustraciones geométricas.
Revisado
Abrir el original: Euclidean algorithm (abre el sitio original en una pestaña nueva)Añadir a una hoja de ruta
Guarda este recurso junto a una hoja de ruta que sigues. Aparece como un recurso extra tuyo; los pasos de la hoja de ruta no cambian y no cuenta para tus pasos registrados.
Contenido de la fuente: inglés
In mathematics, the Euclidean algorithm, or Euclid's algorithm, is an efficient method for computing the greatest common divisor (GCD) of two numbers, the largest number that divides both of them without leaving a remainder. The Euclidean algorithm is based on the principle that the greatest common divisor of two numbers does not change if the larger number is replaced by its difference with the smaller number. For example, 21 is the GCD of 252 and 105 (as 252 = 21 × 12 and 105 = 21 × 5), and the same number 21 is also the GCD of 105 and 252 − 105 = 147. Since this replacement reduces the larger of the two numbers, repeating this process gives successively smaller pairs of numbers until the two numbers become equal. When that occurs, they are the GCD of the original two numbers. By reversing the steps, the GCD can be expressed as a sum of the two original numbers each multiplied by a positive or negative integer, e.g., 21 = 5 × 105 + (−2) × 252. The fact that the GCD can always be expressed in this way is known as Bézout's identity.
Resumen de PrepKit
El equipo editorial de PrepKit redactó y revisó este resumen a partir del repositorio de origen. No es texto del propio recurso.
- Adecuado para
- La fuente no indica un nivel
- Formato
- Referencia
Qué cubre
- Sustituir el número mayor por la diferencia conserva el MCD, mostrado con 252 y 105
- Identidad de Bézout: 21 = 5 por 105 más -2 por 252
- Imágenes de teselado para 24 por 60 y una animación que reduce 1071 y 462 hasta 21
Cómo usarlo
Consejo de estudio de PrepKit, no una afirmación de la fuente.
Programa la versión por restas y la versión con resto y compara el número de pasos para 1071 y 462; luego añade el algoritmo extendido y reproduce los coeficientes de Bézout.
Alcance y limitaciones
Solo la forma por restas: sin la forma con módulo, el algoritmo extendido ni el tiempo de ejecución.
Acceso y formato
README gratuito en inglés en GitHub, en el repositorio trekhleb/javascript-algorithms, con licencia MIT.
Revisado por PrepKit el 2 oct 2026. Commit de la fuente del recurso: 85293e3e2b88
Evidencias de este resumen
- src/algorithms/math/euclidean-algorithm/README.md
Páginas que lo incluyen
Recibe el boletín de PrepKit
Opcional. No lo necesitas para usar PrepKit.