Homework Statement
Solve
x \cong 1 mod 7
x \cong 4 mod 6
x \cong 3 mod 5
by (and I have to use this method) using Euclidean algorithm to find the largest common divisor, then the extended euclidean algorithm to find a linear combination, then a solution to each of the three...
Helloo!
I am asked to find the weights of the shortest path from s in a directed Graph G=(V,E), where V={s,a,b,c,d}, E={(s,a),(s,d),(a,b),(a,c),(a,d),(b,s),(b,c),(c,b),(d,a)} and their weights 5,3,6,4,1,3,7,2,2...
I used Dijkstra's Algorithm, and I found d[s]=0,d[a]=5,d[b]=11,d[c]=9,d[d]=3...
Apparently, this is the DOLLS tensor Hamiltonian:
[ tex ] H = H_0 + \sum q_i p_i : ∇u(t)^T [ /tex ]
These are the derived equations of motion:
[ tex ] \dot{q}_i = p_i/m + q_i \cdot ∇u [ /tex ]
[ tex ] \dot{p}_i = F_i - ∇u \cdot p_i [ /tex ]
And these are the SLLOD equations of motion:
[...
OK, I understand the deal - it was the (and seems to still be) the fastest algorithm for sorting a random set (although it can break down to O(n2) for the worst case non-random.) But it seems that it should have a name that describes its essence, like MergeSort or InsertionSort.
The essence of...
I'm testing an algorithm to find the global mimina of a function. Can someone give me a few examples of optimization test functions in 2 or 3 dimensions, like the Rastrigin function.
I'm hoping to find functions with several local minima.
Hi,
I'm working through thinkpython and there is an exercise which requires drawing flowers and arcs. I'm having some trouble understanding the arc function.
def arc(t, r, angle):
"""Draws an arc with the given radius and angle.
t: Turtle
r: radius
angle: angle subtended by the...
Homework Statement
Why are (2) and (4) equations more accurately than (1) and (3) ? Why is 7*dt in (4) equation ? What kind of equations are (2) and (4) ? What method they used to write (3) and (4) equations?
Homework Equations
Velocity:
(1) v[i] = (x[i] - x[i-1]) / (t[i] - t[i-1])...
I have 17 elements, and I want to put them in 3 sets. This makes 2 sets with 6 elements, and 1 set with 5 elements. Now I want to find an algorithm to partition n elements in k sets.
Can anyone give me an algorithm, or a math expression for me to implement in a algorithm?
Thanks
So I've been reading about minimax polynomial approximations and have found them to be pretty impressive. However, i am confused on exactly how to determine the constants.
The first step is supposed be solving for the Chebyshev polynomials as an initial guess. I'm reading wikipedia but I'm a...
Suppose I make an application with a password of max 20 characters -- no special characters and not case-sensitive. So that means there is a 1-to-1 correspondence between the set of all passwords P and the set S = {1, 2, ..., 3720 - 1, 3720}. A simple bijective function f:P-->S could be...
Homework Statement
On the tapes of Turing machine recorded the number of vertices (n) in the binary system, the length of the desired cycle - k (in binary), and the adjacency matrix of the graph. Required to construct a Turing machine, which checks for the cycles of k-length in the graph, and...
Hi, I have a problem with the following problem:
Assume fj is concave and strictly increasing for all j, j=1,..,n. Show that the optimal solution x* satisfies the condition (from j=1 to n) ∑x*j=B.
Now consider the following improvement algorithm:
start with x0=0 for k=1:B
select...
An algorithm for data compression?
I am coming from a philosophy and science background and I'm particularly interested in finding out what a generalised data compression algorithm would look like. (By algorithm I mean something like a flowchart that would show how this process could be...
So I decided today I wanted to learn a new programming language (for fun).
Normally I would ask this on a general purpose programming site, but I figured perhaps this might be a better place for algorithms of this type?
In the tutorial for Google's "Go" language I came across this, and I am...
Homework Statement
I have an algorithm that implements Gaussian elimination. According to the text, with some modification of the indices and their in the loops, I should be able to have this algorithm perform Gauss-Jordan elimination. I also have to reduce the matrix to reduced row-echelon...
Hi everyone,
Im running the KF to learn parameters of a model, the log likelihood of the p(Y_{k}|Y_{k-1}), however decreases.
Can anyone advise, does this mean my implementation is wrong or can this just be the case.
Advice appreciated
Thanks
Using the Euclidean algorithm...I think...
find the smallest natural number x such that 24x leaves a remainder of 2 upon division by 59
SO it seems to me that the way to approach this would be through the euclidean algorithm and a diophantine equation. Thinking about it for a moment would...
HI guys. Haven't been here in a while...
I have an algorithm attached that uses the levenberg marquardt non linear curve fitting alogrithm to fit a surface.
My C coding skills are reasonable, however I am struggling to adjust the model so that I can fit my curve to it. I want to use this...
Hi all,
I'm looking for an algorithm for multidimensional constrained root finding, implemented in Fortran. It's intended for finding a steady-state solution for a dynamic model. I have n state variables and n coupled differential equations (n~=60), and I need to find the value for the state...
This is actually a request, I don't know if these are the correct forums for me to post these kinds of things, but yeah. Alright. I intended to study and learn numerical methods with PDEs on my own.
And sadly the only thing I can comprehend is the Liebmann method. :cry: And I got so little...
Hi everyone,
Long time lurker, first time poster! I'm developing a website where users can read and participate in discussions, articles and questions. I'm currently developing an algorithm that will recommend to each user discussions, articles and questions that they would be interested in...
Hi
I'm writing a BigNum library for Javascript and have come up with a multiplication algorithm which I think is pretty efficient (a modification of shift/add), but I don't understand O(log ...) notation, so don't really know how to compare my method with something like the Schönhage–Strassen...
Hi
Please can someone help me convert this algorithm to a mathematical formula ?
function fun(int x)
{
int c = 0 ;
for(int i=2;i<floor(x/2);i++)
{
if(floor(x/i) > i-1)
for(int j=0;j<floor(x/i)-i+1;j++)
c++;
}
return c;
}
thanks
This is taken from "Passage to Abstract Mathematics," Watkins and Meyer.
"Theorem 2.3.9 (Division Algorithm) If a \in\mathbb{Z} and b\in\mathbb{N}, then there exist q,r \in\mathbb{Z} such that a = qb+r and 0 \leq r < b.
Furthermore, for each b\in\mathbb{N}, this representation of a is unique...
Hoping to get some assistance here on a volunteer project I am working on.
I am writing a program for my bicyle club in preparation for our spring training series. We will have x participants that will be divided weekly into y number of (approximately) equal groups containing z members per...
Is there any algorithm to form a magic square of any size with a desired magic sum ?
Also can we make a magic square not only with the numbers from 1 to n2
but using any random numbers ?
Homework Statement
Let G = (V,E) be a graph with vertices V and edge set E.
Aldous-Broder algorithm:
Input: G = (V,E)
Output: T = (V, W), where W is a subset of E such that T is a spanning tree of G.
Let W be the empty set. Add edges to W in the following manner: starting at any...
So MathWorks.com shows this as an example:
d = pdist(meas);
Z = linkage(d);
c = cluster(Z,'maxclust',3:5);
http://www.mathworks.com/help/stats/cluster.html.
I'm confused about why the routine gives any useful information. First it returns the Euclidean distances between values in some array...
Hello,
I need to analyze some bubble sort algorithm and calculate the probability of each conditional statements(if,for,while,ect...) be successful. I can post the algorithms if you need to see them.
Thanks in advance
I have a problem in which I have people ordering different goods from my website and I have a number of suppliers who provide these goods, but I need an algorithm to find the cheapest combination of supplies from each supplier. It would seem easiest to just see which company offers the product...
I'm doing a project based around the Metropolis algorithm to explore parameter spaces.The computational aspect I can understand and implement. I understand that a Markov Chain is constructed in the parameter space. However, I don't understand the theory behind why it works so well in exploring...
Hi PF,
I'm working on a program that requires measuring how long it takes a given computer to process a certain task, but am having trouble coming up with algorithms that won't take most computers a trivial amount of time to perform. The only one I've got so far is recursively computing...
I'm trying to find a reasonably fast method for testing whether or not a point (x,y euclidean coordinate system) lies inside a (preferably convex, concave or complex - though different methods for each would be OK) compound polygon with edges consisting of line segments, arcs and/or elliptical...
Homework Statement
Here is a pastebin link to my question, it contains an algorithm, my trace of the algorithm, and my question.Homework Equations
I am interested in the theta notation for the runtime of an algorithm
The Attempt at a Solution
Here is the link
http://mathb.in/1202
My thoughts...
I am trying to understand the quantum algorithm for order finding, but I can't find the proof anywhere. Can anyone help? Thanks in advance
\frac{1}{√r} Ʃ^{r-1}_{s=0} e^{2πisk/r} |μ_{s}> = |x^{k} mod N>
I can't generally map Loop Invariant method for proving the correctness of an Algorithm. Take the case of an Insertion Sort
http://csnx.groups.allonline.in/pool/Introduction%20to%20Algorithms-Cormen%20Solution.pdf
in the above link, at the page 2-3, they have proved the correctness of...
I am recently trying to identify system parameters with projection algorithm, but faced a problem, and the dynamic model is the following:
\ddot{y}(t)+a\cdot\dot{y}(t)=b\cdot e(t)
The true value of a is 2.8, b is 0.1.
While inputing volt e(t)=12sin(2\pi t)+5sin(2t), I can get a good...
I have to write a program validating credit card numbers using Luhn's algorithm. I am having trouble getting my last function to work. For a credit card number I'm supposed to double every second digit from right to left, and sum them (note double digits, like 10=1+0), and then add the rest of...
Hi there,
I am going thru basics of optimization and I see line search being used in many sophisticated optimization algorithms. From what I understand, it works by taking the derivative at a point and moves in a direction that minimizes the function. I have earlier experience using...
Homework Statement
Suppose that u, v ∈ Z and (u,v) = 1. If u | n and v | n, show that uv | n. Show that this is false if (u,v) ≠ 1.
Homework Equations
a | b if b=ac
[b]3. The Attempt at a Solution
I understand this putting in numbers for u,v, and n but I don't know how to...
How to write the algorithm? I figured out a method to find the inverse.
The assignment is making use of the property of triangular matrices to find the inverse of a matrix \displaystyle A.
The inverse of a triangular matrix(Upper/ Lower) is also triangular(Upper/ Lower) and is easy to find...
Twice I have had to calculate the speed of algorithms depending on input size. The first time I was working in MATLAB(which is based on C) and was timing the difference in time to perform matrix operations on the identity matrix in standard storage and in sparse storage, as I grew the matrix...
Homework Statement
reduce the fraction \frac{943578}{1978935} to its lowest terms using Euclid's algorithm
The Attempt at a Solution
I start with finding the gcd of these two numbers using E.algorithm
1978935=943578*2+91779
942578=91779*10+25788
91779=25788*3+14415
25788=14415*1+11373...
Does anyone happen to know a good algorithm for a numerical Karhunen-Loeve transformation for tensors?
Specifically, I'm trying to solve for the eigentensors of a correlation bitensor, along the lines of
\int_{-\infty}^{\infty} d^4x' \, C_{abc'd'}(x,x') \phi^{c'd'}(x') = \lambda \phi_{ab}(x)...
I am trying to prove the following scenario of Quicksort has a running time of Theta(n^2). Initially, we only have arrays of size n, where n = ij. The idea is that at every partition step of Quicksort, you end up with two sub-arrays where one is of size i and the other is of size i(j-1). i in...
How to face a data processig to apply "swinging door algorithm" to a irradiance time
Homework Statement
I would like to obtain the relevant (irradiance change, time increment) pairs from a irradiance time serie that I have in Excel and Origin. One way to do that is making "swinging door"...
Homework Statement
In Florida, the fourth and fifth digits from the end of a driver's license number give the year of birth. The last three digits for a male with birth month m and date b are represented by 40(m-1)+b. Determine the dates of birth of people who have last five digits 42218 and...
Hi everyone,
Duval' algorithm computes all the k-ary Lyndon words up to any length, say n. See here for a brief introduction to Lyndon words and note the section Generation.
http://en.wikipedia.org/wiki/Lyndon_word
The article claims that
"the sequence of all Lyndon words of length at most...
1. My difficulty is to show that if a is an integer such that 2 does not divide a and 3 does not divide a then 24 does not divide a squared minus 1
2.Is there any equation which helps?
3. My idea is that it has to be an integer such that 6 does not divide a...therefore i have to show...
Hey guys, this is my first time working on a genetic algorithm. It seems to me that the algorithm is primarily defined by how you choose to define your crossover operator and fitness function. Let's say the crossover takes two parents and produces one child. Is it necessary/good/bad/etc that the...