HomeHome More SamplesMore Samples
///////////////////////////////////////////////////////////////////////////////////////////////////
// 
// Title: Computer Romance
// Author: Ginger Monka
// Publication: Dell Logic Puzzles
// Issue: April, 2000
// Page: 48
// Stars: 5
// 
///////////////////////////////////////////////////////////////////////////////////////////////////
// 
// The Stardust Club was a busy place this past weekend, as it was the gathering place of five 
// couples who had met over the Internet and were finally getting together face-to-face for the 
// first time. Each man and woman originally met through a different Internet news group (Astronomy,
// Baseball, Fishing, Movies, or Opera). Each of the women (Brenda, Christine, Lori, Olivia, and 
// Tracy) goes by a different online name (Crafty Lady, Elusive Butterfly, Misty Morning, Silver 
// Rose, or Sugar Magnolia), and each of the men (Brian, Dorian, Joel, Nick, and Walter) also goes 
// by a different online alias (Dr. Who, Hal9000, Midnight Rider, Night Flyer, or Rocket Man). To 
// ensure that her date would recognize her, each woman donned a unique piece of attire (including a 
// yellow ribbon), and each man agreed to carry a different newspaper. From the following 
// information, can you determine, for the couple who met through each newsgroup, the woman's online
// alias and article of attire, as well as the man's alias and newspaper?
// 
// 1. Silver Rose, who wore a blue velvet dress, did not meet her date through 
//    either the Baseball or the Opera news group.
// 2. Hal9000 (who carried either the "Herald" or the "Times") met his date 
//    (who calls herself either Crafty Lady or Misty Morning) through their common
//    love of fishing.
// 3. Brenda (who is not a moviegoer) and the one who met her date through the 
//    Astronomy news group are the woman who encountered Midnight Rider and the one 
//    who wore scarlet begonias tucked into her curls, in some order.
// 4. Dorian and the man who carried the "Bugle" are the man who met Sugar Magnolia
//    and the one who recognized his date by her raspberry beret, in some order.
// 5. The man carrying the "Star" (who isn't Brian) didn't meet Silver Rose.
// 6. Lori (who frequents either the Baseball or the Opera news group) met either 
//    Joel or Dr. Who.
// 7. The man carrying the "Gazette" recognized his date from either the raspberry 
//    beret or the scarlet begonia.
// 8. Tracy, who is either the baseball enthusiast or the woman who wore the black 
//    veil, met Rocket Man.
// 9. Elusive Butterfly, who is either Christine or Olivia, wore neither the 
//    raspberry beret nor the black veil.
// 10. Christine met either Brian or the man with the "Bugle", and Olivia's date 
//     is either Dr. Who or Walter.
// 11. Either Walter was carrying the "Times", or he met Crafty Lady.
// 12. Misty Morning is not a baseball fan.
// 
///////////////////////////////////////////////////////////////////////////////////////////////////
//
//  Running the query
//
//      all ComputerRomance(groupWoman,aliasWoman,article,groupMan,aliasMan,newspaper) 
//
// will solve the puzzle, with a single solution as follows:
//
// groupWoman = [ {Astronomy} Christine, {Baseball} Tracy, {Fishing} Brenda, {Movies} Olivia, 
//                {Opera} Lori]
// aliasWoman = [ {Crafty_Lady} Tracy, {Elusive_Butterfly} Olivia, {Misty_Morning} Brenda, 
//                  {Silver_Rose} Christine, {Sugar_Magnolia} Lori]
// article    = [ {Blue_Velvet_Dress} Christine, {Scarlet_Begonias} Brenda, 
//                  {Raspberry_Hat} Tracy, {Black_Veil} Lori, {Yellow_Ribbon} Olivia]
// groupMan   = [ {Astronomy} Brian, {Baseball} Dorian, {Fishing} Walter, {Movies} Nick, 
//                {Opera} Joel]
// aliasMan   = [ {Dr_Who} Nick, {Hal9000} Walter, {Midnight_Rider} Brian, 
//                {Night_Flyer} Joel, {Rocket_Man} Dorian]
// newspaper  = [ {Herald} Brian, {Star} Nick, {Gazzette} Dorian, {Bugle} Joel, {Times} Walter]
//
///////////////////////////////////////////////////////////////////////////////////////////////////

Group = Astronomy | Baseball | Fishing | Movies | Opera

NameWoman = Brenda | Christine | Lori | Olivia | Tracy
FemaleAliases = Crafty_Lady | Elusive_Butterfly | Misty_Morning | Silver_Rose | Sugar_Magnolia
AliasWoman = FemaleAliases->>NameWoman

Articles = Blue_Velvet_Dress | Scarlet_Begonias |Raspberry_Hat|Black_Veil |Yellow_Ribbon 
Article = Articles->>NameWoman
GroupWoman = Group->>NameWoman

NameMan = Brian | Dorian | Joel | Nick | Walter 
MaleAliases = Dr_Who | Hal9000 | Midnight_Rider | Night_Flyer | Rocket_Man
AliasMan = MaleAliases->>NameMan

Newspapers =  Herald | Star| Gazzette | Bugle |Times
Newspaper = Newspapers->>NameMan
GroupMan = Group->>NameMan

///////////////////////////////////////////////////////////////////////////////////////////////////
// Trabscribe the clues into various constraints 
//
pred ComputerRomance(groupWoman :: GroupWoman,aliasWoman::AliasWoman,article::Article,
    groupMan::GroupMan,aliasMan::AliasMan,newspaper :: Newspaper) iff
  
    // 1. Silver Rose, who wore a blue velvet dress, did not meet her date through 
    //    either the Baseball or the Opera news group.
   
    aliasWoman(Silver_Rose) = article(Blue_Velvet_Dress) &
    aliasWoman(Silver_Rose) <> groupWoman(Baseball) & 
    aliasWoman(Silver_Rose) <> groupWoman(Opera) &

    // 2. Hal9000 (who carried either the "Herald" or the "Times") met his date 
    //    (who calls herself either Crafty Lady or Misty Morning) through their common
    //    love of fishing.

    (aliasMan(Hal9000) = newspaper(Herald) | aliasMan(Hal9000) = newspaper(Times)) & 
    groupMan(Fishing) = aliasMan(Hal9000) &
        (
        groupWoman(Fishing) = aliasWoman(Crafty_Lady) |
        groupWoman(Fishing) = aliasWoman(Misty_Morning)
        ) &

    // 3. Brenda (who is not a moviegoer) and the one who met her date through the 
    //    Astronomy news group are the woman who encountered Midnight Rider and the one 
    //    who wore scarlet begonias tucked into her curls, in some order.

    groupWoman(Movies) <> Brenda & groupWoman(Astronomy) <> Brenda &
        (
        (groupWoman(Astronomy) = article(Scarlet_Begonias) & 
        Brenda = groupWoman(gbrenda) & aliasMan(Midnight_Rider) = groupMan(gbrenda)) | 
        (article(Scarlet_Begonias) = Brenda & aliasMan(Midnight_Rider) = groupMan(Astronomy))
        ) &  

    // 4. Dorian and the man who carried the "Bugle" are the man who met Sugar Magnolia
    //    and the one who recognized his date by her raspberry beret, in some order.

    newspaper(Bugle) <> Dorian &
    article(Raspberry_Hat) <> aliasWoman(Sugar_Magnolia) &
    Dorian = groupMan(gdorian) & 
        (
        groupWoman(gdorian) = aliasWoman(Sugar_Magnolia) | 
        groupWoman(gdorian) = article(Raspberry_Hat)
        ) &
    newspaper(Bugle) = groupMan(gbugle) & 
        (
        groupWoman(gbugle) = aliasWoman(Sugar_Magnolia) | 
        groupWoman(gbugle) = article(Raspberry_Hat)
        ) &
    
    // 5. The man carrying the "Star" (who isn't Brian) didn't meet Silver Rose.

    newspaper(Star) <> Brian & 
    groupMan(gstar) = newspaper(Star) & 
    groupWoman(gsilver_rose) = aliasWoman(Silver_Rose) &
    gsilver_rose <> gstar &

    // 6. Lori (who frequents either the Baseball or the Opera news group) met either 
    //    Joel or Dr. Who.

    (groupWoman(Baseball) = Lori | groupWoman(Opera) = Lori) & groupWoman(glori) = Lori & 
        (
        groupMan(glori) = Joel | 
        groupMan(glori) = aliasMan(Dr_Who)
        ) &

    // 7. The man carrying the "Gazette" recognized his date from either the raspberry 
    //    beret or the scarlet begonia.

    newspaper(Gazzette) = groupMan(ggaz) & 
        (
        groupWoman(ggaz) = article(Raspberry_Hat) | 
        groupWoman(ggaz) = article(Scarlet_Begonias) 
        ) &

    // 8. Tracy, who is either the baseball enthusiast or the woman who wore the black 
    //    veil, met Rocket Man.

    groupMan(grock) = aliasMan(Rocket_Man) & 
        (
        (groupWoman(Baseball) = Tracy & grock = Baseball) | 
        (article(Black_Veil) = Tracy & groupWoman(grock) = Tracy)
        ) &

    // 9. Elusive Butterfly, who is either Christine or Olivia, wore neither the 
    //    raspberry beret nor the black veil.

    (aliasWoman(Elusive_Butterfly) = Christine | aliasWoman(Elusive_Butterfly) = Olivia) &
    aliasWoman(Elusive_Butterfly) <> article(Raspberry_Hat) &
    aliasWoman(Elusive_Butterfly) <> article(Black_Veil) &

    // 10. Christine met either Brian or the man with the "Bugle", and Olivia's date 
    //     is either Dr. Who or Walter.

    Christine = groupWoman(gchristine) &
        (
        groupMan(gchristine) = Brian | 
        groupMan(gchristine) = newspaper(Bugle)
        )  &
    
    Olivia = groupWoman(golivia) & 
        (
        groupMan(golivia) = Walter | 
        groupMan(golivia) = aliasMan(Dr_Who)
        ) &

    // 11. Either Walter was carrying the "Times", or he met Crafty Lady.

    (newspaper(Times) = Walter | 
    (groupMan(gwalter) = Walter & groupWoman(gwalter) = aliasWoman(Crafty_Lady))) &

    // 12. Misty Morning is not a baseball fan.

    groupWoman(Baseball) <> aliasWoman(Misty_Morning)







This page was created by F1toHTML