I've attached a version that filters properly as Steve pointed out by looking 
for sets that don't intersect .  Also attached is sample output.  The final 
count is 12 for the 2024 list.

It's seems to be considerably faster than Barry's solution on my system @ 
30ms/solution .vs. 10495ms/solution.

David
----- Original Message ----
From: David Gamey <[EMAIL PROTECTED]>
To: Steve Wampler <[EMAIL PROTECTED]>
Cc: unicon-group@lists.sourceforge.net
Sent: Wednesday, April 11, 2007 1:21:51 PM
Subject: Re: [Unicon-group] Answer/spoiler (was Re: Making the puzzle more 
interesting...)

Steve's right.   I need a filter layer.   So it's less than 51.

----- Original Message ----
From: Steve Wampler <[EMAIL PROTECTED]>
To: David Gamey <[EMAIL PROTECTED]>
Sent: Wednesday, April 11, 2007 12:34:02 PM
Subject: Re: Answer/spoiler (was Re: [Unicon-group] Making the puzzle more 
interesting...)

David Gamey wrote:
> The matches 51 I get are attached.

Thanks!

> Solving using procedure genStates
...
> 3 eeeeeknnnorsstwy L6905 := list(5)
>    L6905[1] := L6906 := list(2)
>       L6906[1] :=
 "newyork"
>       L6906[2] := "tennessee"
>    L6905[2] := L7549 := list(2)
>       L7549[1] := "korynew"
>       L7549[2] := "tennessee"
>    L6905[3] := L8223 := list(2)
>       L8223[1] := "newkory"
>       L8223[2] := "tennessee"
>    L6905[4] := L9190 := list(2)
>       L9190[1] := "tennessee"
>       L9190[2] := "wenkory"
>    L6905[5] := L9203 := list(2)
>       L9203[1] := "tennessee"
>       L9203[2] := "yorknew"

Using this as an example, I don't think this equivalence class generates any 
valid
solutions since 'Tennessee' has to
 appear in both state pairs, e.g.:

   New York:Tennessee &  York New:Tennessee

I think that violates the "...form the names of two *other* U.S. States."
part of the original puzzle (I added the emphasis, of course).

-- 
Steve Wampler -- [EMAIL PROTECTED]
The gods that smiled on your birth are now laughing out loud.





-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Unicon-group mailing list
Unicon-group@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unicon-group




Attachment: puzzle2.icn
Description: Binary data

Solving using procedure genStates ...
1 0 aaaacdhhiklnnoooorrstttu L69 := list(2)
   L69[1] := S68 := set()
      insert(S68,"northcarolina")
      insert(S68,"southdakota")
   L69[2] := S84 := set()
      insert(S84,"northdakota")
      insert(S84,"southcarolina")
... runtime 30ms.
2 matches found.
Solving using procedure genStates2024 ...
1 0 eekknnoorrwwyy L1469 := list(10)
   L1469[1] := S2707 := set()
      insert(S2707,"wenkory")
      insert(S2707,"yorknew")
   L1469[2] := S2715 := set()
      insert(S2715,"newyork")
      insert(S2715,"wenkory")
   L1469[3] := S2726 := set()
      insert(S2726,"newyork")
      insert(S2726,"yorknew")
   L1469[4] := S3059 := set()
      insert(S3059,"korynew")
      insert(S3059,"wenkory")
   L1469[5] := S3060 := set()
      insert(S3060,"korynew")
      insert(S3060,"newyork")
   L1469[6] := S3073 := set()
      insert(S3073,"korynew")
      insert(S3073,"newkory")
   L1469[7] := S3081 := set()
      insert(S3081,"korynew")
      insert(S3081,"yorknew")
   L1469[8] := S3444 := set()
      insert(S3444,"newkory")
      insert(S3444,"wenkory")
   L1469[9] := S3445 := set()
      insert(S3445,"newkory")
      insert(S3445,"newyork")
   L1469[10] := S3456 := set()
      insert(S3456,"newkory")
      insert(S3456,"yorknew")
2 0 aaaacdhhiklnnoooorrstttu L1351 := list(2)
   L1351[1] := S2576 := set()
      insert(S2576,"northcarolina")
      insert(S2576,"southdakota")
   L1351[2] := S2594 := set()
      insert(S2594,"northdakota")
      insert(S2594,"southcarolina")
... runtime 30ms.
12 matches found.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Unicon-group mailing list
Unicon-group@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to