Tag Archives: number bases

Define Your Own Math Rule

My friend, Knox S., introduced me to this problem.  According to a post on The Telegraph’s Education page, this was originally  posted on Facebook by Randall Jones.

The first line is fine by the standard rules of arithmetic, but as soon as you read the 2nd and 3rd lines, you know something is amiss.  What could be the output of line 4?

The Telegraph post above claims there are two answers.  Sadly, that post suggests there are only two solutions.  The reality is that there is an infinite number of correct answers.

I first share the two most commonly proffered solutions suggested by the Telegraph as the only answers.  I follow this with Knox’s clever use of an incremental number base.  Finally, I offer a more generalized approach to support my claim of many more solutions.

STANDARD SOLUTIONS

  • THE ANSWER IS 40:  After the first line, add the previous answer to next sum.

knox1

Consistent with the first three lines, the same rule to line 4 “proves” the answer is 40:

knox2

While nothing requires it, this approach is recursive.  I’ve not seen anyone say this, but the 40 approach requires the equations to appear in the given order.  If you give the equations in a different order, the rule is no longer consistent.  In particular, if you wanted a 5th line, what would it be?  There’s nothing clear about how to extend this solution.

  • THE ANSWER IS 96:  Alternatively, you can multiply the two numbers on the left and add that product to the first number.  This procedure is consistent with the first three lines, so the solution to line 4 must be 96:

knox3

The nice thing about this approach is that the solution is explicit, not recursive.  What’s obviously counter-intuitive is why you would first multiply the given numbers, and then why you would add the result to the first number, not the second.  This approach is consistent with the given information, so it is valid.

Unlike the first solution, this multiplicative approach is not commutative.  By this rule, 1+4 yields 5, as shown, but 4+1 would be 4+(4*1)=8.  Nothing in the problem statement required commutativity, so no worries.

Another good aspect of this algorithm is that the order of the equations is now irrelevant.  It applies no matter what numbers are “added” on the left side of the equation.  This is definitely more satisfying.

CHANGE THE NUMBER BASE

  • THE ANSWER IS 201:  Knox noticed that if you changed the number base, you could find another legit pattern.  The first line is standard arithmetic, but how could the next lines be consistent, too?  You know 2+5 doesn’t give 12 in standard base-10 arithmetic, but if you use base-5, 2+5=7=1*5^1+2*5^0=12_5.

    Unfortunately, in base-5, line 1 would be (1+4)_5=10_5 and line 3 would be (3+6)_5=14_5, both inconsistent.  Knox’s cleverest move was to vary the number base.  The 3rd line is true in base-4; since the 1st line is true in any base larger than five, he found a consistent pattern by applying base-6 to line 1:

knox4

Following this pattern, the next line would be base-3, giving 201 as the answer:

knox5

The best part of Knox’s solution is that he maintains the addition integrity of the left side.  The down-side is that this approach works for only one more line.  Any 5th line would give a base-2 (binary) answer, and since base-1 does not exist, the problem would end there.

Knox’s approach also allows you to use any numbers you want for the left-hand sums.  But notice that answers depend on where you write the sum.  For example, if (2+5) was in any other line, you would not get 12.  In line 1, (2+5)_6=11_6, in line 3, you’d get (2+5)_4=13_4.

CREATE YOUR OWN SOLUTION

By now, you should see that any any rule could work so long as you are consistent.  Because standard arithmetic does not apply, solvers should feel free to invoke any functions or algorithms desired.  One way to do this is to think of each line as the inputs (left side) and output (right side) of a three-variable function.

  • THE ANSWER IS 96:  One possible function is z=f(x,y)=a*x^2+b*y^2+c for some values of a, b, and c that passes through (1,4,5), (2,5,12), and (3,6,21).  I used my TI-Nspire CAS to solve the resulting system:

    knox6

    That means if x and y are the given left-side numbers and z is the right-side answer, the equation \frac{1}{3}*x+\frac{2}{3}*y-6=z satisfies the first three lines and the answer to line 4 is 96

    knox7

  • THE ANSWER IS \displaystyle \frac{2574}{29}:  If you can square the inputs, why not cube them?  That means another possible function is z=f(x,y)=a*x^3+b*y^3+c.  My CAS solution of the resulting system leads to the fractional answer:

    knox9

The first three given equations essentially define three ordered triples–(1,4,5), (2,5,12), and (3,6,21)–so almost any equation you conceive with three unknown coefficients can be used to create a 3×3 system of equations.  The fractional solution for line 4 may not be as satisfying as any of the earlier approaches using only integers, but these last two examples make it clear that there should be an infinite number of solutions.

These last two solutions are especially nice because they are explicit and don’t depend on the order of the given information.  You can choose any two numbers to “add”, and the algorithms will work.

Notice also that all of these functions, except for Knox’s, are non-commutative.  No worries, the problem already broke free of standard rules in line 2.

ONE THAT DIDN’T WORK

The last two examples prove the existence of quadratic and cubic solutions, so why not a linear solution?  In other words, is there a 3D plane in the form z=a*x+b*y+c containing the given points?

knox8

Unfortunately, the resulting 3×3 system didn’t solve. The determinant of the coefficient matrix is zero, suggesting an inconsistent or dependent system.  Upon further inspection, subtracting line 1 from line 2 in the planar system gives a+b=7.  Similarly, subtracting line 2 from line 3 gives a+b=9.  Since both can’t be simultaneously true, the system is inconsistent and has no solution.  It was worth the effort.

CONCLUSION

Since standard arithmetic didn’t apply after the first line and no other restrictions were in play, that opened the door to lots of creativity.  The many different solutions to this problem all hinge on finding some function–any function–that satisfied the first three lines.  Find one of these, and the last line is simple.  That some attempts won’t work is no hinderance.  Even when standard algorithms seem to apply, there is almost always the possibility of some creative twist when working with numerical sequences.

So, whenever you’re faced with a non-standard system, have fun, be creative, and develop something unexpected.

Base-x Numbers and Infinite Series

In my previous post, I explored what happened when you converted a polynomial from its variable form into a base-x numerical form.  That is, what are the computational implications when polynomial 3x^3-11x^2+2 is represented by the base-x number 3(-11)02_x, where the parentheses are used to hold the base-x digit, -11, for the second power of x?  

So far, I’ve explored only the Natural number equivalents of base-x numbers.  In this post, I explore what happens when you allow division to extend base-x numbers into their Rational number counterparts.

Level 5–Infinite Series: 

Numbers can have decimals, so what’s the equivalence for base-x numbers?  For starters, I considered trying to get a “decimal” form of \displaystyle \frac{1}{x+2}.  It was “obvious” to me that 12_x won’t divide into 1_x.  There are too few “places”, so some form of decimals are required.  Employing division as described in my previous post somewhat like you would to determine the rational number decimals of \frac{1}{12} gives

Base6

Remember, the places are powers of x, so the decimal portion of \displaystyle \frac{1}{x+2} is 0.1(-2)4(-8)..._x, and it is equivalent to

\displaystyle 1x^{-1}-2x^{-2}+4x^{-3}-8x^{-4}+...=\frac{1}{x}-\frac{2}{x^2}+\frac{4}{x^3}-\frac{8}{x^4}+....

This can be seen as a geometric series with first term \displaystyle \frac{1}{x} and ratio \displaystyle r=\frac{-2}{x}.  It’s infinite sum is therefore \displaystyle \frac{\frac{1}{x}}{1-\frac{-2}{x}} which is equivalent to \displaystyle \frac{1}{x+2}, confirming the division computation.  Of course, as a geometric series, this is true only so long as \displaystyle |r|=\left | \frac{-2}{x} \right |<1, or 2<|x|.

I thought this was pretty cool, and it led to lots of other cool series.  For example, if x=8,you get \frac{1}{10}=\frac{1}{8}-\frac{2}{64}+\frac{4}{512}-....

Likewise, x=3 gives \frac{1}{5}=\frac{1}{3}-\frac{2}{9}+\frac{4}{27}-\frac{8}{81}+....

I found it quite interesting to have a “polynomial” defined with a rational expression.

Boundary Convergence:

As shown above, \displaystyle \frac{1}{x+2}=\frac{1}{x}-\frac{2}{x^2}+\frac{4}{x^3}-\frac{8}{x^4}+... only for |x|>2.  

At x=2, the series is obviously divergent, \displaystyle \frac{1}{4} \ne \frac{1}{2}-\frac{2}{4}+\frac{4}{8}-\frac{8}{16}+....

For x=-2, I got \displaystyle \frac{1}{0} = \frac{1}{-2}-\frac{2}{4}+\frac{4}{-8}-\frac{8}{16}+...=-\frac{1}{2}-\frac{1}{2}-\frac{1}{2}-\frac{1}{2}-... which is properly equivalent to -\infty as x \rightarrow -2 as defined by the convergence domain and the graphical behavior of \displaystyle y=\frac{1}{x+2} just to the left of x=-2.  Nice.

Base7

I did find it curious, though, that \displaystyle \frac{1}{x}-\frac{2}{x^2}+\frac{4}{x^3}-\frac{8}{x^4}+... is a solid approximation for \displaystyle \frac{1}{x+2} to the left of its vertical asymptote, but not for its rotationally symmetric right side.  I also thought it philosophically strange (even though I understand mathematically why it must be) that this series could approximate function behavior near a vertical asymptote, but not near the graph’s stable and flat portion near x=0.  What a curious, asymmetrical approximator.  

Maclaurin Series:

Some quick calculus gives the Maclaurin series for \displaystyle \frac{1}{x+2} :  \displaystyle \frac{1}{2}-\frac{x}{4}+\frac{x^2}{8}-\frac{x^3}{16}+..., a geometric series with first term \frac{1}{2} and ratio \frac{-x}{2}.  Interestingly, the ratio emerging from the Maclaurin series is the reciprocal of the ratio from the “rational polynomial” resulting from the base-x division above.  

As a geometric series, the interval of convergence is  \displaystyle |r|=\left | \frac{-x}{2} \right |<1, or |x|<2.  Excluding endpoint results, the Maclaurin interval is the complete Real number complement to the base-x series.  For the endpoints, x=-2 produces the right-side vertical asymptote divergence to + \infty that x=-2 did for the left side of the vertical asymptote in the base-x series.  Again, x=2 is divergent.

It’s lovely how these two series so completely complement each other to create clean approximations of \displaystyle \frac{1}{x+2} for all x \ne 2.

Other base-x “rational numbers”

Because any polynomial divided by another is absolutely equivalent to a base-x rational number and thereby a base-x decimal number, it will always be possible to create a “rational polynomial” using powers of \displaystyle \frac{1}{x} for non-zero denominators.  But, the decimal patterns of rational base-x numbers don’t apply in the same way as for Natural number bases.  Where \displaystyle \frac{1}{12} is guaranteed to have a repeating decimal pattern, the decimal form of \displaystyle \frac{1}{x+2}=\frac{1_x}{12_x}=0.1(-2)4(-8)..._x clearly will not repeat.  I’ve not explored the full potential of this, but it seems like another interesting field.  

CONCLUSIONS and QUESTIONS

Once number bases are understood, I’d argue that using base-x multiplication might be, and base-x division definitely is, a cleaner way to compute products and quotients, respectively, for polynomials.  

The base-x division algorithm clearly is accessible to Algebra II students, and even opens the doors to studying series approximations to functions long before calculus.

Is there a convenient way to use base-x numbers to represent horizontal translations as cleanly as polynomials?  How difficult would it be to work with a base-(x-h) number for a polynomial translated h units horizontally?

As a calculus extension, what would happen if you tried employing division of non-polynomials by replacing them with their Taylor series equivalents?  I’ve played a little with proving some trig identities using base-x polynomials from the Maclaurin series for sine and cosine.

What would happen if you tried to compute repeated fractions in base-x?  

It’s an open question from my perspective when decimal patterns might terminate or repeat when evaluating base-x rational numbers.  

I’d love to see someone out there give some of these questions a run!

Number Bases and Polynomials

About a month ago, I was working with our 5th grade math teacher to develop some extension activities for some students in an unleveled class.  The class was exploring place value, and I suggested that some might be ready to explore what happens when you allow the number base to be something other than 10.  A few students had some fun learning to use their basic four algorithms in other number bases, but I made an even deeper connection.

When writing something like 512 in expanded form (5\cdot 10^2+1\cdot 10^1+2\cdot 10^0), I realized that if the 10 was an x, I’d have a polynomial.  I’d recognized this before, but this time I wondered what would happen if I applied basic math algorithms to polynomials if I wrote them in a condensed numerical form, not their standard expanded form.  That is, could I do basic algebra on 5x^2+x+2 if I thought of it as 512_x–a base-x “number”?  (To avoid other confusion later, I read this as “five one two base-x“.)

Following are some examples I played with to convince myself how my new notation would work.  I’m not convinced that this will ever lead to anything, but following my “what ifs” all the way to infinite series was a blast.  Read on!

Level 1–Basic Addition:

If I wanted to add (3x+5)(2x^2+4x+1), I could think of it as 35_x+241_x and add the numbers “normally” to get 276_x or 2x^2+7x+6.  Notice that each power of x identifies a “place value” for its characteristic coefficient.

If I wanted to add 3x-7 to itself, I had to adapt my notation a touch.  The “units digit” is a negative number, but since the number base, x, is unknown (or variable), I ended up saying 3x-7=3(-7)_x.  The parentheses are used to contain multiple characters into a single place value.  Then, (3x-7)+(3x-7) becomes 3(-7)_x+3(-7)_x=6(-14)_x or 6x-14.  Notice the expanding parentheses containing the base-x units digit.

Level 2–Advanced Addition:

The last example also showed me that simple multiplication would work.  Adding 3x-7 to itself is equivalent to multiplying 2\cdot (3x-7).  In base-x, that is 2\cdot 3(-7)_x.  That’s easy!  Arguably, this might be even easier that doubling a number when the number base is known.  Without interactions between the coefficients of different place values, just double each digit to get 6(-14)_x=6x-14, as before.

What about (x^2+7)+(8x-9)?  That’s equivalent to 107_x+8(-9)_x.  While simple, I’ll solve this one by stacking.

Base1

and this is x^2+8x-2.  As with base-10 numbers, the use of 0 is needed to hold place values exactly as I needed a 0 to hold the x^1 place for x^2+7. Again, this could easily be accomplished without the number base conversion, but how much more can we push these boundaries?

Level 3–Multiplication & Powers:

Compute (8x-3)^2.  Stacking again and using a modification of the multiply-and-carry algorithm I learned in grade school, I got

Base2and this is equivalent to 64x^2-48x+9.

All other forms of polynomial multiplication work just fine, too.

From one perspective, all of this shifting to a variable number base could be seen as completely unnecessary.  We already have acceptably working algorithms for addition, subtraction, and multiplication.  But then, I really like how this approach completes the connection between numerical and polynomial arithmetic.  The rules of math don’t change just because you introduce variables.  For some, I’m convinced this might make a big difference in understanding.

I also like how easily this extends polynomial by polynomial multiplication far beyond the bland monomial and binomial products that proliferate in virtually all modern textbooks.  Also banished here is any need at all for banal FOIL techniques.

Level 4–Division:

What about x^2+x-6 divided by x+3? In base-x, that’s 11(-6)_x \div 13_x. Remembering that there is no place value carrying possible, I had to be a little careful when setting up my computation. Focusing only on the lead digits, 1 “goes into” 1 one time.  Multiplying the partial quotient by the divisor, writing the result below and subtracting gives

Base3

Then, 1 “goes into” -2 negative two times.  Multiplying and subtracting gives a remainder of 0.

Base4

thereby confirming that x+3 is a factor of x^2+x-6, and the other factor is the quotient, x-2.

Perhaps this could be used as an alternative to other polynomial division algorithms.  It is somewhat similar to the synthetic division technique, without its  significant limitations:  It is not limited to linear divisors with lead coefficients of one.

For (4x^3-5x^2+7) \div (2x^2-1), think 4(-5)07_x \div 20(-1)_x.  Stacking and dividing gives

Base5

So \displaystyle \frac{4x^3-5x^2+7}{2x^2-1}=2x-2.5+\frac{2x+4.5}{2x^2-1}.

CONCLUSION

From all I’ve been able to tell, converting polynomials to their base-x number equivalents enables you to perform all of the same arithmetic computations.  For division in particular, it seems this method might even be a bit easier.

In my next post, I push the exploration of these base-x numbers into infinite series.

I can guess ANY polynomial with only 2 points

I thought this was a brilliant solution to a surprising problem. At first glance, it seems impossible…

Given the coordinates of only two points of your choosing from an unknown polynomial, could you guess the exact equation of that polynomial?

The problem as originally stated is here and a few different explanations are here.  For the computations, I think the use of technology is a no-brainer.

“Digit”al Multiplication

So here’s another musing I had on a beach visit. I don’t recall where I learned this trick, but I’ve had it for decades.  I suspect most of you already know how you can multiply by 9 using your fingers, but I’ll briefly explain just in case.  An extension follows.

Start by laying out both hands with all fingers outstretched.  Number your fingers from 1 to 10 from left to right.

To compute 9*n for integer values of n between 1 and 10, fold down the n^{th} finger and count the number of still-extended fingers before and after the folded finger. Thinking of those two numbers as a two-digit number gives your answer. For example, to compute 9*9, fold down the 9^{th} finger as shown below.

Because there are 8 fingers before the fold and 1 after, 9*9=81. Simple.

On the beach, I recalled this little trick and first extended it to two other simple multiples of 9. Computing 9*1 is simple, but folding down the 1^{st} finger confirms the answer by showing 0 before and 9 fingers after the fold, so 9*1=09=9.

Computing 9*10 works the same way.  Folding down the 10^{th} finger shows 9 before and 0 fingers after the fold, so 9*10=90.

As I lay on the sand, I marveled at how nice this worked, but was saddened that such a cute approach had such limited applicability.  Thinking about what was going on in this problem, the obvious observation was that all were products of 9 and worked from 10 initial fingers.  So what would happen if you used a different number of fingers?

Starting with 7 fingers, numbered as before, I thought I might be able to multiply by 6.  As a first attempt, I tried 6*6, but the next image shows that my approach gives 6*6=51–obviously not the correct result.

Then inspiration struck.  Perhaps the answer was good, but my interpretation was off.  If multiplication by 9s (using 10 fingers) gave an answer in base-10, perhaps multiplication by 6s (using 7 fingers) needed to be interpreted in base-7.  That is, 6*6=51_7=(5*7^1+1*7^0)_{10}=(35+1)_{10}=36_{10}.  Eureka!  But does it always work?

Testing once more, I tried using 5 fingers meaning I would be multiplying by one less (4) and getting an answer in the base of the number of fingers I was using.  The next image shows 4*2=13_5=(1*5^1+3*5^0)_{10}=(5+3)_{10}=8_{10}.

Generalizing, imagine that you could hold out any number of fingers.  The image below suggests that you extended n “digits”, so you could use this to multiply by (n-1).

The next image supposes that you hold down the k^{th} finger leaving k-1 fingers before and n-k fingers after.

That suggests (n-1)*k=(k-1)(n-k)_n where (k-1)(n-k) is a 2-digit number whose left digit is (k-l) and whose right digit is (n-k).  Expanding, (k-1)(n-k)_n=((k-1)*n^1+(n-k)*n^0)_{10} and (n-1)*k=(k-1)(n-k)_n=(k*n-k)_{10}.  QED

So, if you just had enough “digits” (pun intended) and didn’t mind working in different number bases, the result of every single multiplication could be known with one simple finger fold!