|
The more im working on the horse problem the more i am sure that the solution is 6
Even in the very worst case scenario, by always racing your fastest horse you will eliminate a minimum of 2 horses per round (as usual), however, instead of having to do 7 races since you don't know which horse is the fastest, after the end you DO know which horse is the fastest (since you've raced your fastest one every time) reducing your race count by 1
edit: god damn worst case gives 8 races, but its possible to do it by 5? in best case (5-6 i'm still not 100% sure) Kinda annoying me now lol because i was expecting a more elegant solution but let me crack with it for longer
|
On March 29 2011 20:29 Adeeler wrote: Think outside the box and inside the box also for the wolf lake problem.
Know your variables. 1 human, 1 wolf.
Swim a little side to side and the wolf will run the entire distance around the lake again and again and tire itself out.
Then proceed in any direction. Remember the math solution doesn't help you if the lake is so small the wolf always catchs you; you want a solution that encompasses all possible lake sizes which the math only solves for large lakes considering the speed of a human swimming is.
WTF? I hope you don't need a job.
|
Ok all done, best cast scenario = 6
Otherwise 7 is a surefire way to do it
With the risky way, you are garuanteed 8, but can get 6
|
On March 29 2011 20:46 BrTarolg wrote: The more im working on the horse problem the more i am sure that the solution is 6
Even in the very worst case scenario, by always racing your fastest horse you will eliminate a minimum of 2 horses per round (as usual), however, instead of having to do 7 races since you don't know which horse is the fastest, after the end you DO know which horse is the fastest (since you've raced your fastest one every time) reducing your race count by 1
edit: god damn worst case gives 8 races, but its possible to do it by 5? in best case (5-6 i'm still not 100% sure) Kinda annoying me now lol because i was expecting a more elegant solution but let me crack with it for longer
But wouldn't you need to measure the time other horses finish relative to that chosen horse for that? If you can do that might as well do it in 5 races. If you're comparing distances it gets a bit icky because the horses don't run at constant speed.
|
On March 29 2011 21:22 TrainSamurai wrote:Show nested quote +On March 29 2011 20:46 BrTarolg wrote: The more im working on the horse problem the more i am sure that the solution is 6
Even in the very worst case scenario, by always racing your fastest horse you will eliminate a minimum of 2 horses per round (as usual), however, instead of having to do 7 races since you don't know which horse is the fastest, after the end you DO know which horse is the fastest (since you've raced your fastest one every time) reducing your race count by 1
edit: god damn worst case gives 8 races, but its possible to do it by 5? in best case (5-6 i'm still not 100% sure) Kinda annoying me now lol because i was expecting a more elegant solution but let me crack with it for longer But wouldn't you need to measure the time other horses finish relative to that chosen horse for that? If you can do that might as well do it in 5 races. If you're comparing distances it gets a bit icky because the horses don't run at constant speed.
Let me give an example
You run the first five horses, eliminate two
Run the fastest horse from the first five, and then any 4 other horses
If the fastest horse from the first five comes 2nd, you can eliminate both 2 horses from your normal 5 horse group, AND you can eliminate the slowest horse from the first group If he comes third, you can eliminate TWO horses from the first group And if he comes last, you can eliminate a total of 4 horses in a single race
If every single race you find out your fastest horse was too slow, then you essentially eliminate 2 horses in the first race, and then 4 horses every single race thereafter. After 6 races, you are thus left with 3 horses, which are your fastest three ^^
Edit:
If you take a more complicated example, first five horses (a1-5), lose a4 a5 Now race A1 b1-4, and b1 comes first, a1 comes second eliminate a3 and b3 b4 Now if you race B1 and C1-4, if C1 wins and B1 comes second, you can eliminate C3 C4 (as usual), but you can also eliminate A2 (since C1>B1>A1>A2)
Thus even with a second place, you can keep on eliminating larger number of horses given a non-worst case scenario
|
Is it true that some of these firms test you on the raw speed of your mental arithmetic?
On March 29 2011 19:23 paper wrote:Columns are groups of horses in fives. They are conveniently sorted from fastest to slowest from the top left to the bottom right because... The first five races give you the top runners from each group. Throw the top runners from each group in a sixth race. You now have your guaranteed fastest horse at the most top left position. The seventh race has the leftover five horses marked by the orange circles (excluding the fastest horse at the upper left corner). The two winners are the remainder of your three fastest horses. This is just a matter of following the "circles" (when prioritizing going right over going down). That's just how I see it though ;p
I don't see how it follows from the first 6 races that (say) the 4th fastest horse in the column with the fastest horse is faster than the 4th fastest horse in any other column. What if, for example, the slowest horse and the fastest horse start off in the same column? It seems like 16 of those inequality signs are gratuitous.
Here's another way to think about it. If there's 3 horses faster than you, then you can't be in the top 3. After the first 6 races, there's only 5 horses left (besides the fastest) that aren't separated from the fastest horse by a 'chain' of length 3 or more
It might not the best method though.
|
I don't get the math in some of these. with the wolf, I think it makes more sense to wait for night and swim underwater to sneak away from him. These questions are coming from a humanities guy though.
Edit: I can't read
|
Man, that gives me a headache. I mean, it's right per induction and makes perfect sense if you think about it mathematically (and logical), but it's still weird (and mind-blowing) that a not at all new information causes such a chain reaction.
|
I love questions like this, keep them coming.
|
On March 29 2011 17:54 DTK-m2 wrote: 2.) 30 strings. Two parallel rows of 30 holes. Each of the 30 strings goes through one of the 30 holes in the first row, and then one of the 30 holes in the second row. What is the expected number of crossovers, where one string overlaps the other?
This is pretty cool. As stated it's still ambiguous though - do you mean to say that exactly one string goes through every hole? Or can more than one go through the holes... I'll assume the former.
If you're matching up one left hole with one right hole 30 times, we're looking at a random element of S_30, the symmetric group on 30 objects. A configuration of the 30 strings is just a permutation s on {1,2,...,29,30}. That is, number the holes on each side from 1 to 30, and when you put all the strings on, for each n from 1-30, let s(n) be number at the right end of the string which starts at n at the left end. We want to know how many strings cross other strings. When do those crossovers happen? Well, whenever we have some pair of holes n and m with n<m and s(n)>s(m). In math-land these are called inversions. The number of inversions (i.e. the number of pairs in the list {s(1),s(2),...,s(29),s(30)} which are out of order) is the same as the number of times you'd have to interchange consecutive elements to get everything back to the correct order (i.e. the number of times you'd have to swap right endpoints of adjacent strings to get all the strings going straight across). The minimum number of inversions is obviously 0, corresponding to the identity permutation where every string goes straight across, and the maximum number of inversions obviously happens when every pair is out of order -- that is, s(1)=30, s(2)=29,... s(30)=1. Visually, this is when every string crosses every other and it makes a giant X. How many inversions is that? Well, if every string crosses every other we have one inversion for each possible pair of strings, which is (30 choose 2)=(30*29)/2=435.
The neat bit is that if you take any permutation and reverse the order (not the inverse element, I mean lexicographically reverse it), you get a permutation where all the incorrectly ordered pairs are correctly ordered and vice versa. So in our case, if s={s(1),s(2),...,s(30)} has k inversions, then defining s' to be the permutation {s(30),s(29),...,s(1)}, s' has exactly 435-k inversions.
But then if every permutation with k inversions has a corresponding permutation with 435-k inversions, a moment's thought tells us that *on average*, there will be 435/2 = 217.5 inversions, and that's your expected number of crossovers.
Notice that along the way we've actually proven the much more general fact that if you do this with N holes on each side and N strings, your expected number of crossovers is exactly (n choose 2)/2, which is n(n-1)/4.
P.S.: Despite being the language of group theory, this is reasonably intuitive stuff. Which by no means means it's easy, I just mean that I have no idea if this is the solution economics firms would expect. I'm a grad student doing pure math, and have no clue what goes on in the world of finance and applied math and what sorts of things people know and don't know.
|
Gah! Hit quote instead of edit...
|
1) run them all at the same time, 5 per lane.
|
P.S.: Despite being the language of group theory, this is reasonably intuitive stuff. Which by no means means it's easy, I just mean that I have no idea if this is the solution economics firms would expect. I'm a grad student doing pure math, and have no clue what goes on in the world of finance and applied math and what sorts of things people know and don't know.
You confused the hell out of me good sir. I understand what you did, sort of, but it boggles my mind. I've taken up to Calculus 3 and I could not come up with that answer on my own in an interview. It would have taken me at least a 30 minutes to figure it out. I'm doubting a firm would actually ask this question though. I'm looking at my College's Finance major requirements and only up to Calculus 1 is required. How any student with just some basic knowledge of Calculus is supposed to figure that out is beyond me.
|
On March 29 2011 23:26 Joementum wrote:Show nested quote +
P.S.: Despite being the language of group theory, this is reasonably intuitive stuff. Which by no means means it's easy, I just mean that I have no idea if this is the solution economics firms would expect. I'm a grad student doing pure math, and have no clue what goes on in the world of finance and applied math and what sorts of things people know and don't know.
You confused the hell out of me good sir. I understand what you did, sort of, but it boggles my mind. I've taken up to Calculus 3 and I could not come up with that answer on my own in an interview. It would have taken me at least a 30 minutes to figure it out. I'm doubting a firm would actually ask this question though. I'm looking at my College's Finance major requirements and only up to Calculus 1 is required. How any student with just some basic knowledge of Calculus is supposed to figure that out is beyond me.
they dont except a formal proof like he did, just that you can think yourself through to the soultion, and this is for the best of the best finance firms, some increadibly smart people work for these firms
|
On March 29 2011 18:35 eluv wrote: 5) There are 100 people in separate rooms. They can talk as much as they want until they "begin." Once they begin, they are called one at a time, in no particular order, into another room. In this room is only a light switch that turns on and off a lightbulb in the room. Noone can see the lightbulb unless they are in the room, and the only thing you can do in the room is check the lightbulb, turn it on, or turn it off. How do the people know when all 100 have been called? (You can be called more than once before everyone else has gone once).
Say there are 100 people, name them p_1, p_2, ... p_100.
Let p_1 be the tallier.
When p_1 enters the room, he must leave the light off when he leaves.
When p_i, for i = 2,3 ... 100 enters the room, he must leave the light on, if and only if he has not turned it on yet, and it is off when he has entered.
When p_1 turns the light off 99 times, he can assume all 100 have been called.
|
United States10328 Posts
On March 29 2011 22:59 Iranon wrote:Show nested quote +On March 29 2011 17:54 DTK-m2 wrote: 2.) 30 strings. Two parallel rows of 30 holes. Each of the 30 strings goes through one of the 30 holes in the first row, and then one of the 30 holes in the second row. What is the expected number of crossovers, where one string overlaps the other? This is pretty cool. As stated it's still ambiguous though - do you mean to say that exactly one string goes through every hole? Or can more than one go through the holes... I'll assume the former. If you're matching up one left hole with one right hole 30 times, we're looking at a random element of S_30, the symmetric group on 30 objects. A configuration of the 30 strings is just a permutation s on {1,2,...,29,30}. That is, number the holes on each side from 1 to 30, and when you put all the strings on, for each n from 1-30, let s(n) be number at the right end of the string which starts at n at the left end. We want to know how many strings cross other strings. When do those crossovers happen? Well, whenever we have some pair of holes n and m with n s(m). In math-land these are called inversions. The number of inversions (i.e. the number of pairs in the list {s(1),s(2),...,s(29),s(30)} which are out of order) is the same as the number of times you'd have to interchange consecutive elements to get everything back to the correct order (i.e. the number of times you'd have to swap right endpoints of adjacent strings to get all the strings going straight across). The minimum number of inversions is obviously 0, corresponding to the identity permutation where every string goes straight across, and the maximum number of inversions obviously happens when every pair is out of order -- that is, s(1)=30, s(2)=29,... s(30)=1. Visually, this is when every string crosses every other and it makes a giant X. How many inversions is that? Well, if every string crosses every other we have one inversion for each possible pair of strings, which is (30 choose 2)=(30*29)/2=435.
The neat bit is that if you take any permutation and reverse the order (not the inverse element, I mean lexicographically reverse it), you get a permutation where all the incorrectly ordered pairs are correctly ordered and vice versa. So in our case, if s={s(1),s(2),...,s(30)} has k inversions, then defining s' to be the permutation {s(30),s(29),...,s(1)}, s' has exactly 435-k inversions.
But then if every permutation with k inversions has a corresponding permutation with 435-k inversions, a moment's thought tells us that *on average*, there will be 435/2 = 217.5 inversions, and that's your expected number of crossovers.
Notice that along the way we've actually proven the much more general fact that if you do this with N holes on each side and N strings, your expected number of crossovers is exactly (n choose 2)/2, which is n(n-1)/4.
P.S.: Despite being the language of group theory, this is reasonably intuitive stuff. Which by no means means it's easy, I just mean that I have no idea if this is the solution economics firms would expect. I'm a grad student doing pure math, and have no clue what goes on in the world of finance and applied math and what sorts of things people know and don't know.
I tried some sort of silly induction approach, but then my friend owned me. The probability that two strings intersect given arbitrary starting positions is 1/2: for each crossing, there corresponds exactly one uncrossing (untwist the strings). There are nC2 ways of picking two starting positions. So by linearity of expectation, the total expected value is nC2/2 = n(n-1)/4. (This might be clearer if you just count the number of cross/uncrossings for each pair.)
|
7) There are N cars travelling along an infinitely long one-lane highway. No two cars travel at the same speed. When a car is travelling at a speed less than the car behind it, it forms a jam. How many jams are expected to be on this highway, in terms of n?
+ Show Spoiler [Hint] +Model a set from {1,...n} where a higher number => higher speed. Permutations
|
United States10328 Posts
On March 30 2011 00:40 Oracle wrote:7) There are N cars travelling along an infinitely long one-lane highway. No two cars travel at the same speed. When a car is travelling at a speed less than the car behind it, it forms a jam. How many jams are expected to be on this highway, in terms of n? + Show Spoiler [Hint] +Model a set from {1,...n} where a higher number => higher speed. Permutations
if n_a < n_{a+2} there's no ja correct? only if n_a < n_{a+1}? and jams don't cause other jams? because then expected value works again: for each pair of adjacent cars, 1/2 probability of jam. n-1 pairs of cars, so (n-1)/2 jams are expected.
|
On March 30 2011 00:50 ]343[ wrote:Show nested quote +On March 30 2011 00:40 Oracle wrote:7) There are N cars travelling along an infinitely long one-lane highway. No two cars travel at the same speed. When a car is travelling at a speed less than the car behind it, it forms a jam. How many jams are expected to be on this highway, in terms of n? + Show Spoiler [Hint] +Model a set from {1,...n} where a higher number => higher speed. Permutations if n_a < n_{a+2} there's no ja correct? only if n_a < n_{a+1}? and jams don't cause other jams? because then expected value works again: for each pair of adjacent cars, 1/2 probability of jam. n-1 pairs of cars, so (n-1)/2 jams are expected.
Consider the set {6, 4, 5, 7, 2}
4,5 form a jam, but also 4,5,7 forms a jam. So yes, jams may cause other jams.
However, jams are counted contiguously, {4,5} would be not regarded as a different jam than {4, 5, 7}
|
United States10328 Posts
On March 30 2011 01:00 Oracle wrote:Show nested quote +On March 30 2011 00:50 ]343[ wrote:On March 30 2011 00:40 Oracle wrote:7) There are N cars travelling along an infinitely long one-lane highway. No two cars travel at the same speed. When a car is travelling at a speed less than the car behind it, it forms a jam. How many jams are expected to be on this highway, in terms of n? + Show Spoiler [Hint] +Model a set from {1,...n} where a higher number => higher speed. Permutations if n_a < n_{a+2} there's no ja correct? only if n_a < n_{a+1}? and jams don't cause other jams? because then expected value works again: for each pair of adjacent cars, 1/2 probability of jam. n-1 pairs of cars, so (n-1)/2 jams are expected. Consider the set {6, 4, 5, 3, 2} 4,5 form a jam, but also 4,5,3 forms a jam. So yes, jams may cause other jams. However, jams are coutned contiguously, {4,5} would be not regarded as a different jam than {4, 5, 3}
did you mean to say (4,5) is not a jam? or are numbers to the left the cars in front... or are your numbers inversely related to the speed. ok I'm confused lol.
let a number represent speed and coordinates with higher index be in front (as if cars traveled right).
so 5 4 3 2 1 is how many jams? 1? how about 2 3 1? does the 2 count as part of the same jam, since the 3-car is slowed to 1?
|
|
|
|