Showing posts with label puzzles. Show all posts
Showing posts with label puzzles. Show all posts

Play the Wikipedia Game: Get to Philosophy!

Subscribe to BrokenAirplane!

It's no secret that I love Python and that I love Wikipedia. So when my former teacher and collaborator Michel Paul told me about this game I had to see if I could merge the two.

Take any random article on Wikipedia and click on the first link that is not within parenthesis or italicized, you will eventually end up on the Philosophy page.

Sounds simple enough. He was made aware of this by the webcomic XKCD which if you hover over the comic, you discover the Wikipedia Game. Not to be outdone, Wikipedia has its own page about the Get to Philosophy game where you learn this works with approximately 93% of the articles and the rest end up in a 2 page loop. There are variations of the game for multiple people or to see how many clicks are necessary to find Jesus, etc. I feel like this has a deeper meaning about the nature of knowledge or perhaps about our culture and perhaps that is why I am drawn to the problem.

So, I rolled up my sleeves and gave it a shot. I always want to improve my skills and this would allow me to get better at parsing data and working with HTML/Internet fetching through Python. I am not usually interested in the typical programming puzzles, there needs to be a context and this seemed to work for me.

I came up with a basic working program after an hour or so but I ran into a stumbling block when trying to get past the parenthesis like when I came across England, this page has a pronunciation key and parenthesis and my algorithm would not work. I tried to adjust it and even considered some Regular Expressions but I have to throw in the towel for the moment. I found that the XKCD wiki has a page where Ryan Elmquist has a beautiful script that will show you the jumps. I hope he will be kind enough to help me see what I am missing.

Usual disclaimer follows: I am not a professional programmer, I pick it up as I go so if you dislike my code help me make it better. I love to learn. Note if you are running Python 3.0, remove the "2" from urllib2 on lines 1 and 2.

1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import urllib2
opener = urllib2.build_opener()
opener.addheaders = [('User-agent', 'Mozilla/5.0')]

newURL = 'http://en.wikipedia.org/w/index.php?title=Special:Random' #URL for a random article
#newURL = 'http://en.wikipedia.org/w/index.php?title=England'

def getNextURL(newURL): #Finds the first link/title (broken when it has a country)
    infile = opener.open(newURL)
    page = infile.read()
    mainP = page[page.find('<p>'):page.find('<p>')+500] #Find the first <p> tag for the main body
    newPage = mainP[mainP.find('<a href="/wiki/')+15:mainP.find('"',mainP.find('<a href="/wiki/')+15)] #Find the first href for the link
    return newPage

newPage = getNextURL(newURL)

counter = 0 #Keeps track of the jumps

if newPage == 'Philosophy':
    print("The Random page chosen was the Philosophy page. Isn't the universe cool?")
else:
    print("We begin our journey on the " + newPage + " page.")
    while newPage !='Philosophy':
        newURL = 'http://en.wikipedia.org/w/index.php?title=' + newPage #Creates the next link to go to based upon the first link
        newPage = getNextURL(newURL)
        print ('Now jumping to the ' + newPage + ' page.')
        counter +=1

print ('It took %d times to get to the Philosophy page on Wikipedia. Thanks Michel for the puzzle!' % counter)  

As I said, if you run the program, it runs well enough but it will fail if it comes across a page that does not play nice with how I find the first link. Hopefully the Python/CS community will come to my rescue and teach me something and help me solve the problem! I post this for education and entertainment purposes as I hope it inspires you to keep learning and solving puzzles no matter how old you are.

Subscribe to BrokenAirplane for all of the relevant technology and education news/information.

Programming and Puzzles in Math

One way I relieve stress with my students is with puzzles. We are currently preparing for our school wide exhibition "Festival del Sol". I'll be sure to follow up with pictures when it happens in a couple of weeks, it is amazing. Even though our students have done two exhibitions (the challenges of engineering project, and a Edgar Allen Poe play) there is still a high possibility of getting stressed out as the deadline approaches. I have a weekly puzzle on the board so we can take a moment to have some mathematical play.

I always choose puzzles that I do not know the answer to or that I have forgotten so I can enjoy working it out with the students as well. Often it inspires me to write a Python program to solve it. My students think I am cheating but I always tell them that someone has to program the computer, it can't just solve it for me.

This week's puzzle was:

Find the five digit number in which the first digit is two more than the second, the second digit is two more than the third, the fourth digit is two less than the third, and the last digit is two more than the fourth. The sum of the third, fourth, and fifth digits equals the first. The sum of all the digits is 19. What is the five-digit number?

Here is my solution, it is definitely one of the most nested loops I remember writing. Although I wasn't writing it for efficiency, I still reduced the loops to 9 because that is the biggest it could be for a single digit. I never cease to be amazed at how quickly the program can solve the problem.

1
2
3
4
5
6
7
8
for first in range(1,9):    
     for second in range(1,9):         
              for third in range(1,9):             
                     for fourth in range(1,9):                
                           for fifth in range(1,9):                     
                                if first+second+third+fourth+fifth == 19:                         
                                        if (first == second +2) &amp; (second == third+2) &amp; (fourth == third-2) &amp;((third+fourth+fifth)== first):                                         
                                             print ("The answer is first: %i, second: %i, third: %i, fourth: %i, fifth: %i" % (first, second, third, fourth, fifth))   

Now for a real challenge. One of my favorite puzzles came from Henry Dudeney almost 90 years ago.

A college student sent a letter home to his parents saying, "Hey Mom and Dad, I need some more cash because college is expensive." The parents wrote him back saying, "We have spent all of this money to educate you and yet you ask us for money like this? You didn't even say how much you need." The student sends a letter back saying:

SEND + MORE = MONEY

Where each letter represents a unique digit from 0-9. How much money was the student asking for? Now you can of course Google the answer but I hope you will give yourself the time to either solve it by hand or program it.

Subscribe to BrokenAirplane for great tutorials and educational news.

Get Your Students Thirsty for Math

Many of you read the Is Calculating Math? post last week and are now considering what can you do to bring Math back into your classroom. There are so many resources out there to get students thinking mathematically. What does it mean to think Mathematically? Every student is different and we need to take that into account. Is our goal just to teach a canon of concepts or to inspire students to look at the world with the eyes of an artist? I think it is a little of both.

Howard Gardner's Theory of Multiple Intelligences refers to 9 various intelligences which describe a student's strengths and preferred method of learning. If we look at the logical-mathematical sphere of intelligence it refers to quote:

Less emphasis on traditional mathematical ability and more on reasoning capabilities, abstract patterns of recognition, scientific thinking and investigation, and the ability to perform complex calculations.

I believe all students are capable of enjoying these aspects of life and our universe and so in addition to the standard curriculum, wherever possible, I provide my students opportunities to explore.

One great resource that I have come across is James Tanton. His website provides a lot of great resources and ideas about math and how to make concepts more easily understood. Many teachers do not know the reasons behind why they do certain things in math and this can frustrate students when they want to understand. Mr. Tanton's resources and books are more conversational and geared towards students and teachers reading them for enjoyment and explanation. For example, here is a great free guide and resource about Quadratics.

I really enjoy using Math without Words and examples from Solve This. The post that inspired me to  check out these resources came from this Math Mama Writes blog post. In the post you can see some examples and see why my students and I were so excited about it. Every time I use one of these resources I seem to hook one more student into realizing that math is fun. The coveted, "Wow, this is really interesting" to the student who is working on a Kakuro puzzle you gave them after school for fun.

We can have the best teachers in the world, but if the students are not enjoying themselves then they will not be receptive to learning. In We Make The Road by Walking, Myles Horton is asked to comment on education as related to the quote, "you can lead a horse down to water, but you cannot make him drink." His response was:


This is a problem they deal with in academia by hitting the horse over the head and beating on him till they force his nose in the tub, and just to keep the blows from continuing, he'll try to drink. My system is to make him thirsty, so he'll volunteer to drink.


If you can get your students thirsty for math, they will be able to learn anything because they have motivation.


Updated: After writing this post, I received an email from BachelorsDegree.org with a link about 20 Incredible Math Ted Talks some of which I had seen before and some I had not but they are a really good list. It is important to keep learning all of the time so you can answer student's questions. Not just the ones about how to solve problems, but why and what makes math interesting.


Subscribe to BrokenAirplane!

Is Calculating Math? Part 1

I was reading a book one of my students lent me The Geeks' Guide to World Domination (excellent read, I love my students). There are 314 (yes, pi reference) short essays about all sorts of interesting topics about geek culture. One topic which interested me greatly was regarding Artificial Intelligence and what John Searle referred to as the Chinese Room Thought Experiment.


Quoting from Wikipedia (image also from Wikipedia):
Searle imagines himself in a room acting as a computer by manually executing a program that convincingly simulates the behavior of a native Chinese speaker. People outside the room slide Chinese characters under the door and Searle is able to create sensible replies, in Chinese, by following the instructions of the program; that is, by moving papers back and forth under the door.


When I read this, it immediately brought to mind many of our "A" students in our math/physics classes. A lot of students become extremely good at learning how to do a specific task (e.g. factor a quadratic equation or find the third side of a right triangle), yet you ask them to apply or use that information in a new situation and they are stuck. 


This is why the Chinese Room experiment spoke to me, as I wondered how many students leave our classes, giving the appearance of knowing how to do a calculation but one summer break later and they are tabula rasa.


There are two complaints I hear about math class from adults and students alike:
  1. It's not fun
  2. When will we ever have to use this?
Now we could draw the conclusion that they just don't get it, they are lazy, maybe they had poor quality teachers, etc, etc. But I would like to propose another theory, maybe they are right. Maybe math class isn't enjoyable or relevant.

Now before you start to email me about your class, remember that I am talking about the large number of people I have talked to over the years who just can't understand why I enjoy math so much, let alone teaching it. 


If I can be so bold, I think I fell in love with math in spite of my math classes. Don't get me wrong, I had some incredibly interesting math teachers but most of the lessons just involved various ways of moving x's and y's around. Who could honestly enjoy that?

If we look at the curriculum set forth in textbooks and standards, they all involve calculations and remembering which formula to use. Patterns, creativity and problem solving are never addressed. Yet these are the fun and relevant parts our students crave.

But, we have state and federal standards and textbooks filled with lessons that we can barely get through you say. The content in our classrooms is increasing exponentially and teachers are struggling to keep up. With a general pacing of one maybe two days per topic rarely provides any time to devote to depth or application. 

If you have not read Paul Lockhart's thought provoking treatise on the subject of math and creativity I highly recommend it. You can read it for free here and if you would like, you can purchase a paper copy: A Mathematician's Lament: How School Cheats Us Out of Our Most Fascinating and Imaginative Art Form.


For me and I am sure many of you, the difficulty lies in releasing ourselves from the cycle. Most of us went to a US Public School where our math classrooms were filled with endless rote calculations and 30 or more problems a night. If we examine this practice, the primary goal of this routine is for students to perform the task so many times that they can perform it in their sleep.


The Navy traines it's sailors the same way. Drilling for battle stations and damage control over and over again until we could do it in our sleep. The question is whether or not we want math to be something that is robotic and automatic or requiring imagination and creativity. From the mathematicians I have read and heard from (e.g. Letters to a Young Mathematician), calculation should certainly not be our primary goal. The great mathematical discoveries have begun with wonder and inquiry and only later would calculation be needed to test the theory.


How can we set ourselves and our students free from the antiquated and aggravating structure of American Math Class. Why do we teach what we teach? What is truly important in a math class? For me, it is students being able to leave thinking math is enjoyable. My hope is to inspire and create opportunities for this to happen. When all else fails, geeking out and sharing historical background (which for a lot of math is right out of a mystery thriller), a puzzle, real life application, or an extremely esoteric problem that only those inducted into the deepest of the mathematical mysteries usually get to experience. 


As for the calculation, that comes with time and help but unless we seek to inspire interest and awe in our students first they will not learn. They might remember it for a time but they will not learn.


For part 2, I would like to share more about what inspires me and what I think is a new direction for high school math and science.


Subscribe to BrokenAirplane!

Use Puzzles to Promote Critical Thinking and Fun!

I think puzzles capture the essence of math and the scientific method. Sometimes it requires very logical steps and other times it involves lateral out-of-the-box thinking. I love to see students, especially those with an aversion to math, get into the fun and freedom of a puzzle.

I use math to encourage this kind of thinking but also to reduce the math anxiety that is so prevalent in our society. Everyone enjoys a game, but puzzles are non-competitive and allow for everyone to win. Here are some great resources for games to enjoy with your students.

Sudoku - Fill in all of the numbers from 1-9 horizontally, vertically, and in the box. Extremely popular. Play online or print out for class or home.

Kakuro/KenKen - Like Sudoku but with an added twist, the numbers inside a "cage" must add up to a certain total. Great for building number sense. I actually had a student shocked that they were enjoying math so much (she said she was addicted to the puzzles)!




Math Puzzles:
Dr. Math @ Drexel - From the famous to the obscure, I put up a problem from here every week to challenge my students. Problems of all levels and abilities are available and it is also an excellent resource for math help that students can submit their own questions.
Math Games - Broad assortment of casual games for class or at home with family. If you can get the family to enjoy math and encourage it at home, it is a proven fact their student will be more interested and stronger in their math skills.
Mr. L's Math - Already mentioned this in a previous blog post. Great ideas for a classroom filled with math and fun. Teacher to Teacher Press has some materials for sale which are well worth it.
Ken's Puzzle of the Week - While the site is no longer being updated, there are still many great puzzles to enjoy.
University of Idaho Math Challenge - No longer updated, but another great resource for fun mathematical brain teasers.

Word Puzzles:
East of The Web - General grouping of word puzzles.
Merriam Webster - The popular dictionary provides crosswords, scrambles, and word searches.
Scrabble - Play the popular game online
Word Games - This site touts itself as the place for the most popular word games.

General Puzzle Sites:
These sites include your riddles, math puzzles, visual, and otherwise.
BrainDen
Pzzls
Thinks
Riddles

Optical Illusions - This site is just too good to leave out  of a thought provoking post like this. They will blow your mind and your students will not believe their eyes.

Do you have another great site? List it in the comments below.

Middle and High School Culture - Simple Things You Can Do to Enhance It

These are some of the things I do daily/weekly/yearly to help foster a positive classroom culture.

Greeting Circle: I have my colleague Patrick to thank for this but on the first day of the week, we sit in a circle and we take turns answering a question about themselves. Some great examples of this are, "what super power do you wish you had?", "what word do you wish could be deleted from the English Language," or "if you were given one million dollars but had to give it away what would you do," (more great circle starters can be found in books like The Book of Questions).
In order to be effective (not take up a whole class period) you want to phrase the questions so they can be answered quickly in a sentence or less. There are also 5 rules of greeting circle that keep it respectful and sacred:
      1. No talking when others are talking.
      2. Do not comment on what others have said (even laughing is considered commenting)
      3. Share seriously so others feel comfortable sharing seriously.
      4. Use your Jamba Juice voice. I managed a Jamba Juice at one time and part of the training was helping new team members be loud enough to be heard by anyone.
      5. You may pass once but we will come back to you.
             Some weeks the conversation is silly and lighthearted, some weeks it is somber and deeply reflective. But it is always powerful and a good use of time. The first couple of times it may take a little longer but if you are hard and fast on the rules it should take no more than 10 minutes.

Chair Ceremony: I have a very nice chair that the school purchased for me but just does not work for my back. The students were always asking if they could use it so I devised a little ceremony on Fridays that incorporated this as well as contributing to our culture. The first week I announce that someone in this class has really helped make this class a better place for people, then I will say a couple of examples. That student then receives the chair to sit in for the entire week. The next week that student will perform the same ceremony and pass it on to a new student. A couple of key points are:

  • This is for culture not necessarily academics so it is not about best test score etc.
  • If you don't want to give up your chair feel free to use something else that is awesome.
  • After the official chair ceremony, I ask the students to honor others who have contributed to the class/school culture and made their week better. Often I have to pause for a minute while they reflect. I ask them to keep the ceremony sacred and not simply give shout-outs to their friends and they must say something more specific than "he is nice".
  • This ceremony takes about 10 minutes tops once a week, but with News and media bombarding us with all the negative things in our world, I think it is worth it to highlight the good that people are doing.
Content Conversations or Geek Time: Geek has typically been applied to technology fanatics but it is actually a more general term applying to anyone who is exceptionally good or interested in a certain topic. So there are Football Geeks, Spanish Literature Geeks, Computer Geeks, and the list goes on forever. If you just became aware by reading that last sentence that you are a geek, welcome to an awesome club. 

You are most likely paid to teach a particular curriculum and adhere to very specific standards. Once in a while (I will leave the frequency to you), I encourage you to geek out with your students. The science/math curriculum in particular takes a few years to update itself with all of the new advances and so you might love Black Holes, Quantum Mechanics, or a new technology but there is no established time to talk about it in your class. Whether it come up from a conversation, an article that you ask them to read, a YouTube video, please take the time to have a conversation about it. 

Students will feed off of your interest and energy and they might discover an interesting topic that they never knew about. You will form powerful connections with your students. I understand that if you did this too often you would fall behind or gain a potentially negative reputation so you need to be mindful about how you do it but please do it.

Note: If you don't have anything you can geek out about. I encourage you to immediately go to your bookstore/library and find something of interest (just wander around). BBC has incredibly interesting documentaries you can look at. Check out your local paper for groups or meetup.com to connect with others. No one should just go through life without something they are passionate about, and your students want to see you passionate about something.

Puzzles: I love puzzles and I have one up weekly in order to challenge my students. You can have one that is academically challenging as well but I also try to have puzzles that can be figured out and understood by anyone so the class culture is enhanced. This helps students see that math, science, literature is as fun as you consider it to be. You can find a tremendous number of puzzles online (I would suggest you slightly change the wording or your students will find them too), there is also great show on NPR if you get it called A Way With Words which provides a weekly puzzle as well.

Clean Up Procedure: Whether or not you work with power tools like my math/physics students, classrooms can get pretty messy. I discuss the Broken Window Theory with my students to stress how important it is to their learning that we keep our room clean. We spend the last 10 minutes of every class cleaning up my room. If you do not work with tools or computers you could shorten that a bit I suppose but it really makes a difference for students to come into a clean put together classroom. 

My jobs include computers, floor, desks, lab equipment, calculators, notebooks, etc with a description of each. There is also a supervisor who ensures that others do their jobs. The supervisor checks that each job is done and when they believe they are all done, they come to me and tell me that it is done. I excuse the other students and the supervisor will stay and clean up anything that isn't finished. This plus the rotation of the jobs each week ensures that the students do their jobs well and that my room is put back together. The supervisor allows this all to happen without me needing to be involved, which provides me an opportunity to prepare my classroom for the next group of students.

Saying Hello: Seems obvious but you would be amazed at how your relationship with your students will change if you hold the door open for them and greet them each morning by name.

One-on-One Conversations: Student are human beings, they are not just a GPA and every time they do not turn in an assignment or come late, there is a reason. Even if you think the reason is silly, they do not. Rather than acting in a vacuum and creating frustration with your students, seek them out and have a discussion. Some thoughts to consider:
  • Don't make it about a specific assignment, make it about the person. Instead of saying, "Why didn't you turn in your  homework," perhaps you can ask them how they are feeling, are they really busy, how is the family, etc. A student who was typically doing well in my class, stopped turning in work. I asked him how things are and he told me a lot about how things are frustrating at home. Our students are human beings just like you with stress, concerns, hopes, and dreams.
  • Try and have a conversation with all of your students at some point. All students regardless of their grade or status deserve to be heard and supported. Conversations should initially be a few minutes long so you can have more depth than one word answers.
Class Discussions: I try at least once a semester to have a class discussion about my class and school in general. You can do it sooner if you need to as Anne blogged about here. It can be as meaningful as you are willing to be open to. The conversation should focus on getting their collective opinions and thoughts on how a test went, a policy is working, a news story that impacts them, etc. They are already talking about it outside your class, the question is do you want to be a part of that conversation?

Habits of the Heart and Mind:
At our school our culture stems from our adoption of the Habits originally created at Central Park East Secondary Schools (CPESS) in Harlem by Debbie Meier and her faculty. The Habits are Refinement, Evidence, Mindfulness, Perspective, Perseverance, Cooperation, and Compassion. I will do another post about these in the future.

Isn't this obvious/Why do we need to do this?
You are right, many of these things are what you would do anyway with other people and perhaps you already do it in your classroom. However, many classrooms focus so much on the content and the impending standardized tests that they believe there is no time to acknowledge your student's personhood. I can tell you that your students will be happier and more able to do a great job if they know that you care and you will be able to better serve them if you are aware of what is going on in their lives.

If you have any additional suggestions for what works well in your classroom, please leave a comment!

Math Puzzles, Games, and Writing Resources with Mr. L and Teacher to Teacher Press

It is not often that I will recommend that teachers spend money. Budgets are tight and we need to make every penny count. Therefore I only recommend books, technology, resources that I have used and have felt it worth the cost.

It is with that in mind that I encourage you to check out Mr. L's Math. He has a lot of great resources on his blog but what I have found most useful are the books and DVDs found at Teacher to Teacher Press run by Bill Lombard (Mr. L) and Brad Fulton. I have always been passionate about having math games in the classroom that also promote learning and Mr. L has quite a few books related to that subject.

In fact every single game I have played with my students from these resources has been a big hit with the students. Additionally, they are retaining the information and understanding it more deeply. If I am referring to a concept I can say, "Remember when we played..." and they will quickly remember and understand what I am talking about. Supplementing my math curriculum with games that have no cost except the cost of paper (see my post about how to save paper) and take up as little or as much time as you would like has brought a fresh air of enthusiasm to my students and I.

If this were all, then I would appreciate the books but they would not warrant an entire post on BrokenAirplane. For the last year I have been passionate about creating projects where the student learns by doing the project. For those of you uninitiated to the world of Project Based Learning, many times the learning is "front loaded" or taught in a traditional method as a means to completing or understanding the product. To me this undermines why I would do projects in the first place. If I want the students to learn by doing, then I needed projects which have them learn through the project itself.

As an integrated math/physics teacher I find it easier to create physics projects because they are more based in concrete reality (electricity, forces, motion, etc). Yet, the more challenging concepts to students are often the abstract concepts in math (negative numbers, geometric constructions, fractions/ratios). This is the other reason I was so grateful to find Mr. L's resources as their store carries a DVD simply called Math Projects. You will find these projects to be cost effective (often using just paper and free software) and able to be completed in a day or two. This, as they say, allows the benefit of using projects while still maintaining your districts' curriculum pacing.

Finally, I have seen many teachers in twitter #edchat and various blogs comment on the desire to have students writing in their math class. Spending time explaining or analyzing their thinking would greatly benefit the students ability to solve different or more difficult problems. Having read "The Language of Math" I can tell you that the team of Mr. Fulton and Mr. L do a great job of describing why and how this could be implemented in a classroom with effective tips and prompts that you could begin using tomorrow.

I realize that the cost might make you hesitate, but there are samples of student work of which you can get inspired from, and samples from the books themselves so you can see whether or not they will fit your classroom.

I am excited that my students are doing hands on learning with math and spending time playing with it in a way that is inviting to all. I hope that you will consider using these resources in your classroom so you too can enjoy the benefits.