Search The Web

Today's Headlines

Sunday, December 18, 2011

Quick Review Of The GE Disposall GFC720T 3/4 HP Garbage Disposer

Last week, after a long and laborious struggle, my old garbage disposer finally died. It was an Insinkerator Badger model which had a 1/2 HP motor. It was installed about 5 or 6 years back, and it was never a great disposer. It worked OK, but it was loud, and got stuck quite frequently. It required my wife and I to unclog it pretty regularly with a plunger.

Eventually, one fine day last week, the disposer simply refused to work. I could hear the motor humming when I turned it on, but the motor would not turn. I used the provided allen wrench to turn the motor externally thinking something was stuck. But I could turn the motor externally quite easily, but the motor never wanted to turn by itself. I even turned the motor this way and that way externally while it was on, but apart from humming and becoming warm, the motor refused to turn.

It was time to do some shopping. I called and fixed up an appointment with my usual plumber to replace the garbage disposer. Then, I went out and shopped around for a new garbage disposer. I checked reviews on various sites also and found that the best ones were very expensive (well over $250). When I went to the stores, I found the best-reviewed garbage disposers selling for well over $300. The best-reviewed garbage disposer is one made by Insinkerator, by the way. I also found the disposer I eventually purchased, the GE Disposall GFC720T selling for just over $100.

The specs of this disposer are quite reasonable. It has a 3/4 HP motor, and a 2-stage grinding mechanism. I had used Insinkerator brand garbage disposers for the past 13 years, and had gone through 3 of them in that time period. I decided it was perhaps time to try a different brand. It also helped that the GE Disposall was about $200 cheaper than the Insinkerator brand disposer of the same power rating.

Like all 3/4 HP disposers, the GE Disposall is quite large around. At least larger than 1/3 or 1/2 HP disposers. It seems to be slightly smaller than the corresponding 3/4 HP disposers from Insinkerator. It should fit under most sinks without much of a problem, but if you have an extra small under-sink space, you might want to check the clearances before buying a bigger disposer.

I did not do the installation. That was what I paid the plumber over $300 to do! It took him well over 2 hours to do it. It took about 15 minutes for him to test and remove the old garbage disposer. After I showed him how the motor never turns even though it hums, he concurred with me that it was possible the motor was partially burnt out. He also tried turning it manually and found that there was no obstruction to the motor turning. The motor had just given up, and it was time for me to give up on the disposer.

Next it was time to put the new disposer in place. The fittings that attach this disposer to the sink are a little different from what were used for the Insinkerator. This is not surprising since every brand probably uses proprietary, and perhaps patented, fittings to attach it firmly to the sink and prevent leaks. Insinkerator is by far the best-selling garbage disposer, so plumbers are much more familiar with installing those than any other brand. The plumber had to refer to the installation directions that came with my new disposer several times during the installation to get it all squared away.

Next came the process of hooking up the drains. This took a long time because the outlet of this disposer was lower than the outlet of my previous disposer. This meant that all the under-sink plumbing had to be adjusted to make sure that the drains worked as before. He had to extend one section of pipe (well, actually that simply meant he had to replace the existing pipe with a slightly longer section of pipe), and some others had to be cut down to size. I am not going to hold this against the new disposer because I would have probably had the same problem simply by going from my original 1/2 HP disposer to a 3/4 HP disposer, even if I had stuck with the same brand.

Then came the process of hooking up the disposer to the electric system. Here, I think GE could have definitely done a better job of things. The problem was that the new disposer did not come with all the hardware to hold the electrical connections inside the body of the disposer. The old disposer had come with a nut that holds the electrical connections in place. This disposer did not, and the old nut would not fit on the new disposer. The plumber had to use a lot of electrical tape to simulate what the nut did by taping the electrical connections securely to the disposer so that they don't eventually come apart.

Finally, it was all done, and it was time to test the disposer. We did not have actual garbage to test it with, but we filled the sink with water (the disposer comes with a sink drain plug that can be used to plug up the drain and therefore fill up the sink), and then pulled the plug while running the disposer. There were no leaks anywhere, and the disposer itself ran quite well. Like all garbage disposers I have used, this one also has motor overheat protection, that trips a fuse when the motor gets overheated. You can reset it after the motor cools down by pressing in a small switch on the side of the garbage disposer opposite the water outlet.

It is much quieter than the old disposer. Most of the time, all you hear is a faint humming sound from the electric motor. The actual grinding mechanism is well-insulated and you don't hear it most of the time. However, the problem this disposer has is that if the motor is slowed down from its usual speed because of the load it is under, the whole disposer starts vibrating violently. This vibration is then transmitted to the sink, and from there to the entire counter-top.

Most of the time that I use the garbage disposer, I am very happy with its performance. But when it gets a little overloaded and it goes into this vibration mode, it produces quite a racket with everything in the sink, and most of the stuff on the counter-top jumping around because of the vibration. Once the disposer is able to get back to its normal speed, it quiets down, but in the meantime, it is quite scary. I don't think it is healthy for the sink and counter-top either to be so violently shaken every time this happens. If you have breakable stuff on the counter-top, better move them well inside from the edges of the counter-top before switching on this garbage disposer.

The user manual suggests never to let garbage get into the disposer before it is switched on. That way, the disposer deals with the garbage while it is spinning, and never gets into a situation where it tries to start up under load. And I have noticed that this slowdown and vibration occurs only on start-up, not after the disposer has started spinning at speed. So, if you are very disciplined about making sure that your disposer is not clogged with garbage before you switch it on, you may never have to deal with this vibration problem.

The next thing to note is that this garbage disposer does not come with an allen wrench to turn the motor externally. If the motor is stuck, the advice in the user's manual is to use a broom stick inside the garbage disposer to try and get it unstuck. Personally, I think the allen wrench to turn the disposer from outside is a much better, more practicable idea.

Also, the garbage disposer has a very narrow opening from the sink. I am not a large man, and I have smaller than average hands, but I can't put my hands into the disposer through the opening in the sink. I used to be able to do this quite easily with the old disposer, and regularly used to do so when something was stuck inside, and had to be taken out to the garbage rather than being disposed off down the drain. My wife and kids, who have smaller hands than I do, can reach in, but the disposer seems to be designed to prevent most normal-sized hands from being inserted into the body of the disposer.

What do you do if something that does not belong in the disposer does get stuck inside the disposer? The user's manual's suggestion is to use long tongs to fish out such offenders from the body of the disposer. Well, so far, I have been lucky that things like spoons or forks have not fallen into the disposer. But I can tell you that I don't like the prospect of fishing for things like that with tongs. Can you imagine manipulating a spoon or fork using tongs carefully enough to retrieve it through the narrow opening of the disposer? My advice would be to be very careful about what goes into the garbage disposer so that you never have to take anything out.

So, what is the bottomline? For the cost, this is a very solid garbage disposer. It is powerful, and quiet. It has never jammed or had problems disposing of any garbage so far. However, installation was a bit of a problem, not only because plumbers are unfamiliar with this brand, but also because it does not have the correct hardware included for securing the electrical connections.

Even though it is quiet when running at its normal speed, any slowdowns caused by extra load result in excessive vibration that could be damaging to the sink, the counter-top and the plumbing under the sink. There is no way to get the disposer unstuck by using an allen wrench from the outside of the disposer. I am not entirely sure how successful poking around the inside of the disposer with a broom handle will be. And more importantly, the sink opening of this disposer is designed to prevent most adults from being able to reach inside the disposer to retrieve stuff that does not belong in there. The user's manual suggests using long-handled tongs to do this. I would say, good luck doing so!

But it is early days still, and I don't know how durable it is going to be. If it works like it does right now three years or five years from now, I would have no complaints about it whatsoever. I will update you on any problems that it develops down the road. For now, there are no insurmountable drawbacks to this disposer except for the vibration under load. I would therefore give this a 3.5 or 4 rating out of 5. If the vibration problem were fixed, it might merit a 4.5 out of 5.

Thursday, December 15, 2011

More Online Shopping Could Mean More Christmas Day Disappointments

The Christmas shopping season is in full swing. Malls are full, and even worse, many mall parking lots are full too. I recently had a coupon to a store inside the mall, and I think spent more money on gas circling the parking lot for a spot than I saved by using the coupon! It is quite insane, without even taking into account the long lines in front of checkout counters and the mad rush of shoppers who make picking out what you want a real-life race against time!

So, as many others have done in recent times, I have switched more and more of my shopping online. You can do online shopping from the comfort of your armchair, without having to fight traffic or trying to find parking somewhere within the same city as the shop you are trying to visit. You can take your time browsing through the merchandise online without having to jostle with other shoppers in crowded stores. And when it comes to checking out what you bought, you can do it without having to wait in line.

But the main problem with online shopping is that you have to take shipping times into account when you figure out how close you can cut it and still get away with it. If you are going to pick something up at the mall, you can shop the night before Christmas and still have time to get everything under the tree. If you buy online, you have to figure out what each store's policies are about shipping times, and make sure you place your order so that you can get your stuff before Christmas day.

Previously, you had to go to each store's website, and read through their shipping policies and what not to figure out when it was OK to place an order and when it was too late to get it by Christmas. Recently, I have come across a website that provides a valuable service by compiling information about Shipping Deadlines for Christmas 2011 from various stores into one convenient place. Stores are arranged in alphabetical order, and the BestOnlineCoupons.com site lists the deadlines associated with each store for different shipping methods.

As the name of the site suggests, these shipping deadlines are just icing on the real cake, which is coupons that you can use at these stores to lower your Christmas shopping bill too. The coupons are probably one of the best reasons to keep this site on your list of bookmarks. Consult it before you buy anything online anywhere. Shop around to find the best prices. Then find out what coupons are available, and recalculate the price of what you want taking into account the coupons that each store makes available. That way, you know you are getting what you want at the lowest price possible.

Let us say, you have shopped around and found out that Best Buy has the lowest prices on a gadget you have had in mind for a while. Now, just go to the Best Buy Coupons section of the site, and find the best coupon that is applicable to your gadget from among the numerous coupons and deals on that page. Then, just click on the appropriate coupon, and you will be transported directly to the appropriate page on the Best Buy website that shows you the details of the coupon, and allows you to complete your shopping by placing your order and taking advantage of the deal you wanted.

Online coupons are valuable as more and more people shift their shopping online to avoid crowds and have a bigger choice of merchandise at lower prices. Combine that with timely information about how long you have before you really need to nail down your shopping list and place your orders, and it becomes doubly valuable. BestOnlineCoupons.com is an online shopper's dream come true.

Tuesday, December 6, 2011

My Daughter Gets Her Second Pair Of Glasses

It has been almost 2 years since my daughter started wearing spectacles to correct her nearsightedness in one eye. As I wrote in an earlier post, I was able to cut the cost of getting her her first pair of glasses by ordering cheap eyeglasses from Zenni Optical.

Zenni Optical sells directly to customers without using retail outlets or middlemen. There are minimal overheads because of this method of doing business. There are no rents to pay on retail premises. No salaries or commissions to pay salesmen in these retail premises. So, they are able to keep prices low. But low prices do not mean low quality because they have invested in high-tech factories where lenses and frames are manufactured to perfection out of the latest high-tech materials.

Why is all this relevant to me? Well, the dreaded letter came from the school nurse saying that my daughter needed another eye checkup. My daughter did not feel that her vision had improved or deteriorated since her last checkup. But it is hard for her to tell because she has perfect or better-than-perfect vision in one eye, so it always compensates for the other, and makes differences in the less-than-perfect eye hard to notice.

In any case, this last weekend, I took her to an optometrist inside a large department store and had her undergo an eye test. The optometrist examined her eyes and found out that the power in her eye had actually increased over the past 2 years. It was time to get a new prescription filled. And that is where Zenni enters the picture once again.

I asked my daughter whether she was happy with her previous set of glasses. Not only with how it corrects her vision, but also how it looks, how it fits, etc. I did not want to go for the cheap option and leave my daughter fending off mean-spirited schoolmates who made fun of her for glasses that did not look or fit right. But my daughter said she was perfectly comfortable with her glasses and would love to get another pair from Zenni Optical. In fact, some of her classmates had asked her where she had gotten her glasses from. Far from being made fun of, the glasses were actually making her popular!

Saving money is a hobby of mine I enjoy greatly. But sometimes I take it too far and end up with things that are not considered workable, fashionable or even tolerable! Sometimes I end up wasting money because I buy something that is cheap, and then have to end up buying something more expensive anyways because the cheap stuff does not work or look presentable.

At least with Zenni Optical, I made the right choice. I went with the cheap choice, and it turned out to be good too. The quality is wonderful, and the frames fit perfectly. And they look good enough that my daughter does not stand out in a negative way. My pocketbook is certainly very thankful for that!

Saturday, December 3, 2011

Beginner's Method For Solving A 3x3 Rubik's Cube (Part 2)

You can find Part 1 of this guide here.

Now onto step 4.

Step 4: In this step, your aim is to solve the upper face (the green face in my case) to a cross. That is, I want to align the edges that involve green such that the green side is on the upper face of the cube. At the end of this step, you may not have those edge pieces placed correctly, but at least all their green faces will be on the green side of the cube. If you already have the 4 edge pieces involving green placed in such a way that their green sides are on the upper face, skip step 4 and proceed directly to step 5.

At the end of step 3, you may find yourself in one of three situations as far as the upper face is concerned.
No green edges on top
Step 4 Before, Option 1
Two adjacent green edges on top
Step 4 Before Option 2
Two opposite green edges on top
Step 4 Before Option 3

Ignore the corner pieces and concentrate only on the edge pieces involving green. You might find that none of the green sides are on the top face (option 1), or you might find two of them on the top face on adjacent sides of the cube (option 2), or you might find two of them on the top on opposite sides of the cube (option 3).

If you find yourself facing option 1, it does not matter how you hold the cube. If you face option 2, make sure that the two adjacent sides on which the green edges are on the top face are on the back and left. If you face option 3, make sure the green pieces form a bar parallel to the front face of the cube.

From all three options, you can execute the following algorithm to get to the point where all the edge pieces are placed such that their green sides are on the upper face: F R U R' U' F'. When you do this, you will notice that if you start from option 1, you will end up in either option 2 or option 3 when you execute this algorithm once. If you start from option 2, you will end up in option 3 after one execution of this algorithm. If you start from option 3, after one execution, you will be ready to move to step 5. If you want to cut down on one application of the algorithm, you can apply a modified algorithm from option 2 to skip option 3 and end up with a green cross on top. That modified algorithm is F U R U' R' F'.

Either way, you should now have the following configuration in front of you at the end of step 4 (ignore the green corners. You may or may not have them as shown below. All you need is a green cross on the upper face).
Green cross on top
Step 4 After

The edge pieces involving green may or may not be in the correct positions. We will deal with that in step 5. If you have blue solved fully, four sides solved two-thirds of the way, and the edges involving green positioned with the green sides on the green face, you are done with step 4.

Step 5: In step 5, we are going to align the edges of the green face so that they line up with the colors on the sides of the faces. You may have 1, 2 or 4 of the top edges aligned correctly with colors on the sides (if you look at the picture above, you can rotate the upper face clockwise by 90 degrees to align the green and yellow face). If all 4 edge pieces are aligned correctly, skip step 5 and go directly to step 6.

If you find only one top edge aligned correctly, make that part of the front face, as shown in the picture below. You are now going to apply the algorithm below that will move the edge piece from the left face to the right face, the one on the right face to the back face, and the one on the back face to the left face. The piece on the front face does not move. So, it is an anticlockwise rotation of the edge pieces skipping the edge on the front face.
Edges before rotation
Step 5 Before

The algorithm is: R U R' U R U U R'.
Edges after rotation
Step 5 After

Since three of the edge pieces move when this algorithm is applied, if your cube already has two top edges aligned correctly, you may have to apply the algorithm multiple times to get all the edges aligned correctly. In the first application, you will end up destroying one or both of the original alignments, and then you can rebuild all of them by applying the algorithms a couple more times. Make sure you understand what changes the algorithm makes (anticlockwise rotation of the edges, skipping the front face), and you will have no trouble figuring out how best to use it.

Step 6: Step 6 is used to position the top corner pieces correctly. At this point, you only have 4 unsolved pieces in the cube (at most). These 4 pieces could be at the correct places, but wrongly oriented (in which case, skip to step 7). None of them may be in the right place (note that at this stage, you can not rotate the upper face because that will cause the edge pieces to get out of position), or 1 of them could be in the right place, but the other three are in the wrong corners.

If none of them are in their correct corners, you can apply the algorithm holding the cube with any of the sides (that is the faces other than blue and green in my case) as the front face. If one of the corner pieces is in the correct corner (don't worry about its orientation), make sure you hold the cube such that you place that piece in the front upper right corner of the cube (this is the only corner that is not going to move when you apply this algorithm).

The algorithm below causes the front upper left corner piece to move to the back upper right corner, the back upper right corner piece to move to the back upper left corner and the back upper left corner piece to move to the front upper left corner. It is an anticlockwise rotation of the corner pieces skipping the front upper right corner. You might have to apply it more than once to position all the corners correctly. Once again, understand what the algorithm does, and you will have no problem figuring out how to use it.

The algorithm is: U R U' L' U R' U' L.

Step 7: Now you have a cube in which all the top corners are positioned correctly, but one or more of them may be oriented wrongly. If you find that the cube is fully solved at the end of step 6 (that is, all the corners oriented themselves correctly while being placed in their correct spots), you are done. Congratulations! Otherwise, you will have to orient the corner pieces.

Now, step 7 is a little confusing. Not because the algorithm for it is complicated. Quite on the contrary: it is a very short algorithm. But throughout step 7, your front face is never changed. So, pick a front face right now. I have picked red in the pictures below. You can pick any, but it is not going to change as you progress through step 7.

Once you have picked a front face, bring a mis-oriented corner piece to the upper front right position by rotating the upper face of the cube. The mis-orientation may look like the picture below, in which the top color (green) is on the right face.
Corner with green on right
Step 7 Before, Option 1

In this case, apply the algorithm below twice to get the green side on the upper face: R' D' R D. After you do this, you may notice that your cube may look very scrambled. You may find blue pieces floating around, away from the bottom face where they belong. DO NOT PANIC. Between when you begin step 7 and when you complete step 7, you will find all kinds of weird changes in the cube that you just have to ignore.

Just make sure you get the green side of the corner cube to the upper face, and then rotate the upper face (only the upper face) of the cube to get the next mis-oriented corner piece in the front upper right corner of the cube. Make sure you continue to keep red (or whatever face you chose at the beginning of step 7) as the front face. You may then be faced with the following situation pictured below where the green is on the front face.
Green on front face
Step 7 Before, Option 2

Notice how the cube looks very scrambled. That is because we are in the middle of step 7. Don't worry. Just apply the same algorithm as before (R' D' R D), but 4 times to get the green side on the upper face. Continue turning the upper face and orienting each top corner piece so that the green is on the upper face. Do not worry about how bad the cube looks in the interim.

Once you are done with all four corners, and all of them are oriented properly, you may find that your cube looks as below:
Almost there
Almost done!

Now, all you have to do is rotate the upper and down faces of the cube a couple of times to line up all the colors, and you will have yourself a fully solved cube, as shown below:
All done
Fully done!

That is all there is to it! Two algorithms in step 3 (one of which is actually a variation of the other), and one algorithm each in steps 4 (two if you want to use a shortcut), 5, 6 and 7. A total of 6 or 7 algorithms, none of which are longer than 8 steps. That is all it takes to solve the cube! I told you it was easy. Try it and let me know how it works out. Good luck!

Beginner's Method For Solving A 3x3 Rubik's Cube (Part 1)

The past couple of weeks, I have been doing research into methods for solving the Rubik's Cube. According to wikipedia, the Rubik's Cube is by far the world's best-selling toy ever. How such a cerebral toy became so popular is quite surprising to me. More than 30 years after the introduction of the first 3x3 cube, we now have cubes in several different dimensions from 2x2 all the way to 7x7. There are also computer simulations of cubes of practically infinite sizes.

The surprising thing I found is that in spite of my studious search of several websites, I could not find a single site that has the solution steps I found in the printed booklet that came packaged with my Rubik's cube. There are solutions that involve just 2 algorithms, and solutions that involve several hundred algorithms. However, even the official Rubiks.com website does not have the solution method that I am using for my cube-solving. In fact, the method explained in the official website is quite involved, and includes some algorithms that include up to 13 moves. On the face of it, it seems quite complicated, and difficult to memorize.

So, I decided to put together the solution method I have been using as a two-part post on my blog. The link to the second part of this solution methodology can be found at the bottom of this post. This algorithm is considered a beginner's algorithm (as opposed to some other methods that are used in speed-solving, and need one to memorize a lot more algorithms. In exchange for the increased memorization, you get higher speed and fewer twists and turns from scrambled state to solved state). You are not going to set any speed records using this method. But, you are going to be able to solve the cube reliably using this method. Once you get that, you might be motivated to learn other methods, so that you can improve your speed.

I believe in the crawl-walk-run philosophy. Playing around with a cube so that you can solve one side intuitively is the crawl stage. This method will get you to the walking stage. If you want to run, you can look up dozens of methods on the internet, and choose a method of your liking to continue your cube education.

To begin with, let us define some basic notation. Take a look at the picture of a cube below.
Naming ConventionThe pictures used in the solution are all going to look like this. In this cube, I consider the red-face to be the front of the cube (F). The blue face is the right side of the cube (R) and white is the upper face of the cube (U). In this cube, yellow is opposite the white, so yellow would be the down face of the cube (D). Similarly, orange is opposite the red, so orange would be the back face of the cube (B). And green is opposite the blue, and would be the left face of the cube (L). This notation of naming faces is the same as that used on Wikipedia.

In all my pictures, the cube will always be shown with three faces. The top face will be the upper face of the cube (U), the face to the right will be the right face (R), and the face to the left of the right face will be the front face (F). It is assumed that the solver is actually looking at the cube almost directly at the front face, but with their point-of-view shifted slightly to the right and above the cube, so that the top face and right face are also visible in addition to the front face.

Every move of the cube involves turning a face of the cube either clockwise or counterclockwise. The direction of the move is as it appears to an observer facing that face of the cube head-on. Thus a 90 degree clockwise rotation of the right face of the cube is denoted as R, and it would involve turning the blue face from front to back (so that three red cubes end up on the upper face, 3 white cubes end up on the back face, 3 orange cubes end up on the down face, and 3 yellow cubes end up on the front face).

An anti-clockwise rotation is denoted with an apostrophe after the letter of the face. Thus R' is an anticlockwise rotation of the right face and would move 3 white cubes to the front face of the cube while moving 3 red cubes to the down face of the cube. Similarly, L' would move 3 red cubes to the upper face while moving 3 orange cubes to the down face. The algorithms in this methodology do not involve any face except the front (F), upper (U), down (D), right (R) and left (L), so make sure you are absolutely sure what clockwise and anticlockwise rotations of each of these faces would involve. You don't have to worry about rotating any of the middle layers or the back layer of the cube if you stick with this method.

Step 1: Step 1 of this method is entirely intuitive. I don't want to burden you with algorithms for this step. All you want to do is go from an entirely scrambled cube to selecting a top face, and solving the 4 edges of the chosen top face (the edge pieces of a cube have two colors on them). Play around with the cube until you can do this without any problems from any start point. Notice that each edge piece is aligned such that the top face is of the chosen top face color, and the color on the side corresponds to the color of the center tile on that face. This is called solving the top cross.
Scrambled cube
Step 1 Before
Top cross
Step 1 After

Step 2: The second step is also intuitive, and just involves solving the 4 corners of the top face. The corner pieces of a cube are the pieces with 3 colors on them. In this second step, you are going to intuitively get the corner pieces involving blue into the correct corners (make sure the colors on these pieces apart from blue line up with the center pieces of the same colors). This solves the top face, and forms short T's down the four sides of the cube. I refer to the combination of steps 1 and 2 as solving one face to a T. With practice, you should be able to do this in about a minute or so starting from scratch (don't worry if it initially takes you several minutes. The important thing is to get familiar with how different cubes move in relation to each other).
Solved one face to a T
Step 2 After

Step 3: At this point, turn the cube over, so that your solved side is on the bottom. Thus, blue becomes the down side of the cube (D). Your aim in this step is to complete solving the second layer of the cube by getting the edge pieces of the colors around blue in their right places and orientations. Thus, after the end of step 3, you will have two layers of yellow, orange, white and red (your colors may be different depending on how your cube is colored. I am referring to the color scheme on my cube in which green is the color opposite the solved blue side).

Now, if any of the second layer edge pieces are already in the correct position and orientation, you don't have to worry about them. But many times, you will find edge pieces that are supposed to go into the second layer in the third layer.

In one configuration (option 1), you will find second layer edge pieces that need to be rotated from the right face to the corner of the front and right faces. That is, the piece needs to be rotated into place anticlockwise.
Edge needs anticlockwise rotation
Step 3 Before, Option 1

Notice how, in the picture above, the white and red piece in the middle top of the right face needs to be moved anticlockwise to the middle of the edge between the front and right faces. In this case, the following sequence of steps will accomplish this: U' F' U F U R U' R'.
Edge rotated anticlockwise
Step 3 After, Option 1

Notice how the white and red face has been moved anticlockwise to its correct location and orientation.

In the other configuration (option 2), the edge piece needs to be moved from the top of the front face to the corner of the front and right faces (so, it requires a clockwise rotation). Notice the red and yellow corner piece in the picture below.
Edge needs clockwise rotation
Step 3 Before, Option 2

Notice how, in the picture above, the yellow and red piece in the middle top of the front face needs to be moved clockwise to the middle of the edge between the front and right faces. In this case, the following sequence of steps will accomplish this: U R U' R' U' F' U F. If you are astute, you will realize that this is essentially the same set of moves as in option 1, just that you start from move 5 of option 1, and cycle around to move 4 after the end. So, you only have to actually memorize one algorithm for step 3.
Edge rotated clockwise
Step 3 After, Option 2

Notice how the yellow and red face has been moved clockwise to its correct location and orientation.

Now, one complication that you might encounter when you are solving this second layer is that the edge piece you want in a particular position may be in that position, but may be in the wrong orientation. In other words, for example, the yellow and red edge piece may be at the corner of the yellow and red faces, but may be placed such that the yellow side of that edge piece is on the red face and the red side of it is on the yellow face. In that case, there is no simple algorithm to reorient the piece in place. You have to push some other edge piece into its position using one of the algorithms above, and this will pop that edge piece to the upper layer, from where it can be moved down to its correct position and orientation using one of the algorithms above.

At the end of step 3, you will have a cube that has one side fully solved (blue in my case), and 4 sides solved two-thirds of the way (two layers each of red, yellow, orange and white in my case). Your cube will look like the picture below, assuming you have the same color scheme as me. You don't see the orange and yellow sides, but they are also solved two-thirds of the way just like the white and red sides in the picture below. The green side is still a mess while the blue side (which is at the bottom) is fully solved (make sure you have not made any mistakes in applying the step 3 algorithms by turning the cube over and making sure that the blue side is indeed solved. If it is not, re-solve it, and then apply the step 3 algorithms more carefully).
Cube after step 3
Step 3 After

At this point, you are about halfway done. Continue on to the next step in part 2 of this solution guide.

Saturday, November 26, 2011

Practice Makes Perfect

Last week I wrote about how I learned how to solve the Rubik's Cube, and how I have been able to solve the cube in between 5 and 10 minutes. Well, I have been practicing more and more, and this has made it easier for me to solve the cube because the procedures have become more and more memorized. In addition, my times have improved considerably also.

After all the practice of the past week, my average time has come down to about three and a half to five minutes. My personal best time is two minutes and 53 seconds. Interestingly, my daughter has also improved considerably, and in fact, her personal best time is two minutes and 33 seconds! Her average is no better than mine, but she got lucky once, and has a better personal best time than I have. I am wearing the cube and my fingers out trying to beat the record and take the title back from her!

I was actually wrong last week about the world record being 29 seconds. It turns out that the world record for solving the 3x3 cube is 5.66 seconds! That is less than the time it takes me to put together even a couple of cubes on the top side of my scrambled cube!! Oh well, the world record is quite safe from me as of now.

Anyways, I had posted a puzzle last week that illustrates isolation. As promised, here is the solution to that puzzle. The way to think about this is as follows: any cell in the table which is flipped an odd number of times changes from a 0 to a 1 or vice versa. Any cell which is flipped an even number of times remains what it was (a 0 remains a 0 and a 1 remains a 1). So, the idea is to flip every cell in the table zero or an even number of times, and flip just the cell (3,3) an odd number of times.

After some thought, you will realize that one way to accomplish this is to flip every cell in the row and column in which (3,3) is located exactly once. That way, cell (3,3) is flipped 7 times (an odd number of times), every other cell in row 3 and column 3 of the table is flipped 4 times (an even number of times), and all other cells in the table are flipped 2 times (an even number of times).

The sequence of flips is shown below. The original table is as below:

1 0 1 1
0 0 1 0
0 0 1 1
1 1 0 1


We start by flipping each element in column 3 first. After cell (1,3) is flipped, the table is as below (remember that every cell in the row and column in which the flipped element is present is also flipped):

0 1 0 0
0 0 0 0
0 0 0 1
1 1 1 1


Now we flip cell (2,3) to get the table below:

0 1 1 0
1 1 1 1
0 0 1 1
1 1 0 1


Now it is the turn of cell (3,3) to get flipped:

0 1 0 0
1 1 0 1
1 1 0 0
1 1 1 1


We move on to cell (4,3):

0 1 1 0
1 1 1 1
1 1 1 0
0 0 0 0


Now, we flip each element in the third row of the table. This is the state after flipping cell (3,1):

1 1 1 0
0 1 1 1
0 0 0 1
1 0 0 0


Now, we flip cell (3,2):

1 0 1 0
0 0 1 1
1 1 1 0
1 1 0 0


And finally, we move on to cell (3,4). Remember not to flip (3,3) twice. We flip each element in the third row and third column of the table exactly once:

1 0 1 1
0 0 1 0
0 0 0 1
1 1 0 1


Now, compare this last table to the first table. You will see that all the cells are exactly the same except for cell (3,3) which has been flipped from a 1 to a 0. Which was precisely the objective of the puzzle!

Can you find a shorter sequence of steps to accomplish the above transformation? I would love to hear it if you manage this in fewer steps. In a 4x4 table, this transformation took 7 steps. In a 2n x 2n table, this transformation takes 4n - 1 steps, which gets tedious for larger tables.

The more interesting challenge is to try to accomplish this in a square table with an odd number of elements per side (for example, in a 3x3 or 5x5 table). I have not been able to find any sequence of steps that will flip just one cell in such a table (obviously, it is trivial in a 1x1 table, but I am talking about tables that are true tables rather than a single element). If you come up with a set of steps to flip a single element in such a table, I would be very interested in hearing about it. Post your solution, if you find one, in the comments below.

In fact, the procedure above works for non-square tables also. The only condition is that each side of the table should have an even number of elements. So, the method would work perfectly fine on 4x10 tables, 14x40 tables, and so on. But if one or both sides have an odd number of elements, the procedure fails. So, it is no good on 5x3 tables, 15x30 tables and so on. It would be really good if a solution existed for odd-sided square tables, and the procedure could be extended to non-square tables without much additional thought. Good luck!

Obviously, there are similarities between this puzzle and what happens in a Rubik's Cube (when you try to change the position of one small cube, a whole layer of cubes moves), but also differences (it is not as simple as changing a 0 to a 1 or vice versa). The trick is to figure out isolation sequences for the cube which accomplish the changes you want while avoiding changes you don't want. The mathematics of it are interesting, but also quite challenging. I am just starting to read up on it. I will keep you posted as to how it goes.

Saturday, November 19, 2011

The Conquest Of The Rubik's Cube

My daughter goes to school in a school bus. One day, she came back from school and told me that another student on her bus works on a Rubik's cube on the bus. She watches him solve the cube quite often, and her interest was piqued enough that she wanted to play around with a Rubik's cube herself.

So, I took her to a store and got her a new Rubik's cube. I also sat with her and taught her the general principles behind solving one side of the cube. I taught her how to move individual cubes out of the way, bring down a layer, slot the moved cube back into the layer, and then move the layer back to its original position. I also taught her how to get cubes out of the bottom layer or cubes which were stuck on the sides of the top layer (assuming she was trying to solve the top side). My daughter caught on quite quickly, and could solve one side of the cube without any problems. And then started asking me how to solve the whole cube.

The Rubik's cube first came out when I was in school, and all I ever did was learn how to solve one side of it. When I went to college, one of my friends knew how to solve all 6 sides of the cube. I sat with him a few times, and documented the procedure for solving all 6 sides in a notebook (remember, this was before the days of the internet, so I couldn't just Google for the solution technique at that time).

The procedure seemed complicated enough that I never really solved the cube properly using the procedure. I certainly could not memorize the procedure and all the variations and exceptions. After a while, I did not even have access to a cube anymore, and my experimentation with it was long-forgotten. And then I lost the notebook itself, and the cube was a challenge that went unconquered.

Now that I had access to a Rubik's cube once more, my curiosity was re-ignited. The cube came packaged with a solution technique that used simple pictures and a very understandable notation for describing which layers of the cube to turn in what directions. I was actually able to follow the directions and actually solve the cube after the first few attempts (the first couple of times I tried it, I misunderstood one of the steps, and kept messing up the cube).

Rubik's CubeAfter those first few attempts, I took the time to memorize the directions using some simple mnemonics. And now, I can solve a fully scrambled Rubik's cube without referring to any directions or instructions at all. This set of instructions is not optimized, and so you have to use the same set of instructions multiple times to accomplish different steps in the solution process. I am sure there are better instructions out there that are optimized for the specific arrangement of cubes you find yourself facing. But, those instructions are probably more complicated and require more memorization.

In any case, from a fully scrambled state, I can get to a fully solved state in between 5 minutes and 10 minutes. I started out taking just over 10 minutes, but as I have become more familiar with the instructions and how to identify patterns in the arrangement of the cubes, I have improved somewhat. Obviously, I am not setting any records here. It seems more like magic than talent when I hear that the record for solving a cube fully is 29 seconds! 29 seconds!! I can't even solve one side of a cube in 29 seconds if my life depended on it!!!

I can solve one side in about 30 seconds to a minute if I didn't care about the sides. If I wanted to get the first layer of the sides solved along with the top side, then it takes me 90 seconds to 3 minutes. But, I don't really care. The Rubik's cube is one of those timeless puzzles that has fascinated me since my school days. To be able to solve one in less than 10 minutes seems like such an accomplishment that I am tickled pink by it!

When I initially played with a Rubik's cube, I never believed it possible that I would ever be capable of solving it fully without referring to instructions step by step. To be able to now solve it without any help from anybody or anything feels as if I have accomplished something that I could only dream of before. It is like getting a black belt in cube-solving! I can even solve the cube while carrying on a conversation with somebody else.

My conquest of the cube was inspired by my daughter's curiosity. She is still at a point in my life when she considers me smart enough to do anything I want in life. So, I could hardly let her down when she started asking me to teach her how to solve the cube fully. After becoming familiar with the instructions, I started teaching her how to do it.

The first few times, I helped her by reciting the instructions I had memorized at each step as she turned the cube and solved it. After hearing me repeat the instructions several times, they started becoming embedded in her brain, and pretty soon, she could repeat the instructions herself without any help from me. Now, she can also solve the cube in about 5 to 10 minutes without any external help.

I am now trying to get my other daughter to take up the cube as a challenge. She can solve one side right now in about 5 minutes, and solving the top with the first layers of the sides takes her longer. But, I am confident that she will eventually get interested enough to get beyond that to the full solution. I am working at keeping her interest level up so that she does not give it up in the initial stages. That is when things always seem way too hard, and the end result does not seem worth the trouble. We will see how it goes.

Most of the steps in solving the cube are related to isolating different parts of the cube and doing a set of twists and turns that rearranges cubes in a part of the cube without affecting other parts of the cube. I refer to this as isolation. You have to understand isolation and how to accomplish it to be able to go beyond memorizing instructions to solve the cube. If you want to come up with your own solution techniques, you have to figure out how to isolate parts of a cube so that you can rearrange cubes to the required positions while not destroying the arrangement of cubes in other parts of the cube.

To illustrate isolation, I gave my kids a puzzle that you might also find interesting. Take a 4x4 grid of 1's and 0's as below. It doesn't matter where the 1's and 0's are. The important thing is to start with this grid, and do a set of "manipulations" that result in a grid that has just one of those numbers changed from a 0 to a 1 or vice versa. So, consider the two grids below, for instance:

1 0 1 1
0 0 1 0
0 0 1 1
1 1 0 1

1 0 1 1
0 0 1 0
0 0 0 1
1 1 0 1

The second one is just the first one with the 1 in position (3,3) changed to a 0 (I have bolded the elements to show you what has changed). All the other elements are the same. Now, the rules of manipulations are very simple. You can flip any number in the grid from a 0 to 1 or vice versa. When you flip any element in the grid, all the elements in the grid in that row and column also flip (0's change to 1's and 1's change to 0's).

That is all there is to it. Using this rule, come up with a set of manipulations (flips) that change just the element in (3,3) from a 1 to a 0. That is what isolation is all about (though I would daresay, the isolations in a Rubik's cube are a lot more complicated and require a lot more spatial orientation skills). I will provide the solution to this simple puzzle next week. Good luck!

Saturday, November 12, 2011

Divisibility Rules For Powers Of 2 Redux

In my previous post, I had come up with some simple divisibility rules for 16 and 32 (at least, simpler than simply checking divisibility by doing actual division on the last 4 or 5 digits of the number we need to check for divisibility). The rules involved splitting the last few digits of the number into chunks of various lengths, multiplying the chunks by different powers of 2, and then adding these parts up and checking the sum for divisibility by the powers of 2.

In that post, I also mentioned that I had not verified the correctness of these derived rules for divisibility because I was not a theoretical mathematician or number theorist. It turns out you don’t need to be either of those to come up with proofs of correctness (or incorrectness) of these rules, and also to derive new ones. The secret lies in modulo arithmetic, which I introduced in this earlier lesson during a discussion of how and why osculation works in deriving divisibility tests.

Mathematical Symbols

I also used those principles to derive a new divisibility rule for 7 that involved subtracting the number formed by the last 3 digits of the number from the rest of the number, and then checking to see if this is divisible by 7.

We can use the exact same principles to prove the divisibility rules for the powers of 2 that I published in the previous post, and also to derive new rules for these numbers.

First of all, let us get some basics out of the way. Any number with n+1 digits (say a) can be expressed as below:

10n*dn + 10n-1*dn-1 + . . . + 103*d3 + 102*d2 + 10d1 + d0

Now, we also know that divisibility of a number by 2m implies that a mod 2m = 0. Expanding out a, we can then say that:

(10n*dn + 10n-1*dn-1 + . . . + 103*d3 + 102*d2 + 10d1 + d0 ) mod 2m = 0

Knowing that 10m and higher powers of 10 are multiples of 2m, we can keep the modulo arithmetic intact by subtracting out these higher powers of 10. After the subtraction, all we are left with would be an (m-digit number) mod 2m = 0. This is the basis for saying that we only need to concern ourselves with the last m digits of a number when checking divisibility by 2m. Going forward, we will not even bother writing out the rest of the number to be checked for divisibility. We will only worry about the last m digits when proving or deriving divisibility rules for 2m.

Let us also not worry about 2 to begin with. The divisibility rule for 2 is trivial, and needs no proving. Simply, since 10 and higher powers of 2 are multiples of 2 anyways, the entire modulo equation becomes simply x mod 2 = 0 implies divisibility by 2, where x is the last digit of the number.

Let us move on to 4. We know that 100 and higher powers of 10 are multiples of 4. So, for some number to be divisible by 4, we simply have to make sure that (10x + y) mod 4 = 0, where y is the last digit, and x is the last but one digit. In fact, this is the first divisibility rule for 4: the number formed by the last 2 digits has to be divisible by 4 for the entire number to be divisible by 4. But let us examine further.

(10x + y) mod 4 = 0 implies

(2x + y) mod 4 = 0, and also

(-2x + y) mod 4 = 0, and also

(2x – y) mod 4 = 0

The second line comes about because we subtracted 8x from (10x + y). We know this is valid because 8x is a multiple of 4. Similarly, we can get the third line by subtracting 12x from (10x + y). The fourth line is simply flipping the sign on the third line. Notice also that the second line is, in fact, the second rule for divisibility by 4. The third and fourth lines are in fact, brand-new rules for divisibility by 4 which I have not mentioned before.

Now, obviously, instead of subtracting 8x from (10x + y), I can choose to add 96x to (10x + y). After all 96x is a multiple of 4, so it is perfectly valid. But the resulting rule becomes more difficult to apply than the rule it was derived from (verifying that (106x + y) is divisible by 4 is a lot harder than verifying that (10x + y) is divisible by 4). Our goal should be to reduce the coefficients next to x and y as much as possible to make the arithmetic as easy as possible. 2 and –2 are the closest we are going to be able to get to zero from 10 by subtracting multiples of 4 from it, so we are better off stopping with the rules we have gotten above.

Also, (10x + y) mod 4 = 0 implies

(30x + 3y) mod 4 = 0 (I can multiply by 3 and the implication works in both directions because 3 and 4 are co-prime), which implies

(-2x + 3y) mod 4 = 0, and also

(2x – 3y) mod 4 = 0.

In the above cases, I subtracted 32x from (30x + 3y) since 32x is a multiple of 4. You can derive an infinite number of divisibility rules based on the rules of modulo arithmetic, and I think the above derivations show some of the possibilities. You are limited only by your imagination!

The rules above can be expressed in the form of a table as below. In this table, the column headings denote the digits in the various places. The coefficients by which these digits have to be multiplied are the elements of the table. The sum of these products is then checked for divisibility by 4 to verify the divisibility of the entire given number by 4. When the number under the “tens digit” column is 10, and the number under the “ones digit” is 1, this means that the 2-digit number formed by the two digits can be treated as a single chunk, multiplied by 1. Here are the 6 rules for divisibility by 4 in this notation.

Divisibility Rules for 4:

Rule NumberTens DigitOnes Digit
1101
221
3-21
42-1
5-23
62-3

To apply rule number 4, for instance, simply take twice the last but one digit and subtract the last digit from it. If the total obtained after this is divisible by 4, the entire number is divisible by 4.

Now that we know the basics of how to use modulo arithmetic to derive divisibility rules, applying the rules to 8 should be quite simple. First of all, 1000 and higher powers of 10 are multiples of 8, so we only have to deal with the last 3 digits of the number, which can be expressed as (100x + 10y + z). Without further ado, let us go about deriving some divisibility rules based on modulo arithmetic:

(100x + 10y + z) mod 8 = 0 implies

(4x + 10y + z) mod 8 = 0 (subtract 96x which is a multiple of 8), which implies

(4x + 2y + z) mod 8 = 0 (subtract 96x + 8y, which is a multiple of 8). Also,

(-4x + 10y + z) mod 8 = 0, which implies

(4x – 10y – z) mod 8 = 0. Also,

(-4x –2y + z) mod 8 = 0, which implies

(4x + 2y – z) mod 8 = 0. Also,

(300x + 30y + 3z) mod 8 = 0, which implies

(4x – 2y + 3z) mod 8 = 0, and also

(-4x –2y + 3z) mod 8 = 0, and

(4x + 2y – 3z) mod 8 = 0.

As you can see, the number of divisibility rules we can get is practically limitless. Here is a table with just a few of them:

Divisibility rules for 8:

Rule Number100s DigitTens DigitOnes Digit
1100101
24101
3421
4-4101
5-421
64-2-1
74-61
84-23
9-4-23
1042-3

If you continue this exercise for 16, 32, 64, etc., you will see that the generalized rule I came up with for using multi-digit chunks of a number to check for divisibility in this earlier post are wrong. Those rules were arrived at by intuition rather than rigorous mathematical analysis, and I am not surprised that some of them turned out to be wrong. Intuition is valuable in mathematics and science, but it should be backed by solid analysis and verification.

The number of divisibility rules goes up exponentially as the number for which divisibility is being checked goes up. So, I am not going to make any attempt to list them all in the tables below. I am just going to show you a representative few, including the rules I did come up with for 16 and 32 that are actually correct. So, here goes:

Divisibility rules for 16:

Rule Number1,000s Digit100s DigitTens DigitOnes Digit
11000100101
28100101
384101
4404101
584-61
6-84-61
7 8 -4 6 -1
8 -8 4 10 1
9 8 -4 -10 -1
10 8 12 -2 3
11 -8 -4 -2 3
12 8 4 2 -3

You may be able to recognize some of the rules from the previous post in the table above. For instance, rule 4 above is the second rule from the previous post. Rule 2 is the third rule from the previous post.

Divisibility rules for 32:

Rule Number 10,000s Digit 1,000s Digit 100s Digit Tens Digit Ones Digit
1 10000 1000 100 10 1
2 16 1000 100 10 1
3 16 8 100 10 1
4 16 8 4 10 1
5 16 40 4 10 1
6 -16 8 4 10 1
7 16 8 4 -22 1
8 -16 -24 -28 -22 1
9 16 24 28 22 -1
10 80 8 100 10 1
11 16 -8 12 -2 3
12 -16 8 -12 2 -3

The second rule from the previous post is rule number 5 in the table above. The third rule from the previous post is rule 10 above. And fourth rule from the previous post is rule number 2 in the table above.

I will leave you with a few divisibility rules for 64. You will notice that the general rules I postulated in my previous post for deriving divisibility rules for powers of 2 actually do not work with 64. That is one of the problems with trying to come up with or identify and extend patterns when you don't understand the underlying principles that result in the given pattern. I did not know what I was doing last week, and modulo arithmetic has enlightened me!

Divisibility rules for 64:

Rule Number 100,000s Digit 10,000s Digit 1,000s Digit 100s Digit Tens Digit Ones Digit
1 100000 10000 1000 100 10 1
2 32 10000 1000 100 10 1
3 32 16 40 36 10 1
4 32 16 -24 -28 10 1
5 -32 16 -24 -28 10 1
6 32 -16 24 28 -10 -1

I will leave the derivation of divisibility rules for 128 and other higher powers of 2 to the readers (though I doubt you will encounter the need to check divisibility by such large numbers).

This was a lot of fun for me, and I hope you had fun reading this post. It is amazing how much you can discover in mathematics by using simple principles and applying them logically. The derivation of divisibility rules from modulo arithmetic is one such endeavor, where one of the most basic mathematical principles gives us such powerful results. I hope I have not made any arithmetic errors in this post. If I have, please do let me know. Good luck!

Saturday, November 5, 2011

Divisibility Rules For Powers Of 2

In this earlier post, I wrote about some divisibility rules for various numbers. In that post, I mentioned that it is easy to derive divisibility rules for composite numbers by breaking them down into co-prime products, and then checking divisibility by each of those prime numbers.

One problem that has been bothering me since that time is the problem of finding divisibility rules for powers of 2 (4, 8, 16, 32, etc.). The problem is that these numbers have 2 as their only prime factor. As such, just because a number is divisible by 2 does not make it divisible by all its powers, but there are no other co-prime numbers to check divisibility against, so what do we do?

Many other websites do have a simple divisibility rule for powers of 2: Essentially, a number is divisible by 2^n if the last n digits of the number are divisible by 2^n. Thus the divisibility rule for 4 (which is 2^2) is that the last 2 digits of the number have to be divisible by 4. Seems fair enough for 4, and perhaps even 8.

But for a number to be divisible by 16, the last 4 digits have to be divisible by 16. To be divisible by 32, the last 5 digits have to be divisible by 32. As you can see, the divisibility rule becomes almost as onerous to apply as the actual division of the whole number by 16 or 32. In fact, in many cases, you may be trying to check the divisibility of numbers by 16 or 32 that may not even have 4 or 5 digits! So, the divisibility check does become an actual case of division, and does not save any labor at all.

In that same post, I also came up with a divisibility rule for 16 that seems to be less laborious to apply than checking divisibility of the last 4 digits by 16. The rule seemed seductively simple, luring me into a false sense of correctness. In fact, I am surprised that nobody has pointed out that the rule I have posted is completely wrong!

Yes, completely wrong. The rule is copied below for reference:

... one can also take the sum of the first digit, twice the second digit, 4 times the 3rd digit and 8 times the 4th digits (digits are numbered from the right, not the left), and test this sum for divisibility by 16.

Why is it wrong? Well, it does not even work on the number 16! Applying this rule to the number 16, you get the sum as 8, and therefore 16 should not be divisible by 16. Obviously, there is something wrong with the rule!

The problem is that since the rule was simply an extension of rules that actually work for 2, 4 and 8, it was easy to believe that it would work. And its simplicity makes it all the more appealing, clouding your judgment. It would have been easy for me to check to make sure it actually works, but I did not.

So, we have to derive another simple divisibility rule for 16. Note that 10000 is divisible by 16, so any rule we come up with has to depend on the last 4 digits, but no other part of the number (the other parts of the number only add 10000's to the number and since 10000 is divisible by 16, they do not affect the divisibility of the number by 16). Similarly, the divisibility rule for 32 has to depend on the last 5 digits, but no other part of the number. You get the idea.

So, to recap, the following rules do work:

Divisibility rule for 2: If the last digit is divisible by 2, the entire number is divisible by 2.

Divisibility rule for 4: (a) If the last 2 digits are divisible by 4, the entire number is divisible by 4. (b) Alternatively, if the last digit + twice the digit before that is divisible by 4, the entire number is divisible by 4.

Divisibility rule for 8: (a) If the last 3 digits are divisible by 4, the entire number is divisible by 8. (b) The second rule is similar to that used for 4 also. We take the sum of three numbers: the first number is the last digit itself. The second number is twice the next-to-last digit. The third number is 4 times the digit 3rd from the end. If this sum is divisible by 8, then the entire number is divisible by 8.

(c) In addition, 8 has another divisibility rule also. Split up the last 3 digits into two chunks, the first chunk with the last 2 digits of the number and the second chunk with the 3rd digit from the end. Now, add the first chunk to 4 times the second chunk, and if the sum is divisible by 8, then the whole number is divisible by 8.

That last rule came out of lots of experimentation, and forms the basis for derivation of rules for higher powers of 2. Let us apply it on 368, for instance. We split up the last 3 digits into two chunks. The first chunk would be 68 and the second chunk would be 3. We then add 4*3 to 68 to get 80. Since 80 is divisible by 8, we conclude that 368 is divisible by 8.

So far, I have not found any counterexamples for these rules, so they seem to hold up to real-world anecdotal testing.

As mentioned earlier, the simple extension of the second divisibility rule for 8 does not work on 16. Why? I have no idea. It seems to be a matter of the rule failing when you go from checking divisibility by a single digit number (8) to a 2-digit number (16).

However, the extension of the 3rd rule for divisibility by 8 does work for 16. In addition, I seem to have stumbled upon a general rule for checking divisibility by using chunks of digits (chunks of 2 digits, 3 digits, etc.).

Thus, the rules for divisibility by 16 are as below:

Divisibility rule for 16: (a) If the last 4 digits of a number are divisible by 16, the entire number is. (b) Alternatively, divide the last 4 digits of the number into 2 chunks of 2 digits each. Add the first chunk (the last 2 digits) to 4 times the second chunk (the previous 2 digits). If this sum is divisible by 16, then the whole number is divisible by 16. (c) In addition, there is a third rule. Divide the last 4 digits into one 3-digit chunk (the last 3 digits), and one 1-digit chunk (the 4th digit from the end). Add the first chunk and 8 times the second chunk. If that sum is divisible by 16, the entire number is divisible by 16.

Let us apply these on some numbers to see if they work. Take 16 for instance. Applying either the second or third rule above is trivial (in both cases, the first chunk is 16 or 016, and the second chunk is 00 or 0, so their sum gives us 16, which is obviously divisible by 16). For something more challenging, let us try it on 560, instance. The two chunks for rule number 2 are 60 and 05. Adding 60 to 4*5 gives us 80, which is divisible by 16, so 560 is divisible by 16.

Now, let us try it on a 4-digit number. Take 3888 for instance. The two chunks are 88 and 38. 88 + 4*38 = 240. Applying the rule once again, gives us 40 + 4*2 = 48. We know 48 is divisible by 16, so we conclude that 3888 is divisible by 16.

Applying the third rule to 3888 gives us two chunks, 888 and 3. 888 + 8*3 = 912. At this point, we can apply the second rule to get 12 + 9*4 = 48, which is divisible by 16. Thus, we can conclude that 3888 is divisible by 16 using the third rule also.

Now, let us move on to 32. Obviously, it is true that if the last 5 digits are divisible by 32, the entire number is (because 100,000 is divisible by 32). Some simpler rules can be derived using the work we have done for 8 and 16. In fact, by extending the rules for 8 and 16 to 32, we can derive 4 different divisibility rules for 32. Here they are:

Divisibility rule for 32: (a) If the last 5 digits are divisible by 32, the entire number is divisible by 32. (b) Divide the last 5 digits of the number into 3 chunks of 2 digits, 2 digits and 1 digit (the last 2 digits, the previous 2 digits, and the 5th digit from the end). If the last chunk + 4 times the next chunk + 16 times the third chunk is divisible by 32, then the entire number is. (c) Divide the last 5 digits into two chunks, the first containing the last 3 digits of the number, and the second containing the 2 digits prior to that. If the first chunk + 8 times the second chunk is divisible by 32, then the entire number is. (d) This rule is a logical extension of the previous 2 rules: Divide the last 5 digits into two chunks, the first with the last 4 digits of the number, and the second with the 5th digit from the end. If the sum of the first chunk and 16 times the second chunk is divisible by 16, the entire number is.

Let us try these rules out on a sample number. Let us take 37024. For the second rule, the 3 chunks are 24, 70 and 3. We take 24 + 4*70 + 16*3. We find that the sum is 352. Reapplying the rule, we get 52 + 3*4 = 64. We know 64 is divisible by 32, so we conclude that 37024 is divisible by 32.

For the third rule, our chunks are 024 and 37. 24 + 8*37 = 320. Obviously, 320 is divisible by 32, so once again the third rule also gives us the same divisibility signal.

For the fourth rule, our chunks are 7024 and 3. 7024 + 16*3 is 7072. At this point, we can switch to either the second or third rules to continue checking for divisibility. Using the second rule, our chunks are 72, 70 and 0. 72 + 4*70 = 352. We know that 352 is divisible by 32, so the fourth rule also confirms divisibility by 32.

OK, so by now, the pattern for deriving divisibility rules for powers of 2 seems to be clear. First identify the last n digits of the number, where n is the power of 2 for which divisibility is to be checked. Divide these last n digits into chunks of at least m digits where m is the number of digits in the power of 2 for which we are checking divisibility (so we can use 1-digit chunks for 2, 4 and 8, but must switch to at least 2-digit chunks for 16, 32 and 64, and 3-digit chunks for 128, and so on). The last chunk (farthest from the end of the number) may contain less than m digits (do not include any digits in the last chunk that are outside the last n digits of the number).

Now, multiply the first chunk (last m digits) by 1. Multiply the next chunk by 2^m. So, 2^m is the second multiplier. Multiply the chunk after that by (2^m)^2. (2^m)^2 is the third multiplier. In general, keep squaring the previous multiplier to get the next multiplier after you get the second one. If the sum of all this is divisible by 2^n, then the whole number is divisible by 2^n. Simple, isn't it?


OK, so some of the above is correct, and some of it is not. The verification of the correctness of some of the rules presented here, as well as derivation of new rules is very simple using modulo arithmetic. I discovered this about a week after this post went up, and you can read about my discoveries in this later post.

I will leave the derivation of divisibility rules for 64 (and 128 and other higher powers) to the reader. I will also leave the thorough verification of these rules to make sure there are no rule-breakers out there, to the readers. I like to think of this as crowd-sourced testing and debugging! So, try these rules out on various numbers, and see whether any of these rules fail. Remember that counterexamples can be false negatives (a number is actually divisible, but the rule says it is not) or false positives (a number is not divisible, but the rule says it is). Well, get cracking, and good luck!

Wednesday, October 26, 2011

I Have An Answer To My Question, But Not A Solution To My Puzzle

Last week, I wrote up a blog post about starting with 7 sets of 11 numbers each (multiples of 10 from 0 through 100), and trying to find the number of ways to choose one number from each set such that the sum of the numbers is 100. I have spent time thinking about this problem, and doing some research on it on and off for the past week or so.

Based on what I have seen so far, and what I have been able to think of by myself, it is not an easy problem. I did not expect it to be trivial, but it turns out it is a lot harder than I gave it credit for. I eventually did manage to find the answer to my specific question. That is to say, given 7 sets of 11 numbers (multiples of 10 from 0 through 100), I know how many ways exist of combining one number from each of the sets such that they all add up to 100. However, I am not any closer to a general solution to my puzzle than I was a week back.

My first stop once I conceived of the puzzle was to check on Google. I used several combinations of search terms, but did not come up with any results initially. Knowing what to search for is sometimes half the battle when it comes to using the web to research something! In this case, I did eventually hit upon the right search terms. And this led me to an article on Wikipedia devoted to the Partition Function.

Essentially, a partition of a positive integer is a way of writing that positive integer as a sum of other positive integers. The number of ways of "partitioning" the given integer, n, is represented by the function p(n). There is also another function p(k,n), which indicates the number of ways in which the integer n can be partitioned such that the minimum integer used to create n in any of the sums is at least equal to k.

Moreover, there is a recursive relationship that allows one to calculate p(n). The trick is to use the following relationships and slowly work your way through the entire problem. The relationships are:

p(k,n) = 0 if k>n (this is obviously true since you can not get a set of positive integers to add up to n if each of them is greater than n)
p(k,n) = 1 if k=n
p(k,n) = p(k+1,n) + p(k,n-k)

When we want to calculate p(n) in general, what we really want to calculate is p(1,n) since we are allowed to use all integers starting from 1.

Using the relationships above, for instance, one would calculate p(4) as below:

p(4) = p(1,4)
p(1,4) = p(2,4) + p(1,3)
p(2,4) = p(3,4) + p(2,2)
p(3,4) = p(4,4) + p(3,1)
Thus, p(2,4) = p(4,4) + p(2,2) + p(3,1) = 1 + 1 + 0 = 2 (this is obviously true since the number of combinations of positive integers that add up to 4 such that each integer is greater than or equal to 2 are either 2+2 or 4).

Similarly p(1,3) can be broken down as below:

p(1,3) = p(2,3) + p(1,2)
p(2,3) = p(3,3) + p(2,1) = 1
p(1,2) = p(2,2) + p(1,1) = 1 + 1 = 2

Thus, p(1,3) = 3.

Thus p(4) = 3 + 2 = 5.

This is true since we can actually enumerate the answer to this problem. The sets of numbers that add up to 4 are (1,1,1,1), (2,1,1), (3,1), (4) and (2,2). Actually, the partition problem gives us only combinations, not permutations. Thus (3,1) is considered the same as (1,3).

The partition function increases tremendously as you go out further and further. Here are some values of partition functions:
p(1)    1
p(2) 2
P(3) 3
p(4) 5
p(5) 7
p(6) 11
p(7) 15
p(8) 22
p(9) 30
p(10) 42
p(11) 56
p(12) 77
p(13) 101
p(14) 135
p(15) 176
p(16) 231
p(17) 297
p(18) 385
p(19) 490
p(20) 627
p(21) 792
p(22) 1002
p(23) 1255
p(24) 1575
p(25) 1958
...
p(100) 190569292
p(1000) 2.4x10^31

Partitions of numbers
A graph of the function with just the first 25 points plotted looks as shown on the left. It starts off slowly, but the rate of growth increases as you move along, making the numbers grow literally "off the chart" as you move to the right.

So far, so good. In fact, if my puzzle had been worded exactly as the partition function is defined, all would be well. Unfortunately, my puzzle is not worded the same way. First of all, my puzzle had the number of sets of numbers pre-defined. Moreover, the contents of these sets were also pre-defined. Also, I wanted each combination of numbers to include one and only one number from each set, and I wanted all permutations, not just combinations. Thus, in my puzzle, (1,3) is definitely different from (3,1).

Unfortunately, there seems to be no generalized problem defined the same way as my puzzle. This can be considered either good or bad. The good thing is that, I can now name this puzzle after myself! The bad thing is that no great intellects have applied themselves to the solution of this problem. Given the level of my intellect, if nobody else does work on my puzzle, it will remain unsolved for all of eternity!

Now, before I leave you, I will provide you with some numerical answers to my puzzle. Arriving at these was quite easy using computers. All I had to do was create a table with 11 elements (multiples of 10 from 0 through 100). Then, using self-joins, I was able to create all permutations of these numbers that add up to 100. Depending on how many times I self-joined this table to itself, I can find the number of ways to make 100 using 2 sets, 3 sets, etc.

Before you get carried away though, a word of warning: I ran these queries on a pretty powerful server that has enough number-crunching power and memory to make it without crashing. Cartesian self-joins like the one I was doing are quite capable of bringing even powerful computer systems down to their knees, so you have to be careful with them.

Here are the results from my computer runs. The number on the left represents the number of sets I used, and the number on the right represents the number of permutations that are possible using one number from each of the sets.
1    1
2 11
3 66
4 286
5 1001
6 3003
7 8008
8 19448
9 43758
10 92378

Sets adding up to 100
The server ran for over an hour to find the answer to the 10-set problem, and I did not dare try to find the answer for the 11-set problem. A graph of these numbers is shown on the left.

The numerical answer is all well and good, but unfortunately, I am yet to come up with any pattern in the answer that will allow me to generalize an answer to the puzzle. Hence the title of this blog post: I have an answer, but not a solution. Essentially, my original problem was to find the number of permutations when number of sets is 7. And the answer is 8008.

Now, what would be the answer if I had 21 elements in each set (multiples of 10 from 0 to 200), had 12 sets, and wanted the sum to be 250? I have no clue. I have no idea how to systematically go about calculating it. Yes, I can do it laboriously if forced to. And if I have a sufficiently powerful computer at my disposal, I can arrive at the answer without having to exert my brain cells.

The question is, is there a way to arrive at the answer without enormous and tedious mental labor, or trillions of computer operations?

Visitors Country Map

Free counters!

Content From TheFreeDictionary.com

In the News

Article of the Day

This Day in History

Today's Birthday

Quote of the Day

Word of the Day

Match Up
Match each word in the left column with its synonym on the right. When finished, click Answer to see the results. Good luck!

 

Hangman

Spelling Bee
difficulty level:
score: -
please wait...
 
spell the word:

Search The Web