Math / Logic Interview Question

Discussion in 'General Discussion' started by SuF, Mar 4, 2011.

Math / Logic Interview Question
  1. Unread #1 - Mar 4, 2011 at 5:37 PM
  2. SuF
    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary

    SuF Legend
    Pirate Retired Global Moderator

    Math / Logic Interview Question

    This is an interview question asked to potential programmers or sales analyzers for major tech firms. No cheating and back your answer up.

    I'm also going to wait a while to tell people if they are right or wrong.
     
  3. Unread #2 - Mar 4, 2011 at 5:49 PM
  4. Wulfspade1
    Joined:
    Nov 15, 2009
    Posts:
    5,944
    Referrals:
    1
    Sythe Gold:
    93
    Two Factor Authentication User Summer 2020

    Wulfspade1 Claim your real name back and live under it
    Retired Global Moderator Prince Yobabo

    Math / Logic Interview Question

    Alright. If I can race them five at a time, it only takes five times for all of the squirrels to race. I take the fastest squirrel out of every group, then I would have five left. I race them, take the fastest three out. Going by this method, it's six times?

    Another method is after you take the fastest squirrel out of each group. Race them, take the fastest one out each time. Going by this method, it would take eight times.
     
  5. Unread #3 - Mar 4, 2011 at 6:02 PM
  6. JohnK
    Joined:
    Nov 7, 2008
    Posts:
    5,348
    Referrals:
    6
    Sythe Gold:
    5

    JohnK A$AP
    Retired Sectional Moderator

    Math / Logic Interview Question

    What if group A's whole group is faster then group B?
     
  7. Unread #4 - Mar 4, 2011 at 6:03 PM
  8. wtp
    Joined:
    Nov 25, 2005
    Posts:
    2,455
    Referrals:
    2
    Sythe Gold:
    0

    wtp Grand Master
    Banned

    Math / Logic Interview Question

    5 races, take the 3 fastest from each. 15 squirrels now. 3 more races, take 3 fastest from each. 9 squirrels now. 2 more races, take 3 fastest from each. 6 squirrels now. 2 more races, and you can find the three fastest.

    12 races overall.

    That's probably not the best answer.

    No, because what one group if the first group has the three fastest squirrels?
     
  9. Unread #5 - Mar 4, 2011 at 6:05 PM
  10. malakadang
    Joined:
    Jan 1, 2011
    Posts:
    5,679
    Referrals:
    0
    Sythe Gold:
    900
    Discord Unique ID:
    220842789083152384
    Discord Username:
    malakadang#3473
    Two Factor Authentication User Easter 2013 Doge Community Participant

    malakadang Hero
    malakadang Donor Retired Global Moderator

    Math / Logic Interview Question

    You have 25 race squirrels. You can race them 5 at a time. You do not have any timing device. All will race to their fullest potential every race. You want to figure out the fastest 3 squirrels. What is the minimum number of races you must run in order to figure out the three fastest?

    Heres how I'd work it out.

    5 races of 5 squirrels = 25 Race Squirrels.
    No timing device, therefore First 3 squirrels move on to the next set of races.

    15 Are left.
    3 races are done, and the first 3 of all these races are taken to the next phase.
    9 are left, 8 races done so far.

    (Now I realize it's harder than I thought)
    2 more races are conducted, the top 3 are taken to the next race.
    6 are left, 10 races done so far.

    Assuming ALL squirrels run to their fullest potential ever race, and this variable is not changed.

    5 are chosen to run a race, and the top 3 get to stay.
    The last squirrel will also run a race, to ensure he does not get a bye (This is optional, but to maintain the best degree of fairness, essential)

    4 are left, 12 races done so far.

    The top 3 stay.

    Result:

    3 are left, 13 races are done in total. (12 are done if you decided to give the squirrel a bye.)
     
  11. Unread #6 - Mar 4, 2011 at 6:09 PM
  12. Wulfspade1
    Joined:
    Nov 15, 2009
    Posts:
    5,944
    Referrals:
    1
    Sythe Gold:
    93
    Two Factor Authentication User Summer 2020

    Wulfspade1 Claim your real name back and live under it
    Retired Global Moderator Prince Yobabo

    Math / Logic Interview Question

    Oh, dang! You have the point there. My money is on Malakadang now.
     
  13. Unread #7 - Mar 4, 2011 at 6:10 PM
  14. SuF
    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary

    SuF Legend
    Pirate Retired Global Moderator

    Math / Logic Interview Question

    I wouldn't put my money on it. ;)
     
  15. Unread #8 - Mar 4, 2011 at 6:17 PM
  16. malakadang
    Joined:
    Jan 1, 2011
    Posts:
    5,679
    Referrals:
    0
    Sythe Gold:
    900
    Discord Unique ID:
    220842789083152384
    Discord Username:
    malakadang#3473
    Two Factor Authentication User Easter 2013 Doge Community Participant

    malakadang Hero
    malakadang Donor Retired Global Moderator

    Math / Logic Interview Question

    I stand by my answer, unless you don't run 5x5 initially, however if thats the case then I'm too lazy to work that out =,=
     
  17. Unread #9 - Mar 4, 2011 at 6:19 PM
  18. Pro Porkchop
    Joined:
    Jan 8, 2011
    Posts:
    460
    Referrals:
    0
    Sythe Gold:
    0

    Pro Porkchop Forum Addict
    Banned

    Math / Logic Interview Question

    I think this is what wulfspade said.

    I would split the 25 squirrels into 5 groups, containing 5 each.

    Take the #1 squirrel from each group. That will take 5 races.
    Put the 5 #1 squirrels into the same race. Take the top 3 and there you have your top 3 fastest squirrels. It takes a total of 6 races. Pretty much the same as in track meets.
     
  19. Unread #10 - Mar 4, 2011 at 6:22 PM
  20. malakadang
    Joined:
    Jan 1, 2011
    Posts:
    5,679
    Referrals:
    0
    Sythe Gold:
    900
    Discord Unique ID:
    220842789083152384
    Discord Username:
    malakadang#3473
    Two Factor Authentication User Easter 2013 Doge Community Participant

    malakadang Hero
    malakadang Donor Retired Global Moderator

    Math / Logic Interview Question

    The problem is, what if you have the actually 3 fastest squirrels all in one race?
    So you knock the 2nd and 3rd fastest out, leaving only the 1st.
     
  21. Unread #11 - Mar 4, 2011 at 6:48 PM
  22. Koot
    Joined:
    Oct 23, 2008
    Posts:
    612
    Referrals:
    0
    Sythe Gold:
    0

    Koot Forum Addict

    Math / Logic Interview Question

    First I thought 6, now I'm going with 12 what two people I think have said so far.

    I'm trying to think of a way where there will be less but I'm not seeing it.

    EDIT: The answer is actually 11 I think. Whenever you have a race with the 5 people, you kick out the bottom two. So with 11 races, you kick out 22 squirrels leaving you with the top 3. To save that race whenever there are squirrels left that aren't in multiples of 5, don't race them without 5. Let 5 race, take the top 3 and race them again with 2 that haven't. If this is repeated, 2 will keep dropping out till 1 last race of 5.
     
  23. Unread #12 - Mar 4, 2011 at 7:18 PM
  24. SuF
    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary

    SuF Legend
    Pirate Retired Global Moderator

    Math / Logic Interview Question

    You still do the 5x5 first.
     
  25. Unread #13 - Mar 4, 2011 at 8:31 PM
  26. malakadang
    Joined:
    Jan 1, 2011
    Posts:
    5,679
    Referrals:
    0
    Sythe Gold:
    900
    Discord Unique ID:
    220842789083152384
    Discord Username:
    malakadang#3473
    Two Factor Authentication User Easter 2013 Doge Community Participant

    malakadang Hero
    malakadang Donor Retired Global Moderator

    Math / Logic Interview Question

    O, now I got it.

    25 Squirrels - 0 races
    15 Squirrels - 5 races
    9 Squirrels - 8 races
    7 Squirrels - 9 races
    5 Squirrels - 10 races
    3 Squirrels - 11 races.

    What koot said xD.
     
  27. Unread #14 - Mar 4, 2011 at 10:19 PM
  28. 1994RANGERS
    Joined:
    May 22, 2010
    Posts:
    532
    Referrals:
    0
    Sythe Gold:
    0

    1994RANGERS Forum Addict
    Banned

    Math / Logic Interview Question

    I'm gunna go out on a limb here and go with 53,130 races. Its probably wrong but heres what I did:
    C(25,5)=53130
     
  29. Unread #15 - Mar 4, 2011 at 10:37 PM
  30. SuF
    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary

    SuF Legend
    Pirate Retired Global Moderator

    Math / Logic Interview Question

    You can get farther than that. It took me awhile to figure that out though. :p

    Your over mathifiying it.
     
  31. Unread #16 - Mar 5, 2011 at 4:37 AM
  32. I'm Still Breathing
    Joined:
    Sep 8, 2009
    Posts:
    489
    Referrals:
    0
    Sythe Gold:
    0

    I'm Still Breathing Forum Addict

    Math / Logic Interview Question

    Would take 7 races. (trying to pretty up / make sure my explanation is clear.) My original answer was 8, but looking over my work I was able to get it down to 7.

    I've given every squirrel a name based on their original groups / place.

    Once a squirrel has been beaten by at least 3 other squirrels, it is unable to place in the top 3, so it is useless to continue racing them

    a1 a2 a3 a4 a5 - race one
    b1 b2 b3 b4 b5 - race two
    c1 c2 c3 c4 c5 - race three
    d1 d2 d3 d4 d5 - race four
    e1 e2 e3 e4 e5 - race five

    Every squirrel that didn't place in the top 3 is unable to win because they were beaten by atleast 3 squirrels.​

    Race every squirrel that placed first in their orignal group.

    a1 b1 c1 d1 e1 - race six.

    The winner of this group is the fastest (a1), and it is now pointless to race him.

    All squirrels in the d and e groups are now unable to win because they've all been beaten by at least 3 squirrels

    At best, c1 can be the third fastest squirrel because it's been between by two squirrels, meaning every c squirrel besides c1 is unable to win.

    At best b1 can place second, meaning b2 can still come in third, making b3 unable to win.

    Both a2 and a3 can still place in the top 3, since they've only been beaten by a1



    This leaves us with only 5 possible squirrels that can fill the second and third place slots

    b1 a2 c1 a3 b2 - race seven

    The top two in this race are the second and third fastest (b1, a2)​



    Can explain more if needed. Think I've got it right tho. If you don't want to post whether I've got it correct or not please pm me:).
     
  33. Unread #17 - Mar 5, 2011 at 8:39 PM
  34. Try and run
    Joined:
    Aug 24, 2008
    Posts:
    2,002
    Referrals:
    0
    Sythe Gold:
    0

    Try and run Grand Master
    Banned

    Math / Logic Interview Question

    8 races, not going to bother explaining myself unless I'm right.
     
  35. Unread #18 - Mar 5, 2011 at 8:40 PM
  36. SuF
    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary

    SuF Legend
    Pirate Retired Global Moderator

    Math / Logic Interview Question

    Thats right!
     
  37. Unread #19 - Mar 5, 2011 at 8:49 PM
  38. fr00by
    Joined:
    May 19, 2010
    Posts:
    902
    Referrals:
    1
    Sythe Gold:
    0

    fr00by Apprentice
    Banned

    Math / Logic Interview Question

    Take all the squirrels and make a yummeh stew?
     
< The High Amount of Buyers, who post to buy but never do. | How do people get Fancy pictures in there sig ? >

Users viewing this thread
1 guest


 
 
Adblock breaks this site