Results 1 to 17 of 17

Thread: Pls help me with the math question (centered on inequality division, in a problem)

  1. #1
    Kyriakos's Avatar Vicarius Provinciae
    Join Date
    Nov 2012
    Location
    Thessalonike, The Byzantine Empire
    Posts
    10,114

    Default Pls help me with the math question (centered on inequality division, in a problem)

    I am not sure if this was the correct forum...
    I need some help with a math question (trying to establish how to work with an inequality division mentioned below)

    Someone posted the following problem, and I solved it using the method in the image - but I ended up having to deal with an inequality division and my way around it was very likely not optimal. Can you please have a look and tell me what else can be done? The result numerically is correct (checked it with manual calculations for scaled down versions), but I don't like the inequality division part. I also would wish to ask if the Sum-based recursion is correct (silently I accepted it should be, since it led to the right inequality...)

    The problem was stated like this: 100 people are to take slices off a cake. The first takes 1% of what is there (ie of the entire cake), the second takes 2% of what remained, the 3rd takes 3% of what remained etc. Find who will get the largest slice.




    Note about my solution: I started by defining the function recursively; any person takes x/100 multiplied by 1-the sum of all the previous f(x), so up to that of x-1.
    (Note2: you can try the same for an easier to calculate problem, for example 10 people taking 1/10, 2/10 of what remains etc of the cake. There you end up with x^2+x>=2.7=>xEN:x=2=>x+1=3 and indeed f(3)>f(4)).
    Thank you for any help!
    Λέων μεν ὄνυξι κρατεῖ, κέρασι δε βούς, ἄνθρωπος δε νῷι
    "While the lion prevails with its claws, and the ox through its horns, man does by his thinking"
    Anaxagoras of Klazomenae, 5th century BC










  2. #2
    Kyriakos's Avatar Vicarius Provinciae
    Join Date
    Nov 2012
    Location
    Thessalonike, The Byzantine Empire
    Posts
    10,114

    Default Re: Pls help me with the math question (centered on inequality division, in a problem)

    Since the inequality may simply be a bad idea and unworkable, what if the whole thing was written as an equality? (ie trying to establish when f(x) and f(x-1) will approximate each other, and then trying to show that this function, as it is continuous, will need to have its max there? (maybe I won't get any replies, but thought of asking this too)
    Λέων μεν ὄνυξι κρατεῖ, κέρασι δε βούς, ἄνθρωπος δε νῷι
    "While the lion prevails with its claws, and the ox through its horns, man does by his thinking"
    Anaxagoras of Klazomenae, 5th century BC










  3. #3
    Flinn's Avatar His Dudeness of TWC Consul
    Moderator Patrician Citizen Content Emeritus spy of the council Gaming Emeritus

    Join Date
    Dec 2012
    Location
    Italy
    Posts
    20,584
    Blog Entries
    46

    Default Re: Pls help me with the math question (centered on inequality division, in a problem)

    Moved to the Academy
    Under the patronage of Finlander, patron of Lugotorix & Lifthrasir & joerock22 & Socrates1984 & Kilo11 & Vladyvid & Dick Cheney & phazer & Jake Armitage & webba 84 of the Imperial House of Hader

  4. #4
    chriscase's Avatar Chairman Miao Moderator
    Civitate Patrician

    Join Date
    Mar 2008
    Posts
    5,745

    Default Re: Pls help me with the math question (centered on inequality division, in a problem)

    I expect you'd want to represent each portion as a function of the iteration, then take the derivative and set it to 0 to find local min/max.

    P(n) = n/100 * Remainder(n)

    Figuring out the remainder in the function is the harder part I think.

    Why is it that mysteries are always about something bad? You never hear there's a mystery, and then it's like, "Who made cookies?"
    - Demetri Martin

  5. #5
    Kyriakos's Avatar Vicarius Provinciae
    Join Date
    Nov 2012
    Location
    Thessalonike, The Byzantine Empire
    Posts
    10,114

    Default Re: Pls help me with the math question (centered on inequality division, in a problem)

    ^but I can't take the derivative when the function is written recursively with the sum. I also wanted to avoid calculus, if possible
    Can you think of any way to arrive at the answer from justifying how the inequality would go? As indeed it is x^2+x-100 <=0 for the last x for which it is true that f(x)<f(x+1).
    Λέων μεν ὄνυξι κρατεῖ, κέρασι δε βούς, ἄνθρωπος δε νῷι
    "While the lion prevails with its claws, and the ox through its horns, man does by his thinking"
    Anaxagoras of Klazomenae, 5th century BC










  6. #6

    Default Re: Pls help me with the math question (centered on inequality division, in a problem)

    Tried putting this into WolframAlpha?
    The Armenian Issue

  7. #7
    swabian's Avatar igni ferroque
    Join Date
    Dec 2005
    Location
    Germany
    Posts
    4,308

    Default Re: Pls help me with the math question (centered on inequality division, in a problem)

    Not sure what you tried to do there, but here is my solution.
    Quote Originally Posted by Kyriakos View Post

    The problem was stated like this: 100 people are to take slices off a cake. The first takes 1% of what is there (ie of the entire cake), the second takes 2% of what remained, the 3rd takes 3% of what remained etc. Find who will get the largest slice.
    So the initial whole cake be R0 = 1 and Rn be the remaining fraction after n people have taken their slices.

    After the first person takes 1%, the remaining cake is R1 = 0.99.

    After the second person takes 2% of the remaining R1, the rest of the cake is R2 = R1 * (1 − 0.02) = 0.99 * 0.98.

    After the third person, the remaining cake is R3 = R2 * (1 − 0.03) = 0.99 * 0.98 * 0.97.

    After the n-th person, the remaining cake is Rn = Rn-1 * (1 - n/100).

    Therefore the slice taken by the n-th person is a portion Sn = Rn-1 * n/100 taken of the cake.


    Now the task is to find the n for which Sn is maximized. So eventually you have to find the remaining cake after each person’s turn by recursively calculating the number of steps. The rest is really just doing the recursion until you find n, nothing more complex.

  8. #8
    Kyriakos's Avatar Vicarius Provinciae
    Join Date
    Nov 2012
    Location
    Thessalonike, The Byzantine Empire
    Posts
    10,114

    Default Re: Pls help me with the math question (centered on inequality division, in a problem)

    Thanks, but what you wrote in detail is exactly what the sum (Σ) does: calculate f(x) for each x
    What I wanted to do was to have a general solution which doesn't require manual calculation (because that calculation will become very tedious; already is for 100 cuts to the cake, but imagine it for 100000000000000). To the contrary, for the latter using my way you simply end with an fast to solve polynomial (x^2+x-100000000000000<=0 => the biggest piece would go to who cut 10000000th.
    But I am still not happy with the inequality part.
    Λέων μεν ὄνυξι κρατεῖ, κέρασι δε βούς, ἄνθρωπος δε νῷι
    "While the lion prevails with its claws, and the ox through its horns, man does by his thinking"
    Anaxagoras of Klazomenae, 5th century BC










  9. #9
    AqD's Avatar 。◕‿◕。
    Join Date
    Dec 2007
    Location
    🏡🐰🐿️🐴🌳
    Posts
    11,024

    Default Re: Pls help me with the math question (centered on inequality division, in a problem)

    Quote Originally Posted by Kyriakos View Post
    The problem was stated like this: 100 people are to take slices off a cake. The first takes 1% of what is there (ie of the entire cake), the second takes 2% of what remained, the 3rd takes 3% of what remained etc. Find who will get the largest slice.
    The first.

    Instead of taking a slice from middle, you cut a circle like this:


    and tell the next person the inner circle is the cake.



    The largest inequality is the inequality of knowledge.
    Last edited by AqD; September 16, 2024 at 01:46 PM. Reason: pic

  10. #10
    chriscase's Avatar Chairman Miao Moderator
    Civitate Patrician

    Join Date
    Mar 2008
    Posts
    5,745

    Default Re: Pls help me with the math question (centered on inequality division, in a problem)

    So I modeled this is Desmos:

    R(1)=T
    R(n)=R(n-1) - P(n-1)
    P(1)=1/T
    P(m)=m/T * R(m)

    P(n) is the portion size the nth portion takes; R(n) is the remainder of the cake before the nth portion is taken. Then we can set T to our partition size. In your canonical example T=100

    We make some assumptions that there is a single maximum and that behavior on the integers in the interval {1..T} is representative of the full behavior of the function on the reals, so we can talk about things like maxima as if the function were continuous.

    A few runs in Desmos:

    T=100; Max(P)=10
    T=25; Max(P)=5
    T=10000; Max(P)=100

    So from a first glance it looks like the max occurs at the square root of T. Knowing that, we might be able to come up with a non-recursive definition of P(n) and reduce it or take its derivative. A series we could just take the derivative term by term and set it to 0 to calculate the maximum.
    Last edited by chriscase; September 28, 2024 at 10:34 PM.

    Why is it that mysteries are always about something bad? You never hear there's a mystery, and then it's like, "Who made cookies?"
    - Demetri Martin

  11. #11
    Kyriakos's Avatar Vicarius Provinciae
    Join Date
    Nov 2012
    Location
    Thessalonike, The Byzantine Empire
    Posts
    10,114

    Default Re: Pls help me with the math question (centered on inequality division, in a problem)

    Thank you
    That it is always 1+ the positive root of x^2+x-S, S being the number of slices, was my sense too. But currently I don't know how to define the function in a non-recursive way. Furthermore, I sort of like the recursive function itself and would like to keep it if possible - but find a way to justify the 2nd degree equation from there (it's what I tried to do with the inequalities but failed).

    Edit: I misread your post the first time... I was looking at the solution (positive root+1, moved to the closest integer that is smaller than it), but that doesn't seem to be aligned to the sqr(number of slices). Eg for 5 it is 1+1.8, reduced to the closest (smaller numerically) integer 2. Sq5 (which is around 2.2) also would reduce to 2. Now I wonder (given my recursive function should be itself correct) if the second degree equation just happens to be close enough to give a 'correct' answer when reduced to nearest integer.
    Last edited by Kyriakos; September 29, 2024 at 01:50 AM.
    Λέων μεν ὄνυξι κρατεῖ, κέρασι δε βούς, ἄνθρωπος δε νῷι
    "While the lion prevails with its claws, and the ox through its horns, man does by his thinking"
    Anaxagoras of Klazomenae, 5th century BC










  12. #12
    Muizer's Avatar member 3519 Moderator
    Patrician Artifex

    Join Date
    Apr 2005
    Location
    Netherlands
    Posts
    11,218

    Default Re: Pls help me with the math question (centered on inequality division, in a problem)

    I posed this question, to a couple of math teachers. They didn't sit down to work out an answer, but one mentioned something that sort of made sense. That is, if you take the difference between subsequent slices, won't that remove the recursive part of the equation? Because it's going to be the same for both except for the last step? Don't know, but perhaps worth a look.
    "Lay these words to heart, Lucilius, that you may scorn the pleasure which comes from the applause of the majority. Many men praise you; but have you any reason for being pleased with yourself, if you are a person whom the many can understand?" - Lucius Annaeus Seneca -

  13. #13
    Kyriakos's Avatar Vicarius Provinciae
    Join Date
    Nov 2012
    Location
    Thessalonike, The Byzantine Empire
    Posts
    10,114

    Default Re: Pls help me with the math question (centered on inequality division, in a problem)

    Hm, non-recursively, just comparing two adjacent values, I suppose it would be (with x=position, a=all bits taken off by then) x/100 (1-a) and [(x+1)/100][1-a-[(x/100)(1-a)]]...? (will check later if stuff cancel out and it reduces to something easy to handle)

    Speaking of which, would the function have something similar to a parabolic graph with (m being negative) f(x)=mx^2+stuff? The max would be where the slope is zero
    Last edited by Kyriakos; September 29, 2024 at 05:45 PM.
    Λέων μεν ὄνυξι κρατεῖ, κέρασι δε βούς, ἄνθρωπος δε νῷι
    "While the lion prevails with its claws, and the ox through its horns, man does by his thinking"
    Anaxagoras of Klazomenae, 5th century BC










  14. #14
    chriscase's Avatar Chairman Miao Moderator
    Civitate Patrician

    Join Date
    Mar 2008
    Posts
    5,745

    Default Re: Pls help me with the math question (centered on inequality division, in a problem)

    Well we hypothesize that the f(n) curve has a max around n=sqrt(T) where T is the number of portions we are making. So the first derivative of the curve would have a zero around there. If T - n^2 = 0 represents this then we are looking for a function that differentiates to that, or a series whose derivative is equivalent to it.

    Why is it that mysteries are always about something bad? You never hear there's a mystery, and then it's like, "Who made cookies?"
    - Demetri Martin

  15. #15
    Kyriakos's Avatar Vicarius Provinciae
    Join Date
    Nov 2012
    Location
    Thessalonike, The Byzantine Empire
    Posts
    10,114

    Default Re: Pls help me with the math question (centered on inequality division, in a problem)

    I am not saying that it is a parabola with only some x^2, mind. It all points to this having both an x part and an integer (not that the latter matters in the derivative) ^^
    Hm, wait, so you are suggesting the function would be (1/3)x^3-Tx+number? I am not that fluent in calculus currently, I know such would have a derivative x^2-T, which at 0 would mean (since xEN) x=sqrT. But have we actually established beyond doubt that the maxima is at sqrT?
    And like I said, I will have a look at the entire thing later on.
    Last edited by Kyriakos; September 29, 2024 at 01:40 PM.
    Λέων μεν ὄνυξι κρατεῖ, κέρασι δε βούς, ἄνθρωπος δε νῷι
    "While the lion prevails with its claws, and the ox through its horns, man does by his thinking"
    Anaxagoras of Klazomenae, 5th century BC










  16. #16
    chriscase's Avatar Chairman Miao Moderator
    Civitate Patrician

    Join Date
    Mar 2008
    Posts
    5,745

    Default Re: Pls help me with the math question (centered on inequality division, in a problem)

    Certainly for perfect squares like 36, 49, 64, the max occurs at the square root. Given the recursion my intuition is that it's unlikely to be a cubic or even a polynomial. I expect we'd be better off looking for a series whose derivative evaluates to

    T - n^2

    But still playing around with it as time allows.
    Last edited by chriscase; September 29, 2024 at 03:16 PM.

    Why is it that mysteries are always about something bad? You never hear there's a mystery, and then it's like, "Who made cookies?"
    - Demetri Martin

  17. #17
    Kyriakos's Avatar Vicarius Provinciae
    Join Date
    Nov 2012
    Location
    Thessalonike, The Byzantine Empire
    Posts
    10,114

    Default Re: Pls help me with the math question (centered on inequality division, in a problem)

    I secretly continue to hope that somehow (eg with replacing inequalities with equalities and proving an added step) my original idea (in the opening post) can be salvageable
    But we will see :o
    Λέων μεν ὄνυξι κρατεῖ, κέρασι δε βούς, ἄνθρωπος δε νῷι
    "While the lion prevails with its claws, and the ox through its horns, man does by his thinking"
    Anaxagoras of Klazomenae, 5th century BC










Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •