Tuesday, July 27, 2010

Thinking Clearly is more important than the Right Answer

Have you ever met anyone who attracted your attention because he had the right idea, but the more you got to know how he arrived at that idea, the less attracted you felt?

All our lives, we learn how important it is to be correct, to have the right answer. You gotta have the right answer to make good grades in school, to nail that interview, to be accepted by your peers and your families and your supervisors, .... But too many people think that an education is merely a sequence of milestones at which you demonstrate that you know the right answer. That view of education is unfortunate.

Here’s a little trick that will help me demonstrate. I’m sure you already know how to “cancel” factors in fractions, like I showed in my Filter Early post, to make division simpler. Like this:But, did you know that you can do this, too?
You never knew you could do that, did you?

Well, that’s because you can’t. Canceling the nines produces the right answer in this case: 95/19 is in fact 5/1. But the trick works only in a few special cases. It doesn’t, for example, work here:
Canceling digits like this is not a reliable technique for reducing fractions. (Here’s a puzzle for you. For how many two-digit number pairs will this digit-canceling trick work? What are they? How did you figure it out?)

The trick’s problem is precisely its lack of reliability. A process is reliable only if it works every time you use it. Incomplete reliability is the most insidious of vices. If you have a tool that never works, you learn quickly never to depend upon it, so it doesn’t hurt you too badly. But if you have a tool that works sometimes, then you can grow to trust it—which increases the stakes—and then it really hurts you when it fails.

Of course, you can make a partially reliable tool useful with some extra work. You can determine under what limited circumstances the tool is reliable, and under what circumstances it isn’t. Engineers do it all the time. Aluminum is structurally unreliable in certain temperature ranges, so when a part needs to operate in those ranges, they don’t build it out of aluminum. In some cases, a tool is so unreliable—like our cancel-the-digits trick—that you’re better off abandoning it entirely.

So, if your student (your child) were to compute 95/19 = 5/1 by using the unreliable cancel-the-digits method, should you mark the problem correctly solved? It’s the right answer; but in this case, the correctness of the answer is actually an unfortunate coincidence.

I say unfortunate, because any feedback that implies, “you can reduce fractions by canceling digits,” helps to create a defect in the student’s mind. It creates a bug—in the software sense—that he’ll need to fix later if he wants to function properly. That’s why showing your work is so important for students. How can someone evaluate your thinking if all you show is your final answer?

Being a good teacher requires many of the same skills as being a good software tester. It’s not just about whether the student can puke out the right answers, it’s whether the process in the student’s mind is reliable. For example, if a student is prone to believing in an unreliable trick like cancel-the-digits, then a test where all the problems submit nicely to that trick is a really bad test.

Likewise, being a good student requires many of the same skills as being a good software developer. It’s not just fitting your mind to the problems in the book; it’s exploring how the things you’re learning (both code path and data) can help you solve other problems, too. Being a good student means finding out “Why?” a lot. Why does this work? Does it always work? When does it not work?

Clear thinking is more important than the right answer. Certainly you want the right answer, but knowing how to find the right answer is far more important. It’s the difference between having a fish and knowing how to catch more.

22 comments:

  1. sheesh... i've been trying to figure out how you'd attack that puzzle mathmatically and so far i'm completely stumped. only thing i can really think of is to take a brute force approach... but it really bothers me that i can't think of a better algorithm! :)

    ReplyDelete
  2. Jeremy,

    There are elegant, non-brute ways to do it, but I'd rather see someone execute the brute force approach and get the answer now (especially since you have the tool to do that in just a few seconds sitting right in front of you) than spend [too much] time trying to find a cooler way of finding the answer.

    Remember, "Premature optimization is the root of all evil." :-) Sometimes, the act of executing the brute-force approach gives you the insight you need to figure out something more elegant. And, sometimes, the brute-force approach gives a more correct answer than an approach that on its face appears more elegant. And sometimes, of course, you don't need elegant at all, you just need the blasted answer and the quickest available way to prove that it's correct.

    I'll blog later about how I found numbers that worked. I had seen this 95/19 pair somewhere before, but I couldn't find where I had recorded the numbers or the source, so I had to figure out which numbers would work, in order to write my blog.

    Thanks for reading!

    —Cary

    ReplyDelete
  3. Cary,

    Excellent post as always.
    I agree that a most important is to know "Why" and "How" than have a correct answer based on our luck or coincidence. But this is tough process and I know that some kind of people don't like when I still asking my question "why" or "how".
    The more you understand, the less you have to remember.

    ReplyDelete
  4. Give a man a fish and you've fed him for a day.
    Give a man a fish farm and fish will be jumping into his boat. Which will make him happy until he realizes they are eating all the other better tasting fish.

    Thinking Clearly is tough!

    word: redles

    ReplyDelete
  5. The example uses two digit numbers top and bottom, but doesn't say whether it is the left most digit cancelling out the right most, or the whether it is a fixed offset.

    Once you ask that question, it becomes apparent that what you are demonstrating ONLY works in a particular base. If the 95 and 19 were numbers in hex (149 and 25) then it falls.

    I checked with
    " ((10 * x) + y) / ((10 * z) + x) = (y / z)" for x/y/z values between 1 and 9.

    Brute force shows up a few.
    11/11, 22/22, 33/33, 44/44, 55/55, 66/66, 77/77, 88/88 and 99/99 all work.
    The other ones are 64/16, 65/26 and 98/49 plus the 95/19 you originally stated.

    ReplyDelete
  6. A lot of the feeds I have in my reader talk about the question of how to educate our children. Facts or method? How important is the scientific method to teach children? How early should we teach the different between absolute and relative statistics? And so on.

    It's only now I realise how important it was to show my working in my maths exams, as opposed to just doing it in my head and plonking the answer down.

    My 5 cents.

    ReplyDelete
  7. It’s the difference between having a fish and knowing how to catch more

    Reminds me of:

    "Give a man a fish, and you've fed him for a day...but TEACH a man to fish, and he'll sit in a boat and drink beer all day" :-)

    ReplyDelete
  8. Nice post Cary, I have independently of Gary Myers used the brute force approach and have a results set that agrees with his.

    SQL > declare
    2
    3 x integer; -- cannot be zero, as no ratio y/10z = y/z
    4 y integer; -- can be zero but would only work when x is zero
    5 z integer; -- must be greater than zero, otherwise y/z = y/0
    6
    7 begin
    8
    9 for x in 1 .. 9
    10 loop
    11 for y in 1 ..9
    12 loop
    13 for z in 1 .. 9
    14 loop
    15 if (10*x + y)/(10*z + x) = y/z
    16 then dbms_output.put_line(to_char(10*x+y) || '/' || to_char(10*z+x) || ' = ' || to_char(y) || '/' || to_char(z));
    17 end if;
    18 end loop;
    19 end loop;
    20 end loop;
    21 end;
    22 /
    11/11 = 1/1
    22/22 = 2/2
    33/33 = 3/3
    44/44 = 4/4
    55/55 = 5/5
    64/16 = 4/1
    65/26 = 5/2
    66/66 = 6/6
    77/77 = 7/7
    88/88 = 8/8
    95/19 = 5/1
    98/49 = 8/4
    99/99 = 9/9

    PL/SQL procedure successfully completed.

    SQL >

    I eliminated zeros from the x, y and z values for the reasons stated in the comments above.

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. The brute-force-way (excluding the trivial NN/NN):

    with
    d as (select level d from dual connect by level <= 9),
    n as (select d0.d d0, d1.d d1 from d d0, d d1)
    select distinct n0.d0||n0.d1||'/'||n1.d0||n1.d1
    from n n0, n n1
    where
    (n0.d0*10+n0.d1) / (n1.d0*10+n1.d1)
    = case
    when n0.d0 = n1.d0 then n0.d1 / n1.d1
    when n0.d0 = n1.d1 then n0.d1 / n1.d0
    when n0.d1 = n1.d0 then n0.d0 / n1.d1
    when n0.d1 = n1.d1 then n0.d0 / n1.d0
    end
    and (n0.d0*10+n0.d1) <> (n1.d0*10+n1.d1)
    order by 1

    ReplyDelete
  11. @Scott, thank you; that's the effect I was going for!

    @Connor, I heard a new one just a few days ago, "Give a man a fish, and he'll eat for a day. Give a fish a man, and he'll eat for the rest of his life."

    @Tony, now that's a first-rate job of of showing your work. In PL/SQL, no less.

    ReplyDelete
  12. @Ilya, I've written code in many languages in my software development career. There's one thing I find consistent about SQL programs: I am always amazed by how difficult it is for me to comprehend (a) their intended meaning and (b) their correctness in fulfilling that meaning.

    ReplyDelete
  13. Hi Cary,
    In the spirit of puzzles there is something that does not Add up on your website http://method-r.com/component/simplecalendar/?controller=simplecalendar&view=detail&id=21

    Hint ... there would be a fair amount of un-accounted for time if this were a TC Resource Decomposition

    cheers/drew

    ReplyDelete
  14. @Drew, good catch! When I entered my start and end times, I had forgotten the only accepted format was HH:MM. Another case of an inattentive user, encouraged to do a bad thing by a bad UI design.

    ReplyDelete
  15. Very good posts.

    Know how is more important than just know the answer.

    ReplyDelete
  16. Cary,

    Curious if the following SQL is easy for you to understand / read (wish Oracle had a DIV function):

    with twodigitnums as
    (select level+10 n from dual connect by level <= 89)
    select ns.n as numerator, ds.n as denominator
    from twodigitnums ns, twodigitnums ds
    where floor(ns.n/10) = mod(ds.n,10)
    and mod(ns.n,10) / floor(ds.n/10) = ns.n / ds.n
    order by ns.n
    /

    I like this query because it essentially states the properties of the numerator and denominator as a filter condition.

    You can add a condition to remove trivial cases too:

    and ns.n #not equal to# ds.n

    ReplyDelete
  17. How about the below code.

    public class NumDivision{
    public static void main (String args[]) {
    for (int i = 10 ; i< 100 ; i++) {
    for(int j = 10 ; j < 100 ; j++) {
    if(i==j) continue;
    double result = ((1.0d)*i)/j;
    double a = i%10;
    double b = i/10;
    double c = j%10;
    double d = j/10;
    if((a==c) && (b/d==result)) {
    System.out.println(i+"/"+j+"="+(int)b+"/"+(int)d);
    continue;
    }
    if(a==d && b/c == result) {
    System.out.println(i+"/"+j+"="+(int)b+"/"+(int)c);
    continue;
    }
    if(b==c && a/d == result) {
    System.out.println(i+"/"+j+"="+(int)a+"/"+(int)d);
    continue;
    }
    if(b==d && a/c == result) {
    System.out.println(i+"/"+j+"="+(int)a+"/"+(int)c);
    continue;
    }
    }
    }
    }
    }


    Gives me the below numbers.

    10/20=1/2
    10/30=1/3
    10/40=1/4
    10/50=1/5
    10/60=1/6
    10/70=1/7
    10/80=1/8
    10/90=1/9
    16/64=1/4
    19/95=1/5
    20/10=2/1
    20/30=2/3
    20/40=2/4
    20/50=2/5
    20/60=2/6
    20/70=2/7
    20/80=2/8
    20/90=2/9
    26/65=2/5
    30/10=3/1
    30/20=3/2
    30/40=3/4
    30/50=3/5
    30/60=3/6
    30/70=3/7
    30/80=3/8
    30/90=3/9
    40/10=4/1
    40/20=4/2
    40/30=4/3
    40/50=4/5
    40/60=4/6
    40/70=4/7
    40/80=4/8
    40/90=4/9
    49/98=4/8
    50/10=5/1
    50/20=5/2
    50/30=5/3
    50/40=5/4
    50/60=5/6
    50/70=5/7
    50/80=5/8
    50/90=5/9
    60/10=6/1
    60/20=6/2
    60/30=6/3
    60/40=6/4
    60/50=6/5
    60/70=6/7
    60/80=6/8
    60/90=6/9
    64/16=4/1
    65/26=5/2
    70/10=7/1
    70/20=7/2
    70/30=7/3
    70/40=7/4
    70/50=7/5
    70/60=7/6
    70/80=7/8
    70/90=7/9
    80/10=8/1
    80/20=8/2
    80/30=8/3
    80/40=8/4
    80/50=8/5
    80/60=8/6
    80/70=8/7
    80/90=8/9
    90/10=9/1
    90/20=9/2
    90/30=9/3
    90/40=9/4
    90/50=9/5
    90/60=9/6
    90/70=9/7
    90/80=9/8
    95/19=5/1
    98/49=8/4

    ReplyDelete
  18. In math there might be the right answer.... In Science(Scientific Method) there is no "Right Answer" or "Truth"... There are only "theories" that explain the most phenomena with the least # of assumptions....

    "You know that you are candidate for the Nobel Prize ...when other scientists read your 3 page paper and say "Oh S*it*... "

    Thinking clearly to means you evaporated your core Conflicts in your Thinking (or at least aware of our distortions in thinking)... in order that you can be "Thinking Clearly".... Only then and only then are you able the next best "Right Answer" ...

    Richard Feynman && Eli Goldratt && Dr David Burns

    ReplyDelete
  19. In math there might be the right answer.... In Science(Scientific Method) there is no "Right Answer" or "Truth"... There are only "theories" that explain the most phenomena with the least # of assumptions....

    "You know that you are candidate for the Nobel Prize ...when other scientists read your 3 page paper and say "Oh S*it*... "

    Thinking clearly to means you evaporated your core Conflicts in your Thinking (or at least aware of our distortions in thinking)... in order that you can be "Thinking Clearly".... Only then and only then are you able the next best "Right Answer" ...

    Richard Feynman && Eli Goldratt && Dr David Burns

    ReplyDelete
  20. is there any one word name given to these numbers

    ReplyDelete
  21. Not that I'm aware of, Krishnanunni.

    ReplyDelete