# How many cows are there?

In a field, the grass increases in a constant rate. $17$ cows can eat all the grass in the field in $30$ days. $19$ cows can eat all the grass in $24$ days. Suppose, a group of cows started eating grass for $6$ days. Then $4$ cows are sold. The rest cows took $2$ more days to eat the remaining grass. What is the number of cows in the group?

## My trying:

A cow eats a certain amount of grass in one day, call it $c$. The field grows by a certain amount each day, call it $g$.

The field has some initial amount of grass: $i$

\begin{equation} \begin{aligned} i + 30g - 17\cdot30c &= 0\\ i+24g-19\cdot24c&=0 \end{aligned} \end{equation}

Solving these two equations we get , $g = 9c$ . That means It takes 9 cows to eat one day's growth in one day.

• I appreciate the visual aid for this problem. However, you should include your thoughts on the problem. What have you tried? – Dave Dec 25 '17 at 14:42
• Like any word problem, find things to assign variables to. The field starts with $x$ cow-days of grass and gains $y$ cow-days per day. Then write equations to describe what you know. The first two sentences should give you two equations to find $x,y$. Then you start with $n$ cows which eat ??? – Ross Millikan Dec 25 '17 at 14:47
• gottfriedville.net/mathprob/alg-cowsgrass.html – lab bhattacharjee Dec 25 '17 at 14:47
• I initially thought this was a question about optimizing your cow related startup or something..nice stock image though :P – Rick Dec 25 '17 at 15:08
• A very similar problem was given to me by my grandfather when I was 9 from a puzzle book. Obviously I couldn't solve it and it continued to give me nightmares for quite awhile. – King Tut Feb 9 '18 at 3:47

\begin{aligned} V+30x&=30\times 17\times y\\ V+24x&=24\times 19\times y\\ V+8x&=6\times k\times y+2(k-4)\times y\\ V&=510y-30x\\ x&=9y\\ 510y-22x&=(8k-8)y\\ 510y-198y&=(8k-8)y\\ k&=40 \end{aligned} where $V$ - value of grass on the field, $x$ - speed of growth grass for a day, $y$ - speed of 1 cow for a day, $k$ - number of cows.

I'm going to set up some variables first.

Number of Cows: $C$

Amount of Grass on Day $n$: $G_n$

The rate of growth of grass: $x$ per day

The rate of consumption of grass: $y$ per day

So we have $$G_{n+1}=G_n+x-Cy$$ which give $$G_n=G_0+nx-nCy$$

The first two equations can be easily converted to $$G_{30}=0=G_0+30x-30\cdot17\cdot y\tag{1}$$ $$G_{24}=0=G_0+24x-24\cdot19\cdot y\tag{2}$$

This gives $$x=9y\tag{*}$$

For the last one, the recurrence relation no longer holds but the idea is the same, so we have $$0=G_0+(6+2)x-6Cy-2(C-4)y$$ which simplifies to $$0=G_0+8x-(8C-8)y\tag{3}$$

The rest is algebraic work. Using $(1)$ and $(*)$, you will get $C=40$.

Let

$i$ be the initial amount of grass on the field,

$a$ be the constant rate of growth of grass,

$b$ be the consumption rate of 1 cow for a day,

and $x$ be the number of cows in the situation asked

Given,

$$i+30a-17(30)b = 0 \tag1$$ $$i+24a-24(19)b = 0\tag2$$

Subtracting $(1)$ and $(2)$,

we get

$$6a - 510b + 456b = 0$$

$$\Rightarrow 6a = 54b$$

or, $$a = 9b \tag3$$

Putting this in $(1)$,

$$i+30a-17(30)b = 0 \tag1$$

$$\Rightarrow i+30(9b)-17(30)b = 0$$

So,

$$i+270b-510b = 0$$

or

$$i = 240b \tag4$$

In the situation given,

$$i + 8a - 6xb = i_{2} \tag5$$

where $i_{2}$ is the amount of grass left before selling

Now we have $(x-4)$ cows left.

$$i_{2} + 2a - 2(x-4)b = 0 \tag6$$

Combining $(5)$ and $(6)$ to eliminate $i_{2}$,

$$i + 8a - 6xb + 2a - 2(x-4)b = 0$$

Now using relations $(3)$ and $(4)$ we get,

$$(240b) + 8(9b) - 6xb + 2(9b) - 2(x-4)b = 0$$

Dividing both sides by $b$, we now get

$$240 + 54 - 6x + 18 - 2(x-4) = 0$$

$$\Rightarrow 312 - 6x - 2x + 8 = 0$$

$$\Rightarrow 320 = 8x$$

so $x = 40$, or the initially there were 40 cows.