Social Icons

twitterfacebookgoogle plusemail

martes, 18 de septiembre de 2012

Silogísticas a lógica predictiva

Exercise 4.15 Translate the following syllogistic statements into predicate logic, without using universal quantifiers:

        (1) All A are B.

        (2) All A are non-B.

        (3) No A are B.


(1) All A are B:


 (2) All A are non-B:


(3) No A are B:






El ejercicio fue tomado de esta fuente:

jueves, 13 de septiembre de 2012

Homework: Implementation of RSA algorithm in Python

I implemented with sockets where the server read a plaintext, in the plaintext we have the users with his private keys. The server have to create a random number and pass it by a function, then the server send it to a client where the client has to pass it by a function, the user have to give his name to get his public key where he has d and n. The client have to squarting the random number that the server sent to d module of n, we can call it r. The client sends the hist username and the r value, then the server squart r to e module of n( n and e are the private key), if the value that we get of that operation is equal to the y value, we establish a secure connection, else we say a warning.


The client has to type his name to get his public key.


Server socket

Client socket

martes, 11 de septiembre de 2012

Modelo matematico y función de transferencia de proyecto

Antes de explicar mi modelo matemático, explicaré mi proyecto. Mi proyecto trata de mover una pelota a cierta altura en el aire dentro de un tubo donde este será movido por un ventilador con un motor DC, gracias a un sensor ultrasonico este sabría hacia que altura moverse, osea que tanta potencia le daríamos al motor DC para que la pelota se eleve. Para ello reciclaremos el juguete que vemos abajo, conectando el motor DC y el sensor ultrasonico a un arduino que por medio de este haremos el control.


Viendo esto, determinamos que nuestra planta será el motor DC, así que mi modelo se basará en el motor DC donde recibirá de entrada un valor dado por sensor para que este aumente o disminuya su corriente.

 Llegado a esto presentaré a continuación un modelo de un motor DC.

Donde nuestro i dependerá del valor dado de nuestro sensor. Esta es la ecuación diferencial.
 
Donde J es la inercia de rotación de eje y carga, b es el contrapeso,  k es la constante del motor. Asumiendo que nuestro tiempo inicial es 0,
 Y esta es la función de transferencia :

 

En donde nuestra entrada será Js^2 + bs y nuestra salida será k.

Fuente:

Esta diapositivas me fueron de gran ayuda ya que explicaban algunos ejemplos de funciones de transferencia.

jueves, 6 de septiembre de 2012

Problema de laboratorio

Dada:


determine los valores iniciales de f(0+). Utilizando el teorema de valor inicial.
Sabemos que:

Lo cual es equivalente a tener: 




Eliminamos s




Diffie–Hellman key exchange

With two collaborators where one is called Alice and the another one called Bob, they established the diffie-hellman key exchange. My work here is to be a eavesdropper and I need to get the k value that is called secret key, to see more info you can check out here.

Let's see the information that I take:

P = 17
G = 11

from Alice X = 4
from Bob Y = 10

The method that I did is by brutal force:


And We got the value of k is 4.

martes, 4 de septiembre de 2012

Lógica predicativa

En la entrada de hoy se verá lógica predicativa en la que se resolverá un problema.

A continuación veremos el siguiente predicato:

 No country, that has been explored, is infected by dragons;
Unexplored countries are fascinating.

Donde llamaremos c como country, E como explored, I como infected by dragons y F como fascinating. Por lo tanto obtenemos la siguiente lógica predicativa:






Libro de referencia de la cual obtuve el problema:

Symbolic Logic por Lewis Carroll


Diagramas binarios de decisión

En esta entrada veremos el diagrama binario de decisión en donde se puede observar la proposición que use en la imágen de abajo.

Como podemos observar se realizaron operaciones repetidas, y realizamos la siguiente reducción.

Y ahora veamoslo de una manera más limpia, podemos observar que sea reducido gran parte del árbol. Sin embargo aún tenemos un nodo repetido la cual reduciremos.

Ahora veremos nuestro diagrama binario de decisión ya reducido.