Edición de «Práctica 3: Cuantificadores (Algoritmos I)»
De Cuba-Wiki
Puedes deshacer la edición. Antes de deshacer la edición, comprueba la siguiente comparación para verificar que realmente es lo que quieres hacer, y entonces publica los cambios para así efectuar la reversión.
Revisión actual | Tu texto | ||
Línea 56: | Línea 56: | ||
e)aux primo<math>(x: \mathbb{Z})</math>: Bool = |[ y | y <math>\leftarrow</math>[1..|x|], x mod y == 0]| == 2 (Recordemos que un número es primo si tiene exactamente dos divisores positivos: el 1 y su valor absoluto) | e)aux primo<math>(x: \mathbb{Z})</math>: Bool = |[ y | y <math>\leftarrow</math>[1..|x|], x mod y == 0]| == 2 (Recordemos que un número es primo si tiene exactamente dos divisores positivos: el 1 y su valor absoluto) | ||
f) aux coprimos<math>(x,y: \mathbb{Z})</math>: Bool == |[ z | z <math>\leftarrow</math> [ | f) aux coprimos<math>(x,y: \mathbb{Z})</math>: Bool == |[ z | z <math>\leftarrow</math> [0..x], x mod z==0, y mod z == 0]| == 1 (Dos números son coprimos si tienen un único divisor positivo en común: el uno) | ||
g) aux divisoresGrandes<math>(x,y : \mathbb{Z})</math>: Bool = (<math>\forall</math> z <math>\leftarrow</math> [ t | t <math>\leftarrow</math> [2..|x|], x mod t == 0]) z > y | g) aux divisoresGrandes<math>(x,y : \mathbb{Z})</math>: Bool = (<math>\forall</math> z <math>\leftarrow</math> [ t | t <math>\leftarrow</math> [2..|x|], x mod t == 0]) z > y |