|
Conjecture: if the knot moves at all, it has to fall off eventually.
I can't really formally prove it. But if the knot slides somewhere, the weights will redistribute such that the weights in the direction the knot moved into can be closer together (they will attempt to all move to the place such that their length of string on the table is minimized, that will be the same location for all weights now because the knot isn't in the middle any more). So if there was an imbalance to begin with, it gets worse. So whatever weird things happen with weights swinging on their strings like pendula and weird outward forces from being swung around the table, there is no equilibrium to reach.
|
|
|
|
|
Intuitively, I agree with you, but for different reasons.
The weights will move so that the total energy of the system is minimized.
At any given point in time, the force on the knot is the vector sum of the tensions in all of the strings. If this vector sum is non-zero, the knot will accelerate. Once it starts accelerating in a given direction, I can see no way that a returning force would develop, so the knot would eventually slide off the table.
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
Thank you all for a most interesting, and evocative, discussion !
My current thinking is that what I really want to model is some kind of parallel to a Bezier curve, but with #n control points, instead of two.
An analogy might be consider, for a 2 control-point Bezier curve, given a movement in 2-d space of either control-point: what is the x,y displacement of the center of the total length of the curve ?
«In art as in science there is no delight without the detail ... Let me repeat that unless these are thoroughly understood and remembered, all “general ideas” (so easily acquired, so profitably resold) must necessarily remain but worn passports allowing their bearers short cuts from one area of ignorance to another.» Vladimir Nabokov, commentary on translation of “Eugene Onegin.”
modified 2-Feb-16 8:21am.
|
|
|
|
|
Not sure if it is the right place to ask this question. Is there anyone know where I can download the lecture videos for MIT subject "Distributed Algorithms" (course number : 6.852J / 18.437J) and "Advanced Algorithms" (course number 6.854J / 18.415J). I could not find the download link in its official website. Thank you.
|
|
|
|
|
May be you should attend to the course ?
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
MIT Open Courseware has these subjects, but without the Video Lectures.
Advanced Algorithms: Here[^] and here[^].
Distributed Algorithms: Here[^].
Till they release the video lectures over there, it's a good idea to go over the material available here.
|
|
|
|
|
|
http://cgp.wikidot.com/circle-to-circle-collision-detection
radius of both circle cannot longer than the distance apart
|
|
|
|
|
When posting links to external sites, please make them clickable.
|
|
|
|
|
Circles are trivial. The interesting part is ellipses. I've found this in Graphics Gems V.
Ellipses can be represented by a characteristic 3x3 matrix S, such that the points on the ellipse satisfy x̄Sx̄T = 0, x is a 3-vector representing the coordinate of the point with a homogeneous coordinate for translation. This is probably not too surprising yet, it's reminiscent of a circle with radius zero (lol, but the point is the form) x*x+y*y=0 => x̄x̄T=0 (I'll omit bars on vectors from now on, you can figure it out from context) but with a matrix in between to potentially do some scaling/rotating/translation, and an ellipse is clearly just a transformed circle.
The point(s) of intersection satisfy the equations of both ellipses. So xS1xT = 0 and xS2xT, those points must therefore satisfy axS1xT + bxS2xT = 0. Because linear algebra is, well, linear, you can write that as x(S1 + qS2)xT = 0 where q = b/a. This test is not as strict, it will allow some spurious points, but they can simply be tested against the original equations.
H = S1 + qS2 will again be the characteristic matrix of some conic, not necessarily an ellipse, indeed it could be a bunch of lines. That would be useful, so solve for q (recall that the points we want will work for any q, so we can pick it) such that det(H) = 0. Since H is a 3x3 matrix, this is just a cubic equation which can be solved directly (though slightly annoyingly). The three roots defined three H's.
For each H found that way (most H's will work, but some solutions may not have a useful form), determine which type it is (because of round-off, do the usual floating point "is nearly zero" thing instead of the exact math thing), say the matrix has the form
A B D
B C E
D E F (it is, because a linear combination of two symmetric matrices is also symmetric, this just names the elements)
- A=B=C=0, now vHvT=0 is just Dx+Ey+F=0, the familiar line equation. Because we will be applying linear transformations to the line(s), represent it as two points. Just pick any two points on the line and remember them.
- B2-AC=0, some number of parallel lines. Make a rotation matrix for the angle -0.5 atan(2B / (A-C)) and apply it to H. The quadrant doesn't matter so atan2 isn't necessary. The lines will be either horizontal or vertical, if C=0 then they're vertical with the equation Ax²+2Dx+F=0 (beware typos in the book, if you're reading it alongside this), just solve that the regular way giving you up to 2 vertical lines, again represent them by pairs of points. Since we had rotated, apply the reverse rotation to those points. If C!=0, then they were horizontal lines, with the equation Cy²+2Ey+F=0, do the same thing with that.
- B²-AC > 0, crossing lines, it's a bit tricky to actually find them. Rotate the same way as above, then translate with (using the rotated H) xoffset=-(CD-BE)/(B²-AC), yoffset=-(AE-BD)/(B²-AC), finally in the rotated and translated H, 0,0 is a trivial point on both lines (their intersection is now in the origin) and we also have 1/sqrt(|A|),1/sqrt(|B|) and 1/sqrt(|A|),-1/sqrt(|B|). Translate them back, then rotate them back.
- Some other form, pick a different H.
Now you have a bunch of lines. Transform them and the first ellipse such that the ellipse becomes a circle, test all the transformed lines against the circle, then inverse-transform the intersections you found. Testing points against the second ellipse is easy, but keep in mind you will have plenty of rounding error by now.
There's C code implementing this here: http://www.realtimerendering.com/resources/GraphicsGems/gemsv/ch2-6/conmat.c[^] and you should probably read the relevant chapter from the book as well.
modified 6-Jan-16 6:12am.
|
|
|
|
|
Thanks for reply.
I am studying your comments and links.
It will help me definitely.
|
|
|
|
|
|
Hi, I am learning probability and need a good working algorithm for selecting between two options successfully. Any help will be appreciated. Please post the algorithm in equation form.
Thanks.
|
|
|
|
|
- Remove coin from pocket
- Flip coin
- Examine coin. If it fell "heads" up, choose option 1. If it fell "tails" up, choose option 2.
- Repeat as necessary.
The case of the coin falling on the side is left to the student
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
(Apart from question being unclear) Probability is a "chance", it does not guarantee 100% "successful" answer. So even if you could get an algorithm it won't guarantee to be correct.
The accuracy of answer is 100%, only when there is one answer. In two options, there is a probability of 50/50 (50%) and so on.
answer := 1/n
Where n is the number of answers; options. The example of "coin flip" is a good way to demonstrate this. You flip a coin and your friend selects one. That is the probability. It can be correct or it can be false.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
modified 5-Jan-16 6:47am.
|
|
|
|
|
Hello There,
Please keep in mind that I am not the brightest person in the bunch, that is why I am here asking for help. Because of my lack of education in math, I've been kind of creating my own solutions =/
This code is written in Microsoft Visual Basic for Applications (VBA) 7.0 and used in a Microsoft Access 2010 application.
Sometime in the past year, I created a function that converted non-decimal based string values. Like HEX "0123456789ABCDEF" and/or any other numbering definition you can think of.
I have recently come across another application that requires a custom format of numbering. Bringing me to revise the old function with the new, containing a formula that I wrote out.
The Revised function:
Code:
Public Function ConvertStringToDecimal(ByVal str As String, _
ByVal def As String) As Variant
str = Trim(str & vbNullString)
def = Trim(def & vbNullString)
If Len(str) = 0 Then: ConvertStringToDecimal = "No value has been entered.": Exit Function
If Len(def) < 2 Then: ConvertStringToDecimal = "Number definition must have 2 or more characters.": Exit Function
Dim LD As Integer: LD = Len(def)
Dim LV As Integer: LV = Len(str)
Dim N As Variant: N = CDec(0)
Dim I As Integer
Dim P As Integer
str = ReverseString(str)
For I = 1 To LV
P = InStr(1, def, Mid(str, I, 1))
If P > 0 Then: N = N + CDec((P - 1) * (LD ^ (I - 1)))
Next
ConvertStringToDecimal = N
End Function
What I would like to request your help with is the design of a Convert decimal to number definition function. I have a working one, but I can't seem to figure out if it is the most effective way to go about doing it.
This function will retrieves a decimal based number and converts it to a definition string:
number: "12345"
def: (hex) "0123456789ABCDEF"
or (binary) "01"
or (custom) "!@#$%^&*()1234567890ABCDEFGHIJKLMNOP"
I'm not satisfied with the way that I went about figuring out my starting point.
Here she is:
Code:
Public Function ConvertNumberToDefinition(ByVal number As String, _
ByVal def As String) As String
Dim length_of_def As Integer: length_of_def = Len(def)
Dim dec_number As Variant: dec_number = CDec(number)
Dim I As Variant: I = CDec(0)
Dim j As Variant: j = CDec(0)
Dim val As String
Dim temp As Variant: temp = CDec(0)
Dim index_value As Variant: index_value = CDec(0)
For I = 0 To dec_number
If (length_of_def ^ I > dec_number) Then
For j = I - 1 To 0 Step -1
index_value = length_of_def ^ j
temp = dec_number Mod index_value
val = val & Mid(def, ((dec_number - temp) / index_value) + 1, 1)
dec_number = temp
Next
Exit For
End If
Next
ConvertNumberToDefinition = val
End Function
Thanks,
Dan
|
|
|
|
|
Here is a simplified version of the first function.
Public Function ConvertStringToDecimal(ByVal str As String, _
ByVal def As String) As Variant
If Len(str) = 0 Then: ConvertStringToDecimal = "No value has been entered.": Exit Function
If Len(def) < 2 Then: ConvertStringToDecimal = "Number definition must have 2 or more characters.": Exit Function
Dim Base As Integer: Base = Len(def)
Dim LV As Integer: LV = Len(str)
Dim N As Variant: N = CDec(0)
Dim I As Integer
Dim P As Integer
For I = 1 To LV
P = InStr(1, def, Mid(str, I, 1))
if P = 0 then ConvertStringToDecimal = "Unknown digit.": Exit Function
N= N * Base + P - 1
Next
ConvertStringToDecimal = N
End Function
you should not prep the parameters because it prevent the use of space in definition and removing spaces in definition is changing the values of digits.
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
BlueIshDan wrote: P will always end up being 0 at some point. Only if you provide an unknown digit.
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
Crap I tried to fix my message, I read the code too fast to notice that you changed a bit more than I'd first thought.
Thank you again for your suggestions on the first function.
|
|
|
|
|
I'm blown away by N= N * Base + P - 1. Its going to take me a bit of figuring out to learn this!
|
|
|
|
|
Run it on debugger and track how variables evolves.
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
And the simplified second function:
Public Function ConvertNumberToDefinition(ByVal number As Variant, _
ByVal def As String) As String
Dim Base As Integer: Base = Len(def)
Dim val As String: val = ""
Dim temp As Variant
While number > 0
temp = number Mod base
val= Mid(def, temp + 1, 1) & val
number= ( number - temp ) / base
End While
ConvertNumberToDefinition = val
End Function
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
Patrice,
Thank you very much for your guidance! Rest can be assured that I am studying from these and learning.
Kindest Regards
Daniel
|
|
|
|
|
have fun with the code
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
what kind of algorithms we use to find minimum spanning tree
?
a) greedy algorithm
b) topological order
c) kosoraju sharir algorithm
d) prim algorithm
|
|
|
|
|