Logic Puzzles II

Last week, we looked at solving some simple logic puzzles.  This week, the logic puzzle is quite a bit more involved —  I hope you enjoy it!

Six logical friends — Arlen, Boris, Cecil, Doran, Edith, and Frank — having just finished some pretty hairy logic problems, decided to go to Wacky Jack’s Primo Ice Cream Emporium to celebrate. Each ordered their ice cream in a waffle cone or a dish, except for the one who ordered the Slurp-A-Licious Bucket-O-Yum — a delectable concoction with two scoops each of Jack’s five Specialty Flavors — in which case it came in a commemorative Wacky Jack Bucket (which you got to keep if you ate it all). From the following clues, can you decide who ordered what?  Note: All solvers made their selections from Jack’s five Specialty Flavors: Blueberry Farkle, Chocolate Smudge, Marshmallow Whoop, Pecan Passion, and Peppermint Blast. For the cones, you must specify the order of the scoops.

  1. No cone had more than three scoops of ice cream, and no dish had more than five.
  2. Except for the problem solver who got the Slurp-A-Licious Bucket-O-Yum, no one got more than one scoop of the same flavor.
  3. The number of scoops in Edith’s dish was the same as the sum of the numbers of scoops in Arlen’s and Cecil’s cones.
  4. Cecil and Edith together had the same number of scoops as Arlen and Frank together.
  5. If Frank had an even number of scoops, then there were 23 scoops among the six solvers.
  6. If Frank had an odd number of scoops, then there were 25 scoops among the six solvers.
  7. If Boris had an odd number of scoops, then Edith had an even number.
  8. Boris had fewer scoops than Doran.
  9. Exactly two solvers had exactly three scoops of ice cream.
  10. Frank ordered a dish if and only if Boris ordered a cone.
  11. Arlen had three scoops of ice cream if and only if no two cones had the same number of scoops.
  12. Exactly four solvers had Marshmallow Whoop, exactly four had Pecan Passion, and exactly two had both.
  13. Either Arlen’s flavors were a subset of Edith’s, or Frank’s were a subset of Cecil’s.
  14. Frank did not order Pecan Passion, and Cecil did not order Marshmallow Whoop.
  15. If Cecil ordered just one scoop, then Arlen ordered Pecan Passion.
  16. Boris and Doran were the only two to order Peppermint Blast.
  17. Arlen and Frank had no flavors in common if and only if Boris and Frank had exactly one flavor in common.
  18. Two cones had a scoop of Chocolate Smudge second from the top.
  19. Frank had exactly two scoops if and only if Pecan Passion was always the bottom scoop of the cone it was on.

 

Logic Puzzles I

Some of my favorite puzzles to create are logic puzzles.  There are many reasons for this — you can often create humorous scenarios for your puzzles (like Trolls wearing hats).  Also, there are typically multiple entry points into a solution — you can start with any clue you like!

I’ll let you do a review of simple logic; you should be familiar with truth tables, conjunctions, disjunctions, implications, and biconditionals, for example.  In this week’s post, we’ll start by solving a simple puzzle — and in doing so, discuss several tricky points in working with mathematical logic.

We begin in the Land of Pergile, where four friendly trolls — Cedric, Dillon, Elbyn, and Fenn — are wearing four different but brightly colored hats of the red, blue, green, and yellow varieties. Here’s what you know:

  1. Dillon is wearing a yellow hat if and only if Elbyn is wearing a green one.
  2. Either Dillon is wearing a red hat, or Fenn is wearing a yellow hat.
  3. If Dillon is wearing  a red hat, then Cedric is wearing a blue one.
  4. Cedric’s hat is either red or yellow.
  5. If Cedric’s hat is blue, then Elbyn’s is green.

Where to begin?  Let’s look at clues 3 and 4.  Suppose Dillon’s hat is red.  Then from clue 3, Cedric is wearing a blue hat.  But clue 4 says his hat is either red or yellow — not blue.  So our original assumption that Dillon’s had is red must be false.  Therefore, we know that Dillon is not wearing a red hat.

Now since Cedric’s hat is either red or yellow, it can’t be blue.  So from clue 5…well, nothing.  Remember that if the antecedent of an implication is false, you can’t conclude anything about the consequent.  In other words, since Cedric’s hat is not blue, you can’t conclude that Elbyn’s hat is green — but you can’t conclude that his hat is not green, either.  So we really can’t learn any more information from clue 5.

Now let’s look at clue 2.  Keep in mind that it is possible for both Dillon to be wearing a red hat and Fenn to be wearing a yellow hat.  In general, a disjunction (that is, an “or” statement) is inclusive.  (Although in clue 4, this is certainly not possible — but in general you have to consider that both clauses in a disjunction may be true.)

Now we’ve already established that Dillon is not wearing a red hat — so that means that Fenn must be wearing a yellow hat.  At least one clause in a disjunction must be true.  Then we use clue 4 to establish that Cedric must be wearing the red hat, since Fenn is wearing the yellow hat.

We haven’t used clue 1 yet.  Recall that in a biconditional statement, both clauses have the same truth value — both are true, or both are false.  In this case, they can’t both be true, since we already know that Fenn is wearing the yellow hat.  So they must both be false.

Therefore Dillon is not wearing a yellow hat, which doesn’t really help us since that fact gives us no information about the color of hat he is wearing.  But also,  Elbyn is not wearing a green hat — and since the red and yellow hats are already accounted for, he must be wearing the blue hat.  That leaves Dillon wearing the green hat.

Problem solved!  Now if you know your way around logic problems, this might have seemed simple.  But if you’re new to them, you realize you have to be very careful about the conclusions you make.

Of course maybe you just guessed the right answer and found no contradictory statements. But part of solving these problems is showing that you’ve found the only solution — and that means using the rules of logic to exclude all other possibilities.

And of course you might used the clues in a different order.  You can eliminate any help from clue 5 by looking at clue 4 first, and then consider clue 3.  Or you can take a completely different approach with clue 1.  For example, if Dillon’s hat is yellow, then neither clause in clue 2 can be true — which yields a contradiction.  So Dillon’s hat can’t be yellow.  The point is that there is not just one way to solve any of these problems — which is part of the fun!  But you’ve always got to make some tentative decision about where to begin.

Now here’s one for you to figure out.  As it happens, the four friendly young Trolls decided to skip school one Afterday morning and go shopping for new hats!  Excited — though not particularly adventurous — they each bought another hat which was either red, blue, green, or yellow.  (It is possible that a Troll bought the same color hat as he was already wearing.)  From the following clues, can you deduce what colors their new hats are?

  1. If Fenn bought a green hat, then Dillon bought a yellow hat.
  2. After all the new hats were purchased, either Cedric and Dillon did not share a hat of the same color, or Elbyn and Fenn did not share a hat of the same color.
  3. If Cedric’s new hat was blue, then Elbyn’s new hat was green.
  4. Either Dillon or Fenn bought a new blue hat.
  5. If Dillon did not buy a hew red hat, then Elbyn did.
  6. If Cedric bought a new yellow hat, then so did Fenn.

You can easily create logic puzzles of your own.  I find it easiest to start with a solution, write clues which describe the solution, and then see if you have enough clues as well as check that the solution is unique.  There’s a certain amount of back-and-forth work here — you don’t always get it right the first time….  The second problem took a little while to get the clues right — I wanted a variety of clues (sharing the same color hat, implications and disjunctions, etc.), and I wanted to make sure there was a clear solution path.  Maybe you’ll find it…..

Finally, here’s another short puzzle to test your logical prowess.  After their hat-buying excursion, Cedric decided to go to the local produce stand, where he bought a basket of his favorite fruits:  apples, bananas, and choobles.  In all, he bought ten pieces of fruit.  Given the following true statements made by Cedric, how many pieces of each fruit did he have in his basket?

  1. If I don’t have more choobles than bananas, then I have two more apples than bananas.
  2. If I have more choobles than bananas, I have three apples.
  3. If I have fewer than four apples, then I have the same number of bananas as choobles.
  4. The number of pieces of one of the fruits is the same as the sum of the number of pieces of the other two fruits.

Happy solving!

Roman Numeral Puzzles

Today, I’ll talk about a set of puzzles I created just for this blog.  The problems you’ve seen before — CrossNumber puzzles and Cryptarithms — I’ve been creating for many years.  But in writing a blog about creativity in mathematics, I feel I should occasionally create something new….

I call these “Roman Numeral Puzzles” since they involve using Roman numerals in an interesting way.  If you’re not familiar with how Roman numerals are written, just search online.  (The internet knows everything.)

So here’s how the puzzles go.  Fill in the following grid with the digits 0–9 and the letter X so that each row and column is either a number or a mathematically correct statment. The 1 may represent either the number 1 or an I in Roman numerals, and the X may represent either a multiplication symbol or an X in Roman numerals. For example, the second row may be XXX (the number 30 in Roman numerals), or 5X6 (since 5\times6=30), or 3XX, where the first X represents multiplication, and the second X the number 10. What an I or X represents in a row may not the same as what it represents in the corresponding column.  And as usual, no number can begin with a “0.”  Happy solving!

Day018Grid1

Let’s work through the solution for this puzzle together. Then there will be two more for you to try on your own.

First, look at the second column. It can’t be 100, since there would be no way to write 12 in the third row with a 0 in the middle. So the second column is a multiplication, and the only way to write 100 using three symbols is XXX, which we interpret as 10\times10.

In the third column, there is no way to write 40 as just a number, so it must be the result of a multiplication. So far, we have

Day018Grid2

Now think about how we can write 40. There are only four ways: 4XX, XX4, 5X8, and 8X5, where in the first two cases, one “X” is the multiplication symbol, and the other “X” represents the number 10. Since the first and third rows must be multiplications and 8 is not a factor of 20 or 12, that leaves 4XX or XX4. But 10 is a factor of 20 (and not 12), so we’ve got to use XX4. Once we have this, the rest is easy to fill in:

Day018Grid3

These puzzles aren’t difficult to make. You can begin with a grid, and simply fill it in with symbols and work out the values for the rows and columns. Try to think of using numbers which can be represented in different ways. For example, in the 4\times4 puzzle below, I used 13 since it might either be written as a Roman numeral XIII, or a multiplication like 1X13. Having some entries end in 0 means a multiplication by 10, but that might be represented by 10 or X.

I can’t exactly remember what prompted me to bring in Roman numerals this way.  You just let your mind wander — thinking about puzzles you are already familiar with, pushing the boundaries a bit — until your mind just “snaps” and you’ve got a concrete idea to try.  Better minds than I have tried to pin down the creative process, so I won’t try to do that here.  But I’m not really sure we’ll ever really undertand it….

Now the biggest challenge is solving your own puzzle and making sure it has a unique solution. Sure, you might say “find all solutions” — but as a puzzle maker, you really want just one solution. This is somehow more satisfying — if you create enough puzzles, I think you’ll see why. Good luck!  And if you come up with any of your own puzzles, post them in a comment.

Here’s the 4\times4 puzzle.

Day018Grid4

And for a real challenge, here is a 5\times5 puzzle.

Day018Grid5

I hope you enjoy solving these puzzles.  Let me know how it goes!

 

ColorSlide Puzzles

Part of the fun of writing a math blog is designing new puzzles.  I wanted to come up with a puzzle which incorporated color and logic, so here’s the result!

In the grid below, slide the tiles either horizontally or vertically onto the grid so that each row and column contains exactly one each of green, cyan, magenta, and yellow dots. When two dots share the same square, they are combined, so that if a green and a red dot occupy the same square, the dot is yellow, while if a blue and a green dot occupy the same square, a cyan dot is produced. In other words, overlapping the tiles is like adding their RGB values.  (If you aren’t familiar with RGB values, you can experiment in the “Continue reading” section by searching for Day002 in my blog.)  Horizontal tiles may only overlap vertical tiles (and not other horizontal tiles), and vertical tiles may only overlap horizontal tiles.

Dots of the same color may never overlap — although this condition follows from the puzzle setup. Note that green, cyan, and yellow all require a green dot, so with four rows/columns, at least 12 green dots are necessary. Since there are exactly 12 green dots, no two green dots may overlap. Similar arguments show that no two red dots or two blue dots may overlap, either.

Day010CS1

In the first part of the post, we’ll solve this puzzle so you see what’s involved.  We’ll look at the design later.

Let’s start by looking at Column 1. Each row column needs three green dots, two red dots, and two blue dots — this follows from the fact the the RGB values of the four colors in the completed puzzle are (0,1,0), (0,1,1), (1,0,1), and (1,1,0). Since the vertical tiles in Column 1 already include three green dots, we know how to place the tiles in Row 2, since we need to avoid a fourth green dot in the first column. This results in

Day010CS2

Now see that however the tiles are placed in Column 1, the dot at (2,1) — Row 2 and Column 1 — must be yellow. So (2,4) can’t be yellow, and therefore we know how to place the tiles in Column 4.

Day010CS3

Note how the red and blue dots overlap to create magenta.  Since there are no blue dots in the completed puzzle, we must place the tile in Row 3 so that the blue dot is covered by a green one (making a cyan dot).

Day010CS4

Since green dots cannot overlap, we know how to place the tiles in Rows 1 and 4.  Note the red and green dots overlapping in (4,4) to create yellow.

Day010CS5

Since green dots cannot overlap, we know how to place the tile in Column 2.  See how the overlapping dots create yellow, cyan, and magenta dots.

Day010CS6

Now in Column 1, there can only one be yellow dot. So we know how to place the tiles in Column 1, and it is easy to slide the remaining tiles from Column 3.

Day010CS7

That wasn’t so bad! Just a little knowledge of color theory and a bit of logic is all you need.

These puzzles are fun to create.  However, there are a few issues to be aware of.  The first arises since you want to avoid too many single dots — I used just one in the first puzzle, and I think that’s enough.  It’s actually rather easy to create a grid with one of each color in each row and column — there are called Latin squares.  The hard part is then creating an appropriate set of tiles.  The difficulty lies with the fact that some squares are covered by just one tile, others by two.

In the following small grid, the numbers represent how many dots are needed to create a color in a certain location.

Day010CS8

Suppose we wanted a vertical tile to cover a 1 and a 2 in column 3.  Since (2,3) is covered by two tiles and vertical tiles cannot overlap, this means we must use a horizontal tile here.  But then the only way to cover location (1,2) is with a horizontal tile and a vertical tile of height 1 (since the 1’s are already covered).  But this is exactly what we want to avoid!  Once I realized was happening, I first designed a grid with just 1’s and 2’s and a corresponding tile set, then added the colors later.  In other words, I broke a harder design problem into two easier ones.

The other issue which arose was the question of uniqueness.  It’s desirable to have a unique solution to puzzles like this — when you design a puzzle, you clearly have one solution, but can you be sure that there aren’t any others?  This is not an insurmountable task, but for the larger puzzle below, it was more involved than I thought it would be.

So I leave you with a 6 x 6 puzzle to solve.  Slide the tiles so that there is a red, green, blue, yellow, magenta, and cyan dot in each row and column.  As mentioned above, the solution is unique.  Feel free to post your own puzzles if you create them!

Day010CS9

The Problem with Calculus Textbooks

Simply put, most calculus textbooks are written in the wrong order.

Unfortunately, this includes the most popular textbooks used in colleges and universities today.

This problem has a long history, and will not be quickly solved for a variety of reasons. I think the solution lies ultimately with high quality, open source e-modules (that is, stand-alone tutorials on all calculus-related topics), but that discussion is for another time. Today, I want to address a more pressing issue: since many of us (including myself) must teach from such textbooks — now, long before the publishing revolution — how might we provide students a more engaging, productive calculus experience?

To be specific, I’ll describe some strategies I’ve used in calculus over the past several years. Once you get the idea, you’ll be able to look through your syllabus and find ways to make similar adaptations. There are so many different versions of calculus taught, there is no “one size fits all” solution. So here goes.

1. I now teach differentiation before limits. The reason is that very little intuition about limits is needed to differentiate quadratics, for example — but the idea of limits is naturally introduced in terms of slopes of secant lines. Once students have the general idea, I give them a list of the usual functions to differentiate. Now they generate the limits we need to study — completely opposite of introducing various limits out of context that “they will need later.”

Students routinely ask, “When am I ever going to use this?” At one time, I dismissed the question as irrelevant — surely students should know that the learning process is not one of immediate gratification. But when I really understood what they were asking — “How do I make sense of what you’re telling me when I have nothing to relate it to except the promise of some unknown future problem?” — I started to rethink how I presented concepts in calculus.

I also didn’t want to write my own calculus textbook from scratch — so I looked for ways to use the resources I already had. Simply doing the introductory section on differentiation before the chapter on limits takes no additional time in the classroom, and not much preparation on the part of the teacher. This point is crucial for the typical teacher — time is precious. What I’m advocating is just a reshuffling of the topics we (have to) teach anyway.

2. I no longer teach the chapter on techniques of integration as a “chapter.” In the typical textbook, nothing in this chapter is sufficiently motivated. So here’s what I do.

I teach the section on integration by parts when I discuss volumes. Finding volumes using cylindrical shells naturally gives rise to using integration by parts, so why wait? Incidentally, I also bring center of mass and Pappus’ theorem into play, as they also fit naturally here. The one-variable formulation of the center of mass gives rise to squares of functions, so I introduce integrating powers of trigonometric functions here. (Though I omit topics such as using integration by parts to integrate unfriendly powers of tangent and secant — I do not feel this is necessary given any mathematician I know would jump to Mathematica or similar software to evaluate such integrals.)

I teach trigonometric substitution (hyperbolic as well — that for another blog post) when I cover arc length and surface area — again, since integrals involving square roots arise naturally here.

Partial fractions can either be introduced when covering telescoping series, or when solving the logistic equation. (A colleague recommended doing series in the middle of the course rather then the end (where it would have naturally have fallen given the order of chapters in our text), since she found that students’ minds were fresher then — so I introduced partial fractions when doing telescoping series. I found this rearrangement to be a good suggestion, by the way. Thanks, Cornelia!)

3. I no longer begin Taylor series by introducing sequences and series in the conventional way. First, I motivate the idea by considering limits like

\displaystyle\lim_{x\to0}\dfrac{\sin x-x}{x^3}=-\dfrac16.

This essentially means that near 0, we can approximate \sin(x) by the cubic polynomial

\sin(x)\approx x-\dfrac{x^3}6.

In other words, the limits we often encounter while studying L’Hopital’s rule provide a good motivation for polynomial approximations. Once the idea is introduced, higher-order — eventually “infinite-order” — approximations can be brought in. Some algorithms approximate transcendental functions with polynomials — this provides food for thought as well. Natural questions arise: How far do we need to go to get a given desired accuracy? Will the process always work?

I won’t say more about this approach here, since I’ve written up a complete set of Taylor series notes.  They were written for an Honors-level class, so some sections won’t be appropriate for a typical calculus course. They were also intended for use in an inquiry-based learning environment, and so are not in the usual “text, examples, exercise” order. But I hope they at least convey an approach to the subject, which I have adapted to a more traditional university setting as well. For the interested instructor, I also have compiled a complete Solutions Manual.

I think this is enough to give you the idea of my approach to using a traditional textbook. Every calculus teacher has their own way of thinking about the subject — as it should be. There is no reason to think that every teacher should teach calculus in the same way — but there is every reason to think that calculus teachers should be contemplating how to make this beautiful subject more accessible to their students.

Continue reading The Problem with Calculus Textbooks

What Is Mathematics?

Mathematics is creative.

Unfortunately, this is lost upon many — if not most — students of mathematics, in large part because their teachers may not understand mathematical creativity, either.  One way to address this issue is to have students write and solve their own original mathematics problems.  This seems daunting at first, until students realize they are more creative than they were led to believe.  (I’ll discuss this more in a later post.)

The difficulty is that the creative dimension of mathematics is a bit elusive.  Give a child crayons and ask her to draw a picture, sure — but give a student some ideas and ask him to create a new one?  To appreciate mathematical creativity, you need some understanding of the abstract nature of mathematics itself.  To create mathematics, you need imagination much like you do in any of the arts — or other sciences, for that matter.

Over the years, I’ve created my fair share of mathematics.  How much of it is really new is hard to determine — how do you know if any of the billions of other people in the world already created something you did?  (Proof by internet search notwithstanding.)

This blog is about sharing some of my ideas, problems, and puzzles.  Some were created years ago, some are new — and I will consider myself lucky if some are entirely original.  I truly did have fun creating them, and I enjoy writing about them now.

I’m hoping to convey an enthusiasm for mathematics and its related fields — in other words, all human knowledge — and to share something of the creative process as well.  The creation of mathematics is not a mystical process, and needs no explanation to a mathematician.  But we can surely do more to make this enlivening process accessible to all in a time when it is certainly necessary.

As you follow, you’ll notice a heavy emphasis on programming.  Every student should learn to program — and in more than one language.  Perhaps this should be an axiom in the 21st century, but we’re not even close.  So many of the tools I use are virtual — the ability to write code to perform various tasks is essential to my creative process, as you’ll see.  In fact, many posts will have links to Python programs in the Sage platform (don’t worry if you don’t know what these are yet).  These tools are all open source, and available to anyone with internet access.

Finally, blog posts will usually have a “Continue reading…” section.  Some posts (like this one) will be essays on teaching, creativity, or a related topic.  Since not everyone may be so philosophically minded, the “Continue reading…” sections of these essays will be a puzzle or game.  Enjoy!

Continue reading What Is Mathematics?