Real world algebra problem -- Solving for r

JPDeni

New member
Joined
Sep 18, 2008
Messages
3
I'm not in school. I last took algebra over 40 years ago and I'm a bit rusty.

I am working on a knitting project. It starts with 8 stitches and adds 4 stitches for each row. I want to find out how many stitches one skein of yarn will use so that I can work out how best to use the yarn I have remaining.

I worked out how to do that. The formula, which seems to work is

t = rs + ar(r+1)/2

where
t = total number of stitches
r = number of rows completed
a = number of stitches added per row
s = number of stitches at the start of the project

I will compute this once I finish with the first skein of yarn, which will get me halfway to what I need to know. The real use of it is to come up with the number of increasingly lengthy rows that I can make with subsequent skeins of yarn. What I figure is that I need to

--solve the above formula for r
--replace s with s + a(the number of previous rows completed) [the number of stitches in the last row completed, which is my new starting point]
--use the value of t from the previous computation, since the number of stitches worked by a skein will be constant

I keep trying to solve for r, but I end up going in circles, ending up where I started, solving for t.
 
t = rs + ar(r+1)/2
Multiply each term by 2, to get rid of fraction:
2t = 2rs + ar(r + 1)
Multiply out the term with brackets:
2t = 2rs + ar^2 + ar
So we now have:
ar^2 + ar + 2rs - 2t = 0
ar^2 + r(a + 2s) - 2t = 0

You need to use the quadratic formula to slove that for r: are you familiar with it?
If not, google "quadratic formula" and see how far you can get.
Come back if still stuck.
 
Thank you! It's a start. (Why did I think this was going to be easy? :) )

It's been a while since I've dealt with quadratics, but I'll give it a shot and see if I can jog some memories.
 
You should come out with r = [-a - 2s +- sqrt(a^2 + 4as + 4s^2 + 8at)] / (2a) ..... YUK!!
In case you're not familiar, stuff like a^2 means a squared; example: 3^2 = 9.

Since you're dealing with positive stuff (no negative stitches!), then that equation can be
simplified a bit by removing the "- sqrt", thus making it a little less terrifying(!):
r = [sqrt(a^2 + 4as + 4s^2 + 8at) - a - 2s] / (2a)

Hope that helps...
 
Sequences and Series ...

JPDeni said:
... I am working on a knitting project. It starts with 8 stitches and adds 4 stitches for each row. I want to find out how many stitches one skein of yarn will use ...

Hello JP:

My interpretation is that the number of stitches per row form an arithmetic sequence.

{8, 12, 16, 20, 24, 28, 32, ...}

Are these numbers correct for your project?

If so, then 56 stitches comprise the first four rows.

When I use your formula for total stitches in four rows, I get 72.

I may not be understanding your project. (The only time I wielded a knitting needle was for demonstrating puncture wounds -- using a pumpkin -- for an advanced first-aid class when I worked for the Red Cross.)

If the sequence above matches your project, then we can express the number of stitches in any row with the following formula.

S[sub:ltl2p95i]r[/sub:ltl2p95i] = 4 * (r + 1)

S[sub:ltl2p95i]r[/sub:ltl2p95i] is the number of stitches in row r.

If you knit 37 rows, then the 37th row has 152 stitches.

S[sub:ltl2p95i]37[/sub:ltl2p95i] = 4 * (38) = 152

There is a method to find a formula that adds up the stitches from all 37 rows. I won't go into it, but ask if you're interested. (It began when an exasperated schoolteacher told his class to add the numbers from 1 to 100 -- hoping that this task would keep them quiet for awhile. A clever young boy named Carl Friedrich Gauss reasoned his way to the answer in mere moments ... Gauss)

T[sub:ltl2p95i]r[/sub:ltl2p95i] = 2 * r[sup:ltl2p95i]2[/sup:ltl2p95i] + 6 * r

T is the total number of stitches from row 1 through row r.

T[sub:ltl2p95i]37[/sub:ltl2p95i] = 2 * 37[sup:ltl2p95i]2[/sup:ltl2p95i] + 6 * 37 = 2960

If your skein of yarn yields 37 complete rows, then your project so far contains 2,960 stitches.

Cheers,

~ Mark :)
 
(The only time I wielded a knitting needle was for demonstrating puncture wounds -- using a pumpkin -- for an advanced first-aid class when I worked for the Red Cross.)
LOL!!

My interpretation is that the number of stitches per row form an arithmetic sequence.

{8, 12, 16, 20, 24, 28, 32, ...}

Are these numbers correct for your project?

If so, then 56 stitches comprise the first four rows.

When I use your formula for total stitches in four rows, I get 72.

Right on all counts. Except that the row with 8 stitches is considered to be Row 0. It's not actually in the pattern. I was going to add those 8 stitches in at the end or just leave them out. Eight stitches aren't going to make much difference in the overall scheme of things. I could, though, start with that first row and use an s value of 4.

When I started this, I set up the forumula like this for how many stitches were in each row, assuming that the row with 8 stitches is Row 0:

1: (starting stitches) + (additional stitches)
2: (starting stitches) + (additional stitches) + (additional stitches)
3: (starting stitches) + (additional stitches) + (additional stitches) + (additional stitches)
4: (starting stitches) + (additional stitches) + (additional stitches) + (additional stitches) + (additional stitches)

I only went that far because the lines were getting too long and a pattern began to emerge. So I rewrote those lines:

1: s + a
2; s + 2a
3: s + 3a
4: s + 4a

Therefore, each row has s + ra stitches in it. Now I want to add them together to get the total number of stitches

t = s + a + s + 2a + s + 3a + s + 4a

Gather up the s's

t = 4s + a + 2a + 3a + 4a

Then I came to my first dilemma. How to add 1 + 2 + 3 + 4 + ... r without having to manually put the values into the calculator. From the dim past, my mind remembered the term "factorial" but that wouldn't work, for that is 1 x 2 x 3 x 4 x ... r. So did did a google search for factorial addition. I found

1 + 2 + 3 + ... + n = n(n+1)/2

http://answers.google.com/answers/threa ... 08478.html

So I plugged that into my formula, using my r instead of their n so I didn't get confused.

t = rs + ar(r+1)/2

I worked it out manually using the 5th row (understanding that the row with 8 is not included), which yields a very handy 100 --

100 = 5 x 8 + 4x5(5+1)/2
100 = 40 + 4 x 5 x 6 x .5
100 = 40 + 120 x .5
100 = 40 + 60

It works!! :D

Tr = 2 * r[sup:4b17411l]2[/sup:4b17411l] + 6 * r

Okay. Then, with including the row of 8, the row that I have been working on is row 6, which has 28 stitches and at that point there are a total of 108 stitches. (Just working it out to prove it to myself.)

Tr = 2 * 36 + 6 * 6
= 72 + 36
= 108

So we're both right. More than one way to a skinless feline.

But the next step is still a quadratic equation and it's not going to be a very nice one. When I started all this, I was looking at the numbers in the first few rows, but as you pointed out, I'm going to be into the thousands of stitches and solving that quadratic will not be a whole lot of fun. After delving into this whole thing, I realized that I could achieve the same goal by writing a little php script, using a loop to count the number of rows for the next section. It's more arithmetic than algebra and I wouldn't want to try to do it by hand, just because I'd likely lose track of where I was. (My first skein is just about used up and I'm just starting row 50.) Handy thing about computers is that they don't lose track of which line they're on or forget to carry the 2.

Still, it doesn't hurt to dust off some of the brain cells that haven't seen the light of day for eons. I always liked algebra.

Thanks so much for the help. It would have been great if there would have been some place to go to get this kind of help when I was first learning all this stuff. Back when we rode dinosaurs to school. :wink: (Seriously, I'm old enough to have used an actual slide rule. I still have it.)
 
Top