Repositório para a disciplina de otimização e simulação.
Nota: Trabalhos e 2 projetos (em grupo)
O problema escolhe a linguagem, não vocês - Peretta
Como o computador faz cálculos?
- Ponto Flutuante, IEEE 754
Mantissa → Coeficiente do 2 é negativo (primeiro bit é 2⁻¹ até 2⁻²³)
Expoente → Coeficiente do 2 é positivo (primeiro bit é 2⁸ até 2⁰)
import numpy as np
import matplotlib.pyplot as plt
def dfdt(f,t):
h = 2**-36
return(f(t+h) - f(t-h))/(2*h)
t = np.linspace(0,2*np*pi, 100)
fun = lambda t : np.sin(t)
plt.plot(t,fun(t), 'b', label='seno')
plt.plot(t,dfdt(fun,t)), 'b', label='cosseno')
plt.legend()
plt.show()
first derivative dfdt(f,t) = (f(t+h) - f(t-h))/(2*h)
second derivative d²/dt² f(t) = d/dt(d/dt f(t))
d/dt sin = cos
- LP Problem of optimization
Number_of_employees_that_work_on_monday = 8.0
Number_of_employees_that_work_on_tuesday = 0.0
Number_of_employees_that_work_on_wednesday = 3.0
Number_of_employees_that_work_on_thursday = 5.0
Number_of_employees_that_work_on_friday = 2.0
Number_of_employees_that_work_on_saturday = 3.0
Number_of_employees_that_work_on_sunday = 2.0
Total Number of Employees = 23.0
- Wikipedia: Finite difference
- Imprevisibilidade
- Retorno à média (Central Limit Theorem) - Wikipedia
- É possível identificar uma distribuição de probabilidade
- Distribuição normal (Gaussiana) - Wikipedia
- LCG (Linear Congruential Generator) - Wikipedia
- Mersenne Twister - Wikipedia
- Random.org
- Box-Muller - Wikipedia
- Big Crunch - Wikipedia
Se o jogador tem menos de 50% de chance de ganhar, ele não deve apostar.
Uma forma de usar estados não-determinísticos para conseguir probabilidades de mudanças com base em dados históricos. É uma simulação estocástica, então, é necessário simular várias vezes e fazer uma média do valor de interesse.