Puzzle: Gears and Gray codes
Phil Pilgrim (PhiPi)
Posts: 23,514
Here's a mathematical puzzle which, without giving much thought to it, I'm not sure has a solution. My mountain bike has 21 nominal speeds. The front cluster has three sprockets with the following gear numbers and tooth counts:
The rear gear numbers and tooth counts are:
This results in the following gear ratios and the gear numbers (front:rear) that create them, in order from low to high:
As you can see, shifting from one ratio to the next can involve shifting more than one derailleur at at a time, sometimes over a very large range.
So here's the puzzle: Ignoring mechanical practicality, is it possible to come up with a selection of tooth counts that permit shifting incrementally through an entire range of gear ratios by shifting only one derailleur at a time? (This is where the Gray code reference in the title comes from.) If not (and I suspect not) can it be done by occasionally shifting both at once but only by a single step?
-Phil
1: 22, 2: 32, 3: 42
The rear gear numbers and tooth counts are:
1: 28, 2: 24, 3: 21, 4: 18, 5: 15, 6: 13, 7:11
This results in the following gear ratios and the gear numbers (front:rear) that create them, in order from low to high:
0.786 1:1
0.917 1:2
1.048 1:3
1.143 2:1
1.222 1:4
1.333 2:2
1.467 1:5
1.500 3:1 Not allowed
1.524 2:3
1.692 1:6
1.750 3:2
1.778 2:4
2.000 3:3
2.133 2:5
2.333 3:4
2.462 2:6
2.800 3:5
2.909 2:7
3.231 3:6
3.818 3:7
0.917 1:2
1.048 1:3
1.143 2:1
1.222 1:4
1.333 2:2
1.467 1:5
1.500 3:1 Not allowed
1.524 2:3
1.692 1:6
1.750 3:2
1.778 2:4
2.000 3:3
2.133 2:5
2.333 3:4
2.462 2:6
2.800 3:5
2.909 2:7
3.231 3:6
3.818 3:7
As you can see, shifting from one ratio to the next can involve shifting more than one derailleur at at a time, sometimes over a very large range.
So here's the puzzle: Ignoring mechanical practicality, is it possible to come up with a selection of tooth counts that permit shifting incrementally through an entire range of gear ratios by shifting only one derailleur at a time? (This is where the Gray code reference in the title comes from.) If not (and I suspect not) can it be done by occasionally shifting both at once but only by a single step?
-Phil
Comments
You gear change would pull a fork on the rear to push the chain and push the front sprocket outward as well.
It'd work, but your pedals would move when you change gears! Har, Har
It's interesting how you describe the mechanism. My old 21sp bike had two gear shift collars.... One was operated the front sprocket, 1...3 while the other operated the rear sprocket, 1....7. Maybe I'm reading your post wrong however.
I've been known to get on a bike for 30+ hours straight and not stop for 500+ miles over terrain that has some extreme uphills & down. Bike changes are allowed, so I have a special bike just for the 50+ mph downhill run into Death Valley at night. Have a look at my custom-CNC'ed 90-tooth chainring:
http://www.the508.com/2003web/stories/s01.html
I suspect that the answer to your question might involve bigger gears front and rear in order to avoid overlap. In the rear, the current state of the art bikes have an 11 cog smallest (or 9-tooth if you use the Shimano small-wheels Capreo groupo). Just shifting from 11 to 12 creates a big 9% jump in cadence, so for your solution you would have to make your smallest cluster gears larger to reduce that jump and result in usable gears. Then you would have to increase your chainring sizes to compensate. As such, your bike would weigh more just in pounds of gears, and you'd be at the point of diminishing returns.
But then, you can get into the wacky world of internally-shifting hubs, which are up to 8 speeds or more by now... a whole other can of worms. But those have their own inefficiencies, which I will not get into here.
For now.
Could you please post a video of you changing bikes during a 30 hour straight, 500 mile non-stop ride? That's like leaping from one moving bike to another rmoving bike! Tres Impressive!!!!
OMG! Can you even pedal that thing unless you're going downhill? At 50 mph on the downhill, do you ever experience steering jitter or other instabilities?
_____________________________________________
Reiterating the conditions of the puzzle, mechanical practicality is not a concern for now, just the numbers. Further constraints in light of Spiral_72's "solution", though: the front and rear clusters have to have at least three sprockets each and there have to be at least 21 speeds total, all distinct. Ideally, the ratios of adjacent speeds would be fairly constant, but it's not a requirement of the puzzle.
-Phil
22 chainring: 1.16-1.69
33 chainring: 1.74-2.53
49 chainring: 2.58-3.76
Not terribly practical, usable, or user-friendly, but possible.
I should add one more proviso for the sake of the puzzle: The sprocket sequence in each cluster does not necessarily have to progress in order from smallest to biggest.
-Phil
I haven't been keeping up to date on such things, but are issues of the chain crossing too far (in/out) between gears still important or are they going away due to better design, materials, etc?
I'm thinking along the lines of only using the front inner gear with the three inner gears in back (out of 7), the front middle with the rear middle three, and the front outer with the rear outer three to reduce wear on the chain and gears.
This doesn't contribute to the puzzle much, but it does remind me that I really need to dust off my bikes.
@schill: You are correct, sir. A straight chainline is very important to mechanical efficiency, perhaps even moreso with Campy's new 11-speed rear cluster (WOW!). I went by PhiPi's suggestion about "ignoring mechanical practicality". As I am wont to do...
You could go for the logical extension and run something like 38:40:42 up front, but you'd occasionally need to shift two gears at once up front. Unfortunately the rear cluster has enough variation in spacing that some gears are likely to overlap.
Lawson
---Since you didn't specify perfect conditions---Shifting the ring gear up from 1 -> 2, or 2 -> 3 while going up hill is mechanically impractical, and an easy way to throw a chain.
With a Watt meter, and a little DA, you could shift gears up or down based on your own personal Nm and Kw profile, and incline.
Bill M.
The reason for having all these sprockets isn't to get AxBxC gears, it's really to have a selection of gears available for the inner front chain ring, a selection for the middle (or outer) front chain ring (and, for the 3-chainring types one for the outer ring). So, you select your combinations so that the chain is reasonably straight. Less strain, and more efficiency. Therefore you need the overlaps really.
-Tor
put one gear (front or back) and 21 gears on the other end and shift only that end.
Problem/puzzle solved...
My reason for skipping the very lowest two gears is that if I was to use thm it would be slower than getting off and walking!
The other exclusions is to lessen the strain on the chain and wear on the sprockets
Switching both derailleurs at the same time is asking for trouble.
As for a certain 'dinnerplate bicycle'... OUCH!
Hope you never have a spill, because that thing will cut into your leg like a blunt circular saw.
As for finding the most efficient stepping and gears in general, maybe someone can put together a Propeller-based bicycle-coputer with servo-controller derailleurs?
Add a climb-indicator and speed/distance, and it should be able to gear up/down for you when needed.
(Hooking it up to a speedo isn't that difficult. I did it years ago with a 1987-vintage Psion Organisr II)
Dave: Interesting! 'Not what I envisioned, but I guess your "sparse matrix" solution satisfies the stated conditions -- and it keeps the chain parallel!
Putting it in matrixi form like that is an interesting way to view the problem, too. If all the boxes were filled in and all the gears used, it becomes a problem of how to arrange the columns and rows, such that adjacent speeds are in adjacent boxes. If there's a solution, shifting through the speeds creates a path through the martix, with each shift represented by a hop to an adjacent box.
What this tells me, though, is that if the sprockets in each cluster are arranged in order, no solution exists. My reasoning is this: Suppose a legitimate shift occurs from y1 to y2 in a given column. Somewhere in that same trajectory, but in a different column, there will have to be a jump from y2 to y1, from y1 to y0, or from y3 to y2 to ensure that all the boxes are visited. But these latter movements go in the wrong direction: i.e. if you started out upshifting, they represent downshifts.
That doesn't rule out a solution, though, if the sprockets are arranged out of order, or if diagonal jumps (i.e. shifting both derailleurs at once) are permitted.
-Phil
Agreed! It's called tread, or Q-factor!
http://sheldonbrown.com/gloss_q.html
BTW, that whole website is a highly-revered knowledge base for cyclists. Definitely bookmark-worthy! Sheldon Brown was to cycling what Mike Green & PhiPi are to this forum. He passed away fairly recently, but his knowledge will go on until the Atomic Flame Deluge.
http://sheldonbrown.com/
No and no. Single moves would mean you can't go backwards at any point so you are limited to (A-1)+(B-1) steps where A and B are the numbers of sprockets on each axle.
If you are allowed to move two at a time but only by one step each, you can only take one step backwards on one axle while going forwards on the other. This doesn't add enough cases to get A*B-1 steps unless both axles have 2 sprockets each.
I think the gear ratios could be arranged so that each speed-increment alternates between the left and right side. If the right side is the current one in use, the next speed would be engaged by moving one or both of the derailers on the left side. You would then engage the left side and disengage the right side. If a ratchet is used instead of a clutch, a downspeed would require momentarily removing tension from the chain so the ratchet could release.
This only requires 6 levers. This would be a good application for using a microcontroller and some servos to perform the shifting sequence. The rider would just need to control a single lever in this case. The shifting could even be made automatic so that a contant pedal force or power could be maintained.