The type of this problem in general is called an 'Integer Programming Problem' for anyone interested, and it is in fact 'actually hard' in the mathematical sense that it's NP-hard.
NP mean non-polynomial, which mean that it’s hard for computers to do, and a similar problem with more terms would rapidly grow in difficulty, until it was unimaginably hard for people and computers to solve.
@@benjamincruz6633 That's a common misconception. Although your idea is right, NP stands for nondeterministic polynomial time, meaning problems that are verifiable in polynomial time, but without known polynomial time solutions. Ironically, NP-hard problems are not necessarily in NP. Integer Programming, however, is not just NP-hard but also NP-complete, meaning it is in NP and be reduced to known NP-complete problems (Wikipedia gives a simple reduction to the Vertex Cover problem), and can be verified in polynomial time. Whether or not a polynomial time solution exists is a question yet to be definitively answered, although most people suspect not.
@@kylaxial I have eliminated the first equation the same way, and after that it turned into a super easy problem, because you can decouple the equation for B and C "mechanically", so you can rewrite them into a very simple form where the whole solution space is trivial. Basically it can be solved by following the recipe, no out of the box thinking is required. A bit disappointing, I have expected it to be much harder, but I am really out of practice with these kind of integer problems, so my expectation were quite off.
I found a solution in 2b 3b > 4c 3c > a My first step was to get rid of a variable and I chose a as its coefficient is always 1. a = 100 - b - c so we are left with 100 - b - c > 2b 3b > 4c 3c > 100 - b - c I then rearranged them to have 1b on the left for each inequality b > 4/3 c b > -4c + 100 b < -1/3c + 100/3 These are linear inequalities and can be easily graphed. Doing so gives a region where the only point with integer values for both x and y is (19, 26) so c = 19 and b = 26 a = 100 - 26 -19 = 55 a = 55 b = 26 c = 19
In a way though, you did guess - just a little. Graphing could almost be thought of as evaluating all guesses at once, and selecting the values that meet the criteria as a final guess. Still a very good solution, but not *technically* entirely guess-free, in an abstract sense, for certain definitions of 'guess'.
@@2001herne I don't see how viewing the solution set and then applying the integer restriction is any different from eliminating a variable and then establishing a system of linear inequalities. If the layering of criteria constitutes making a guess, then all mathematical procedures are guesswork. Does that accurately represent your intention or am I missing something? By the way, my intended meaning of "guess" was like "guess and check." I did not posit an answer before discovering it.
I did the exact same thing but I took the long way and wrote c as 100-a-b. Along the way I somehow added x/2 + 4x/3 = 7x/6 and shaded the wrong side of the graphs and got results such as 54.5426.6 before finding out my embarrassing mistake via desmos. I think this approach is more challenging, which makes it feel better when you finally solve it.
@@wafflegamerxox6575 I actually disagree with this approach being more challenging. Brute force methods, even with reduced ranges, are computationally expensive. Efficient algorithms are far superior. I had no difficulty with this method, but guessing and checking would have been mentally strenuous. Laziness is a mathematician's best friend. What is generally difficult and non-trivial about these types of problems is not the act of solving them, but rather the discovery of an appropriate algorithm. I personally find satisfaction when a problem requires a non-obvious insight which leads to an elegant solution. I think this is more likely to have been what you meant than the way I read it (as I responded in the first paragraph).
@@exeatop8044 It’s different because even with a “guess and check”, there is an unknown variables you’re trying to solve for and the only way you could narrow it down is through guessing and checking. With graphs and using integer restriction, you are basically scrolling through a bunch of possible solutions and finding which fits. It’s how graphing is done rather than what you actually did mentally. Electronically, it narrowed things down for you. Other mathematical procedures are different since they don’t guess values, and instead give an answer without any checking. It’s basically narrowing things down until an answer pops out.
I actually completely ignored the 100 and focused on the A>2B, 3B>4C, 3C>A. Just pick a few random numbers, fine-tune until you get the distribution right, scale up and fine-tune one last time. After 1 minute I got to A=41, B=20, C=14, A+B+C=75. Not quite 100 but 41>40, 60>56 and 42>41. Just need to scale it up. 41/75*100 ≈ 54.6 20/75*100 ≈ 26.6 14/75*100 ≈ 18.6 Fine-tune and you get A=55, B=26, C=19. Took like 3 minutes total. But saying that this is a "hard" problem actually made it "easier" since I automatically assumed that there wont be much wiggle room, which probably helped me pick the right numbers quicker.
4:45 From here we can obtain 5.5C > 100 > 4.9C by adding the both inequalities and then add C. Next we will obtain 20 >= C > 18. Let's continue If C = 20 then 3B > 4C = 80 Now we obtain A + B > 2B + B = 3B > 80. Then A + B + C > 100. We get a contradiction therefore C = 19. Continue again Now C = 19. Hence A + B = 100 - 19 = 81 We obtain A + B > 3B 81 > 3B > 4C = 76 Then 3B = 78 since 3B is a multiple of 3. We obtain B = 26, and then immediately we obtain A = 81 - 26 = 55.
By pure chance i got it first try, i was trying to prove that a "big" value for B was not possible, so I assumed it to be 26 or greater, then i started working on the consequences of such assumption, trying to reach a contradiction, but everything worked nice so I checked and got there at the end.
2:00 Okay, we can do that for a in range(98): for b in range(98): for c in range(98): if a + b + c == 100 and a > 2 * b and 3 * b > 4 * c and 3 * c > a: print(a, b, c)
my attention span on waiting to solve problems cant be longer than 160ms :( for A in range(98): for B in range(98): for C in range(98): if (A+B+C) == 100 and A > B*2 and B*3 > C*4 and C*3 > A: print (f'A = {A} B = {B} C = {C}')
at 6:43 i wonder if we could also get an upper bound for every number, and then further decrease our bounds , and then create a For loop of c, b and a is derived from the others, the For loop goes from Cs min to Cs Max, and Bs min to Bs max, and then we discard any A's above our max and below our min. and we get every lattise point that solve this equasion.
#Brute force solution. for a in range(101): for b in range(101): for c in range(101): if a+b+c==100: if a>2*b: if 3*b>4*c: if 3*c>a: print(a,b,c) #Answer: 55,26,19 #No need to fret!
instead of dividing you can end up with 9c>3a>6b>8b from there you can get 18c>6a>16c 9c>6b>8b add with 6c everywhere to get 33c>600>30c so from one side you get 20>c and form other c>18.1 and since c has to be an integer there is only one c=19
4:42 You should actually keep the fractions as long as possible, because inaccuracies don't arise until you approximate. So for example, you can put A + B + C = 100 in between those equations and get C * (8/3 + 4/3 +1) < 100 < C * (3 + 3/2 + 1) 5C < 100 < 5.5 C => 20 > C > 18.(18) => C = 19, for sure this time. With 3B > 4C => B > 25.(3) And with 3C > 2B => B < 28.5 And remember that A > 2B, so for B = 26, A > 52 and for B = 27, A > 54, and for B = 28, A > 56 And since 3C > A, for C = 19 => A < 57 With B = 28, A >56, but A < 57, so B is not 28. And with A + B + C = 100 => A + B = 81, so if B = 27, A = 81 - 27 = 54 (false) This means that the only correct solution is: A = 55, B = 26, C = 19
You can actually narrow down C to 19 by bounding it with approximations of the highest and lowest possible values of A and B. So you assume B=1.5C and A=3C to conclude that C>18, and assume B=(4/3)C and A=(8/3)C to conclude that C
wait just to make sure i'm not hallucinating, you didn't put any coefficients in front of the fruits right? (oh I get it I'm supposed to recognize that you have two bananas there. tricky)
I started by realizing that A had to be greater than 50 because it was greater than 2B and greater than 2C, so it was greater than B+C and therefore over half of the 100. From there, C had to be between 2/3 and 3/4 of B and it was trial and error from then on
Everybody using triple nested loops all from 1 to 98 disappoints me. You can easily reduce your brute force solutions from 98^3 = 941,192 combinations to 99 choose 2 = 4,851 combinations: for A in range(1, 99): # A from 1 to 98 for B in range(1, 100-A): # B from 1 to 98 when A = 1, just 1 when A = 98 C = 100 - A - B # Even if you loop B from 1 to 98, just check that C > 0 instead of A + B + C == 100, giving 9,604 combinations if A > 2*B and 3*B > 4*C and 3*C > A: print(f'{A = } {B = } {C = }')
This was harder than the normal Facebook math stuff but still pretty easy, maybe just because all the numbers were relatively small and easy to work with
the method I used was to pick values for B (starting from 1,2,3... etc) and use the first two inequalities to find a value for A and C in the following way: for C (3B > 4C) multiply B by 3 (3B) then find the largest multiple of 4 that is less than 3B and divide it by 4 to get C) for A (A > 2B) multiply B by 2 (2B) then add 1 then take the 3 values and test the final inequality (3C > A) using a spreadsheet I found the values of A,B and C up to about 100 (using the above method) and seperated out the cases where the 3rd inequality is also satisfied, then added them up. none of them added to 100 but one of them (53, 26,19) added to 98 and adding 2 to A (to make 55) didn't affect the 1st and 3rd inequality so I got 55, 26, 19
Of course we can do less than a million combinations... in minutes! Write a little program! Writing will last longer than actually running it! And writing it is easy a piece of cake!
a=55, b=26, c=19 The moment you said "is actually hard", and that I saw that inequalities were involved and that the system is underconstrained (implying all numbers must be integers), I decided "to hell with solving it myself, I'll just plug it into 3 for loops of 100 iterations and see what the answer is". And yes, I realize now I could've just had 2 for loops and set c to 100-a-b, but I didn't feel like even trying.
I just noticed, ABC (while being the most common math terms for this kind of equation) can represent apples, bananas, and cherries respectively, maybe thats why they used those fruit specifically
Here was my solution: Given the inequality 3c>a>2b, I added c to each part, giving 3b>4c>a+c>2b+c Now, rewriting the top equation yields a+c=100-b. Then, by substitution and adding b to each part, we are left with 4b>4c+b>100>3b+c, proving b>=26. Then, by the original inequalities, a>=53 and c>=18, yielding a minimum sum of 97. From here, I noticed you can only increase c by 1 to maintain the inequalities, which then allows a to be increased by to, giving the solution a=55, b=26, c=19
i had an image pop into my head of the generalized riemann hypothesis except some symbols are replaced by fruit thats a great idea to make and post on facebook
You really don't need guessing with this. It's a very interesting problem. The key is the solution has to be an integer. Here's how I approached it. A + B + C = 100 rewrite to A = 100 - B - C ---- This is equation 1 substitute equation 1 to A > 2B 100 - B - C > 2B 100 - C > 3B --- This is equation 2 Substitute equation 1 to 3C > A 3C > 100 - B - C 4C > 100 - B ---- This is equation 3 Substitute equation 2 into 3B > 4C 100 - C > 4C 100 > 5C 20 > C ---- Therefore the biggest possible solution for C is 19 Substitute equation 3 into 3B > 4C 3B > 100 - B 4B > 100 B > 25 --- Therefore the smallest possible solution for B is 26 We also know 3C > A > 2B Because the biggest and smallest solutions for C and B respectively is 19 and 26, we can bind A into 57 > A > 52 This also limits our solution for C to 19 or 18 because if C is 17, then 3C would be lower than 52. Also, B is bound to 26, 27, or 28, since if B is 29, 2B will be more than 57 if B is 27, that means 3B > 4C becomes 81 > 4C. since the answer is an integer, the next lowest possible solution for this is 80. This makes C be 20 which is not possible. For the same reason we can also rule out 28, making 26 be the only possible solution for B We now have A + 26 + C = 100 which gives us A + C = 74 If C is 18, A is 56. This is not possible because it violates 3C > A Therefore we have A = 55, B = 26 , C = 19
How I attempted this was looking for when the inequality breaks, A>2B, therefore,3C>2B, because C has a constant that is bigger than B constant, B must be bigger than C for when the expressions, 2B is bigger than 3B, i.e when C is 1 and B is 2, 3C = 3and 2B = 4, because the expression is 3C>2B, there is a point for which the inequalities are equal and because A,B and C are whole numbers that are positive this makes the comparison very easy, going up a step when C = 2, and B = 3, 3C = 6 and 2B = 6, this is when they are equal, to fast forward a bit, every other comparison would be a set for which 3C would always be greater than 2B, which would be an infinite set, but we can reduce this set to just a set that contains two elements, because A + B + C = 100, if we go up a step C = 3 and B = 4, 3C = 9 and 2B = 8 , because the equation A+ B + C = 100 is linear, they all share the same constant, so 3*10 = 30 and 4 * 10 = 40 but that would leave 30 left but 3C is bigger than A not equal, and using 9 instead of 10 gives 29 and 36 respectively, leaving 35 , but 35 is not a multiple of 9, so this eliminates the C= 3 and B = 4 pair, TLDR, C = 4 and B = 5 does work! , and 3C = 12, B = 10, 2B
*Ground* *Rules:* An apple is over twice a banana (a banana is less than 1/2 an apple) A bannana is greater than 4/3 cherries (a cherry is less than 3/4 a banana) A cherry is over 1/3 an apple (an apple is less than 3 cherries) --------------- A banana is between 4/9 - 1/2 of an apple A cherry is between 1/3 - 3/8 of an apple *Finding* *the* *apple’s* *minimum* *value* Taking the apple’s max, 1/2a + 3/8a + a = 100 1 7/8a = 100 15/8a = 100 100 * 8/15 =
I got it in a few minutes just by ignoring the "=100" at first and figuring out what the minimum value for each number could be. Apple had to be at least 11, banana at least 5, and cherry at least 3. I got 58, 26, and 16 when I scaled it up.
I wonder how many of you saying:I USED A COMPUTER TO FIND THE ANSWER would be talking right now if computers didn t exist first you try to solve the problem THE SMART way and then let the computer verify the answers with computational work or else we will end up mindless goons
I completely missed the first part where the greater than parts showed multiple fruit meaning I spent the first 2 minutes trying to understand why he put A>2B and not just A>B
I found that 55 was the smallest a could be to get a sum of 100. As a>2b, b could at most be the first integer less than a/2. Similarity, c could at most be the first integer less than 3c/4. Example: if a=50, b could at most be 24, and c could at most be 17. But 50+24+17=91
I saw the thumbnail and tried doing it on my own first. I did pretty much the same thing and got answers that fit, but I thought "there has to be a cleaner way that doesn't involve any guess and check". Then I clicked this video to see you do basically the exact same thing, the only difference that I just guessed 3z=x=2b.
Before clicking on the video, I tried solving the math problem in the thumbnail. My Solving Progress: 3z > x > 2y 3y > 4z > x y > z I knew x was the highest, so I started with x = 50, and gave the other half to y and z, keeping z lower than y. Well it was impossible so I went for x = 55, y = 25 and z = 20. Then I did the inputs 60 > 55 > 50 // 75 > 80 > 55, and I worked from there. Quickly, I found the answer: x = 55, y = 26, z = 19 ------ 57 > 55 > 52 // 78 > 76 > 55. In Conclusion: math is fun
Actually it's less than 5000 (there are 98 possibilities for a, 98-a possibilities for b and exactly one for c in every case). Python can do that in seconds flat. If I wasn't crap at python, this would have been 5 minutes of coding.
Let's do this without the constraint of all values being positive integers and find all solutions within the real numbers. Because of 4C < 3B, we can replace C by 3B/4 - d with positive d. Using A+B+C = 100, the first inequality A > 2B yields 2B < 100 - 7B/4 + d or equivalently (1) d > 15B/4 - 100. (Observe that if the right-hand side is zero or negative, this condition is automatically satisfied for every positive d.) Similarly, the last inequality 3C > A yields 9B/4 - 3d > 100 - 7B/4 + d or equivalently (2) d < B - 25. We immediately see from (2) that B needs to be larger than 25 as d is positive. Furthermore, in order for (1) and (2) to hold simultaneously, we have to have 15B/4 - 100 < B - 25, which means that B < 300/11. Thus, all real solutions are - Pick B with 25 < B < 300/11, - Pick d > 0 with 15B/4 - 100 < d < B - 25 and let C = 3B/4 - d, - Let A = 100 - B - C. From this, we can also easily deduce that the solution within the integers is unique: (i) There are only two possible integer values for B, namely 26 and 27. (ii) If B = 26, then the condition for d is 0 < d < 1 (the right-hand side in (1) is negative and thus (1) is automatically satisfied). In order for C = 3B/4 - d = 39/2 - d to be an integer, we have to have d = 1/2, which yields the known solution C = 19 and A = 55. (iii) If B = 27, then the condition for d is 5/4 < d < 2. But C = 3B/4 - d = 81/4 - d can only be an integer if d is 1/4 plus an integer. Since the admissible range for d does not contain such a value, there is no solution in this case.
my thoughts: if we assume those are all equations instead of inequalities, then a=2b=3c => a+b+c=6x+3x+2x=11x => a=6/11*100=54.5454... ~= 55. from this we can determine - b=19 these add up to 101, so we need to decrease something by 1 also just to check, 19*4 = 76 < 81 = 27*3 i think its safe to just decrease b, so: apple = 55 banana = 26 cherry = 19 and to confirm: 55 > 52=26*2 26*3=78 > 76=19*4 19*3=57 > 55
It was pretty easy and fast to do in a trial and error fashion. We know for sure that apple > 1 banana > 1 cherry and they summed up together cannot exceed 100 and cannot go under 100. First create 3 imaginary numbers for each of the fruits that cause the first two rules (apple > 2 bananas, 3 bananas > 4 cherries) to apply. And from there, simply negate 1 from apple and add 1 to cherry if 3 cherries are smaller than 1 apple or add 1 to apple and remove 1 from cherry if 3 cherries are bigger than 1 apple, but also bigger than 3 bananas
Sorry UA-cam isn’t saving comments so I’ll have to finish this explanation later. I also mixed up the terms a couple times but I can’t edit my comment for some reason
No guessing, no graphing, no calculator solution: let a=2b+d where d>0, let 3b = 4c+e (*) where e>0, the last inequality gives c>2e+3d, so let c=2e+3d+f where f>0. Take (*) mod 3 to get 0 = c+e = f mod 3, so let f=3g where g>0. Then 11e+16d+5g=100. We have 11(e+d) < 100 and taking mod 5 gives e+d=0 mod 5, so e+d=5, giving d+3g=9. We have d e=2, now substitute everything back to get a=55, b=26, c=19.
Ahh yes. Using the what I call brute force approach which is basically what I use every time. Find the answer first then reverse that to find the working so that you get full marks.
My method was similar to yours. Let A=n. From A>2B we get max(B)=n/2. From 3B>4C :: (3/4)B>C we get max(C)=(3/4)B = (3/4)(n/2) = 3n/8. Given that the numbers don't have much room to move around i approximated the numbers as their maximums. Adding them all up we get 15n/8 = 100 thus n=53.33... . From there it's the exact same trial and error as yours. This method doesn't feel like guesswork (it's much more intuitive) and it only took like 3 minutes
I found this solution which doesn't require guessing, after working backwards from the answer. From the given constraints, 3C > A > 2B > 8/3 C, so 8/3 C < A < 3C, and 4/3 C < B < 3/2 C. As a result: 8/3 C + 4/3 C + C < A + B + C < 3C + 3/2 C + C 5C < 100 < 11/2 C 18.18... < C < 20 So C = 19. We get: A + B = 81 and 50 < A < 57 and 25.33... < B < 28.5 and A > 2B Plugging A = 81 - B and simplify, we get: 24 < B < 31 and 25 < B < 29 and B < 27 So B = 26. This yields the only solution: A = 55, B = 26, C = 19
Out of curiosity, how were the rest of the solutions calculated? I assume it would be rather easy to make a program do it, but without trying everything isn't it a pretty tedious thing to do?
@@Skiringen Let's see, firstly, I did write some Python code. Very bad python code which consists of 3 for loops and 4 if statements, but it solved it in around 1.5 seconds. To do this manually, I assume you mean by checking every answer. Which you technically can do, just make a system on how you gooing to aproach it, write out the numbers and check it against the conditions, if one doesn't even match, just move onto the next one, eventually you are going to hit the answer. If you mean manually by calculating it, well, the above video told you how to do it manually in that way. There really is no good way of writing down numbers and just trying over and over again until it works.
Before watching the video my 'instinctual' answer was 55, 27, 18 (off by a little) based on years of Fantasy Football dividing up the winnings for 1st, 2nd, and 3rd place.
Took me 30 minutes to solve. But after that, I felt like Albert Einstein for a short time. Because in the end there were 20 solution. Not much success I guess
I needed a few minutes and calculator. Apple = x, banana = y, cherry = z. We have: x > 2y 3y > 4z 3z > x So 3z = 2y (for more accurate result) Just guessing about minimal (but right) numeric that can do the conditions. So x = 23, y = 11 and z = 8. But 23 + 11 + 8 ≠ 100 42 ≠ 100 42 × t = 100 t = 50/21 We need to multiply x, y and z to get 100. x = 23 × 50/21 x = 1150/21 y = 11 × 50/21 y = 550/21 z = 8 × 50/21 z = 400/21 That's it. 1150/21 + 550/21 + 400/21 = 100. Every condition is true 1150/21 > 2(550/21) 3(550/21) > 4(400/21) 3(400/21) > 1150/21 3(400/21) > 2(550/21) It wasn't as hard as interesting. I spent only 6 minutes, lol. But i guessed quite a lot)
There is an analytical way to find the solution A = 55, B = 26, C = 19 and prove its uniqueness without guesswork. Here's my process. First I write the inequalities A > 2B 3B > 4C 3C > A As the three equalities A = 2B + X 3B = 4C + Y 3C = A + Z where X, Y and Z are all positive integers. Solving the above system of equation allows to write A, B and C as A = 9X + 6Y + 8Z B = 4X + 3Y + 4Z C = 3X + 2Y + 3Z The condition A+B+C=100 can therefore be written as A+B+C = 16X + 11Y + 15Z = 100 which can be solved for X as X = 6 - (11Y + 15Z - 4)/16 Since X must be an integer, the term in parentheses must be a multiple of 16, which means it must be an even number. Given that 11 and 15 are both odd numbers, their linear combination 11Y + 15Z must be even, which occurs when the sum or Y and Z is even, i.e. Y + Z = 2N With N being again a positive integer. This allows us to express Z as Z = 2N - Y Substituting the expression for Z in the expression for X gives X = 6 - (15N - 2(Y+1))/8 in which the term in parentheses must be a multiple of 8 for X to be an integer, i.e. 15N - 2(Y+1) = 8M which we can solve for Y as Y = (15N - 8M)/2 - 1 Since Y is also an integer, the term in parentheses in the previous equation must be even, which can only happen if 15N is also an even number. This condition requires N = 2P Which allows to rewrite Y as Y = 15P - 4M - 1 So we can now rewrite also the expressions for X and Z in terms of the positive integers M and P as X = 6 - M Z = -11P + 4M + 1 Which finally allows us to write A, B and C in terms of M and P: A = 56 + 2P - M B = 25 + P C = 19 - 3P + M Notice that the above expressions for A, B and C satisfies the condition A+B+C=100 for any value of P and M, which a sanity check that the expressions are still coherent with the statement of the problem after all the previous manipulations. But we still need to select appropriate values of M and P to obtain a solution. If we substitute the expressions for A,B and C, the three inequalities A > 2B 3B > 4C 3C > A reduce to 6 > M (i) 15P > 1 + 4M (ii) 1 + 4M > 11P (iii) Inequality (iii) can also be written as P < (1+4M)/11 which imposes an upper limit to the value of P for every given value of M. This upper limit however cannot be smaller than 1, given that P is defined as a positive integer, which gives the condition (1+4M)/11 > 1 which can be written as M > 2.5 (iv) Given that M must be an integer, conditions (i) and (iv) restrict its possible values only to the numbers 3, 4 and 5. For M=3, conditions (ii) and (iii) together read 1 - 2/15 < P < 1 + 2/11 Which is satisfied only by the integer value P=1, which gives the solution A = 55 B = 26 C = 19 This proves that the solution exists (and we found it). As for its uniqueness, notice that for the only two other possible values of M={4,5}, conditions (ii) and (iii) respectively read 1 + 2/15 < P < 1 + 6/11 and 1 + 6/15 < P < 1 + 10/11 which can never be satisfied by any integer value of P. This proves that the solution is unique.
@Cowieman sure you can do that. that's a computational "brute force" approach: you can also write an iterative code that does that calculation for you. I wanted to see if I could find an analytical solution, with the least amount of blind computations involved, by using the properties and restrictions of the problem (e.g. integers, even numbers, etc). In the end it's not about answering the question, but which answer do you give and why
These are different symbols, so you cannot properly do this math. For instance, are leaves worth anything? How about the value of a stem, does that change depending on its length? If this was a+b+c=100, a>2b, 3b>4c, 3c>a, this would be workable, but that's not what we have here.
This isn't the way to do it since math isn't about guessing and that "trial and error" technique isn't a valid thing to use. If this was in a math competition you would get 0 points
Took me a bit but i got 55+26+19=100 55>52 78>76 57>55 Realized that banana cannot be greater or equal to half of apple. Also figured cherry is less than banana. Then i Realized apple cannot be under 51 since cherry also cannot be greater than or equal to half of apple. Then found out cherry had to be at least a third of apple. Then it was a matter of inputing random stuff. Went from Apple=51 to 57 to 56 to 55. Nice challenge
Here's the problem with all of these types of problems in as brief a manner as I can articulate. If banana picture is B, then the picture of two bananas is D. It's the same issue with the cherries. We don't have two copies of the same picture. We have two different pictures. Which means we ultimately have a bunch of variables and no way to solve for them. Now, all of this is easily solved by stating that a picture of two bananas is equivalent to two times the picture of one banana, but no one ever does that (except for here in this video).
@@SomeCowguy I understand the intent of a picture of two bananas being twice the value of a picture of one banana as used in the video. However, when you encounter this sort of stuff on Facebook, it's almost always designed to be deceptive. For example, if you check the other comments here, you'll see people stating they didn't see the second banana, or they didn't realize the number of cherries was different in the various pictures. In order to preempt the intentional misdirection, I argue that we don't actually have two bananas. We have an icon on the screen in the shape of bananas. If it was actually bananas, then yes, two bananas is 2B and one banana is B. We only have pictures though, and a picture of two bananas is D while a picture of one banana is B. Again, I understand that a picture of two bananas is meant to represent 2B, but these posts are typically meant to trip people up so the poster can be pedantic when someone gets the wrong answer. I choose to be pedantic first just to tease them. I'm not saying anyone has done anything wrong either.
Wow i really thought math can give us the exact value and how many possible answers there are for this problem following some procedure but i guess there is always some fascinating things in mathematics that are yet not discovered or just can’t be possible
You can actually get the exact values without guessing. But only because the problem works with positive integers and is designed to have only one solution.
I wanted to verify the claim without watching the video, so I took a few minutes and found 55 26 19. Wasn't too easy, took me at few minutes. Started by assuming >= to get an idea of the ratio, so I got 6 3 2. Then I multiplied by 10, and knew I had 10 more than necessary to eliminate. Then I checked against the original strictly superior condition, which told me what I needed. I first did the easiest part, reducing 60 to 55 and 30 to 25 so it would total 80. Then I reduced 20 to its theoretical limit (55/3 is about 18.8) getting me to 55 25 19 = 99. Then it was a single step to get to 55 26 19.
I took this as a challenge to do mentally. And I did. Consider the inequalities as eqn 1,2,3. Add 1,2 then 2,3 then 1,3. And b = 100 - a - c. We get that cherry has to be less than 20 and bananas greater than 25. Also cherry is greater than 2/3 bananas. That should mean bananas can't be greater than 28. Now only 26 and 27 have to be checked. Use eqn 1 to verify. It took 5 minutes. I didn't watch the video sorry.
Well, isn't this supposed to be an elementary school problem? Using fraction numbers seems to ruin the beauty. I feel the original problem is supposed to be solved like this: A + B + C = 100 & A > 2B => 100 > 2B + B + C = 3B + C & 3B > 4C => 100 > 5C => C < 20 (max 19) Similarly A + B + C = 100 & 3C > A => 100 < 3C + B + C = B + 4C & 3B > 4C => 100 < 4B => B > 25 (min 26) Now with A > 2C we get A > 52(min 53), and if A = 53 => B= 26 => C = 21, too big So A >= 54 that means C is fixed at 19 Then it's trivial to get B = 26 and A = 54
The type of this problem in general is called an 'Integer Programming Problem' for anyone interested, and it is in fact 'actually hard' in the mathematical sense that it's NP-hard.
Wtf
NP mean non-polynomial, which mean that it’s hard for computers to do, and a similar problem with more terms would rapidly grow in difficulty, until it was unimaginably hard for people and computers to solve.
@@benjamincruz6633 That's a common misconception. Although your idea is right, NP stands for nondeterministic polynomial time, meaning problems that are verifiable in polynomial time, but without known polynomial time solutions. Ironically, NP-hard problems are not necessarily in NP. Integer Programming, however, is not just NP-hard but also NP-complete, meaning it is in NP and be reduced to known NP-complete problems (Wikipedia gives a simple reduction to the Vertex Cover problem), and can be verified in polynomial time. Whether or not a polynomial time solution exists is a question yet to be definitively answered, although most people suspect not.
it' not that hard to programm it, I've done that in 10 minutes
@@Fero_36it's about execute time, not write time
I really liked this, it was interesting! I took a somewhat different approach:
- You can combine A>2B with A+B+C=100 to get 2B+B+C
Interesting solution!
Yeah, I somewhat did that as well. This one generally takes more trial and error, though doing that simplifies it by quite a bit!
I just threw it in Desmos and got the solution that way, changing the first equation from x+y+z=100 to z=100-(x+y)
I actually found the same results as yours, just the variable Naming is different
@@kylaxial I have eliminated the first equation the same way, and after that it turned into a super easy problem, because you can decouple the equation for B and C "mechanically", so you can rewrite them into a very simple form where the whole solution space is trivial. Basically it can be solved by following the recipe, no out of the box thinking is required.
A bit disappointing, I have expected it to be much harder, but I am really out of practice with these kind of integer problems, so my expectation were quite off.
I found a solution in 2b
3b > 4c
3c > a
My first step was to get rid of a variable and I chose a as its coefficient is always 1.
a = 100 - b - c
so we are left with
100 - b - c > 2b
3b > 4c
3c > 100 - b - c
I then rearranged them to have 1b on the left for each inequality
b > 4/3 c
b > -4c + 100
b < -1/3c + 100/3
These are linear inequalities and can be easily graphed. Doing so gives a region where the only point with integer values for both x and y is (19, 26)
so c = 19 and b = 26
a = 100 - 26 -19 = 55
a = 55
b = 26
c = 19
In a way though, you did guess - just a little. Graphing could almost be thought of as evaluating all guesses at once, and selecting the values that meet the criteria as a final guess. Still a very good solution, but not *technically* entirely guess-free, in an abstract sense, for certain definitions of 'guess'.
@@2001herne I don't see how viewing the solution set and then applying the integer restriction is any different from eliminating a variable and then establishing a system of linear inequalities. If the layering of criteria constitutes making a guess, then all mathematical procedures are guesswork. Does that accurately represent your intention or am I missing something?
By the way, my intended meaning of "guess" was like "guess and check." I did not posit an answer before discovering it.
I did the exact same thing but I took the long way and wrote c as 100-a-b. Along the way I somehow added x/2 + 4x/3 = 7x/6 and shaded the wrong side of the graphs and got results such as 54.5426.6 before finding out my embarrassing mistake via desmos. I think this approach is more challenging, which makes it feel better when you finally solve it.
@@wafflegamerxox6575 I actually disagree with this approach being more challenging. Brute force methods, even with reduced ranges, are computationally expensive. Efficient algorithms are far superior. I had no difficulty with this method, but guessing and checking would have been mentally strenuous. Laziness is a mathematician's best friend.
What is generally difficult and non-trivial about these types of problems is not the act of solving them, but rather the discovery of an appropriate algorithm. I personally find satisfaction when a problem requires a non-obvious insight which leads to an elegant solution. I think this is more likely to have been what you meant than the way I read it (as I responded in the first paragraph).
@@exeatop8044 It’s different because even with a “guess and check”, there is an unknown variables you’re trying to solve for and the only way you could narrow it down is through guessing and checking. With graphs and using integer restriction, you are basically scrolling through a bunch of possible solutions and finding which fits. It’s how graphing is done rather than what you actually did mentally. Electronically, it narrowed things down for you.
Other mathematical procedures are different since they don’t guess values, and instead give an answer without any checking. It’s basically narrowing things down until an answer pops out.
I actually completely ignored the 100 and focused on the A>2B, 3B>4C, 3C>A. Just pick a few random numbers, fine-tune until you get the distribution right, scale up and fine-tune one last time.
After 1 minute I got to A=41, B=20, C=14, A+B+C=75. Not quite 100 but 41>40, 60>56 and 42>41. Just need to scale it up.
41/75*100 ≈ 54.6
20/75*100 ≈ 26.6
14/75*100 ≈ 18.6
Fine-tune and you get A=55, B=26, C=19. Took like 3 minutes total. But saying that this is a "hard" problem actually made it "easier" since I automatically assumed that there wont be much wiggle room, which probably helped me pick the right numbers quicker.
You didnt show that this was the only solution
4:45
From here we can obtain
5.5C > 100 > 4.9C by adding the both inequalities and then add C.
Next we will obtain
20 >= C > 18.
Let's continue
If C = 20
then
3B > 4C = 80
Now we obtain
A + B > 2B + B = 3B > 80.
Then A + B + C > 100.
We get a contradiction therefore C = 19.
Continue again
Now C = 19.
Hence A + B = 100 - 19 = 81
We obtain
A + B > 3B
81 > 3B > 4C = 76
Then 3B = 78 since 3B is a multiple of 3. We obtain B = 26, and then immediately we obtain A = 81 - 26 = 55.
Yes, unique solution.
Yup, that's how i solved it too. Simpler to guess just C than both A and B
I like this approach since it has algebra and all you can do is check all the cases bounded
If you don't round down the fractions you get 5.5C>100>5C and that straight up gets you to C=19.
By pure chance i got it first try, i was trying to prove that a "big" value for B was not possible, so I assumed it to be 26 or greater, then i started working on the consequences of such assumption, trying to reach a contradiction, but everything worked nice so I checked and got there at the end.
So glad to see my boy quasimoto teaching other people math instead of being America’s most blunted
2:00 Okay, we can do that
for a in range(98):
for b in range(98):
for c in range(98):
if a + b + c == 100 and a > 2 * b and 3 * b > 4 * c and 3 * c > a:
print(a, b, c)
my attention span on waiting to solve problems cant be longer than 160ms :(
for A in range(98):
for B in range(98):
for C in range(98):
if (A+B+C) == 100 and A > B*2 and B*3 > C*4 and C*3 > A:
print (f'A = {A} B = {B} C = {C}')
Python: everybody's favorite language :)
in fstrings you can use {A = } instead of A = {A} f.ex f'{A = }\t{B = }\t{C = }'
Your solution is technically not correct, python range does not include the upper bound. it starts from 0. So it should be range(1, 99) instead.
at 6:43 i wonder if we could also get an upper bound for every number, and then further decrease our bounds , and then create a For loop of c, b and a is derived from the others, the For loop goes from Cs min to Cs Max, and Bs min to Bs max, and then we discard any A's above our max and below our min. and we get every lattise point that solve this equasion.
#Brute force solution.
for a in range(101):
for b in range(101):
for c in range(101):
if a+b+c==100:
if a>2*b:
if 3*b>4*c:
if 3*c>a:
print(a,b,c)
#Answer: 55,26,19
#No need to fret!
instead of dividing you can end up with 9c>3a>6b>8b
from there you can get 18c>6a>16c 9c>6b>8b add with 6c everywhere to get
33c>600>30c so from one side you get 20>c and form other c>18.1
and since c has to be an integer there is only one c=19
Great video! Surprised to see no comments here, you definitely deserve way more!
Psst, let's check my solution in my comment.
My first thought was linear programming via simplex method. Otherwise, we can transform this problem into dynamic programming problem
imagine dynamic programming a facebook fruit problem lmao. and also a space of 10^6 fits within the time limits of 10^8 operations.
i solved it using linear algebra, should I share my genius thought process with my professor?
4:42 You should actually keep the fractions as long as possible, because inaccuracies don't arise until you approximate.
So for example, you can put A + B + C = 100 in between those equations and get
C * (8/3 + 4/3 +1) < 100 < C * (3 + 3/2 + 1)
5C < 100 < 5.5 C => 20 > C > 18.(18) => C = 19, for sure this time.
With 3B > 4C => B > 25.(3)
And with 3C > 2B => B < 28.5
And remember that A > 2B, so for B = 26, A > 52 and for B = 27, A > 54, and for B = 28, A > 56
And since 3C > A, for C = 19 => A < 57
With B = 28, A >56, but A < 57, so B is not 28.
And with A + B + C = 100 => A + B = 81, so if B = 27, A = 81 - 27 = 54 (false)
This means that the only correct solution is:
A = 55, B = 26, C = 19
Quite hard. It's took me about an hour, but quite a cool problem
Brute forcing this problem took me about 3 minutes to write the code, and 120ms to run it.
a=55 b=26 c=19
I kind of hate speaking computers.
You can actually narrow down C to 19 by bounding it with approximations of the highest and lowest possible values of A and B. So you assume B=1.5C and A=3C to conclude that C>18, and assume B=(4/3)C and A=(8/3)C to conclude that C
wait just to make sure i'm not hallucinating, you didn't put any coefficients in front of the fruits right?
(oh I get it I'm supposed to recognize that you have two bananas there. tricky)
I started by realizing that A had to be greater than 50 because it was greater than 2B and greater than 2C, so it was greater than B+C and therefore over half of the 100. From there, C had to be between 2/3 and 3/4 of B and it was trial and error from then on
An apple is over 8/3 cherries
Everybody using triple nested loops all from 1 to 98 disappoints me. You can easily reduce your brute force solutions from 98^3 = 941,192 combinations to 99 choose 2 = 4,851 combinations:
for A in range(1, 99): # A from 1 to 98
for B in range(1, 100-A): # B from 1 to 98 when A = 1, just 1 when A = 98
C = 100 - A - B # Even if you loop B from 1 to 98, just check that C > 0 instead of A + B + C == 100, giving 9,604 combinations
if A > 2*B and 3*B > 4*C and 3*C > A:
print(f'{A = } {B = } {C = }')
This was harder than the normal Facebook math stuff but still pretty easy, maybe just because all the numbers were relatively small and easy to work with
I just wrote a script to manually go through all one million possible combinations until it worked...
Well, it worked!
the method I used was to pick values for B (starting from 1,2,3... etc) and use the first two inequalities to find a value for A and C in the following way:
for C (3B > 4C) multiply B by 3 (3B) then find the largest multiple of 4 that is less than 3B and divide it by 4 to get C)
for A (A > 2B) multiply B by 2 (2B) then add 1
then take the 3 values and test the final inequality (3C > A)
using a spreadsheet I found the values of A,B and C up to about 100 (using the above method) and seperated out the cases where the 3rd inequality is also satisfied, then added them up.
none of them added to 100 but one of them (53, 26,19) added to 98 and adding 2 to A (to make 55) didn't affect the 1st and 3rd inequality so I got 55, 26, 19
Of course we can do less than a million combinations... in minutes! Write a little program! Writing will last longer than actually running it! And writing it is easy a piece of cake!
I would have multipled across by 3 to eliminate the 8/3 and gone from there
a=55, b=26, c=19
The moment you said "is actually hard", and that I saw that inequalities were involved and that the system is underconstrained (implying all numbers must be integers), I decided "to hell with solving it myself, I'll just plug it into 3 for loops of 100 iterations and see what the answer is".
And yes, I realize now I could've just had 2 for loops and set c to 100-a-b, but I didn't feel like even trying.
I just noticed, ABC (while being the most common math terms for this kind of equation) can represent apples, bananas, and cherries respectively, maybe thats why they used those fruit specifically
I did the whole math problem in my head, and didn't even notice that til the video used the letters for representation. Well played, problem creator.
Here was my solution:
Given the inequality 3c>a>2b, I added c to each part, giving
3b>4c>a+c>2b+c
Now, rewriting the top equation yields a+c=100-b.
Then, by substitution and adding b to each part, we are left with 4b>4c+b>100>3b+c, proving b>=26.
Then, by the original inequalities, a>=53 and c>=18, yielding a minimum sum of 97. From here, I noticed you can only increase c by 1 to maintain the inequalities, which then allows a to be increased by to, giving the solution a=55, b=26, c=19
You guys should checkout linear integer programming and simplex method
3:30 No, bringing in decimal representations is even worse! You hate fractions? Then multiply up by 3. 9c > a > 2b > 8c.
You forgot to multiply the a & 2b by 3. The actual inequality should be:
9c > 3a > 6b > 8c
Hope that helps! :)
i had an image pop into my head of the generalized riemann hypothesis except some symbols are replaced by fruit
thats a great idea to make and post on facebook
the real problem is the voice changer
You really don't need guessing with this. It's a very interesting problem. The key is the solution has to be an integer. Here's how I approached it.
A + B + C = 100
rewrite to A = 100 - B - C ---- This is equation 1
substitute equation 1 to A > 2B
100 - B - C > 2B
100 - C > 3B --- This is equation 2
Substitute equation 1 to 3C > A
3C > 100 - B - C
4C > 100 - B ---- This is equation 3
Substitute equation 2 into 3B > 4C
100 - C > 4C
100 > 5C
20 > C ---- Therefore the biggest possible solution for C is 19
Substitute equation 3 into 3B > 4C
3B > 100 - B
4B > 100
B > 25 --- Therefore the smallest possible solution for B is 26
We also know 3C > A > 2B
Because the biggest and smallest solutions for C and B respectively is 19 and 26, we can bind A into
57 > A > 52
This also limits our solution for C to 19 or 18 because if C is 17, then 3C would be lower than 52.
Also, B is bound to 26, 27, or 28, since if B is 29, 2B will be more than 57
if B is 27, that means 3B > 4C becomes 81 > 4C. since the answer is an integer, the next lowest possible solution for this is 80. This makes C be 20 which is not possible. For the same reason we can also rule out 28, making 26 be the only possible solution for B
We now have A + 26 + C = 100 which gives us A + C = 74
If C is 18, A is 56. This is not possible because it violates 3C > A
Therefore we have A = 55, B = 26 , C = 19
How to make math fun
The way you solved that was foul, but it was very satisfying to see it work out!
How I attempted this was looking for when the inequality breaks, A>2B, therefore,3C>2B, because C has a constant that is bigger than B constant, B must be bigger than C for when the expressions, 2B is bigger than 3B, i.e when C is 1 and B is 2, 3C = 3and 2B = 4, because the expression is 3C>2B, there is a point for which the inequalities are equal and because A,B and C are whole numbers that are positive this makes the comparison very easy, going up a step when C = 2, and B = 3, 3C = 6 and 2B = 6, this is when they are equal, to fast forward a bit, every other comparison would be a set for which 3C would always be greater than 2B, which would be an infinite set, but we can reduce this set to just a set that contains two elements, because A + B + C = 100, if we go up a step C = 3 and B = 4, 3C = 9 and 2B = 8 , because the equation A+ B + C = 100 is linear, they all share the same constant, so 3*10 = 30 and 4 * 10 = 40 but that would leave 30 left but 3C is bigger than A not equal, and using 9 instead of 10 gives 29 and 36 respectively, leaving 35 , but 35 is not a multiple of 9, so this eliminates the C= 3 and B = 4 pair, TLDR, C = 4 and B = 5 does work! , and 3C = 12, B = 10, 2B
apple is 55, banana is 26, cherry is 19... don't ask how much time i wasted calculating this using just the thumbnail
*Ground* *Rules:*
An apple is over twice a banana (a banana is less than 1/2 an apple)
A bannana is greater than 4/3 cherries (a cherry is less than 3/4 a banana)
A cherry is over 1/3 an apple (an apple is less than 3 cherries)
---------------
A banana is between 4/9 - 1/2 of an apple
A cherry is between 1/3 - 3/8 of an apple
*Finding* *the* *apple’s* *minimum* *value*
Taking the apple’s max,
1/2a + 3/8a + a = 100
1 7/8a = 100
15/8a = 100
100 * 8/15 =
I got it in a few minutes just by ignoring the "=100" at first and figuring out what the minimum value for each number could be. Apple had to be at least 11, banana at least 5, and cherry at least 3.
I got 58, 26, and 16 when I scaled it up.
I thought it was impossible because I didn't process that the number of bananas and grapes changed
I wonder how many of you saying:I USED A COMPUTER TO FIND THE ANSWER would be talking right now if computers didn t exist first you try to solve the problem THE SMART way and then let the computer verify the answers with computational work or else we will end up mindless goons
I completely missed the first part where the greater than parts showed multiple fruit meaning I spent the first 2 minutes trying to understand why he put A>2B and not just A>B
I found that 55 was the smallest a could be to get a sum of 100.
As a>2b, b could at most be the first integer less than a/2. Similarity, c could at most be the first integer less than 3c/4. Example: if a=50, b could at most be 24, and c could at most be 17. But 50+24+17=91
I saw the thumbnail and tried doing it on my own first. I did pretty much the same thing and got answers that fit, but I thought "there has to be a cleaner way that doesn't involve any guess and check". Then I clicked this video to see you do basically the exact same thing, the only difference that I just guessed 3z=x=2b.
Before clicking on the video, I tried solving the math problem in the thumbnail.
My Solving Progress:
3z > x > 2y
3y > 4z > x
y > z
I knew x was the highest, so I started with x = 50, and gave the other half to y and z, keeping z lower than y.
Well it was impossible so I went for x = 55, y = 25 and z = 20.
Then I did the inputs 60 > 55 > 50 // 75 > 80 > 55, and I worked from there.
Quickly, I found the answer: x = 55, y = 26, z = 19 ------ 57 > 55 > 52 // 78 > 76 > 55.
In Conclusion: math is fun
There's no need for approximations nor guessing
Less than a million combinations is easily brute forced by a computer.
I might even.
Actually it's less than 5000 (there are 98 possibilities for a, 98-a possibilities for b and exactly one for c in every case).
Python can do that in seconds flat.
If I wasn't crap at python, this would have been 5 minutes of coding.
Let's do this without the constraint of all values being positive integers and find all solutions within the real numbers.
Because of 4C < 3B, we can replace C by 3B/4 - d with positive d. Using A+B+C = 100, the first inequality A > 2B yields
2B < 100 - 7B/4 + d
or equivalently
(1) d > 15B/4 - 100.
(Observe that if the right-hand side is zero or negative, this condition is automatically satisfied for every positive d.)
Similarly, the last inequality 3C > A yields
9B/4 - 3d > 100 - 7B/4 + d
or equivalently
(2) d < B - 25.
We immediately see from (2) that B needs to be larger than 25 as d is positive. Furthermore, in order for (1) and (2) to hold simultaneously, we have to have
15B/4 - 100 < B - 25,
which means that
B < 300/11.
Thus, all real solutions are
- Pick B with 25 < B < 300/11,
- Pick d > 0 with 15B/4 - 100 < d < B - 25 and let C = 3B/4 - d,
- Let A = 100 - B - C.
From this, we can also easily deduce that the solution within the integers is unique:
(i) There are only two possible integer values for B, namely 26 and 27.
(ii) If B = 26, then the condition for d is 0 < d < 1 (the right-hand side in (1) is negative and thus (1) is automatically satisfied). In order for C = 3B/4 - d = 39/2 - d to be an integer, we have to have d = 1/2, which yields the known solution C = 19 and A = 55.
(iii) If B = 27, then the condition for d is 5/4 < d < 2. But C = 3B/4 - d = 81/4 - d can only be an integer if d is 1/4 plus an integer. Since the admissible range for d does not contain such a value, there is no solution in this case.
my thoughts:
if we assume those are all equations instead of inequalities, then a=2b=3c => a+b+c=6x+3x+2x=11x => a=6/11*100=54.5454... ~= 55.
from this we can determine
- b=19
these add up to 101, so we need to decrease something by 1
also just to check, 19*4 = 76 < 81 = 27*3
i think its safe to just decrease b, so:
apple = 55
banana = 26
cherry = 19
and to confirm:
55 > 52=26*2
26*3=78 > 76=19*4
19*3=57 > 55
Bro I didn't notice that there were different amounts in the bunches and so read it as a > b > c > a lol
It was pretty easy and fast to do in a trial and error fashion. We know for sure that apple > 1 banana > 1 cherry and they summed up together cannot exceed 100 and cannot go under 100. First create 3 imaginary numbers for each of the fruits that cause the first two rules (apple > 2 bananas, 3 bananas > 4 cherries) to apply. And from there, simply negate 1 from apple and add 1 to cherry if 3 cherries are smaller than 1 apple or add 1 to apple and remove 1 from cherry if 3 cherries are bigger than 1 apple, but also bigger than 3 bananas
Sorry UA-cam isn’t saving comments so I’ll have to finish this explanation later. I also mixed up the terms a couple times but I can’t edit my comment for some reason
No guessing, no graphing, no calculator solution: let a=2b+d where d>0, let 3b = 4c+e (*) where e>0, the last inequality gives c>2e+3d, so let c=2e+3d+f where f>0. Take (*) mod 3 to get 0 = c+e = f mod 3, so let f=3g where g>0. Then 11e+16d+5g=100. We have 11(e+d) < 100 and taking mod 5 gives e+d=0 mod 5, so e+d=5, giving d+3g=9. We have d e=2, now substitute everything back to get a=55, b=26, c=19.
Ahh yes. Using the what I call brute force approach which is basically what I use every time.
Find the answer first then reverse that to find the working so that you get full marks.
Bro sounds like Winner from TPOT
Very fun problem!
I solved this on paper by finding that 9 bananas > 12 cherries > 8 bananas and then bruteforced it by estimating how big numbers I need.
My method was similar to yours. Let A=n. From A>2B we get max(B)=n/2. From 3B>4C :: (3/4)B>C we get max(C)=(3/4)B = (3/4)(n/2) = 3n/8. Given that the numbers don't have much room to move around i approximated the numbers as their maximums. Adding them all up we get 15n/8 = 100 thus n=53.33... . From there it's the exact same trial and error as yours. This method doesn't feel like guesswork (it's much more intuitive) and it only took like 3 minutes
I found this solution which doesn't require guessing, after working backwards from the answer.
From the given constraints, 3C > A > 2B > 8/3 C, so
8/3 C < A < 3C, and
4/3 C < B < 3/2 C.
As a result:
8/3 C + 4/3 C + C < A + B + C < 3C + 3/2 C + C
5C < 100 < 11/2 C
18.18... < C < 20
So C = 19. We get:
A + B = 81 and
50 < A < 57 and
25.33... < B < 28.5 and
A > 2B
Plugging A = 81 - B and simplify, we get:
24 < B < 31 and
25 < B < 29 and
B < 27
So B = 26.
This yields the only solution:
A = 55, B = 26, C = 19
Out of curiosity, how were the rest of the solutions calculated? I assume it would be rather easy to make a program do it, but without trying everything isn't it a pretty tedious thing to do?
I can see no reason not to program it. Less than a million options, that's not a lot of run time even for bad code to check this.
@@Qermaq Yeah exactly, I'm mostly curious about how you would go about doing it manually even if it's obviously the harder option.
@@Skiringen Let's see, firstly, I did write some Python code. Very bad python code which consists of 3 for loops and 4 if statements, but it solved it in around 1.5 seconds. To do this manually, I assume you mean by checking every answer. Which you technically can do, just make a system on how you gooing to aproach it, write out the numbers and check it against the conditions, if one doesn't even match, just move onto the next one, eventually you are going to hit the answer. If you mean manually by calculating it, well, the above video told you how to do it manually in that way. There really is no good way of writing down numbers and just trying over and over again until it works.
Before watching the video my 'instinctual' answer was 55, 27, 18 (off by a little) based on years of Fantasy Football dividing up the winnings for 1st, 2nd, and 3rd place.
Took me 30 minutes to solve. But after that, I felt like Albert Einstein for a short time. Because in the end there were 20 solution. Not much success I guess
20 possibilities you needed to test or 20 working values? (disregarding positive integer at start of video)
@@Thymed 20 working values, you can see them end of the video
@@onurbikic no, there is only a unique solution. The 20 solutions in the end is the solution of modified problem.
@@admink8662 oh, thanks, I thought they are correct too. Sorry for misleading
Does anyone else feel like solving this with fractions or decimals is a little much?
Is there a way to solve this purely through algebraic solution without graphing or guess and check?
there is multiple possible solutions, takes like 40 secs tops to solve
I don't even know how I did it, tested a few values and it just worked.
Nice, I guess! X)
apple = 60, banana = 19, cherry = 21
I needed a few minutes and calculator. Apple = x, banana = y, cherry = z.
We have:
x > 2y
3y > 4z
3z > x
So 3z = 2y (for more accurate result)
Just guessing about minimal (but right) numeric that can do the conditions.
So x = 23, y = 11 and z = 8.
But 23 + 11 + 8 ≠ 100
42 ≠ 100
42 × t = 100
t = 50/21
We need to multiply x, y and z to get 100.
x = 23 × 50/21
x = 1150/21
y = 11 × 50/21
y = 550/21
z = 8 × 50/21
z = 400/21
That's it.
1150/21 + 550/21 + 400/21 = 100.
Every condition is true
1150/21 > 2(550/21)
3(550/21) > 4(400/21)
3(400/21) > 1150/21
3(400/21) > 2(550/21)
It wasn't as hard as interesting. I spent only 6 minutes, lol. But i guessed quite a lot)
nice video!
There is an analytical way to find the solution A = 55, B = 26, C = 19 and prove its uniqueness without guesswork. Here's my process.
First I write the inequalities
A > 2B
3B > 4C
3C > A
As the three equalities
A = 2B + X
3B = 4C + Y
3C = A + Z
where X, Y and Z are all positive integers.
Solving the above system of equation allows to write A, B and C as
A = 9X + 6Y + 8Z
B = 4X + 3Y + 4Z
C = 3X + 2Y + 3Z
The condition
A+B+C=100
can therefore be written as
A+B+C = 16X + 11Y + 15Z = 100
which can be solved for X as
X = 6 - (11Y + 15Z - 4)/16
Since X must be an integer, the term in parentheses must be a multiple of 16, which means it must be an even number. Given that 11 and 15 are both odd numbers, their linear combination 11Y + 15Z must be even, which occurs when the sum or Y and Z is even, i.e.
Y + Z = 2N
With N being again a positive integer. This allows us to express Z as
Z = 2N - Y
Substituting the expression for Z in the expression for X gives
X = 6 - (15N - 2(Y+1))/8
in which the term in parentheses must be a multiple of 8 for X to be an integer, i.e.
15N - 2(Y+1) = 8M
which we can solve for Y as
Y = (15N - 8M)/2 - 1
Since Y is also an integer, the term in parentheses in the previous equation must be even, which can only happen if 15N is also an even number. This condition requires
N = 2P
Which allows to rewrite Y as
Y = 15P - 4M - 1
So we can now rewrite also the expressions for X and Z in terms of the positive integers M and P as
X = 6 - M
Z = -11P + 4M + 1
Which finally allows us to write A, B and C in terms of M and P:
A = 56 + 2P - M
B = 25 + P
C = 19 - 3P + M
Notice that the above expressions for A, B and C satisfies the condition A+B+C=100 for any value of P and M, which a sanity check that the expressions are still coherent with the statement of the problem after all the previous manipulations. But we still need to select appropriate values of M and P to obtain a solution. If we substitute the expressions for A,B and C, the three inequalities
A > 2B
3B > 4C
3C > A
reduce to
6 > M (i)
15P > 1 + 4M (ii)
1 + 4M > 11P (iii)
Inequality (iii) can also be written as
P < (1+4M)/11
which imposes an upper limit to the value of P for every given value of M. This upper limit however cannot be smaller than 1, given that P is defined as a positive integer, which gives the condition
(1+4M)/11 > 1
which can be written as
M > 2.5 (iv)
Given that M must be an integer, conditions (i) and (iv) restrict its possible values only to the numbers 3, 4 and 5.
For M=3, conditions (ii) and (iii) together read
1 - 2/15 < P < 1 + 2/11
Which is satisfied only by the integer value P=1, which gives the solution
A = 55
B = 26
C = 19
This proves that the solution exists (and we found it). As for its uniqueness, notice that for the only two other possible values of M={4,5}, conditions (ii) and (iii) respectively read
1 + 2/15 < P < 1 + 6/11
and
1 + 6/15 < P < 1 + 10/11
which can never be satisfied by any integer value of P. This proves that the solution is unique.
Or you can just go up and down a few numbers and solve it in your head, without letters and with less effort.
@Cowieman sure you can do that. that's a computational "brute force" approach: you can also write an iterative code that does that calculation for you.
I wanted to see if I could find an analytical solution, with the least amount of blind computations involved, by using the properties and restrictions of the problem (e.g. integers, even numbers, etc).
In the end it's not about answering the question, but which answer do you give and why
4/9 + 1/3 + a = 100
1 7/9a = 100
16/9a = 100
100* 9/16 = 56.25
These are different symbols, so you cannot properly do this math. For instance, are leaves worth anything? How about the value of a stem, does that change depending on its length? If this was a+b+c=100, a>2b, 3b>4c, 3c>a, this would be workable, but that's not what we have here.
What's a bananner?
few lines of code :D
This isn't the way to do it since math isn't about guessing and that "trial and error" technique isn't a valid thing to use. If this was in a math competition you would get 0 points
Took me a bit but i got
55+26+19=100
55>52
78>76
57>55
Realized that banana cannot be greater or equal to half of apple.
Also figured cherry is less than banana.
Then i Realized apple cannot be under 51 since cherry also cannot be greater than or equal to half of apple.
Then found out cherry had to be at least a third of apple.
Then it was a matter of inputing random stuff.
Went from
Apple=51 to 57 to 56 to 55. Nice challenge
Here's the problem with all of these types of problems in as brief a manner as I can articulate. If banana picture is B, then the picture of two bananas is D. It's the same issue with the cherries. We don't have two copies of the same picture. We have two different pictures. Which means we ultimately have a bunch of variables and no way to solve for them. Now, all of this is easily solved by stating that a picture of two bananas is equivalent to two times the picture of one banana, but no one ever does that (except for here in this video).
Banana + banana = 2 banana. Logic follows this as long as its not stated otherwise.
@@SomeCowguy I understand the intent of a picture of two bananas being twice the value of a picture of one banana as used in the video. However, when you encounter this sort of stuff on Facebook, it's almost always designed to be deceptive. For example, if you check the other comments here, you'll see people stating they didn't see the second banana, or they didn't realize the number of cherries was different in the various pictures. In order to preempt the intentional misdirection, I argue that we don't actually have two bananas. We have an icon on the screen in the shape of bananas. If it was actually bananas, then yes, two bananas is 2B and one banana is B. We only have pictures though, and a picture of two bananas is D while a picture of one banana is B. Again, I understand that a picture of two bananas is meant to represent 2B, but these posts are typically meant to trip people up so the poster can be pedantic when someone gets the wrong answer. I choose to be pedantic first just to tease them. I'm not saying anyone has done anything wrong either.
Wow i really thought math can give us the exact value and how many possible answers there are for this problem following some procedure but i guess there is always some fascinating things in mathematics that are yet not discovered or just can’t be possible
Nah, there are ways to solve this without guessing or fudging, the way beanie did it was just one way that was easy to explain
You can actually get the exact values without guessing. But only because the problem works with positive integers and is designed to have only one solution.
I wanted to verify the claim without watching the video, so I took a few minutes and found 55 26 19. Wasn't too easy, took me at few minutes.
Started by assuming >= to get an idea of the ratio, so I got 6 3 2.
Then I multiplied by 10, and knew I had 10 more than necessary to eliminate. Then I checked against the original strictly superior condition, which told me what I needed.
I first did the easiest part, reducing 60 to 55 and 30 to 25 so it would total 80. Then I reduced 20 to its theoretical limit (55/3 is about 18.8) getting me to 55 25 19 = 99.
Then it was a single step to get to 55 26 19.
Why voice changer?
2:02 hahahahaha
a = 55; b = 26; c = 19
50, 24, 16 was my first rough guess from the thumbnail
Got it pretty close :D
When I saw thumbnail I did think that I can solve it in head and I did spend even less time to solve it, so I solve it as this:
1. For a moment let's assume that it's equal, instead of >
2. I start to narrow down equation for each fruit, so 🍎+🍌+🍒= 100 → 2🍌+🍌+🍒= 100 → 3🍌+🍒= 100 → 4🍒+🍒= 100 → 5🍒= 100 → 🍒= 100 / 5 = 20
3. Next fruit: 🍎+🍌+🍒= 100 → 3🍒+🍌+🍒= 100 → 🍌+ 4🍒= 100 →🍌+ 3🍌= 100 → 4🍌= 100 → 🍌= 100 / 4 = 25
5. Get back to equation 🍎+🍌+🍒= 100 → 🍎+ 20 + 25 = 100 → 🍎= 100 - 45 = 55
6. Lets check conditions: 55 > 2 * 25, 55 > 50, True | 3 * 25 > 4 * 20, 75 > 80, False | 3 * 20 > 55, 60 > 55, True
7. So, lets change numbers 1 time to see if it help, 🍎= 55, 🍌= 26, 🍒= 19
8. Check conditions: 55 > 2 * 26, 55 > 52, True | 3 * 26 > 4 * 19, 78 > 76, True | 3 * 19 > 55, 57 > 55, True
9. Answer is 🍎= *55,* 🍌= *26,* 🍒= *19,* 🍎+🍌+🍒= 100, 🍎> 2🍌, 3🍌> 4🍒, 3🍒> 🍎
When I saw this problem I just guessed that c would be 20 and I saw that it didn't work so then I just guessed 19 and it worked haha
55+26+19
it took me way too long
solved it before I clicked the video
1:44 didn't he calculate the number of combinations wrong?
i did these in school
I took this as a challenge to do mentally. And I did. Consider the inequalities as eqn 1,2,3. Add 1,2 then 2,3 then 1,3. And b = 100 - a - c.
We get that cherry has to be less than 20 and bananas greater than 25. Also cherry is greater than 2/3 bananas. That should mean bananas can't be greater than 28. Now only 26 and 27 have to be checked. Use eqn 1 to verify.
It took 5 minutes. I didn't watch the video sorry.
You forgot that all these are positive INTEGERS and not REAL numbers.
Positive whole numbers and positive integers are the same thing, idiot.
There's a much more elegant way to solve this...
PS - why are you afraid of fractions?
Well, isn't this supposed to be an elementary school problem? Using fraction numbers seems to ruin the beauty.
I feel the original problem is supposed to be solved like this:
A + B + C = 100 & A > 2B => 100 > 2B + B + C = 3B + C
& 3B > 4C => 100 > 5C => C < 20 (max 19)
Similarly
A + B + C = 100 & 3C > A => 100 < 3C + B + C = B + 4C
& 3B > 4C => 100 < 4B => B > 25 (min 26)
Now with A > 2C we get A > 52(min 53), and if A = 53 => B= 26 => C = 21, too big
So A >= 54 that means C is fixed at 19
Then it's trivial to get B = 26 and A = 54
I got:
A=43
B=28
C=19
55 + 26 + 19.