-
Sí, pero no puede hacerse arbitrariamente pequeño. A medida que aumente el número de jugadores, el número de turnos esperado para terminar la partida se acercará a 4 .
-
Sí lo haría, la duración media del juego puede hacerse arbitrariamente larga si se utilizan suficientes números para las bolas. La relación exacta es probablemente muy complicada.
He optado por un enfoque numérico, ya que las probabilidades para el BINGO son extremadamente poco obvias. He escrito un programa en Python que responde (aproximadamente) a la pregunta "¿Cuántos números totales necesitamos para que un juego dure Nturns
dado que tenemos Nplayers
gente jugando?" Tenga en cuenta que el número de números debe ser un múltiplo de 5 De lo contrario, una de las columnas estaría sesgada. Dado que 50 turnos parece ser un buen promedio de duración para un juego, si sólo ponemos R=50 He encontrado un ajuste experimental para 1≤P≤100 . Vea este gráfico:
![Experimental fit]()
Tenga en cuenta que para responder a su pregunta de ejemplo, el modelo da N≈256.5 , por lo que probablemente necesitemos 255 números. Aquí está el programa si quieres calcular algunos resultados con más precisión; simplemente cambia los argumentos de how_many_numbers(Nplayers, Nturns)
.
from random import shuffle, sample
# General plan: card represented as 5x5 arrays of ints, with
# filled spaces represented by 0's and called numbers being
# represented by [column number, actual number].
# Bingo is obtained with straight lines (including diagonals)
def generate_card(N): # makes fresh card with N numbers (mod 5)
N_per_col = N/5 # numbers per column
card = []
for x in range(0, 5):
card.append(sample(range(1 + x*N_per_col, N_per_col + 1 + x*N_per_col), 5))
card[2][2] = 0 # free space
return card
def generate_draws(N): # makes randomized list of balls to be drawn
# for N numbers/card (mod 5)
N_per_col = N/5
draws = []
for x in range(0, 5):
for y in range(1 + x*N_per_col, N_per_col + 1 + x*N_per_col):
draws.append([x, y])
shuffle(draws)
return draws
def did_i_win(card, filled): # simulates player checking
# whether or not they won after adding "filled". Player
# only checks the row an column of the last number he filled,
# or the diagonal if necessary.
for column in range(0, 5):
if card[filled[0]][column] != 0:
for row in range(0, 5):
if card[row][filled[1]] != 0:
if filled[0] == filled[1] or filled[0] + filled[1] == 4:
for x in range(0, 5):
if card[x][x] != 0:
for y in range(0, 5):
if card[y][4 - y] != 0:
return 0
return 1
return 1
else:
return 0
return 1
return 1
def update_card(mycard, called): # simulates player
# updating all their cards with the most
# recently called number; returns 1 if BINGO
newcard = mycard
for row in range(0, 5):
if newcard[called[0]][row] == called[1]:
newcard[called[0]][row] = 0
if did_i_win(newcard, [called[0], row]) == 1:
return 1
return newcard
def grid_print(card): # Prints a card out as a grid, only used for debugging
for x in range(0, 5):
print card[0][x], card[1][x], card[2][x], card[3][x], card[4][x]
def play_game(Nplayers, Nnumbers): # Simulates the players playing a game,
# returns the number of turns taken for the game to finish
hands = [] # all players' hands
for x in range(0, Nplayers):
hands.append(generate_card(Nnumbers))
undrawn = generate_draws(Nnumbers) # balls in wheel
Nturns = 0
while True: # while no one has won
Nturns = Nturns + 1
card = undrawn.pop(0) # Ball drawn and discarded
for x in range(0, Nplayers): # Players update their hands
hands[x] = update_card(hands[x], card)
if hands[x] == 1: # if a player won
return Nturns
def Exp_N(Ntrials, Nplayers, Nnumbers): # Runs Ntrials simulations and returns
# the expected number of turns until a bingo is reached in a game with
# Nplayers players and Nnumbers available for the cards
turns = 0
for x in range(0, Ntrials):
turns = turns + play_game(Nplayers, Nnumbers)
return float(turns)/Ntrials
def how_many_numbers(Nplayers, Nturns): # Determines how many numbers
# are needed for a game with Nplayers to last Nturns
N = 25
while True:
Nturns_N = Exp_N(10, Nplayers, N) # change the 10 to 100 for greater accuracy
if Nturns_N > Nturns:
best_N = N
score = abs(Nturns_N - Nturns)
for N2 in range(N - 25, N + 25 + 1, 5):
d = abs(Exp_N(100, Nplayers, N2) - Nturns) # change the 100 to
# 1000 for greater accuracy
if d < score:
best_N = N2
score = d
return best_N
N = N + 5
print how_many_numbers(1, 42)