Google And The Puzzle of Dropping Eggs Google y el rompecabezas de lanzamiento de huevos
Google is also known for its interesting interview questions. Google es también conocido por sus interesantes preguntas. Enjoy this one and my solution. Disfruta de este y mi solución. Suppose you have two eggs. Suponiendo que tiene dos huevos. These are special eggs—they can take much more punishment than you average chicken egg. Estos huevos son especiales-que pueden tomar mucho más la pena que le promedio de huevos de pollo. The question is exactly just how much punishment can they take? La cuestión es exactamente cuánto castigo que puede tener?
Using a 100 storey building and only the two eggs, how would you find out which is the highest floor of the building you can drop the eggs from, before they break? El uso de un edificio de 100 pisos y sólo los dos huevos, ¿cómo saber cuál es el más alto piso del edificio puedes colocar el de los huevos, antes de que?It could be the 1st floor but it could also be the 99th floor—you don’t know but to test, you need to try dropping the eggs from different floors and see what happens. Podría ser la 1 ª planta, pero también podría ser la 99 ª piso-que no conoces pero a prueba, tiene que intentar dejar caer los huevos de diferentes pisos y ver qué pasa.
via SitePoint a través de SitePoint
Are you done yet? ¿Está hecho? My solution is simple. Mi solución es simple.
Use binary search with one egg till it breaks. Utilice búsqueda binaria con un huevo hasta que se rompe. Use linear search with the second egg till it breaks. Uso de búsqueda lineal con el segundo huevo hasta que se rompe. And you have the solution. Y usted tiene la solución. If that’s not clear enough allow me to explain. Si eso no es lo suficientemente claro para permitir que me explique.
First drop one egg from 50th (midway). Primera caída de un huevo de 50 (a mitad de camino).
- If it breaks (no more binary search) then drop the second egg from first floor. Si se rompe (no más búsqueda binaria) y luego soltar el segundo huevo de primer piso. Move up one floor at a time till it breaks. Mover hacia arriba un piso en un tiempo hasta que se rompe.
- If it doesn’t break then drop it from 75th floor. Si no es así entonces romper descenso de 75o piso.
- If it breaks then drop the second egg from 76th floor. Si se rompe luego soltar el segundo huevo de 76o piso. Move up one floor at a time till it breaks. Mover hacia arriba un piso en un tiempo hasta que se rompe.
- If it doesn’t break then drop it from the 87th floor… Si no es así romper luego dejarlo caer, de la 87 ª piso…
I hope you get the picture by now. Espero que usted obtiene la imagen de ahora. I would love to see anyone coming with a better optimized solution. Me encantaría ver a alguien que viene con una mejor solución optimizada.
Update: The optimization is to minimize the number of drops. Actualización: La optimización es reducir al mínimo el número de gotas.
Filed under Filed under Google , Headline News Headline News , How To Cómo , Web | |
| |
RSS 2.0 RSS 2,0 | |
Trackback this Article | este artículo |
Email this Article Enviar artículo
You may also like to read También puede leer |




June 10th, 2006 at 12:24 pm 10 de junio de 2006, a las 12:24 pm
wouldn’t you drop it from the 51st instead of the 76th floor on the second round? no te das de baja desde la 51 en lugar de la 76 ª planta en la segunda ronda? if the first broke on 75, then it’s between 51 and 74 inclusive that you need to check now si la primera se rompió en 75, entonces es entre 51 y 74 inclusive que usted necesita para comprobar ahora
June 10th, 2006 at 5:41 pm 10 de junio de 2006, a las 5:41 pm
I spent a long time typing a detailed explanation of a solution but I lost it in a browser mishap. Pasé mucho tiempo escribiendo una explicación detallada de una solución, pero he perdido en un navegador percance. But, here is my solution, without the explanation: drop egg #1 at every 10th (0, 10, 30, 50…) floor, and drop egg #2 at every 20th floor (20, 40, 60…), until one breaks. Pero, aquí está mi solución, sin la explicación: caída del huevo # 1 en todos los 10o (0, 10, 30, 50…) piso, y soltar el huevo # 2 en cada piso 20 (20, 40, 60…), hasta que uno de las pausas. Then, drop one egg on every odd numbered floor and the other on every even numbered floor until one breaks. A continuación, soltar un huevo en cada piso impares y el otro en cada palabra, incluso los números hasta que uno de los descansos. Then, you will have the answer to the question of “what is the lowest floor on which the egg will break?” Entonces, usted tendrá la respuesta a la pregunta de "¿cuál es el piso más bajo en que el huevo se romperá?"
If you analyze the two solutions with respect to the number of drops, you will see that this alternative has the same best-case performance, and notably better worst-case performance, always wins when the answer is within (10,50) when, and often wins (but sometimes loses) when the answer is greather than 50. Si analizamos las dos soluciones con respecto al número de gotas, se verá que esta alternativa tiene el mismo caso, mejor desempeño y, en particular, mejor peor de los casos, el rendimiento, siempre gana cuando la respuesta es dentro de (10,50), cuando, y gana a menudo (pero a veces pierde) cuando la respuesta es greather de 50 años.
If you analyze the two solutions with respect to travel time/effort going up/down the building, then I believe that the alternative’s advantage is even better. Si analizamos las dos soluciones con respecto al tiempo de viaje / esfuerzo de ir arriba / abajo el edificio, entonces creo que la alternativa de la ventaja es aún mejor. Your solution ignores travel time, but I imagine you’d do it the same way I did (travel up, drop one, travel up again, drop the other, then travel down to get both). Su solución no tiene en cuenta el tiempo de viaje, pero me imagino que te gustaría hacerlo de la misma manera que hice (gastos de viaje, una gota, viajar de nuevo, la caída de otros, entonces de viaje hacia abajo para conseguir ambas cosas).
I don’t know if the alternative solution is optimal; I was just trying to show a better alternative. No sé si la solución alternativa es óptima; yo estaba tratando de mostrar una mejor alternativa. I too am interested in a better solution. Yo también estoy interesado en una solución mejor.
June 11th, 2006 at 7:17 am Junio 11, 2006 a las 7:17 am
@a @ a
That depends on whether your floor numbering starts from 0 (ground floor) or 1 (first floor). Eso depende de si su piso de numeración empieza desde 0 (planta baja) o 1 (primer piso).
@Brian Brian @
I am sorry to hear your explanation got lost. Me siento a escuchar su explicación se perdió. I would love to hear it. Me encantaría escucharlo.
> Then, drop one egg on every odd numbered floor and the other on every even numbered floor until one breaks. > A continuación, soltar un huevo en cada piso impares y el otro en cada palabra, incluso los números hasta que uno de los descansos.
At this point one has already broken. En este punto ya se ha roto. If your second egg breaks too then you do not have any more eggs to find the exact floor. Si su segundo huevo se rompe demasiado entonces usted no tiene más huevos para encontrar la palabra exacta.
Also why use two eggs at ood and even floors? También el motivo por el uso de dos huevos en ood e incluso plantas? Why not simply use one egg? ¿Por qué no simplemente usar un huevo? We are limited by only two eggs. Estamos limitados por sólo dos huevos. So shouldn’t we keep the second egg to pinpoint the exact floor? Por lo tanto, no debemos mantener el segundo huevo para determinar la exacta palabra?
June 12th, 2006 at 12:37 am Junio 12, 2006 a las 12:37 am
You are right; I copied my wording from the 10/20 part absent-mindedly. Tiene usted razón; He copiado mi texto de la parte ausente 10/20 de miras. Once the first egg breaks, you should drop the second one from every floor, increasing the floor number by one, just as in your case. Una vez que el primer huevo se rompe, debe soltar el segundo de cada palabra, cada vez más la palabra de un número, al igual que en su caso.
However, my main point was that it is better to go every 10th floor then to try the “binary search” you described. Sin embargo, mi principal punto es que es mejor que ir cada planta 10 para luego intentar la "búsqueda binaria" que nos comentas. Your search is highly optimized for when the answer is a floor over 75 and it performs very poorly for high floors less than 50. Su búsqueda es altamente optimizado para cuando la respuesta es una palabra más de 75 años y tiene un rendimiento muy mal para pisos de alta menos de 50.
The reason for the “every 10th floor / every 20th floor” logic is to minimize travel time. La razón de la "cada planta 10 / cada piso 20" lógica es reducir al mínimo el tiempo de viaje. Let’s say that the answer is “22.” Then, I would drop egg #1 from floor 10, it would not break. Digamos que la respuesta es "22." Entonces, yo gota de huevo # 1 piso de 10, no iba a romper. Then, I can go up to floor 20 and drop egg #2 from floor 20, and it does not break. Entonces, puedo ir hasta el piso 20 y soltar el huevo # 2 de piso 20, y que no se rompe. Then I need to go down and pick up both eggs, and take them both to floor 30. Entonces tengo que ir y recoger los huevos, y tenerlas a ambas piso 30. At this point I have traveled 10+10+20+30=70 flights of stairs. En este punto he viajado 10 +10 +20 +30 = 70 vuelos de escaleras.
If travel time is not an issue, then you could just go up to floor 10, drop egg #1, go down to pick it up, carry it up to floor 20, drop it again, go down to pick it up, go up to floor 30 etc. In this case you would just keep egg #2 in your pocket until egg #1 breaks. Si el tiempo de viaje no es un problema, entonces usted podría ir hasta el piso 10, caída de huevo # 1, bajar a recogerlo, llevarlo hasta el piso 20, caída de nuevo, ir a recogerlo, subir piso a 30, etc En este caso, usted acaba de mantener huevo # 2 en el bolsillo hasta que el huevo se rompe # 1. This method would require traveling 10+10+20+20+30=90 flights of stairs to get to floor 30. Este método requiere que viajan 10 +10 +20 +20 +30 = 90 vuelos de escaleras para llegar al piso 30. This is the kind of detail that interviewers would probably be interested in at least hearing about-they’d also probably like you to at least ask if the eggs will weaken structurally as you drop them. Este es el tipo de detalle que los entrevistadores probablemente estaría interesado en por lo menos oír hablar de they'd también probablemente al igual que usted, al menos, preguntar si los huevos se debilitan estructuralmente como te das de baja.
Note also that I chose “10″ arbitrarily: I was just trying a better solution, not the optimal one. Tenga en cuenta también que yo elegí "10" arbitrariamente: yo estaba tratando una solución mejor, no la óptima.
June 22nd, 2006 at 4:35 am 22 de Junio, 2006 a las 4:35 am
What about N floors? ¿Qué pasa con los pisos N?
Is 10 a good choice since it’s the sqrt of 100? 10 ¿una buena elección ya que es la sqrt de 100?
What about using a binary search on floors i=1, 2, 4, 8, 16, 32, 64, … and then a linear search for the floors inbetween? ¿Qué sobre el uso de la búsqueda binaria en los pisos i = 1, 2, 4, 8, 16, 32, 64,… y luego una búsqueda lineal para las plantas inbetween?
A solution for 36 floors is here: Una solución de 36 pisos está aquí:
http://mathforum.org/wagon/past_solns/s921.html
Using the fact that 36 is the 8th triangular number, ie 36 = 1 + 2 + … + 8 Usando el hecho de que el 36 es el número 8 de triangular, es decir, 36 = 1 + 2 +… + 8
June 22nd, 2006 at 8:04 am 22 de Junio, 2006 a las 8:04 am
If you know the height of the building then I think the jump search is optimum using sqrt(h) as your jump size, but if the height of the building is unknown then I’m really not sure. Si conoce la altura del edificio, entonces creo que el salto de búsqueda es la utilización óptima sqrt (h) como su tamaño salto, pero si la altura del edificio es desconocida entonces yo realmente no estoy seguro. Triangular numbers, fibonnaci, or binary. Los números triangulares, fibonnaci, o binario. Binary search on floors i=1, 2, 4, 8, 16, 32, 64, … covers a lot of ground quickly with the first egg. Búsqueda binaria en los pisos i = 1, 2, 4, 8, 16, 32, 64,… abarca un lote de terreno rápidamente con el primer huevo.
November 4th, 2006 at 4:02 am 4 de Noviembre, 2006 a las 4:02 am
hei…just a simple math problem IES… un simple problema de matemáticas
suppose we jump every N floors, and use second egg in the one step increasing pinpoint. supongo que cada salto N plantas, y el uso de huevos en el segundo el aumento de un paso por determinar.
MaxNumbers = 100/N + (N-1) MaxNumbers = 100 / N + (N-1)
To get the Max N we take a derivative: Para obtener el máximo N tomamos un derivado:
-100/N^2 + 1 = 0 => N = 10 -100 / N ^ 2 + 1 = 0 => N = 10
So we take 1st egg every 10 floors, then second egg one by one to pinpoint. Por lo tanto, tomar 1 huevo cada 10 pisos, entonces segundo huevo, uno por uno, para señalar.
Worse case: 19 Peor caso: 19
Average case: 10. Promedio caso: 10.
November 30th, 2006 at 1:43 am 30 de noviembre de 2006, a las 1:43 am
Say X is the number we are looking for. Diga X es el número que estamos buscando. Then, my choice will start with floor X first. Entonces, mi elección se iniciará con la palabra X en primer lugar. This way, if the egg breaks, I start a linear search starting from 1 to X-1, guaranteeing a solution in Y attempts. De esta forma, si el huevo se rompe, que se inicia una búsqueda lineal a partir del 1 º al X-1, garantizando una solución en Y intentos. Otherwise, I go to X + (X-1) floor…. De lo contrario, voy a X + (X-1) piso…. Continuing in this way, with X attempts, I can cover sum(X + X-1 + X-2… 2 + 1) floors. Continuando de esta manera, los intentos con X, no puedo cubrir la suma (X + X-1 + X-2… 2 + 1) plantas. Hence, we are looking for Min X such that X(X+1)/2 > 100. Por lo tanto, estamos buscando Min X tal que X (X +1) / 2> 100.
I can do it in 14 No puedo hacerlo en 14
October 4th, 2007 at 3:57 pm 4 de Octubre, 2007 a las 3:57 pm
I ran into this problem recently and am looking for a solution… it seems there are many Yo corría en este problema hace poco y estoy buscando una solución… al parecer hay muchos
I don’t have a formal proof of this, but a gut feeling tells me my solution is good/pretty close to optimal (and it’s nice to have Jason Southgate’s agreement, I think he’s describing the same solution?). No tengo una prueba formal de ello, sino un tubo digestivo sentimiento me dice mi solución es buena / muy cerca de óptima (y es bueno tener Southgate Jason está de acuerdo, creo que es la descripción de la misma solución? ),.
Algorithm (assumes we know the number of floors): Algoritmo (asume que sabemos el número de pisos):
* Number of floors = N * Número de pisos = N
* Drop the first egg at floor 1 * sqrt(N), 2 * sqrt(N), … until you either reach N or it breaks. * Soltar el primer huevo en piso 1 * sqrt (N), 2 * sqrt (N),… hasta que o bien llegar a N o se rompe. If you drop it from the top floor without it breaking you have your answer. Si te das de baja desde el último piso sin romperla usted tiene la respuesta.
* If it breaks when dropped from k * sqrt(N) floor then drop the second egg, starting at the (k - 1) * sqrt(N) floor and going up one floor at a time until it breaks. * Si se rompe cuando se redujo de k * sqrt (N) piso luego soltar el segundo huevo, a partir de la (k - 1) * sqrt (N) piso y subir un piso en un momento hasta que se rompe. By definition it must break sometime before k * sqrt(N) Por definición, debe romper en algún momento antes de k * sqrt (N)
I think this algorithm is O(N^0.5) - the maximum number of drops it can take is sqrt(N) + (sqrt(N) - 2). Creo que este algoritmo es O (n ^ 0.5) - el número máximo de gotas que pueden tomar es sqrt (N) + (sqrt (N) - 2). This would occur if it broke on the N-1′th floor. Esto se produciría si se rompió por la N-1'th piso.
Two interesting extensions of it would be: what if the number of floors doesn’t have an integer square root? Dos interesantes extensiones de la misma sería: ¿y si el número de pisos no tiene una raíz cuadrada entero? Eg if N = 378? Por ejemplo, si N = 378? It seems there are three alternatives for the size of the increment of the first egg drops - the floor, ceiling or round of sqrt(N). Al parecer, hay tres alternativas para el tamaño del incremento de las primeras gotas de huevo - el piso, techo o ronda de sqrt (N). I’m not certain of my answer but I think using the round would be optimal? No estoy seguro de mi respuesta pero creo que usando la ronda sería óptimo?
The second extension is what to do in the case of an unknown number of floors, where N is just some integer (1…infinity). La segunda ampliación es qué hacer en el caso de un número desconocido de los pisos, donde N es sólo algunas entero (1 infinito…). sqrt(infinity) just doesn’t make sense, and it seems to me that if any integer is equiprobable (sp?) then you want to leap up towards infinity as fast as possible, so you get a known upper bound and then just have a linear search. sqrt (infinito) simplemente no tiene sentido, y me parece que si todo entero es equiprobable (sp?), entonces usted quiere salto hacia el infinito tan rápidamente como sea posible, por lo que obtener un límite superior conocido y, a continuación, sólo han una búsqueda lineal. But I have no way of expressing this formally or in any convincing way, I’m just pumping intuitions madly! Pero no tengo manera de expresar formalmente esta o en cualquier manera convincente, sólo me bombeo intuiciones madly!
All this fancy reasoning said though I think the triangle number solution linked to above is actually better. Todo esto dicho razonamiento de fantasía aunque creo que la solución número triángulo vinculado al anterior es en realidad mejor. I’m just not sure how you would generalise it to situations where N is not a triangular number. Estoy seguro de que no sólo cómo generalizar a situaciones en las que N no es un número triangular.
Binary search would be O(log N) though… hmmm, OK, now I’m confused and lack all certainty, but what the heck, other things to do this morning, I’ll post anyway Búsqueda binaria sería O (log N) hmmm… aunque, OK, ahora estoy confundido y carecen de toda certeza, pero lo que la Heck, otras cosas que hacer esta mañana, voy a cargo de todos modos
Christo
PS: A point I didn’t consider till now: if you’ve checked all but two possible floors and break the egg on the second to last possible floor then you still have your answer… Again, not sure and no time to see if this is important! PS: Un punto que no se consideraba hasta ahora: si ha comprobado todos, pero dos pisos y romper el huevo en la segunda a la última palabra posible, entonces usted todavía tiene su respuesta… Una vez más, no está seguro y no hay tiempo para ver si esto es importante!
October 5th, 2007 at 5:13 pm 5 de octubre de 2007, a las 5:13 pm
The original puzzle doesn’t say what they’re trying to optimize, so I assume the optimization variable is left to the solver. El original puzzle no decir lo que estamos tratando de optimizar, así que yo asumo la optimización de la variable se deja a la solver.
Personally, I would optimize for minimal egg breaks by starting on floor 1 and going up one floor at a time until it breaks. Personalmente, yo para optimizar mínima de huevo se rompe a partir del piso 1 y subir un piso en un momento hasta que se rompe. In the end you’d be left with your answer and one unbroken egg. Al fin y al cabo se le había dejado con su respuesta y un huevo intacto. Any egg that can survive a drop from more than 1 story would be a very valuable egg indeed, and get you a lot of money on ebay! Cualquier huevo que puede sobrevivir a una caída de más de 1 historia sería muy valioso huevo de hecho, y hacerle un montón de dinero en eBay!
October 6th, 2007 at 11:42 am 6 de octubre de 2007, a las 11:42 am
The optimization is for minimizing the number of drops. La optimización para reducir al mínimo el número de gotas.
October 16th, 2007 at 12:42 am 16 de octubre de 2007, a las 12:42 am
For goodness sake. Por la bondad misma. The egg will break when dropped from the first floor because, well, it’s an egg. El huevo se romperá cuando cayó de la primera planta, ya que, además, es un huevo.
I say cook the two eggs for breakfast and move onto the next question! Digo cocinar los dos huevos para el desayuno y pasan a la siguiente pregunta!
November 2nd, 2007 at 11:21 pm 2 de noviembre de 2007, a las 11:21 PM
@Christo Fogelberg execellent explanation and generalisation for optimizing the no of attempts. @ Christo Fogelberg execellent explicación y generalización para optimizar el no de los intentos.
but ofcourse you can match sqrt(n)(how did you find this?) from duduqin solution. pero por supuesto puede hacer coincidir sqrt (n) (¿cómo lo encuentro?) de duduqin solución.
it is like : es como:
no of steps = n no de pasos = n
let us assume x = no of steps between two attempts asumamos que x = no de pasos entre dos intentos
and y = total no of attempts with first egg (maximum) y = y no total de los intentos con el primer huevo (máximo)
so we get de modo que obtenemos
x*y = n x * y = n
and now no of attempt = y + x -1 (or y + x not sure) y ahora intento no de = y + x -1 (o x + y no estaba seguro)
so for min(y + x - 1) así que para min (y + x - 1)
derivative(y + x -1) = 0 derivados (y + x -1) = 0
so you get x = y = sqrt(n) from here. por lo que obtener x = y = sqrt (n) desde aquí.
Now we can go with your solution. Ahora podemos ir con su solución.
I dont know what to do when it is required to optimize not the no of attemps but the total no of steps travelled(going up to some floor and coming down to collect the egg(s) and in the same way). I dont saber qué hacer cuando se requiere para optimizar el no de no intenta, pero el total de pasos no viajó (de hasta un piso y algunos próximos a recoger el huevo (s) y de la misma manera).
Please put your views. Por favor, ponga sus opiniones.
December 4th, 2007 at 4:24 am 4 de Diciembre, 2007 a las 4:24 am
Well because the questions is based upin eggs (fragile), we need to include the non-algorithmic parameters as well. Bien porque las preguntas se basa UPIN huevos (frágil), tenemos que incluir la no-algorítmico parámetros también.
Looking at the question statement, nothing is mentioned about the material on which it is to be dropped & the place where it should be dropped. En cuanto a la cuestión declaración, nada se menciona sobre el material en que se cayó y el lugar en que debe suprimirse. In those cases the egg could also be dropped on to the same floor from any height. En estos casos el huevo también podría ser descendido a la misma planta desde cualquier altura.
December 4th, 2007 at 9:20 pm 4 de Diciembre, 2007 a las 9:20 pm
Obviously it is being dropped to the ground otherwise the question becomes meaningless. Es evidente que se está descendido a la tierra de otro modo la cuestión pasa a ser de sentido. What non-algorithmic parameters are you talking about? Lo que no algorítmico parámetros está usted hablando?
The task is to determine at which height (divisible by height of each floors which are of equal height) the egg breaks. La tarea es determinar a que altura (divisible por la altura de cada uno de los pisos que son de igual altura) se rompe el huevo. The material of egg is unknown but obviously it is made of stronger material than your regular poultry egg. El material de huevo se desconoce pero que, evidentemente, está hecha de material más fuerte que su regulares de aves de corral huevo.
December 14th, 2007 at 11:48 am 14 de diciembre de 2007, a las 11:48 am
One idea is that you want to maintain a constant risk throughout the drops to guarantee an equal average- and worst-case. Una idea es que desea mantener una constante a lo largo del riesgo se reduce a garantizar una igualdad de media-y peor de los casos.
With the strategy of skipping a constant number of floors \ Con la estrategia de saltar una constante el número de pisos \
January 18th, 2008 at 1:36 pm 18 de enero de 2008 a 1:36 pm
I found this page again randomly while checking nothing too noxious was being attributed to me on Google, it sounds like the discussion has moved on so I figure I\’ll add to it again Encontré esta página de nuevo al azar, mientras que comprobar nada demasiado nocivas se atribuye a mi persona en Google, que suena como el debate se ha trasladado a lo que el gráfico I \ 'll añadir de nuevo
@Dhananjay: @ Dhananjay:
Yes, going back now and reading duduqin\’s reasoning I see it is a specific example for n=100 of the general case. Sí, vuelve ahora y de la lectura duduqin \ 's razonamiento yo lo veo es un ejemplo concreto para n = 100 de la general.
You are also right that I did not explain why sqrt(n) was optimal - and in fact, as I think I noted, I\’m still not sure that it is! Usted también es justo que no me explique por qué sqrt (n) es óptimo - y de hecho, como creo que he tomado nota, I \ 'm aún no está seguro de que es!
In any case, I don\’t think derivatives factor into it. En cualquier caso, I don \ 't derivados factor pensar en él. Perhaps they do but I\’m not sure what you\’re deriving with respect to. Tal vez lo hacen pero yo \ 'm no está seguro de lo que usted \' re derivados con respecto a. I agree x = y and that the maximum number of attempts will be n=xy and that you can get sqrt(n) from that but I\’m still a little bit confused. Estoy de acuerdo en x = y y que el número máximo de intentos será n = xy, y que puede obtener sqrt (n), pero que de I \ 'm todavía un poco confusa. Sorry! Perdón! Also, what does the min function in min(x + y - 1) refer to or mean? Por otra parte, ¿qué significa la función min a min (x + y - 1) se hace referencia o se quiere decir?
###########
@dkaminski: @ dkaminski:
I haven\’t thought about this much, but I think you\’re right - it would be interesting to look at the expectation distribution. Me refugio \ 't pensado en esto mucho, pero creo que usted \' re derecho - sería interesante ver a la expectativa de distribución. Any further thoughts? Cualquier otra pensamientos? (I have none right now:) (Tengo ninguno ahora mismo:)
Actually, talking of expectation, a cute wee problem with plenty of off-by-1 and off-by-k chances that a friend and I ended up talking about over dinner recently goes something like this: En realidad, hablar de esperanza, un cute wee problema con abundante por fuera de-1 y off-by-k posibilidades de que un amigo y yo terminamos hablando de poco más de la cena va algo como esto:
You have a bag with 50 lengths of string inside it. Usted tiene una bolsa con 50 longitudes de cadena dentro de él.
You pull out one end of one piece of string, leaving the rest of that piece in the bag. Usted sacar un extremo de un trozo de cuerda, dejando el resto de esa pieza en la bolsa. You pull out a second end of string, possibly the end of a different piece of string and possibly the other end of the piece of string you\’re already holding. Usted saque una segunda final de la cadena, posiblemente el final de una pieza diferente de la cadena y posiblemente el otro extremo del pedazo de cordón usted \ 're ya la celebración. You tie the two ends together before dropping them back in the bag. Usted empate en los dos extremos juntos antes de caer de nuevo en la bolsa.
After all the ends have been tied to some other end, what is the expected number of loops in the bag? Después de todo los extremos se han vinculado a algún otro fin, ¿cuál es el número esperado de los bucles en la bolsa?
OK, it\’s Friday night, there\’s jazz and cocktails on and if I\’m not going to go to that I should really be doing something more productive. OK, es \ 's viernes por la noche, existe \' s jazz y cócteles y si en I \ 'm no va a ir a que realmente debo estar haciendo algo más productivo. Cheerio all! Cheerio todos!
xto