<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: not an impossible problem, just a really big one</title>
	<atom:link href="http://adamcoster.com/2009/12/26/not-an-impossible-proble/feed/" rel="self" type="application/rss+xml" />
	<link>http://adamcoster.com/2009/12/26/not-an-impossible-proble/</link>
	<description>ramblings of a fetal biologist</description>
	<lastBuildDate>Thu, 19 Apr 2012 13:00:34 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Steve</title>
		<link>http://adamcoster.com/2009/12/26/not-an-impossible-proble/#comment-597</link>
		<dc:creator><![CDATA[Steve]]></dc:creator>
		<pubDate>Sun, 26 Dec 2010 05:56:35 +0000</pubDate>
		<guid isPermaLink="false">http://adamcoster.com/?p=859#comment-597</guid>
		<description><![CDATA[My son Uly got this puzzle for xmas this morning. I solved it in less than 6 minutes. The box says that there are 300,000 possible combinations and that only 1 is correct. well, it was easy to solve and now he&#039;s upset because &quot;I ruined it for him.&quot; So, I did  learn a lesson from this puzzle==&gt; I shouldn&#039;t play with my kids toys.]]></description>
		<content:encoded><![CDATA[<p>My son Uly got this puzzle for xmas this morning. I solved it in less than 6 minutes. The box says that there are 300,000 possible combinations and that only 1 is correct. well, it was easy to solve and now he&#8217;s upset because &#8220;I ruined it for him.&#8221; So, I did  learn a lesson from this puzzle==&gt; I shouldn&#8217;t play with my kids toys.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frank Willshire</title>
		<link>http://adamcoster.com/2009/12/26/not-an-impossible-proble/#comment-567</link>
		<dc:creator><![CDATA[Frank Willshire]]></dc:creator>
		<pubDate>Mon, 30 Aug 2010 21:37:54 +0000</pubDate>
		<guid isPermaLink="false">http://adamcoster.com/?p=859#comment-567</guid>
		<description><![CDATA[Hello, 

I believe I have a solution to the puzzle problem.  I wrote it in C# in an attempt to solve 9 piece puzzles such as the ones found here:

http://www.google.com/products?q=B+Dazzle+Game+Birds+&amp;hl=en&amp;aq=f

So far, after letting it run for about an hour, I have 3 working solutions.

Let me know if you would like to see the rest of the project.

Here is some of the code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Puzzle;

namespace Puzzle
{
    public class Piece : IEquatable
    {
        private int _number = -1;
        private int _attempt = 0;
        private Side _top;
        private Side _bottom;
        private Side _left;
        private Side _right;
        
        public Piece(int Number)
        {
            _number = Number;
        }

        public int Number
        {
            get { return _number; }
            set { _number = value; }
        }

        public int Attempt
        {
            get { return _attempt; }
            set { _attempt = value; }
        }

        public Side Top
        {
            get { return _top; }
            set { _top = value; }
        }

        public Side Bottom
        {
            get { return _bottom; }
            set { _bottom = value; }
        }

        public Side Left
        {
            get { return _left; }
            set { _left = value; }
        }

        public Side Right
        {
            get { return _right; }
            set { _right = value; }
        }

        public override bool Equals(object obj)
        {
            return Equals(obj as Piece);
        }

        public bool Equals(Piece other)
        {
            // Check whether the compared object is null.  
            if (ReferenceEquals(other, null)) return false;

            // Check whether the compared object references the same data.  
            if (ReferenceEquals(this, other)) return true;

            // Check whether the Piece&#039; properties are equal.  
            return Number.Equals(other.Number) &amp;&amp;
                    Top.Equals(other.Top) &amp;&amp;
                    Bottom.Equals(other.Bottom) &amp;&amp;
                    Left.Equals(other.Left) &amp;&amp;
                    Right.Equals(other.Right);
        }

        public override int GetHashCode()
        {
            //Get hash code for the ProductId field.  
            int hashNumber = Number.GetHashCode();

            int hashTop = Top == null ? 0 : Top.GetHashCode();
            int hashBottom = Bottom == null ? 0 : Bottom.GetHashCode();
            int hashLeft = Left == null ? 0 : Left.GetHashCode();
            int hashRight = Right == null ? 0 : Right.GetHashCode();

            //Calculate the hash code for the product.  
            return hashNumber ^ hashTop ^ hashBottom ^ hashLeft ^ hashRight;
        }

        public static bool operator ==(Piece a, Piece b)
        {
            // If both are null, or both are same instance, return true.
            if (System.Object.ReferenceEquals(a, b))
            {
                return true;
            }

            // If one is null, but not both, return false.
            if (((object)a == null) &#124;&#124; ((object)b == null))
            {
                return false;
            }

            return a.Equals((object)b);

        }

        public static bool operator !=(Piece a, Piece b)
        {
            return !(a == b);
        }

    }

    public class Side
    {
        private Col _color;
        private Part _birdpart;
        
        public enum Col
        {
            Blue,
            Green,
            Pink,
            Black
        }

        public enum Part
        {
            Head,
            Tail
        }

        public Col Color
        {
            get { return _color; }
            set { _color = value; }
        }

        public Part BirdPart
        {
            get { return _birdpart; }
            set { _birdpart = value; }
        }

        public static bool operator ==(Side leftside, Side rightside)
        {
            bool match = false;

            // If both are null, or both are same instance, return true.
            if (System.Object.ReferenceEquals(leftside, rightside))
            {
                return true;
            }

            // If one is null, but not both, return false.
            if (((object)leftside == null) &#124;&#124; ((object)rightside == null))
            {
                return false;
            }

            if (leftside.BirdPart == Side.Part.Head)
            {
                if (leftside.Color == rightside.Color &amp;&amp; rightside.BirdPart == Side.Part.Tail)
                {
                    match = true;
                }
            }
            else if (leftside.BirdPart == Side.Part.Tail)
            {
                if (leftside.Color == rightside.Color &amp;&amp; rightside.BirdPart == Side.Part.Head)
                {
                    match = true;
                }
            }

            return match;

        }

        public static bool operator !=(Side a, Side b)
        {
            return !(a == b);
        }
    }
}]]></description>
		<content:encoded><![CDATA[<p>Hello, </p>
<p>I believe I have a solution to the puzzle problem.  I wrote it in C# in an attempt to solve 9 piece puzzles such as the ones found here:</p>
<p><a href="http://www.google.com/products?q=B+Dazzle+Game+Birds+&#038;hl=en&#038;aq=f" rel="nofollow">http://www.google.com/products?q=B+Dazzle+Game+Birds+&#038;hl=en&#038;aq=f</a></p>
<p>So far, after letting it run for about an hour, I have 3 working solutions.</p>
<p>Let me know if you would like to see the rest of the project.</p>
<p>Here is some of the code:</p>
<p>using System;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Text;<br />
using Puzzle;</p>
<p>namespace Puzzle<br />
{<br />
    public class Piece : IEquatable<br />
    {<br />
        private int _number = -1;<br />
        private int _attempt = 0;<br />
        private Side _top;<br />
        private Side _bottom;<br />
        private Side _left;<br />
        private Side _right;</p>
<p>        public Piece(int Number)<br />
        {<br />
            _number = Number;<br />
        }</p>
<p>        public int Number<br />
        {<br />
            get { return _number; }<br />
            set { _number = value; }<br />
        }</p>
<p>        public int Attempt<br />
        {<br />
            get { return _attempt; }<br />
            set { _attempt = value; }<br />
        }</p>
<p>        public Side Top<br />
        {<br />
            get { return _top; }<br />
            set { _top = value; }<br />
        }</p>
<p>        public Side Bottom<br />
        {<br />
            get { return _bottom; }<br />
            set { _bottom = value; }<br />
        }</p>
<p>        public Side Left<br />
        {<br />
            get { return _left; }<br />
            set { _left = value; }<br />
        }</p>
<p>        public Side Right<br />
        {<br />
            get { return _right; }<br />
            set { _right = value; }<br />
        }</p>
<p>        public override bool Equals(object obj)<br />
        {<br />
            return Equals(obj as Piece);<br />
        }</p>
<p>        public bool Equals(Piece other)<br />
        {<br />
            // Check whether the compared object is null.<br />
            if (ReferenceEquals(other, null)) return false;</p>
<p>            // Check whether the compared object references the same data.<br />
            if (ReferenceEquals(this, other)) return true;</p>
<p>            // Check whether the Piece&#8217; properties are equal.<br />
            return Number.Equals(other.Number) &amp;&amp;<br />
                    Top.Equals(other.Top) &amp;&amp;<br />
                    Bottom.Equals(other.Bottom) &amp;&amp;<br />
                    Left.Equals(other.Left) &amp;&amp;<br />
                    Right.Equals(other.Right);<br />
        }</p>
<p>        public override int GetHashCode()<br />
        {<br />
            //Get hash code for the ProductId field.<br />
            int hashNumber = Number.GetHashCode();</p>
<p>            int hashTop = Top == null ? 0 : Top.GetHashCode();<br />
            int hashBottom = Bottom == null ? 0 : Bottom.GetHashCode();<br />
            int hashLeft = Left == null ? 0 : Left.GetHashCode();<br />
            int hashRight = Right == null ? 0 : Right.GetHashCode();</p>
<p>            //Calculate the hash code for the product.<br />
            return hashNumber ^ hashTop ^ hashBottom ^ hashLeft ^ hashRight;<br />
        }</p>
<p>        public static bool operator ==(Piece a, Piece b)<br />
        {<br />
            // If both are null, or both are same instance, return true.<br />
            if (System.Object.ReferenceEquals(a, b))<br />
            {<br />
                return true;<br />
            }</p>
<p>            // If one is null, but not both, return false.<br />
            if (((object)a == null) || ((object)b == null))<br />
            {<br />
                return false;<br />
            }</p>
<p>            return a.Equals((object)b);</p>
<p>        }</p>
<p>        public static bool operator !=(Piece a, Piece b)<br />
        {<br />
            return !(a == b);<br />
        }</p>
<p>    }</p>
<p>    public class Side<br />
    {<br />
        private Col _color;<br />
        private Part _birdpart;</p>
<p>        public enum Col<br />
        {<br />
            Blue,<br />
            Green,<br />
            Pink,<br />
            Black<br />
        }</p>
<p>        public enum Part<br />
        {<br />
            Head,<br />
            Tail<br />
        }</p>
<p>        public Col Color<br />
        {<br />
            get { return _color; }<br />
            set { _color = value; }<br />
        }</p>
<p>        public Part BirdPart<br />
        {<br />
            get { return _birdpart; }<br />
            set { _birdpart = value; }<br />
        }</p>
<p>        public static bool operator ==(Side leftside, Side rightside)<br />
        {<br />
            bool match = false;</p>
<p>            // If both are null, or both are same instance, return true.<br />
            if (System.Object.ReferenceEquals(leftside, rightside))<br />
            {<br />
                return true;<br />
            }</p>
<p>            // If one is null, but not both, return false.<br />
            if (((object)leftside == null) || ((object)rightside == null))<br />
            {<br />
                return false;<br />
            }</p>
<p>            if (leftside.BirdPart == Side.Part.Head)<br />
            {<br />
                if (leftside.Color == rightside.Color &amp;&amp; rightside.BirdPart == Side.Part.Tail)<br />
                {<br />
                    match = true;<br />
                }<br />
            }<br />
            else if (leftside.BirdPart == Side.Part.Tail)<br />
            {<br />
                if (leftside.Color == rightside.Color &amp;&amp; rightside.BirdPart == Side.Part.Head)<br />
                {<br />
                    match = true;<br />
                }<br />
            }</p>
<p>            return match;</p>
<p>        }</p>
<p>        public static bool operator !=(Side a, Side b)<br />
        {<br />
            return !(a == b);<br />
        }<br />
    }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deviant Dog</title>
		<link>http://adamcoster.com/2009/12/26/not-an-impossible-proble/#comment-506</link>
		<dc:creator><![CDATA[Deviant Dog]]></dc:creator>
		<pubDate>Thu, 03 Jun 2010 03:05:02 +0000</pubDate>
		<guid isPermaLink="false">http://adamcoster.com/?p=859#comment-506</guid>
		<description><![CDATA[Hey there. I&#039;ve just been taking a trip down memory lane reading this. I remember my step father getting the jigsaw from somebody for a wee Christmas present. He spend a good few hours trying to solve it before telling me &quot;I couldn&#039;t do it so you have no chance&quot;. Needless to say he was pretty miffed after I completed it in a matter of minutes.
The puzzle is hard no doubt about that. It was nearly 20 years ago but if I remember correctly (and it&#039;s the same design) it&#039;s the piece with a positive heart one side and the negative straight opposite that is the centre piece.

I&#039;m not sure if that&#039;s any use to you but thought I&#039;d mention it.

Peace]]></description>
		<content:encoded><![CDATA[<p>Hey there. I&#8217;ve just been taking a trip down memory lane reading this. I remember my step father getting the jigsaw from somebody for a wee Christmas present. He spend a good few hours trying to solve it before telling me &#8220;I couldn&#8217;t do it so you have no chance&#8221;. Needless to say he was pretty miffed after I completed it in a matter of minutes.<br />
The puzzle is hard no doubt about that. It was nearly 20 years ago but if I remember correctly (and it&#8217;s the same design) it&#8217;s the piece with a positive heart one side and the negative straight opposite that is the centre piece.</p>
<p>I&#8217;m not sure if that&#8217;s any use to you but thought I&#8217;d mention it.</p>
<p>Peace</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: puzzle solver, part II &#171; adamcoster.com</title>
		<link>http://adamcoster.com/2009/12/26/not-an-impossible-proble/#comment-479</link>
		<dc:creator><![CDATA[puzzle solver, part II &#171; adamcoster.com]]></dc:creator>
		<pubDate>Mon, 25 Jan 2010 03:52:46 +0000</pubDate>
		<guid isPermaLink="false">http://adamcoster.com/?p=859#comment-479</guid>
		<description><![CDATA[[...] } In a previous post, I discussed my attempt to write a program to solve a puzzle. I never updated that post because, well, I ran the program all night and it didn&#8217;t find the [...]]]></description>
		<content:encoded><![CDATA[<p>[...] } In a previous post, I discussed my attempt to write a program to solve a puzzle. I never updated that post because, well, I ran the program all night and it didn&#8217;t find the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike = bf</title>
		<link>http://adamcoster.com/2009/12/26/not-an-impossible-proble/#comment-461</link>
		<dc:creator><![CDATA[Mike = bf]]></dc:creator>
		<pubDate>Sat, 26 Dec 2009 20:23:21 +0000</pubDate>
		<guid isPermaLink="false">http://adamcoster.com/?p=859#comment-461</guid>
		<description><![CDATA[Can&#039;t wait to see this one Adam!]]></description>
		<content:encoded><![CDATA[<p>Can&#8217;t wait to see this one Adam!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

