• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

More of my kid's math homework...

shilala

Lifer
Choose an integer

If your integer is even, multiply it by two.

If your integer is odd multiply by three, add one, and divide by two.

Keep going with your new number!

Will you eventually reach 1?



Males bees hatch unfertilized eggs and so have a mother but no father. Female bees hatch fertilized eggs. How many ancestors does a male have in the twelfth generation back?
How many of these are males?



Three men have 2 jobs each. The chauffeur offended the musician by laughing at his long hair. The musician and the gardener used to fish with john. The painter bought a quart of milk from the consultant. The chauffer courted the painter?s sister. Jack owed the gardener $5. Joe beat jack and the painter at cards. One of them is a hairdresser and no two have the same job. Who dose what?



Five women have lunch together seated t a circular table. Ms. Osborne is sitting between Ms. Lewis and Ms. Martin. Ellen is sitting between Cathy and Ms. Morris. Ms. Lewis is between Ellen and Alice. Cathy and Doris are sisters. Betty is seated with Ms. Parkes on her left and Ms. Martin on her right. Match the First manes with the Last Names.






 
Originally posted by: ArmchairAthlete
First one is 'no', unless you choose one to begin with maybe.

For fun I coded it in python and the number just blows up.
Can't you just try it instead? (1*3 + 1)/2 = 2. Then keep multiplying by 2. If you multiply by an even number you will always get an even number. Thus it is impossible to do anything but go up. Repeat with any starting number you want, but it will always be an even number mulitplied by 2 over and over again.

The rest just draw the diagram on paper and they answer themselves.
 
Originally posted by: dullard
Originally posted by: ArmchairAthlete
First one is 'no', unless you choose one to begin with maybe.

For fun I coded it in python and the number just blows up.
Can't you just try it instead? (1*3 + 1)/2 = 2. Then keep multiplying by 2. If you multiply by an even number you will always get an even number. Thus it is impossible to do anything but go up. Repeat with any starting number you want, but it will always be an even number mulitplied by 2 over and over again.

The rest just draw the diagram on paper and they answer themselves.

Well if you choose one you've already reached one... unless you're to apply the function before seeing if you've reached one.

EDIT: Nvm, as dullard pointed out you have to go straight to modifying your number before checking it by how the problem is worded. No do loop in python, gotta copy paste.
 
Originally posted by: shilala
Choose an integer

If your integer is even, multiply it by two.

If your integer is odd multiply by three, add one, and divide by two.

Keep going with your new number!

Will you eventually reach 1?

Males bees hatch unfertilized eggs and so have a mother but no father. Female bees hatch fertilized eggs. How many ancestors does a male have in the twelfth generation back?
How many of these are males?

Three men have 2 jobs each. The chauffeur offended the musician by laughing at his long hair. The musician and the gardener used to fish with john. The painter bought a quart of milk from the consultant. The chauffer courted the painter?s sister. Jack owed the gardener $5. Joe beat jack and the painter at cards. One of them is a hairdresser and no two have the same job. Who dose what?

Five women have lunch together seated t a circular table. Ms. Osborne is sitting between Ms. Lewis and Ms. Martin. Ellen is sitting between Cathy and Ms. Morris. Ms. Lewis is between Ellen and Alice. Cathy and Doris are sisters. Betty is seated with Ms. Parkes on her left and Ms. Martin on her right. Match the First manes with the Last Names.

If you can't do these, YOU should be in your son's 4th grade math class.
 
Originally posted by: ArmchairAthlete
Well if you choose one you've already reached one... unless you're to apply the function before seeing if you've reached one.
Then you get to coding order of course. If the first question was to check if it was 1, I'd agree with you. But the first thing it says to do is to do math, then secondly check the result.

Do while...loop coding

vs

Do ...while coding
 
No.

If n is a positive integer, 2n > n and (3n + 1)/2 > 3n/2 > n. Since n is a positive integer, it must be >= 1, so n will constantly increase and you will never reach 1.
If n is a negative integer, 2n < n and (3n + 1)/2 < n. n <= -1, n will constantly decrease and you will never reach 1.
 

[/quote]

If you can't do these, YOU should be in your son's 4th grade math class.[/quote]
It's my daughter, and she's in eighth grade, actually.
Yes, I should be in a forth grade math class.
You should be reading Emily Post.

 
Originally posted by: Atomicus
This is way too dumb for my taste..... anyone up for some Talyor Series expansion or Euler-goodness?

If i see another taylor series im going to shoot up a school
 
Joe is a Gardener and a Chauffer, Jack is a Musician and a Consultant, John is a Painter and a Hairdresser.
 
Originally posted by: Mo0o
You can't do these? How did you make it this far in life...

Actually, I haven't had cause to pony up with any sort of "integer" answer yet. I flunked calculus. I also dropped out of physics. It took me two years to pass Algebra II.
I'm doin pretty good though, since I last looked.
These guys know this stuff, that's why I asked here. We call it "asking for help". It's really neat.
 
The Ant problem can be done easily using recursive relations.

Each generation can be defined using these functions:
*note* that Gm(x) is the number of males at generation x and Gf(x) is the number of females.
G(x) = Gm(x) + Gf(x)
Gm(x) = Gf(x-1)
Gf(x) = Gf(x-1) + Gm(x-1) = Gf(x-1) + Gf(x-2)

Gm(0) = 1
Gf(0) = 0

*note* that Gf(x) reduces to the fibonacci sequence, hence Gm(x) does as well.

Using these simple equations you can construct an analysis of the first 12 generations.
Gm(00) = 01 Gf(00) = 00
Gm(01) = 00 Gf(01) = 01
Gm(02) = 01 Gf(02) = 01
Gm(03) = 01 Gf(03) = 02
Gm(04) = 02 Gf(04) = 03
Gm(05) = 03 Gf(05) = 05
Gm(06) = 05 Gf(06) = 08
Gm(07) = 08 Gf(07) = 13
Gm(08) = 13 Gf(08) = 21
Gm(09) = 21 Gf(09) = 34
Gm(10) = 34 Gf(10) = 55
Gm(11) = 55 Gf(11) = 89
Gm(12) = 89 Gf(12) = 144

So in the 12th generation an ant has 144+89 = 233 ancestors, 89 of which are males.

Did I make that geeky enough for you? 😉
 
Originally posted by: Kyteland
The Ant problem can be done easily using recursive relations.

Each generation can be defined using these functions:
*note* that Gm(x) is the number of males at generation x and Gf(x) is the number of females.
G(x) = Gm(x) + Gf(x)
Gm(x) = Gf(x-1)
Gf(x) = Gf(x-1) + Gm(x-1) = Gf(x-1) + Gf(x-2)

Gm(0) = 1
Gf(0) = 0

*note* that Gf(x) reduces to the fibonacci sequence, hence Gm(x) does as well.

Using these simple equations you can construct an analysis of the first 12 generations.
Gm(00) = 01 Gf(00) = 00
Gm(01) = 00 Gf(01) = 01
Gm(02) = 01 Gf(02) = 01
Gm(03) = 01 Gf(03) = 02
Gm(04) = 02 Gf(04) = 03
Gm(05) = 03 Gf(05) = 05
Gm(06) = 05 Gf(06) = 08
Gm(07) = 08 Gf(07) = 13
Gm(08) = 13 Gf(08) = 21
Gm(09) = 21 Gf(09) = 34
Gm(10) = 34 Gf(10) = 55
Gm(11) = 55 Gf(11) = 89
Gm(12) = 89 Gf(12) = 144

So in the 12th generation an ant has 144+89 = 233 ancestors, 89 of which are males.

Did I make that geeky enough for you? 😉

Not geeky enough... you didn't point out the obvious Fibonacci sequence. 😛

edit: I based my response ^^^ on your reply. I just now read the original question. That's a common question frequently used in introducing the fibonacci sequence.
 
Originally posted by: DrPizza
Originally posted by: Kyteland
The Ant problem can be done easily using recursive relations.

Each generation can be defined using these functions:
*note* that Gm(x) is the number of males at generation x and Gf(x) is the number of females.
G(x) = Gm(x) + Gf(x)
Gm(x) = Gf(x-1)
Gf(x) = Gf(x-1) + Gm(x-1) = Gf(x-1) + Gf(x-2)

Gm(0) = 1
Gf(0) = 0

*note* that Gf(x) reduces to the fibonacci sequence, hence Gm(x) does as well.

Using these simple equations you can construct an analysis of the first 12 generations.
Gm(00) = 01 Gf(00) = 00
Gm(01) = 00 Gf(01) = 01
Gm(02) = 01 Gf(02) = 01
Gm(03) = 01 Gf(03) = 02
Gm(04) = 02 Gf(04) = 03
Gm(05) = 03 Gf(05) = 05
Gm(06) = 05 Gf(06) = 08
Gm(07) = 08 Gf(07) = 13
Gm(08) = 13 Gf(08) = 21
Gm(09) = 21 Gf(09) = 34
Gm(10) = 34 Gf(10) = 55
Gm(11) = 55 Gf(11) = 89
Gm(12) = 89 Gf(12) = 144

So in the 12th generation an ant has 144+89 = 233 ancestors, 89 of which are males.

Did I make that geeky enough for you? 😉

Not geeky enough... you didn't point out the obvious Fibonacci sequence. 😛

edit: I based my response ^^^ on your reply. I just now read the original question. That's a common question frequently used in introducing the fibonacci sequence.

See bolded section above. 😉
 
Back
Top