Who Has The Monitor?

  • Lol, some people have way too much time.

    I take my hat off the solution in SQL, a truly indigenous method of employing our skills.  I don't know why but for every work related problem I immediately turn to SQL, however as soon as a simple none work related puzzle is introduced I bring out the pencil and paper.

  • “indigenous&rdquo?

    You keep using that word. I do not think it means what you think it means.

    Okay, let’s see you SQL gurus use SQL to come up with a solution to this puzzle. What is the next item in this sequence:

    O, T, T, F, F, S, S, __ ?

  • E, N, T

  • Aw, cs_troyk, you beat me.  I didn't see your post until just after I clicked Reply to answer the same thing.  And just to prove I did know the answer, I'll continue it. 

    E, T, T, F, F

  • Your right, it is one of the more common words I miss-spell.  I meant ingenious.

    However the meaning could still sort of apply.

  • Name Color Car Drink Monitor
    Sue Blue Prius Mountain Dew 15" CRT
    Steve Green Caravan Coffee 17" CRT
    Kevin White Suburban Red Bull 15" LCD
    Andy Yellow Accord Iced Tea 19" DUALS!!
    Brian Red Corvette Beer 17" LCD
  •   Red Blue Green White Yellow Suburban Accord Prius Corvette Caravan Red Bull Mtn Dew Beer Coffee Iced Tea 17" CRT 15" CRT Dual 19" 15" LCD 17" LCD First Second Third Fourth Fifth
    Brian Y N N N N N N n N y Y N N N N N n n n y N N Y N N
    Steve N N n n y N y N n n N y n n N Y N N N N N y N n n
    Andy N N N y n N n y N n N N N N Y N y n n n N n N N y
    Sue N Y N N N N N n y n N n y N N N n y n n Y N N N N
    Kevin N N y n N Y N N N N N n N y N N N n y n N N N y n
    B Y R G W

    This is what I came up with.

    -John

  • Andy

  • I'm surprised at the number of posts claiming that there is just one solution. Below are the four solutions that SQL Server returned on my query. As far as I can see, all clues are satisfied in each of the four solutions. Am I missing anything?


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

  •  

    BTW, the execution plan is definitely, ahem, "interesting"

    You can knock out about 100 possible combitation by adding the following inferred clues:

    AND NOT (Car = 'Accord' AND Monitor = '17" LCD')

    AND NOT (Car = 'Caravan' AND Monitor = '15" LCD')

    AND NOT (Person = 'Andy' AND Color = 'green')

    Unfortunately I can't see if that affects the results as my laptop's not capable of generating an execution plan for the final query!  That's a first for me!

     

  • Unfortunately I can't see if that affects the results as my laptop's not capable of generating an execution plan for the final query!  That's a first for me!

     
    Hi Glenn,
     
    I thinks it's the SQL Server version, not the laptop - SQL 2000 doesn't produce a plan for me either, but SQL 2005 does.
     
    Anyway, adding the extra filters doesn't change the results. Still four solutions!

    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

  • Read it again: I didn’t ask you to guess the sequence (which is easy enough). I asked you to use SQL to come up with a solution to it — without hard-coding the English names of the numerals, by the way, nor having them in a Table of any kind.

  • Oops You're absolutely right -- I missed the part about using SQL Server, but now you're adding more conditions...

    The only thing that comes to mind is if SQL Server has a built in function to return english numeral names, or if it can call out to a system-supplied function. I'm not aware of such a function in either case. Do you have a solution?

    TroyK

  • Looks like http://en.wikipedia.org/wiki/Einstein's_Puzzle with a coat of paint!

    Except that there's a typo with: "Sue has the blue office". Perhaps it should read: "Sue is next to the blue office".

  • Joshua-

    In your solution, the Green room is not to the left of the White room....

Viewing 15 posts - 31 through 45 (of 50 total)

You must be logged in to reply to this topic. Login to reply