Showing posts with label guess and check. Show all posts
Showing posts with label guess and check. Show all posts

Monday, November 16, 2015

[Pri20151116DNGC] Quadratic Plays Second Fiddle in Product-Difference Riddle

Question

What two numbers give a product of  21.5  and a difference of  6.1?

Introduction
     This question reminded me of a question that I set myself when I was in Primary 4 (» grade 4).  I imagined a rectangle with breadth 4  and  length 2 units longer then the breadth (i.e. 6) giving a area (product) of  24.  Then I pretended that I did not know the breadth and let it be  x.  This led to a quadratic equation  x(x + 2) which I did not know how to solve (if I did not know the answer).  So I accidentally discovered quadratic equations when I was in Primary 4.  This led me to a quest to learn the method of factorisation (by “trial and error” or “guess and check”) and the quadratic formula.  I never liked trial and error.  So I continued in my quest to invent a method of factorisation that did not require “guess and check”.  I finally succeeded doing that in secondary 1 (» grade 7).  This turned out to be a Pyrrhic victory.  The method I invented was quite similar to the quadratic formula.
     There is a place for “guess and check” in mathematics.  I present a simple solution to the above problem using just that.

Solution

smaller #
larger #
product


2
8.1
16.2
û
3
9.1
27.3
û
2.5
8.6
21.5
ü

Solved! J

H02. Use a diagram / model    (table)
H05. Work backwards             (if the smaller number is this, what is the bigger number?)
H07. Use guess and check
H09. Restate the problem in another way      (area = product)

Suitable Levels
* Primary School Mathematics
* other syllabuses that involve decimal numbers

* anyone who loves to exercise their minds

Thursday, May 28, 2015

[OlymPri20150527NTSD] Sudoku with Modular Arithmetic?

Question

Introduction
     This is a pretty nasty-looking challenge.  It is like Sudoku, but only worse.  You probably cannot avoid some degree of trial-and-error (or [H07] guess and check).  There is a solution posted somewhere, but it is very long and chases many dead-ends before arriving at the solution.
     So how do we avoid making so many wild guesses?  We do so by making good use of number theory, which includes modular arithmetic.  In what follows, I am going to use the theory and notations as in my article (“Divisibility Tests for 7 and other digits”).  Please read the article to remind yourself of the various divisibility tests.

Solution
     It is easy to see that  j = 0. 
     Since abcde ¸ 5,  e Î {0, 5}.  But  0  is already taken, so  e = 5.
     Since divisibility is transitive (x ¸ y  and  y ¸ z  Þ  x ¸ z),  anything divisible by  4,  6  and  8  is also divisible by 2.  So  b, d, f, h  are all the even digits  2, 4, 6, 8  in some order, and  a, c, g, i  are the odd digits  1, 3, 7, 9  in some order.  From the divisibility tests for  3,  6  and  9,
     a+b+c º 0 (mod 3)
     a+b+c+d+e+f º 0 (mod 6)               Þ   a+b+c+d+e+f º 0 (mod 3)
     a+b+c+d+e+f+g+h+i º 0 (mod 9)   Þ   a+b+c+d+e+f+g+h+i º 0 (mod 3)
we get
     a+b+c º d+e+f º g+h+i º 0 (mod 3)
To narrow down the search space, we always test the group of digits that contain the most clues and the least unknowns (if possible).  Currently, this seems to be the middle group d5f.
     Using modulo 3,  d+5+f º 0   Þ   d+f º 1   Þ   d+f = 7, 10, 13  (because  2+4 < d+f < 6+8)
Since  d  and  f  are even digits, we can cross out  7  and  13.  So {d, f} = {6, 4}.
     abcd ¸ 4   Þ   cd ¸ 4   Þ   10c + d º 2c + d º 0   (mod 4)
If  d = 4,  then  2c º 0   (mod 4)   Þ   c º 0   (mod 2).  Not possible, as  c  is odd.
Now we know  d = 6  and  f = 4.  The number is  abc654ghi0,  and  {b, h} = {2, 8}.

Can  h = 8?  If so, we would have  4g8 º 4´100+g´10+8 º 2g  º  0 (mod 8).  g  º  0 (mod 4) 
g ¸ 4 ¸ 2.  But this is not possible, since  g  is an odd number.  Hence  know  h = 2  and  b = 8.  The number is  a8c654g2i0.  Now
4g2 ¸ 8   Þ   4´100+g´10+2 º 2g+2 º 0 (mod 8)   Þ   g+1 º 0 (mod 4)   Þ   g º -1 (mod 4)
   Þ   g Î {3, 7}.

If  g = 3, then working in mod 7, we have  a8c6 º 543,  and then
     Þ   a´1000+8´100+c´10+6 º 5´100+4´10+3
     Þ                  -a+8´2+c´3+6 º 5´2+4´3+3
     Þ                          3c – a + 1 º 4
     Þ                        a – 3(c – 1) º 0 (mod 7)
Note that  a  is an odd digit  and   c  is odd,  c – 1  is even,  3(c – 1)  is even and so  a – 3(c – 1)  is odd.  a – 3(c – 1) ¹ 0  because 0 is even.  Since  1 < a < 9,  a – 3(c – 1) = 7.  We need  a = 7  and  c = 1.  This would mean  i = 9.  But   g+h+i  º 3+2+9 º 2 (mod 3).  It is supposed to be 0 (mod 3).  So  g ¹ 3  i.e.  g = 7.  The number is  a8c65472i0.

Going back to mod 7,     a8c6 º 547
                               3c – a + 1 º 1
                                            a  º 3c
(a, c) = (3, 1) or (9, 3).  But if  (a, c) = (9, 3),  i = 1.  g+h+i  º 7+2+1 º 1 (mod 3), which is incorrect.  So we must have  a = 3 and   c = 1.  The remaining digit is   i = 9. 

The mystery number is 3816547290.  Bingo!


H03. Make a systematic list
H04. Look for pattern(s)
H05. Work backwards
H07. Use guess and check
H08. Make suppositions
H09. Restate the problem in another way
H10. Simplify the problem
H11. Solve part of the problem
H13* Use Equation / write a Mathematical Sentence
Hxx*  At each step, try to attack the part that has most clues and the least unknowns.

Suitable Levels
* Primary School Mathematics
* anyone game for a challenge requiring modular arithmetic

Sunday, May 10, 2015

[PriCNPTGN_20150508] Sum of the First Few Natural Numbers

Question

 Introduction
     Numerical patterns are a challenge to learn and to teach.  Those of us who are teachers, usually the better students of our time, tend to think that the pattern is “obvious”, and hence do not bother to explain and/or facilitate classroom discussions regarding patterns.
     This article is about a pattern that involves the sum of the first few natural numbers (or wholenumbers).  This pattern, common in our primary school mathematics patterns, is a special case of the sum of an arithmetic progression, but its formula is not usually taught explicitly.  The story is told of the great mathematician Karl Friedrich Gauss, who figuredout a short-cut for adding up  1 + 2 +... + 100.  Lesser mortals in primary schools are left to struggle with frustration, or to copy “model answers” from their tutors or teachers without understanding how the solutions were obtained.
     As in a previous article, I attempt to illustrate the pattern visually.  I shall highlight the linkages to facilitate discovery of the general method, as well as show how the last part (part(c)) can be solved.

Solution
     Many pupils are able to deduce the answer to part (a) by analysing the differences between successive answers, which is equivalent to asking what must you add to get the next number.  For example, from the 1st number  1,  you add  2  to get the 2nd number  3,  you add  3  to get the third number  6.  To get the 4th number, you add  4  to get  10.  This approach works, but will not help you much for parts (b) and (c) of the question.  The better way is to look for a method that does not require you to keep on adding numbers.  That would allow one to kill all the birds with one stone.  How to do this?
     Imagine the given dots being doubled, rotated and then put together into parellelogram-like matrices.  If you want, you can imagine them as rectangular arrays.  I use the colour orange for the originals, and blue for the copies.

     As you can see, for figure 1, the total number of blue and orange dots is  1 ´ 2.  For figure 2, the total is  2 ´ 3.  For figure 3, the total is  3 ´ 4.  For figure 4, the total is  4 ´ 5.  The pattern is: for whatever number representing the position of the figure, the total is this ordinal number multiplied by another factor that is one more than this number.  Hence the number of original dots (shown in orange) is this product divided by  2.  With this insight, we can fill up the table to answer part (a).  The answer for figure  5  is  30.

We can also figure out that the answer to part (b) is  55,  with the above-mentioned pattern.

For part (c), we can use trial and error or “guess and check”.  Trying  21  gives  21´22 = 462  which does not work.  We try 22:  22´23 = 506.   Yes!  Bingo!

You may also use a calculator to help you.  Since the two unknown factors are close together (they differ only by one), it is almost like multiplying a number with itself, or squaring.  So to guess our number, we may use the square root (the opposite of squaring) to estimate it.  The square root of  506  is about  22.49.  We guess  22  and verify that 22´23 = 506.

Summary
     The pattern involving the sum of the first few whole numbers may be deduced by making a copy of the original figure, rotating it and joining it to form an array.  Just multiply accordingly and then divide by  2  to get the sum for the original figure.  To solve for a figure’s ordinal number (which figure has a certain given number of dots), one may use guess and check, or use square roots.  A primary school pupil should be able to all these without the knowledge of advanced techniques like the sum of arithmetic progressions or quadratic equations.


H02. Use a diagram / model
H03. Make a systematic list
H04. Look for pattern(s)
H05. Work backwards
H07. Use guess and check
H09. Restate the problem in another way

Suitable Levels
* Primary School Mathematics (algebra unnecessary)
* GCE ‘O’ Level “Elementary” Mathematics (Number patterns, with algebra)
* GCE ‘A’ Levels H2 Mathematics (Number patterns, with algebra)
* anyone who loves a challenge to unravel a pattern


Friday, March 6, 2015

[Pri20150303CRT] Three Pencils in the Haystack?

Question
     A man had fewer than 500 pencils.  If he packed them into 28 packets, there was a remainder of 3 pencils.  If he packed them into 20 packets, he had 7 pencils left over.  How many pencils had he?

Solution
     Let us “shift” the problem [Heuristic H09].  Imagine if there were 3 pencils less.  Then the remainders would be 0, 4 when divided by 28, 20 respectively.  Noting that 4 is also a common factor of 28 and 20, we divide through by 4 and get a simplified problem [Heuristic H10].  We now look for a number whose remainders are 0, 1 when divided by 7, 5 respectively. [Heuristic H11]
We draw tables represent the problem. [Heuristic H02]



     Obviously, the desired number must be a multiple of 7.  First, let us try 7 [Heuristic H07].  It does not work.   Trying the higher multiples 14, 21, ..., we find that 21 fits the bill.  Now just multiply everything back by 4 and we find that 84 leaves a remainder of 0, 4 when divided by 28, 20 respectively.  This is the number 3 less than what we want.  So we “shift” back, and get 87 as an answer.


     However, the is not the only possible answer.  Note that the LCM of 28 and 20 is 140.  Since 140 is divisible by both 28 and 20, we know that if we keep on adding 140, there will not be any change in the respective remainders.  We do just that, giving us two other possible answers below 500, namely 227 and 367.

Ans: 87, 227 or 367

H02. Use a diagram / model
H07. Use guess and check
H09. Restate the problem in another way
H10. Simplify the problem
H11. Solve part of the problem

Commentary
     This is another question involving remainders.  It is quite a tough job juggling the requirements when we have different remainders and the divisors have a common factor.  We solved this problem by “shifting” (imagining that there were 3 pencils less) and reducing the problem (via division by 4).  Thus this problem can be solved in a relatively easy manner, without “cheating”by using advanced knowledge and without searching the whole haystack for the proverbial needle, so to speak.

     The person who set this question overlooked the fact that there could be multiple answers.  He/she listed the answer as 367 whereas a pupil who attempted this question got 227 which could be verified to be a correct answer.  Question setters should be cognisant of LCM and multiple answers, and specify a suitable range for the expected answer, if it is meant to be unique.  As “consumers” we should also be critical and creative thinkers not to blindly rely on the author’s “correct answer”.