Algoritmos Probabilísticos, Parte 3: Las Vegas

Foto de uma placa na cidade de Las Vegas dizendo "Welcome to fabulous Las Vegas Nevada"
Fonte: Mathieu Lebreton
def MC(v,x):
i = randint(0, len(v))
return i
def LV(v,x):
while True:
i = randint(0, len(v))
if v[i]==x:
return i

--

--

Computer Science professor at UFPel. Machine Learning and Artificial Intelligence practitioner and researcher.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ricardo Araujo

Ricardo Araujo

Computer Science professor at UFPel. Machine Learning and Artificial Intelligence practitioner and researcher.