Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Logic Question? [modified]

Logic Question? [modified]

Scheduled Pinned Locked Moved The Lounge
questionc++regexhelp
22 Posts 15 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Photonman007

    I've been lurking here for a while but I had to respond to this one... A lot of people probably know this one (or something similar) but here goes: There are two rooms. In one there are four light switches, in the other there are four lights controlled by the swtiches. It is impossible to see into one room from the other. If you can enter each room only once, how do you determine which switch controls which light? Anyway, this being my first post.. Hello everyone, hope to be useful and/or entertaining.

    J Offline
    J Offline
    J4amieC
    wrote on last edited by
    #13

    Something to do with feeling which lightbulbs are hot. Current blacklist svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour

    D 1 Reply Last reply
    0
    • H hackC

      Tom has six pairs of black gloves and six pairs of brown gloves in his drawer. In complete darkness, how many gloves must he take from the drawer in order to be sure to get a pair that match? Just to have a little fun.... "C++ will solve any problem."

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #14

      13 worst case draw is 6 LH Black then 6 RH Brown #13 will match something Cleek | Image Toolkits | Thumbnail maker

      1 Reply Last reply
      0
      • P Photonman007

        I've been lurking here for a while but I had to respond to this one... A lot of people probably know this one (or something similar) but here goes: There are two rooms. In one there are four light switches, in the other there are four lights controlled by the swtiches. It is impossible to see into one room from the other. If you can enter each room only once, how do you determine which switch controls which light? Anyway, this being my first post.. Hello everyone, hope to be useful and/or entertaining.

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #15

        Photonman007 wrote:

        In one there are four light switches...

        I've heard it before, but with three.


        "The largest fire starts but with the smallest spark." - David Crow

        "Judge not by the eye but by the heart." - Native American Proverb

        1 Reply Last reply
        0
        • P Photonman007

          I've been lurking here for a while but I had to respond to this one... A lot of people probably know this one (or something similar) but here goes: There are two rooms. In one there are four light switches, in the other there are four lights controlled by the swtiches. It is impossible to see into one room from the other. If you can enter each room only once, how do you determine which switch controls which light? Anyway, this being my first post.. Hello everyone, hope to be useful and/or entertaining.

          J Offline
          J Offline
          Jun Du
          wrote on last edited by
          #16

          An IBM or MS quiz? Don't remember which one. Three is easy, lets try four. I guess you need to label all four switches first. Then follow these steps: 1) Turn on switch 1, wait for a couple of seconds, then turn it off; 2) Waite a comple of minutes; 3) Turn on switch 2, wait for a couple of seconds, then turn it off; 4) Turn on switch 3 and leave it on; 5) Enter the bulb room to check: - The light on is linked to switch 3; - The warm one is switch 1; - The hotter one is 2; - The last is 4. Any other thoughts? - It's easier to make than to correct a mistake.

          1 Reply Last reply
          0
          • H hackC

            Tom has six pairs of black gloves and six pairs of brown gloves in his drawer. In complete darkness, how many gloves must he take from the drawer in order to be sure to get a pair that match? Just to have a little fun.... "C++ will solve any problem."

            A Offline
            A Offline
            Andy Brummer
            wrote on last edited by
            #17

            I came up with 8 because surely you can feel the difference between left hand and right hand gloves when you are picking them up. 1 left hand glove 7 right hand gloves


            I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon

            1 Reply Last reply
            0
            • J J4amieC

              Something to do with feeling which lightbulbs are hot. Current blacklist svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour

              D Offline
              D Offline
              Dan Neely
              wrote on last edited by
              #18

              This solution requires the bulbs be incandesent. flourecent and led bulbs put out very little waste here, incandesent bulbs put out primarily heat with a little bit of light as an afterthought.

              D 1 Reply Last reply
              0
              • H hackC

                Tom has six pairs of black gloves and six pairs of brown gloves in his drawer. In complete darkness, how many gloves must he take from the drawer in order to be sure to get a pair that match? Just to have a little fun.... "C++ will solve any problem."

                O Offline
                O Offline
                Office Lineman
                wrote on last edited by
                #19

                2. A logical person would turn on the light, use a flashlight, or would have installed emergency power-outage lights. Having reduced this to an already-solved problem, Tom simply retrieves gloves from the drawer as desired. :-> -- I've killed again, haven't I?

                1 Reply Last reply
                0
                • D Dan Neely

                  This solution requires the bulbs be incandesent. flourecent and led bulbs put out very little waste here, incandesent bulbs put out primarily heat with a little bit of light as an afterthought.

                  D Offline
                  D Offline
                  David Crow
                  wrote on last edited by
                  #20

                  dan neely wrote:

                  ...with a little bit of light as an afterthought.

                  I like that!


                  "The largest fire starts but with the smallest spark." - David Crow

                  "Judge not by the eye but by the heart." - Native American Proverb

                  D 1 Reply Last reply
                  0
                  • D David Crow

                    dan neely wrote:

                    ...with a little bit of light as an afterthought.

                    I like that!


                    "The largest fire starts but with the smallest spark." - David Crow

                    "Judge not by the eye but by the heart." - Native American Proverb

                    D Offline
                    D Offline
                    Dan Neely
                    wrote on last edited by
                    #21

                    DavidCrow wrote:

                    dan neely wrote: ...with a little bit of light as an afterthought. I like that!

                    It's literally true. The black body curve of an incandesent bulb peaks in the IR range. The light is rich in red wavelengths and poor in blue.

                    1 Reply Last reply
                    0
                    • H hackC

                      Tom has six pairs of black gloves and six pairs of brown gloves in his drawer. In complete darkness, how many gloves must he take from the drawer in order to be sure to get a pair that match? Just to have a little fun.... "C++ will solve any problem."

                      C Offline
                      C Offline
                      Chris Meech
                      wrote on last edited by
                      #22

                      How many hands does he have? :) Chris Meech I am Canadian. [heard in a local bar] When no one was looking, every single American woman between the ages of 18 and 32 went out and got a tatoo just above their rumpus. [link[^]]

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups