Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Mathematics (https://www.askmehelpdesk.com/forumdisplay.php?f=199)
-   -   Troll and little red riding hood (https://www.askmehelpdesk.com/showthread.php?t=101258)

  • Jun 14, 2007, 11:12 AM
    galactus
    Troll and little red riding hood
    Here's a fun little problem if anyine would like to have a go. It's not too bad.

    Maybe you've seen it before, if so, maybe those who haven't will find it fun.

    "Little Red Riding Hood is walking to her grandmother's house. She crosses a
    bridge and a troll tells her to pay 1/2 of all her apples and 1/2 of one
    apple. At each bridge there is a troll asking for the same thing. There are
    three bridges. When she gets to her grandmother's house, she has no apples
    left. How many apples did she start with"
  • Jun 14, 2007, 11:51 AM
    Capuchin
    7? Just a first guess.
  • Jun 14, 2007, 11:59 AM
    Lowtax4eva
    I figured 5 actually

    Edit, nope, it's 7 you were right
  • Jun 14, 2007, 12:05 PM
    galactus
    I realize this problem isn't that difficult. I just thought it was cute.

    But, why doesn't someone post their solution instead of just the answer? Go ahead. Different methods is what's interesting.
  • Jun 14, 2007, 12:08 PM
    asterisk_man
    I cheated with maxima so highlight the text below to see a cheater's answer :)

    ---start hidden---

    at each bridge she will start with a apples and end with 0.5a-0.5 apples so the troll function is:
    t(a)=0.5a-0.5=(a-1)/2
    so if she starts with a_0 apples she ends with a_3=t(t(t(a_0)))
    if you do all the math and set a_3=0 and solve for a_0 you'll find that

    a_0=7

    in maxima:
    t(a):=(a-1)/2
    y:t(t(t(a)))
    solve(y=0,a)

    ---end hidden---
  • Jun 14, 2007, 12:25 PM
    Lowtax4eva
    Lol

    What's maxima? I assume a program that solves math functions?
  • Jun 14, 2007, 12:27 PM
    Lowtax4eva
    I just assumed in order to end with zero he has to arrive at the last bridge with one apple (1/2 of all he has plus 1/2 is one apple)

    Going backwards I then saw he has to arrive at the second bridge with 3, giving the troll 2 (1/2 of all he has plus a half is 2).

    Same for the first, he has to leave with 3 so he has to arrive with 7, (half of all be has plus a half is 4)
  • Jun 14, 2007, 12:56 PM
    asterisk_man
    Quote:

    Originally Posted by Lowtax4eva
    lol

    What's maxima? I assume a program that solves math functions?

    Maxima is an open source computer algebra system.
    Maxima - A GPL CAS based on DOE-MACSYMA

  • All times are GMT -7. The time now is 12:48 PM.