Sunday, 25 November 2012

Problem Solving Post

For my problem solving post I decided to complete a problem from the site "cut the knot" as the prof recommended. I surffed around the site trying all the different problems but this particular problem I will provide a solution for, Box Labels, had extra nostalgic value as it reminded me of doing probability problems with hidden objects in boxes back when I was first learning probability.

The problem is described as such:

Each of the three boxes contains 2 balls. In one there are two white balls, in another two black balls, and in the third one ball is black, the other is white. Boxes have been labeled to indicate their contents. However, whoever did the job got all labels wrong. The task is to straighten things out. You may select 1 box and blindly pick up a ball out of it.I will attempt a solution via the G. Polya method.

UNDERSTANDING THE PROBLEM
First I will divide up the question into what I know and what I need to find out.
Given Information  >>  3 boxes.1 box labelled 2 blacks denoted from here on out as bb
                                                    1 box labelled 2 whites denoted from here on out as ww
                                                    1 box labelled1 of each denoted from here on out as bw
                                      All the boxes are labelled incorrectly
                                      I am permitted to choose one ball from one of the boxes and discover it's colour
Unkown                >>   I must discover which labels belong to which box
Condition              >>   I am only alowed to see one ball from one of the boxes then must label the boxes                                                .                                correctly
DEVISING A PLAN
It seems to be the case that if I pick a ball from bb and it is white then I will still be left with the possibilities of either bw or ww, and not tell me the other boxes either. Or if I pick a ball and it is black then it will tell me that the box is bw and the state of the other two boxes.

A similar situation would occur is I choose from ww.

Where as if I pick from the bw box regardless of weather I pick a black ball or white ball it seems to reveal the content of all boxes. So it becmes apparent that I must choose from the bw box, now I set out to prove it by examining all possiblities.

PROOF
It is clear by the nature of the problem that what ever box I pull a ball from must give me a definitive answer as to what the content of the other boxes are. 
Scratch work:
Case1
Without loss of generality suppose I pick from bb (ww would represent the same cases)
Case1a
If I pick a ball from bb and it is white it will tell me that the content is either bw or ww, but that doesn't tell me what exactly is in the box nor does it reveal the other boxes only shrink the possibilities.

Case1b
If I pick a ball from bb and it is black it will tell me that the content of that box is bw because it can't be bb due to the label and it then tells me the labels of the other 2 boxes because the remaining labels are bw and ww and the remaining boxes are ww and bb so it is clear to see the bw label will go with the ww labelled box and the ww labeled box will go with the bw label

So case 1 leads me to a 50% chance
Case2
pick from bw labelled box
Case2a
If I pick a ball from bw and it is white it will tell me that the content is ww since it can't be bw by the label and revels the other two boxes must be different from what they are labelled. 2 boxes remaining one labelled ww and one bb and 2 labels ww and bw thus the bb labelled box gets the bw label and the ww labelled box gets the bb.

Case2b
If I pick a ball from bw and it is black it will tell me that the content is bb since it can't be bw by the label and revels the other two boxes must be different from what they are labelled. 2 boxes remaining one labelled bb and one ww and 2 labels ww and bw thus the bb labelled box gets the ww label and the ww labelled box gets the bw
.
So case 2 leads me to a 100% chance
Thus the dominate strategy for correctly labelling is too choose from the bw box.

LOOKING BACK
Taking a step back and examining my proof it seems to hold up. My intuitive thought that I must choose from bw was right !!!!!!!! The Polya strategy is certainly appears to be a good method, especially since it tells you to lay out all the information you have and want so you can set up your goals accordingly.

Carl

Monday, 19 November 2012

Post Test2

Well Test 2 and Assignment 2 went surprisingly well, quite the confidence boosters. As the course is progressing I am definitely starting to feel more comfortable writing proofs, which is a good thing because I suppose I'll need them for future courses.

Last class we began learning about languages and alphabets; there seems to be a million definitions- hopefully they don't take too long to memorise. The DFSA accepting states looks interesting and I can see the real life applications.Time to go work on A3.

Carl

Sunday, 11 November 2012

Test 2

It's hard to say how Test 2 went, I felt as though I provided a sound argument in each proof but I am not sure if it was syntactically right since the topic of correctness is new and we haven't done many examples.

Carl

Sunday, 4 November 2012

Test 2 Approaching

Well assignment 2 is finished- but I have learned not to get too excited; as a chance to rest in this course seems about as likely as a unicorn. As Pachino put it...
http://www.youtube.com/watch?v=UPw-3e_pzqU

And so here we are, Sunday November 4th 2012. After spending all last week cramming for an Economics Test, I spent all weekend cramming for a Math test and, not to be out done of course;  now I get to spend the next 3 days cramming for CSC236.

The Test will focus on unit 3 Topics probably including: recursively defined functions, time complexity and unwrapping. Dealing with recursively defined functions during induction and unwrapping shouldn't be overly difficult. Although when it come to time complexity I find that the problems can VERY hard to solve. I am glad we at least have the A2 answers available so we can see the form for Big Θ notation to prepare for the test.

Carl