Rats and Anaesthesia Puzzle || Google Interview Puzzle

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024

Комментарии • 33

  • @SimplyLogical
    @SimplyLogical  3 года назад +8

    Did You Like The Video ... Like, Share, Subscribe :)

  • @agytjax
    @agytjax 5 месяцев назад +4

    You have made the solution unnecessarily complicated.
    1. Divide the injections in 5 batches of 48.
    2. Map each batch to each of the 5 rats.
    3. From each batch, inject the mapped rat at each half hour starting at 0 to 23 hours (48 injections).
    4. Based on which rat faints, we'll know which batch has the bad injection. Based on at which hour the rat faints, you'll know which injection in that batch is bad
    Q E D

  • @mikedaly6891
    @mikedaly6891 2 года назад +6

    I went to straight to second, simpler method. Perhaps add a condition that the rats can only be injected at 24 hour intervals in order to get reliable results.

  • @freddb561
    @freddb561 11 месяцев назад +4

    Both answers are a bit flawed. The first answer assumes that you can inject 5 rats with 240 different injections within ... 0 secs otherwise you are outside of the time limit. The second method uses the information that the anesthesia works "in exactly 24 hours" as stated in the puzzle. (5 people can all inject the rats at the same time so we're within the time limit.)
    A reasonable re-working of the problem would have the anesthesia working between 19 and 20 hours. This would nullify the second solutions, since you don't know exactly when the mouse would faint and would logically give a staff enough time to inject the mice (that is 300 injections per hour). Of course this solution would be incredibly wasteful, at least 1200 synergies thrown away in the name of science, but this is just a puzzle.

  • @geeta172
    @geeta172 Год назад +3

    I believe, I found a more optimal method.
    You can identify the injection from 1024 injections in this method. (Therefore, obviously 240 is doable - however I’ll explain for 1024)
    For day 1, divide the 1024 injections in 32 sets of 32.
    Code each of the sets in 5 digit binary from 00000 to 11111. (For example, set 5 i.e 00101 is given to rats C and E, if only rats C and E lost movement, we know that the poison was from set 5)
    Also note, the 32nd set is not given to any rat i.e is not rats lose consciousness the anaesthesia is in this set. This helps us determine which set the injection is from.
    For day 2, repeat the process but instead of it being a set of 32 injections number each injection from 1 to 32 from the identified set.

    • @geeta172
      @geeta172 Год назад +1

      I think it’s more optimum, because in your solution, we’re not getting the opportunity to inject the rats twice. In my proposed solution, we’re gaining information from all 5 rats on the first and then again on the second day.

    • @quentind1924
      @quentind1924 11 месяцев назад +1

      The problem is that the video doesn’t say how long the anaesthesia effects. In another version of the puzzle, it’s killing the rat instead (which doesn’t allow to test a rat that got the lethal injection on the first day)

    • @_RahulDewangan
      @_RahulDewangan 3 месяца назад +1

      That won't work because you can't use the rat again after it got fainted ,so if say 4 rats fainted in 1st day you are now remaining with only 1 rat to test on the next day, and 32 injections left to test ,so won't be possible

  • @gmo4250
    @gmo4250 10 месяцев назад +9

    The written question clearly states in “exactly 24 hours”. So you only need one rat, the first solution was overly complicated.

    • @henryconrad3543
      @henryconrad3543 10 месяцев назад

      Yeah, changed the rules part way through 😂

  • @subinnair3835
    @subinnair3835 2 года назад +1

    Great visual explanation !!

  • @cyberpolice3183
    @cyberpolice3183 2 года назад +3

    what if we take one of the injection

  • @keshavjindal6717
    @keshavjindal6717 2 года назад +1

    Just Amazing!!

  • @devkumar9889
    @devkumar9889 Год назад +2

    It's simple : for each rat we have option to not inject , inject on 1st day or inject on 2nd day => this creates 3*3*3*3*3 = 243 ways and luckily we have 240 injections
    So we inject all 5 rats with same injection again and again but with different pattern
    Eg : 1 2 2 1 0 = rat1 injected on 1st day, rat2, rat3 on 2nd day, rat4 on 1st day, rat5 not injected
    Let this be anethesia injection
    After 1 day rat1, rat4 faints, after 2nd day rat2, rat3 faints and rat5 never faints .
    This way we know which patterned injection is anethesia one

    • @ujasdiyora2804
      @ujasdiyora2804 Год назад

      But we have to do task in 48 hours. So what if last injection which we injected is anethesia , so it would take more time than 48 hours , because we have to wait for 24 hours to see if rat is fainted or not after giving any 1 injection.

    • @devkumar9889
      @devkumar9889 Год назад +1

      @@ujasdiyora2804 giving injection on 2nd day means start of 2nd day i.e after 24 hrs

  • @kandaveld
    @kandaveld 9 месяцев назад

    What happens to the 3 injections left, if that has the anesthesia no rats faint

  • @ashishrawat770
    @ashishrawat770 2 года назад

    bahute badhiya sikhaye h guruji

  • @GUDDUYADAV-ri7xq
    @GUDDUYADAV-ri7xq 5 месяцев назад

    this is given on gfg any other approach

  • @tirthrajgirawale2460
    @tirthrajgirawale2460 9 месяцев назад

    Nice!

  • @harshdeeptelang127
    @harshdeeptelang127 2 года назад +1

    Thank you your video solved my confusion!

  • @snarkk5410
    @snarkk5410 7 месяцев назад

    i came up with the second method qite quickly, pretty simple

  • @paragroy5359
    @paragroy5359 2 года назад

    Nice explanation bro....

  • @SaiTeja-ob6zg
    @SaiTeja-ob6zg 2 года назад

    well explained!

  • @ellis-pr7hh
    @ellis-pr7hh Год назад

    i came up with the second soln by own bt as because of the given condition i thought this cant be the right way..

  • @rishabhsrivastava1241
    @rishabhsrivastava1241 3 месяца назад

    I dont know how prople dont like your first method, its is an amazing approach barring some meaningful assumptions. Google looks for such thinking patterns. Again great thinking for method 1.

  • @gauravchoudhary2080
    @gauravchoudhary2080 2 года назад +1

    Me : great explanation thanks. it's very helpful.
    Random insta/twitter girl : this video should be banned , how dare you to do expirements on rats. If i do this experiment on you how would you feel

  • @user-gn4mq5cs6e
    @user-gn4mq5cs6e 4 месяца назад

    First explanation is incorrect as well as lacks the minimum dosage criteria (if you say that in second solution 30 mins are less to check the effect). Further in 1st solution you are unnecessary complicating things just to show 5 digit code in the base of 3. As total outcomes will be 243(exactly 240) , that means each digit 0,1,2 effectively repeat itself in 243/3 = 81 ways that further means you have to inject lets say 1 st mouse of 1st solution 81 times on 1st day along with combination of 1s in the remaining 4 mouses. So injecting the first mouse 81 times in 24 hours means injecting it ifor subsequent testing n less than 18 minutes. Further in that duration, you have to inject the same injection to none, or/and second or/and third or/and fourth or/and fifth mouse to see the faint reaction of the injection as per the labelling. Hence second solution is the only correct solution in the above given solution and the remark to say that 30 minutes are too short to notice the reaction of injection are totally funny and shows lack of understanding of the solution in a similar manner that without landing gears a plane cannot fly....

  • @ChanderVivekSingh
    @ChanderVivekSingh 2 года назад +1

    why we gave second rat the same dose? when we can the results yes or no from the first rat after 24 hours?
    Also levelling is not clear say you injected 10001 and 10201 on both Rat1 and Rat5 gets fainted after first 24 hour then you will again inject 10201 to verify ?
    can you plzz give more examples of dry run?

    • @factfactorial632
      @factfactorial632 2 года назад +2

      you have valid doubt bro, see we will wait for 48 hour and then come to the conclusion hence 10001 and 10201 injection will have different effect.
      the 1st and 5th rat will faint in cases of anesthesia injection and we might think 10001 and 10201 as our possible answer but after 48 hour we will able to confidently say which is our anesthesia injection.

  • @thichhochoi766
    @thichhochoi766 Год назад +1

    I only need 1 rat.