Edición de «Práctica 3: Cuantificadores (Algoritmos I)»

De Cuba-Wiki
Advertencia: no has iniciado sesión. Tu dirección IP se hará pública si haces cualquier edición. Si inicias sesión o creas una cuenta, tus ediciones se atribuirán a tu nombre de usuario, además de otros beneficios.

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 46: Línea 46:
'''Respuestas:'''
'''Respuestas:'''


a) aux suc <math>(x: \mathbb{Z}): \mathbb{Z}</math> = x + 1;
a) aux suc <math>(x: \mathbb{Z}): \mathbb{Z}</math> = x+1


b) aux suma <math>(x,y: \mathbb{R}): \mathbb{R}</math> = x + y;
b) aux suma <math>(x,y: \mathbb{R}): \mathbb{R}</math> = x + y


c) aux producto<math>(x, y: \mathbb{R}): \mathbb{R}</math> = x * y;
c) aux producto<math>(x, y: \mathbb{R}): \mathbb{R}</math> = x * y


d) aux cuadrado<math>(x: \mathbb{Z})</math>: Bool = (x <math>\geq</math> 0 <math>\wedge</math>(<math>\exists</math> y <math>\leftarrow</math> [0..x]) y*y == x);
d) aux cuadrado<math>(x: \mathbb{Z})</math>: Bool = (<math>\exists y \leftarrow</math> [1..y]) y*y = x  


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)  
Línea 68: Línea 68:


j) aux mcd<math>(x,y: \mathbb{Z}): \mathbb{Z}</math> = <math>[ z | z \leftarrow [0..|x|], x \ mod \ z == 0, y \ mod \ z == 0 ]_{[ z | z \leftarrow [0..|x|], x \ mod \ z == 0, y \ mod \ z == 0 ] - 1}</math>
j) aux mcd<math>(x,y: \mathbb{Z}): \mathbb{Z}</math> = <math>[ z | z \leftarrow [0..|x|], x \ mod \ z == 0, y \ mod \ z == 0 ]_{[ z | z \leftarrow [0..|x|], x \ mod \ z == 0, y \ mod \ z == 0 ] - 1}</math>


===Ejercicio 3===
===Ejercicio 3===
Ten en cuenta que todas las contribuciones a Cuba-Wiki pueden ser editadas, modificadas o eliminadas por otros colaboradores. Si no deseas que las modifiquen sin limitaciones, no las publiques aquí.
Al mismo tiempo, asumimos que eres el autor de lo que escribiste, o lo copiaste de una fuente en el dominio público o con licencia libre (véase Cuba-Wiki:Derechos de autor para más detalles). ¡No uses textos con copyright sin permiso!

Para editar esta página, responde la pregunta que aparece abajo (más información):

Cancelar Ayuda de edición (se abre en una ventana nueva)