Homeostasis logic/math problemDerivative of the coin weight problemMath logic TriangleGetting to the Root of...
Can I legally make a website about boycotting a certain company?
How can guns be countered by melee combat without raw-ability or exceptional explanations?
What is an explicit bijection in combinatorics?
How can I handle players killing my NPC outside of combat?
Is it possible to detect 100% of SQLi with a simple regex?
show notifications of new e-mails without displaying the content
How do I avoid the "chosen hero" feeling?
How do I fight with Heavy Armor as a Wizard with Tenser's Transformation?
How to wrap a figure in exam document?
Is there a way to pause a running process on Linux systems and resume later?
Boss asked me to sign a resignation paper without a date on it along with my new contract
How do I narratively explain how in-game circumstances do not mechanically allow a PC to instantly kill an NPC?
Is the UK legally prevented from having another referendum on Brexit?
Is "accuse people to be racist" grammatical?
Can I travel from country A to country B to country C without going back to country A?
Are there historical references that show that "diatonic" is a version of 'di-tonic' meaning 'two tonics'?
How can I prevent an oracle who can see into the past from knowing everything that has happened?
What is an efficient way to digitize a family photo collection?
Why do single electrical receptacles exist?
In the Lost in Space intro why was Dr. Smith actor listed as a special guest star?
What do "compile" , "fit" and "predict" do in Keras sequential models?
Coworker asking me to not bring cakes due to self control issue. What should I do?
How to write Muḥammad ibn Mūsā al-Khwārizmī?
Is there a celebrity culture in academia and should we discourage it?
Homeostasis logic/math problem
Derivative of the coin weight problemMath logic TriangleGetting to the Root of the ProblemGumball Machine Logic Math PuzzleSimple Math Problem #1To Plunder Treasure IslandsCreate your own custom rulerSimple Math Problem #3Funny Business, Math ProblemUnexpected Delay while Mixing Shots
$begingroup$
I'm trying to derive a generic formula for a programming algorithm. I might be overthinking this or underthinking it... we'll see.
Each of the triangles below represents a container. Each container will transfer a percentage of whatever is transferred into it to the downstream container until a homeostasis is found.
In the diagram, A, B, and C will transfer 50%, 20%, and 30% respectively of what is transferred into them.
Here's what a few iterations of this looks like assuming the first transfer from outside the system is into container A. It's important to note that the amount transferred out of a container at a given iteration would only be a percentage of what is transferred in on the last iteration (i.e., NOT the total already in the container). These numbers appear to be going to a limit (and intuitively they have to be), but I'm not sure what the formula should be.
This is a very simple example, but I'm looking for would need to be able to capture more complex scenarios. This could be done with a brute force approach, but I'm hoping there's a simplified method. As containers are added, things can quickly get out of hand. For example, going from 3 containers to 4 and keeping connections between all of them increases the number of connections from 3 to 6 (I believe this would follow the 1, 3, 6, 10, 15, 21... pattern).
Okay, let's see what you've got, SE.
mathematics calculation-puzzle circuitry
New contributor
$endgroup$
add a comment |
$begingroup$
I'm trying to derive a generic formula for a programming algorithm. I might be overthinking this or underthinking it... we'll see.
Each of the triangles below represents a container. Each container will transfer a percentage of whatever is transferred into it to the downstream container until a homeostasis is found.
In the diagram, A, B, and C will transfer 50%, 20%, and 30% respectively of what is transferred into them.
Here's what a few iterations of this looks like assuming the first transfer from outside the system is into container A. It's important to note that the amount transferred out of a container at a given iteration would only be a percentage of what is transferred in on the last iteration (i.e., NOT the total already in the container). These numbers appear to be going to a limit (and intuitively they have to be), but I'm not sure what the formula should be.
This is a very simple example, but I'm looking for would need to be able to capture more complex scenarios. This could be done with a brute force approach, but I'm hoping there's a simplified method. As containers are added, things can quickly get out of hand. For example, going from 3 containers to 4 and keeping connections between all of them increases the number of connections from 3 to 6 (I believe this would follow the 1, 3, 6, 10, 15, 21... pattern).
Okay, let's see what you've got, SE.
mathematics calculation-puzzle circuitry
New contributor
$endgroup$
$begingroup$
If you connect all nodes then you should connect each pair twice (2 directions), since >3 nodes is not a loop. Your ccw triangle would then be a simplified case with the cw transfers being 0%.
$endgroup$
– amI
5 hours ago
$begingroup$
With the model that I'm going to use this for, transfers are only going to go in one direction for a given connection.
$endgroup$
– SuperCodeBrah
5 hours ago
$begingroup$
OK, but your box will lack symmetry -- the number of transfers from each node cannot be the same (and there will be more than one 'type' of box).
$endgroup$
– amI
5 hours ago
$begingroup$
I agree that it will lack symmetry, but symmetry isn't crucial to the problem I'm trying to solve, even if a lack of symmetry does prevent the possibility of reducing the problem into a relatively simple formula/algorithm. I don't know that such a formula exists, but I'm hoping it does.
$endgroup$
– SuperCodeBrah
5 hours ago
add a comment |
$begingroup$
I'm trying to derive a generic formula for a programming algorithm. I might be overthinking this or underthinking it... we'll see.
Each of the triangles below represents a container. Each container will transfer a percentage of whatever is transferred into it to the downstream container until a homeostasis is found.
In the diagram, A, B, and C will transfer 50%, 20%, and 30% respectively of what is transferred into them.
Here's what a few iterations of this looks like assuming the first transfer from outside the system is into container A. It's important to note that the amount transferred out of a container at a given iteration would only be a percentage of what is transferred in on the last iteration (i.e., NOT the total already in the container). These numbers appear to be going to a limit (and intuitively they have to be), but I'm not sure what the formula should be.
This is a very simple example, but I'm looking for would need to be able to capture more complex scenarios. This could be done with a brute force approach, but I'm hoping there's a simplified method. As containers are added, things can quickly get out of hand. For example, going from 3 containers to 4 and keeping connections between all of them increases the number of connections from 3 to 6 (I believe this would follow the 1, 3, 6, 10, 15, 21... pattern).
Okay, let's see what you've got, SE.
mathematics calculation-puzzle circuitry
New contributor
$endgroup$
I'm trying to derive a generic formula for a programming algorithm. I might be overthinking this or underthinking it... we'll see.
Each of the triangles below represents a container. Each container will transfer a percentage of whatever is transferred into it to the downstream container until a homeostasis is found.
In the diagram, A, B, and C will transfer 50%, 20%, and 30% respectively of what is transferred into them.
Here's what a few iterations of this looks like assuming the first transfer from outside the system is into container A. It's important to note that the amount transferred out of a container at a given iteration would only be a percentage of what is transferred in on the last iteration (i.e., NOT the total already in the container). These numbers appear to be going to a limit (and intuitively they have to be), but I'm not sure what the formula should be.
This is a very simple example, but I'm looking for would need to be able to capture more complex scenarios. This could be done with a brute force approach, but I'm hoping there's a simplified method. As containers are added, things can quickly get out of hand. For example, going from 3 containers to 4 and keeping connections between all of them increases the number of connections from 3 to 6 (I believe this would follow the 1, 3, 6, 10, 15, 21... pattern).
Okay, let's see what you've got, SE.
mathematics calculation-puzzle circuitry
mathematics calculation-puzzle circuitry
New contributor
New contributor
edited 2 hours ago
Glorfindel
13.8k35084
13.8k35084
New contributor
asked 6 hours ago
SuperCodeBrahSuperCodeBrah
1134
1134
New contributor
New contributor
$begingroup$
If you connect all nodes then you should connect each pair twice (2 directions), since >3 nodes is not a loop. Your ccw triangle would then be a simplified case with the cw transfers being 0%.
$endgroup$
– amI
5 hours ago
$begingroup$
With the model that I'm going to use this for, transfers are only going to go in one direction for a given connection.
$endgroup$
– SuperCodeBrah
5 hours ago
$begingroup$
OK, but your box will lack symmetry -- the number of transfers from each node cannot be the same (and there will be more than one 'type' of box).
$endgroup$
– amI
5 hours ago
$begingroup$
I agree that it will lack symmetry, but symmetry isn't crucial to the problem I'm trying to solve, even if a lack of symmetry does prevent the possibility of reducing the problem into a relatively simple formula/algorithm. I don't know that such a formula exists, but I'm hoping it does.
$endgroup$
– SuperCodeBrah
5 hours ago
add a comment |
$begingroup$
If you connect all nodes then you should connect each pair twice (2 directions), since >3 nodes is not a loop. Your ccw triangle would then be a simplified case with the cw transfers being 0%.
$endgroup$
– amI
5 hours ago
$begingroup$
With the model that I'm going to use this for, transfers are only going to go in one direction for a given connection.
$endgroup$
– SuperCodeBrah
5 hours ago
$begingroup$
OK, but your box will lack symmetry -- the number of transfers from each node cannot be the same (and there will be more than one 'type' of box).
$endgroup$
– amI
5 hours ago
$begingroup$
I agree that it will lack symmetry, but symmetry isn't crucial to the problem I'm trying to solve, even if a lack of symmetry does prevent the possibility of reducing the problem into a relatively simple formula/algorithm. I don't know that such a formula exists, but I'm hoping it does.
$endgroup$
– SuperCodeBrah
5 hours ago
$begingroup$
If you connect all nodes then you should connect each pair twice (2 directions), since >3 nodes is not a loop. Your ccw triangle would then be a simplified case with the cw transfers being 0%.
$endgroup$
– amI
5 hours ago
$begingroup$
If you connect all nodes then you should connect each pair twice (2 directions), since >3 nodes is not a loop. Your ccw triangle would then be a simplified case with the cw transfers being 0%.
$endgroup$
– amI
5 hours ago
$begingroup$
With the model that I'm going to use this for, transfers are only going to go in one direction for a given connection.
$endgroup$
– SuperCodeBrah
5 hours ago
$begingroup$
With the model that I'm going to use this for, transfers are only going to go in one direction for a given connection.
$endgroup$
– SuperCodeBrah
5 hours ago
$begingroup$
OK, but your box will lack symmetry -- the number of transfers from each node cannot be the same (and there will be more than one 'type' of box).
$endgroup$
– amI
5 hours ago
$begingroup$
OK, but your box will lack symmetry -- the number of transfers from each node cannot be the same (and there will be more than one 'type' of box).
$endgroup$
– amI
5 hours ago
$begingroup$
I agree that it will lack symmetry, but symmetry isn't crucial to the problem I'm trying to solve, even if a lack of symmetry does prevent the possibility of reducing the problem into a relatively simple formula/algorithm. I don't know that such a formula exists, but I'm hoping it does.
$endgroup$
– SuperCodeBrah
5 hours ago
$begingroup$
I agree that it will lack symmetry, but symmetry isn't crucial to the problem I'm trying to solve, even if a lack of symmetry does prevent the possibility of reducing the problem into a relatively simple formula/algorithm. I don't know that such a formula exists, but I'm hoping it does.
$endgroup$
– SuperCodeBrah
5 hours ago
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
EDIT: I have underestimated the complexity of the four container system. There are multiple loops and each container will have its own common factor when computing the sum of the geometric series. Alas, I was unable to determine what that factor is yet, because the loops are nesting and my final sum in all containers does not equal exactly 1. My solution for the 3 container system is still valid though.
This is nothing more than a geometric series sum. You have to do one loop just to see what the starting value and the common ratio is. Common ratio will actually be the same for all 3 containers. In your example, container A starts with 1. After a full iteration container A will get 1 * 0.5 * 0.2 * 0.3 = 0.03 back. That's 3% of what it started with. You can see that all the containers will always get back 3% of what they start the round with.
The amount of stuff in container A will be the sum of all that is left in there after each iteration. Since 50% is leaving container A that means that 50% remains. 1/2 * 1 + 1/2 * 0.03 + 1/2 * 0.03^2 + 1/2 * 0.03^3 + ...
The sum of a geometric series is given by the formula: sum(n=0 to infinity) of a * r^n = a / (1 - r).
So the amount of stuff in container A is 1/2 / (1 - 0.03) = 50/97.
For B, 80% is always left in the container. And it first gets 1/2 from A on round one.
4/5 * 1/2 + 4/5 * 1/2 * 0.03 + 4/5 * 1/2 * 0.03^2 + ... = 4/5 * 1/2 / (1 - 0.03) = 40/97
Similarly for C, 70% is left and originally it gets 1/10 from B on round one.
7/10 * 1/10 + 7/10 * 1/10 * .03 + 7/10 * 1/10 + 0.03^2 + ... = 7/10 * 1/10 / (1 - 0.03) = 7/97
As you can see the sum of all the stuff in all the containers is 1.
For more containers you just have to do one iteration and find out the initial value and the common ratio.
In this example the numbers in red indicate the percent that leaves the container. The number in green indicate the value that each container gets on the first round. And the blue number represents the calculated common ratio for the A container. Each container will have a different ratio, but I can't figure out exactly how to find that just yet.
New contributor
$endgroup$
$begingroup$
This is amazing. I did notice that B and C both went up by 3% after one round (probably should have checked the next round to see the pattern). I'll have to play with it some more but very good stuff. I'm going to try to set up a more complicated example where every node has an initial, equal value but not all nodes are connected, but I imagine the same principle is in play.
$endgroup$
– SuperCodeBrah
4 hours ago
1
$begingroup$
If you give more than one node initial value, then you'll have to calculate the equilibrium for each initial value and then just add all the equilibrium values together. Also, in my four container example there is only one loop. If the direction of flow was going from B to C and not from C to B, then container B would have a loop of stuff going from B to A to C to D to B and also from B to C to D to B. That's two loops with two common factors, so it's a sum to two geometric series. Not insurmountable, just something to keep an eye for.
$endgroup$
– Vadim Evstifeev
4 hours ago
$begingroup$
More great info - thanks. Just out of curiosity, did you recognize the general scenario or were you able to just quickly determine the pattern? If you recognized the scenario, I'd be curious to know in what fields it shows up. Maybe electrical or hydraulic engineering? I was going to use this to make a ranking system for sports where there's a starting amount of value distributed across all teams and winning teams take value from losing teams. It seems like it could be a widely applicable model.
$endgroup$
– SuperCodeBrah
4 hours ago
$begingroup$
No, nothing like that, just saw that each container will have a running sum and determined that it's a sum of a series, that all. Actually, my previous comment is not entirely clear, thinking's about it some more, container B will still only have one common factor for the series, because that just depends on everything that's coming in and going out. It's just that all the containers will have different factors, not the same factors like in the examples so far. Good luck with your project!
$endgroup$
– Vadim Evstifeev
4 hours ago
$begingroup$
Oops, actually, I'm embarrassed. I underestimated the complexity of the four container system. The common factor is not going to be the same for all for of them even in my example. I will edit my answer..
$endgroup$
– Vadim Evstifeev
3 hours ago
|
show 1 more comment
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "559"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
SuperCodeBrah is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fpuzzling.stackexchange.com%2fquestions%2f79935%2fhomeostasis-logic-math-problem%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
EDIT: I have underestimated the complexity of the four container system. There are multiple loops and each container will have its own common factor when computing the sum of the geometric series. Alas, I was unable to determine what that factor is yet, because the loops are nesting and my final sum in all containers does not equal exactly 1. My solution for the 3 container system is still valid though.
This is nothing more than a geometric series sum. You have to do one loop just to see what the starting value and the common ratio is. Common ratio will actually be the same for all 3 containers. In your example, container A starts with 1. After a full iteration container A will get 1 * 0.5 * 0.2 * 0.3 = 0.03 back. That's 3% of what it started with. You can see that all the containers will always get back 3% of what they start the round with.
The amount of stuff in container A will be the sum of all that is left in there after each iteration. Since 50% is leaving container A that means that 50% remains. 1/2 * 1 + 1/2 * 0.03 + 1/2 * 0.03^2 + 1/2 * 0.03^3 + ...
The sum of a geometric series is given by the formula: sum(n=0 to infinity) of a * r^n = a / (1 - r).
So the amount of stuff in container A is 1/2 / (1 - 0.03) = 50/97.
For B, 80% is always left in the container. And it first gets 1/2 from A on round one.
4/5 * 1/2 + 4/5 * 1/2 * 0.03 + 4/5 * 1/2 * 0.03^2 + ... = 4/5 * 1/2 / (1 - 0.03) = 40/97
Similarly for C, 70% is left and originally it gets 1/10 from B on round one.
7/10 * 1/10 + 7/10 * 1/10 * .03 + 7/10 * 1/10 + 0.03^2 + ... = 7/10 * 1/10 / (1 - 0.03) = 7/97
As you can see the sum of all the stuff in all the containers is 1.
For more containers you just have to do one iteration and find out the initial value and the common ratio.
In this example the numbers in red indicate the percent that leaves the container. The number in green indicate the value that each container gets on the first round. And the blue number represents the calculated common ratio for the A container. Each container will have a different ratio, but I can't figure out exactly how to find that just yet.
New contributor
$endgroup$
$begingroup$
This is amazing. I did notice that B and C both went up by 3% after one round (probably should have checked the next round to see the pattern). I'll have to play with it some more but very good stuff. I'm going to try to set up a more complicated example where every node has an initial, equal value but not all nodes are connected, but I imagine the same principle is in play.
$endgroup$
– SuperCodeBrah
4 hours ago
1
$begingroup$
If you give more than one node initial value, then you'll have to calculate the equilibrium for each initial value and then just add all the equilibrium values together. Also, in my four container example there is only one loop. If the direction of flow was going from B to C and not from C to B, then container B would have a loop of stuff going from B to A to C to D to B and also from B to C to D to B. That's two loops with two common factors, so it's a sum to two geometric series. Not insurmountable, just something to keep an eye for.
$endgroup$
– Vadim Evstifeev
4 hours ago
$begingroup$
More great info - thanks. Just out of curiosity, did you recognize the general scenario or were you able to just quickly determine the pattern? If you recognized the scenario, I'd be curious to know in what fields it shows up. Maybe electrical or hydraulic engineering? I was going to use this to make a ranking system for sports where there's a starting amount of value distributed across all teams and winning teams take value from losing teams. It seems like it could be a widely applicable model.
$endgroup$
– SuperCodeBrah
4 hours ago
$begingroup$
No, nothing like that, just saw that each container will have a running sum and determined that it's a sum of a series, that all. Actually, my previous comment is not entirely clear, thinking's about it some more, container B will still only have one common factor for the series, because that just depends on everything that's coming in and going out. It's just that all the containers will have different factors, not the same factors like in the examples so far. Good luck with your project!
$endgroup$
– Vadim Evstifeev
4 hours ago
$begingroup$
Oops, actually, I'm embarrassed. I underestimated the complexity of the four container system. The common factor is not going to be the same for all for of them even in my example. I will edit my answer..
$endgroup$
– Vadim Evstifeev
3 hours ago
|
show 1 more comment
$begingroup$
EDIT: I have underestimated the complexity of the four container system. There are multiple loops and each container will have its own common factor when computing the sum of the geometric series. Alas, I was unable to determine what that factor is yet, because the loops are nesting and my final sum in all containers does not equal exactly 1. My solution for the 3 container system is still valid though.
This is nothing more than a geometric series sum. You have to do one loop just to see what the starting value and the common ratio is. Common ratio will actually be the same for all 3 containers. In your example, container A starts with 1. After a full iteration container A will get 1 * 0.5 * 0.2 * 0.3 = 0.03 back. That's 3% of what it started with. You can see that all the containers will always get back 3% of what they start the round with.
The amount of stuff in container A will be the sum of all that is left in there after each iteration. Since 50% is leaving container A that means that 50% remains. 1/2 * 1 + 1/2 * 0.03 + 1/2 * 0.03^2 + 1/2 * 0.03^3 + ...
The sum of a geometric series is given by the formula: sum(n=0 to infinity) of a * r^n = a / (1 - r).
So the amount of stuff in container A is 1/2 / (1 - 0.03) = 50/97.
For B, 80% is always left in the container. And it first gets 1/2 from A on round one.
4/5 * 1/2 + 4/5 * 1/2 * 0.03 + 4/5 * 1/2 * 0.03^2 + ... = 4/5 * 1/2 / (1 - 0.03) = 40/97
Similarly for C, 70% is left and originally it gets 1/10 from B on round one.
7/10 * 1/10 + 7/10 * 1/10 * .03 + 7/10 * 1/10 + 0.03^2 + ... = 7/10 * 1/10 / (1 - 0.03) = 7/97
As you can see the sum of all the stuff in all the containers is 1.
For more containers you just have to do one iteration and find out the initial value and the common ratio.
In this example the numbers in red indicate the percent that leaves the container. The number in green indicate the value that each container gets on the first round. And the blue number represents the calculated common ratio for the A container. Each container will have a different ratio, but I can't figure out exactly how to find that just yet.
New contributor
$endgroup$
$begingroup$
This is amazing. I did notice that B and C both went up by 3% after one round (probably should have checked the next round to see the pattern). I'll have to play with it some more but very good stuff. I'm going to try to set up a more complicated example where every node has an initial, equal value but not all nodes are connected, but I imagine the same principle is in play.
$endgroup$
– SuperCodeBrah
4 hours ago
1
$begingroup$
If you give more than one node initial value, then you'll have to calculate the equilibrium for each initial value and then just add all the equilibrium values together. Also, in my four container example there is only one loop. If the direction of flow was going from B to C and not from C to B, then container B would have a loop of stuff going from B to A to C to D to B and also from B to C to D to B. That's two loops with two common factors, so it's a sum to two geometric series. Not insurmountable, just something to keep an eye for.
$endgroup$
– Vadim Evstifeev
4 hours ago
$begingroup$
More great info - thanks. Just out of curiosity, did you recognize the general scenario or were you able to just quickly determine the pattern? If you recognized the scenario, I'd be curious to know in what fields it shows up. Maybe electrical or hydraulic engineering? I was going to use this to make a ranking system for sports where there's a starting amount of value distributed across all teams and winning teams take value from losing teams. It seems like it could be a widely applicable model.
$endgroup$
– SuperCodeBrah
4 hours ago
$begingroup$
No, nothing like that, just saw that each container will have a running sum and determined that it's a sum of a series, that all. Actually, my previous comment is not entirely clear, thinking's about it some more, container B will still only have one common factor for the series, because that just depends on everything that's coming in and going out. It's just that all the containers will have different factors, not the same factors like in the examples so far. Good luck with your project!
$endgroup$
– Vadim Evstifeev
4 hours ago
$begingroup$
Oops, actually, I'm embarrassed. I underestimated the complexity of the four container system. The common factor is not going to be the same for all for of them even in my example. I will edit my answer..
$endgroup$
– Vadim Evstifeev
3 hours ago
|
show 1 more comment
$begingroup$
EDIT: I have underestimated the complexity of the four container system. There are multiple loops and each container will have its own common factor when computing the sum of the geometric series. Alas, I was unable to determine what that factor is yet, because the loops are nesting and my final sum in all containers does not equal exactly 1. My solution for the 3 container system is still valid though.
This is nothing more than a geometric series sum. You have to do one loop just to see what the starting value and the common ratio is. Common ratio will actually be the same for all 3 containers. In your example, container A starts with 1. After a full iteration container A will get 1 * 0.5 * 0.2 * 0.3 = 0.03 back. That's 3% of what it started with. You can see that all the containers will always get back 3% of what they start the round with.
The amount of stuff in container A will be the sum of all that is left in there after each iteration. Since 50% is leaving container A that means that 50% remains. 1/2 * 1 + 1/2 * 0.03 + 1/2 * 0.03^2 + 1/2 * 0.03^3 + ...
The sum of a geometric series is given by the formula: sum(n=0 to infinity) of a * r^n = a / (1 - r).
So the amount of stuff in container A is 1/2 / (1 - 0.03) = 50/97.
For B, 80% is always left in the container. And it first gets 1/2 from A on round one.
4/5 * 1/2 + 4/5 * 1/2 * 0.03 + 4/5 * 1/2 * 0.03^2 + ... = 4/5 * 1/2 / (1 - 0.03) = 40/97
Similarly for C, 70% is left and originally it gets 1/10 from B on round one.
7/10 * 1/10 + 7/10 * 1/10 * .03 + 7/10 * 1/10 + 0.03^2 + ... = 7/10 * 1/10 / (1 - 0.03) = 7/97
As you can see the sum of all the stuff in all the containers is 1.
For more containers you just have to do one iteration and find out the initial value and the common ratio.
In this example the numbers in red indicate the percent that leaves the container. The number in green indicate the value that each container gets on the first round. And the blue number represents the calculated common ratio for the A container. Each container will have a different ratio, but I can't figure out exactly how to find that just yet.
New contributor
$endgroup$
EDIT: I have underestimated the complexity of the four container system. There are multiple loops and each container will have its own common factor when computing the sum of the geometric series. Alas, I was unable to determine what that factor is yet, because the loops are nesting and my final sum in all containers does not equal exactly 1. My solution for the 3 container system is still valid though.
This is nothing more than a geometric series sum. You have to do one loop just to see what the starting value and the common ratio is. Common ratio will actually be the same for all 3 containers. In your example, container A starts with 1. After a full iteration container A will get 1 * 0.5 * 0.2 * 0.3 = 0.03 back. That's 3% of what it started with. You can see that all the containers will always get back 3% of what they start the round with.
The amount of stuff in container A will be the sum of all that is left in there after each iteration. Since 50% is leaving container A that means that 50% remains. 1/2 * 1 + 1/2 * 0.03 + 1/2 * 0.03^2 + 1/2 * 0.03^3 + ...
The sum of a geometric series is given by the formula: sum(n=0 to infinity) of a * r^n = a / (1 - r).
So the amount of stuff in container A is 1/2 / (1 - 0.03) = 50/97.
For B, 80% is always left in the container. And it first gets 1/2 from A on round one.
4/5 * 1/2 + 4/5 * 1/2 * 0.03 + 4/5 * 1/2 * 0.03^2 + ... = 4/5 * 1/2 / (1 - 0.03) = 40/97
Similarly for C, 70% is left and originally it gets 1/10 from B on round one.
7/10 * 1/10 + 7/10 * 1/10 * .03 + 7/10 * 1/10 + 0.03^2 + ... = 7/10 * 1/10 / (1 - 0.03) = 7/97
As you can see the sum of all the stuff in all the containers is 1.
For more containers you just have to do one iteration and find out the initial value and the common ratio.
In this example the numbers in red indicate the percent that leaves the container. The number in green indicate the value that each container gets on the first round. And the blue number represents the calculated common ratio for the A container. Each container will have a different ratio, but I can't figure out exactly how to find that just yet.
New contributor
edited 2 hours ago
New contributor
answered 5 hours ago
Vadim EvstifeevVadim Evstifeev
1215
1215
New contributor
New contributor
$begingroup$
This is amazing. I did notice that B and C both went up by 3% after one round (probably should have checked the next round to see the pattern). I'll have to play with it some more but very good stuff. I'm going to try to set up a more complicated example where every node has an initial, equal value but not all nodes are connected, but I imagine the same principle is in play.
$endgroup$
– SuperCodeBrah
4 hours ago
1
$begingroup$
If you give more than one node initial value, then you'll have to calculate the equilibrium for each initial value and then just add all the equilibrium values together. Also, in my four container example there is only one loop. If the direction of flow was going from B to C and not from C to B, then container B would have a loop of stuff going from B to A to C to D to B and also from B to C to D to B. That's two loops with two common factors, so it's a sum to two geometric series. Not insurmountable, just something to keep an eye for.
$endgroup$
– Vadim Evstifeev
4 hours ago
$begingroup$
More great info - thanks. Just out of curiosity, did you recognize the general scenario or were you able to just quickly determine the pattern? If you recognized the scenario, I'd be curious to know in what fields it shows up. Maybe electrical or hydraulic engineering? I was going to use this to make a ranking system for sports where there's a starting amount of value distributed across all teams and winning teams take value from losing teams. It seems like it could be a widely applicable model.
$endgroup$
– SuperCodeBrah
4 hours ago
$begingroup$
No, nothing like that, just saw that each container will have a running sum and determined that it's a sum of a series, that all. Actually, my previous comment is not entirely clear, thinking's about it some more, container B will still only have one common factor for the series, because that just depends on everything that's coming in and going out. It's just that all the containers will have different factors, not the same factors like in the examples so far. Good luck with your project!
$endgroup$
– Vadim Evstifeev
4 hours ago
$begingroup$
Oops, actually, I'm embarrassed. I underestimated the complexity of the four container system. The common factor is not going to be the same for all for of them even in my example. I will edit my answer..
$endgroup$
– Vadim Evstifeev
3 hours ago
|
show 1 more comment
$begingroup$
This is amazing. I did notice that B and C both went up by 3% after one round (probably should have checked the next round to see the pattern). I'll have to play with it some more but very good stuff. I'm going to try to set up a more complicated example where every node has an initial, equal value but not all nodes are connected, but I imagine the same principle is in play.
$endgroup$
– SuperCodeBrah
4 hours ago
1
$begingroup$
If you give more than one node initial value, then you'll have to calculate the equilibrium for each initial value and then just add all the equilibrium values together. Also, in my four container example there is only one loop. If the direction of flow was going from B to C and not from C to B, then container B would have a loop of stuff going from B to A to C to D to B and also from B to C to D to B. That's two loops with two common factors, so it's a sum to two geometric series. Not insurmountable, just something to keep an eye for.
$endgroup$
– Vadim Evstifeev
4 hours ago
$begingroup$
More great info - thanks. Just out of curiosity, did you recognize the general scenario or were you able to just quickly determine the pattern? If you recognized the scenario, I'd be curious to know in what fields it shows up. Maybe electrical or hydraulic engineering? I was going to use this to make a ranking system for sports where there's a starting amount of value distributed across all teams and winning teams take value from losing teams. It seems like it could be a widely applicable model.
$endgroup$
– SuperCodeBrah
4 hours ago
$begingroup$
No, nothing like that, just saw that each container will have a running sum and determined that it's a sum of a series, that all. Actually, my previous comment is not entirely clear, thinking's about it some more, container B will still only have one common factor for the series, because that just depends on everything that's coming in and going out. It's just that all the containers will have different factors, not the same factors like in the examples so far. Good luck with your project!
$endgroup$
– Vadim Evstifeev
4 hours ago
$begingroup$
Oops, actually, I'm embarrassed. I underestimated the complexity of the four container system. The common factor is not going to be the same for all for of them even in my example. I will edit my answer..
$endgroup$
– Vadim Evstifeev
3 hours ago
$begingroup$
This is amazing. I did notice that B and C both went up by 3% after one round (probably should have checked the next round to see the pattern). I'll have to play with it some more but very good stuff. I'm going to try to set up a more complicated example where every node has an initial, equal value but not all nodes are connected, but I imagine the same principle is in play.
$endgroup$
– SuperCodeBrah
4 hours ago
$begingroup$
This is amazing. I did notice that B and C both went up by 3% after one round (probably should have checked the next round to see the pattern). I'll have to play with it some more but very good stuff. I'm going to try to set up a more complicated example where every node has an initial, equal value but not all nodes are connected, but I imagine the same principle is in play.
$endgroup$
– SuperCodeBrah
4 hours ago
1
1
$begingroup$
If you give more than one node initial value, then you'll have to calculate the equilibrium for each initial value and then just add all the equilibrium values together. Also, in my four container example there is only one loop. If the direction of flow was going from B to C and not from C to B, then container B would have a loop of stuff going from B to A to C to D to B and also from B to C to D to B. That's two loops with two common factors, so it's a sum to two geometric series. Not insurmountable, just something to keep an eye for.
$endgroup$
– Vadim Evstifeev
4 hours ago
$begingroup$
If you give more than one node initial value, then you'll have to calculate the equilibrium for each initial value and then just add all the equilibrium values together. Also, in my four container example there is only one loop. If the direction of flow was going from B to C and not from C to B, then container B would have a loop of stuff going from B to A to C to D to B and also from B to C to D to B. That's two loops with two common factors, so it's a sum to two geometric series. Not insurmountable, just something to keep an eye for.
$endgroup$
– Vadim Evstifeev
4 hours ago
$begingroup$
More great info - thanks. Just out of curiosity, did you recognize the general scenario or were you able to just quickly determine the pattern? If you recognized the scenario, I'd be curious to know in what fields it shows up. Maybe electrical or hydraulic engineering? I was going to use this to make a ranking system for sports where there's a starting amount of value distributed across all teams and winning teams take value from losing teams. It seems like it could be a widely applicable model.
$endgroup$
– SuperCodeBrah
4 hours ago
$begingroup$
More great info - thanks. Just out of curiosity, did you recognize the general scenario or were you able to just quickly determine the pattern? If you recognized the scenario, I'd be curious to know in what fields it shows up. Maybe electrical or hydraulic engineering? I was going to use this to make a ranking system for sports where there's a starting amount of value distributed across all teams and winning teams take value from losing teams. It seems like it could be a widely applicable model.
$endgroup$
– SuperCodeBrah
4 hours ago
$begingroup$
No, nothing like that, just saw that each container will have a running sum and determined that it's a sum of a series, that all. Actually, my previous comment is not entirely clear, thinking's about it some more, container B will still only have one common factor for the series, because that just depends on everything that's coming in and going out. It's just that all the containers will have different factors, not the same factors like in the examples so far. Good luck with your project!
$endgroup$
– Vadim Evstifeev
4 hours ago
$begingroup$
No, nothing like that, just saw that each container will have a running sum and determined that it's a sum of a series, that all. Actually, my previous comment is not entirely clear, thinking's about it some more, container B will still only have one common factor for the series, because that just depends on everything that's coming in and going out. It's just that all the containers will have different factors, not the same factors like in the examples so far. Good luck with your project!
$endgroup$
– Vadim Evstifeev
4 hours ago
$begingroup$
Oops, actually, I'm embarrassed. I underestimated the complexity of the four container system. The common factor is not going to be the same for all for of them even in my example. I will edit my answer..
$endgroup$
– Vadim Evstifeev
3 hours ago
$begingroup$
Oops, actually, I'm embarrassed. I underestimated the complexity of the four container system. The common factor is not going to be the same for all for of them even in my example. I will edit my answer..
$endgroup$
– Vadim Evstifeev
3 hours ago
|
show 1 more comment
SuperCodeBrah is a new contributor. Be nice, and check out our Code of Conduct.
SuperCodeBrah is a new contributor. Be nice, and check out our Code of Conduct.
SuperCodeBrah is a new contributor. Be nice, and check out our Code of Conduct.
SuperCodeBrah is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Puzzling Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fpuzzling.stackexchange.com%2fquestions%2f79935%2fhomeostasis-logic-math-problem%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
If you connect all nodes then you should connect each pair twice (2 directions), since >3 nodes is not a loop. Your ccw triangle would then be a simplified case with the cw transfers being 0%.
$endgroup$
– amI
5 hours ago
$begingroup$
With the model that I'm going to use this for, transfers are only going to go in one direction for a given connection.
$endgroup$
– SuperCodeBrah
5 hours ago
$begingroup$
OK, but your box will lack symmetry -- the number of transfers from each node cannot be the same (and there will be more than one 'type' of box).
$endgroup$
– amI
5 hours ago
$begingroup$
I agree that it will lack symmetry, but symmetry isn't crucial to the problem I'm trying to solve, even if a lack of symmetry does prevent the possibility of reducing the problem into a relatively simple formula/algorithm. I don't know that such a formula exists, but I'm hoping it does.
$endgroup$
– SuperCodeBrah
5 hours ago