[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Math problem

grandmabeckie

2/26/2008 8:28:00 AM

I am try to help my daughter:
Problem

father is 4 times older then his daughter.
in 6 years he will be 3 times older what is the answer and how did you
reach it.
Thanks, a mom in CA
25 Answers

ycsunil

2/26/2008 8:41:00 AM

0

On Feb 26, 1:28 pm, grandmabec...@msn.com wrote:
> I am try to help my daughter:
> Problem
>
> father is 4 times older then his daughter.
> in 6 years he will be 3 times older what is the answer and how did you
> reach it.
> Thanks, a mom in CA

This is not the right forum to ask..anyway I can answer this question

Father is 4 times older then his daugher. so the first equation will
be:

Equation 1: Father = 4 * Daughter

In 6 years he will be 3 times older. so the second equation will be:

Equation 2: (Father + 6) = 3 * (Daughter + 6)

Solve equation 1 and 2

In equation 2; replace 'Father' by '4 * Daughter' (by equation 1)

so equation 2 can be written as:

(4Daughter + 6) = 3Daughter + 18
4Daughter - 3Daughter = 18 - 6
Daughter = 12

Present Daughter age is 12
Father present age is : 4 * Daughter age = 4 * 12 = 48

Matthias Wächter

2/26/2008 9:05:00 AM

0

ycsunil schrieb:
> On Feb 26, 1:28 pm, grandmabec...@msn.com wrote:
>> I am try to help my daughter:
>> Problem
>>
>> father is 4 times older then his daughter.
>> in 6 years he will be 3 times older what is the answer and how did you
>> reach it.
>> Thanks, a mom in CA
>
> This is not the right forum to ask..anyway I can answer this question
>
> Father is 4 times older then his daugher. so the first equation will
> be:
>
> Equation 1: Father = 4 * Daughter
>
> In 6 years he will be 3 times older. so the second equation will be:
>
> Equation 2: (Father + 6) = 3 * (Daughter + 6)

Depends on how you interpret "4 times older". What if it'd say "the brother is one time older than the sister"? Are they equal in age, a.k.a. twins, or would you suggest he is twice as old?

In case of the latter, we'd have to interpret the whole problem differently.

Equation 1: Father = Daughter + 4*Daughter

Equation 2: Father+6 = Daughter+6 + 3*(Daughter+6)

=> Father = 5*Daughter,
5*Daughter+6=Daughter+6+3*Daughter+18
=> Daughter = 18
=> Father = 90

Well ... be Father with 72 ... Charlie Chaplin then?

:)

- Matthias

Arlen Cuss

2/26/2008 11:02:00 AM

0

[Note: parts of this message were removed to make it a legal post.]

Hi,

On Tue, Feb 26, 2008 at 7:29 PM, <grandmabeckie@msn.com> wrote:

> Thanks, a mom in CA
>
>
Where is CA, anyway? Not everyone lives in the US.

Arlen

Victor Reyes

2/26/2008 1:36:00 PM

0

[Note: parts of this message were removed to make it a legal post.]

Damn, I was always thought that Math was exact and unambiguous. I want my
money back!

On Tue, Feb 26, 2008 at 6:02 AM, Arlen Cuss <celtic@sairyx.org> wrote:

> Hi,
>
> On Tue, Feb 26, 2008 at 7:29 PM, <grandmabeckie@msn.com> wrote:
>
> > Thanks, a mom in CA
> >
> >
> Where is CA, anyway? Not everyone lives in the US.
>
> Arlen
>

Shandy Nantz

2/26/2008 3:38:00 PM

0

Arlen Cuss wrote:
> Hi,
>
> On Tue, Feb 26, 2008 at 7:29 PM, <grandmabeckie@msn.com> wrote:
>
>> Thanks, a mom in CA
>>
>>
> Where is CA, anyway? Not everyone lives in the US.
>
> Arlen

That's California - the very most western part of the country.
--
Posted via http://www.ruby-....

pat eyler

2/26/2008 3:49:00 PM

0

On Tue, Feb 26, 2008 at 8:37 AM, Shandy Nantz <shandybleu@yahoo.com> wrote:
> Arlen Cuss wrote:
> > Hi,
> >
> > On Tue, Feb 26, 2008 at 7:29 PM, <grandmabeckie@msn.com> wrote:
> >
> >> Thanks, a mom in CA
> >>
> >>
> > Where is CA, anyway? Not everyone lives in the US.
> >
> > Arlen
>
> That's California - the very most western part of the country.

Unless it's Canada, in which case British Columbia is the very most
western part of the country. ;^)

(I'll also ignore Hawai'i and Alaska -- one joke at a time, that's
my motto)


> --
> Posted via http://www.ruby-....
>
>



--
thanks,
-pate
-------------------------
Duty makes us do things, Love make us do things well.
http://on-ruby.bl... http://on-erlang.bl...
http://on-soccer.bl...

Rick DeNatale

2/26/2008 4:27:00 PM

0

On 2/26/08, pat eyler <pat.eyler@gmail.com> wrote:
> On Tue, Feb 26, 2008 at 8:37 AM, Shandy Nantz <shandybleu@yahoo.com> wrote:

> > > Where is CA, anyway? Not everyone lives in the US.

> > That's California - the very most western part of the country.

> Unless it's Canada, in which case British Columbia is the very most
> western part of the country. ;^)
>
> (I'll also ignore Hawai'i and Alaska -- one joke at a time, that's
> my motto)

Actually, California isn't even the westernmost state in the lower 48
states. That distinction goes to Oregon.

--
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denh...

Todd Benson

2/26/2008 5:59:00 PM

0

On Tue, Feb 26, 2008 at 2:29 AM, <grandmabeckie@msn.com> wrote:
> I am try to help my daughter:
> Problem
>
> father is 4 times older then his daughter.
> in 6 years he will be 3 times older what is the answer and how did you
> reach it.
> Thanks, a mom in CA

Here's a matrix solution...

require 'matrix'
coefficient_matrix = Matrix[[1, -4], [1, -3]]
solution_vector = [[0], [12]]
father_age, daughter_age = (coefficient_matrix.inverse *
solution_vector).to_a.flatten

=> [48, 12]

Let x be father's age, y be daughter's

x = 4y
x + 6 = 3(y + 6)

Simplified and with x's and y's on one side.

x - 4y = 0
x - 3y = 12

The coefficients make up the matrix [[1, -4], [1, -3]], with the
current solution vector as [[0], [12]].

Multiply both sides by the inverse of the coefficient matrix will give
you the identity matrix on the left side and the solution vector on
the right.

cheers,
Todd

Todd Benson

2/26/2008 6:18:00 PM

0

On Tue, Feb 26, 2008 at 11:58 AM, Todd Benson <caduceass@gmail.com> wrote:
>
> On Tue, Feb 26, 2008 at 2:29 AM, <grandmabeckie@msn.com> wrote:
> > I am try to help my daughter:
> > Problem
> >
> > father is 4 times older then his daughter.
> > in 6 years he will be 3 times older what is the answer and how did you
> > reach it.
> > Thanks, a mom in CA
>
> Here's a matrix solution...
>
> require 'matrix'
> coefficient_matrix = Matrix[[1, -4], [1, -3]]
> solution_vector = [[0], [12]]

Oops, that line was supposed to be...

solution_vector = Matrix[[0], [12]]

Todd

Christopher Dicely

2/27/2008 3:31:00 AM

0

On Tue, Feb 26, 2008 at 8:26 AM, Rick DeNatale <rick.denatale@gmail.com> wrote:
> On 2/26/08, pat eyler <pat.eyler@gmail.com> wrote:
> > On Tue, Feb 26, 2008 at 8:37 AM, Shandy Nantz <shandybleu@yahoo.com> wrote:
>
>
> > > > Where is CA, anyway? Not everyone lives in the US.
>
>
> > > That's California - the very most western part of the country.
>
> > Unless it's Canada, in which case British Columbia is the very most
> > western part of the country. ;^)
> >
> > (I'll also ignore Hawai'i and Alaska -- one joke at a time, that's
> > my motto)
>
> Actually, California isn't even the westernmost state in the lower 48
> states. That distinction goes to Oregon.

The48 contiguous states haven't really been the "lower 48" since
Hawai'i was admitted, either. (Though I suppose if you meant the 48
states that aren't Alaska and Maine, what you said would still be
true.)