Algorithm Definition and 651 Threads

  1. J

    What sort of Math do I need for a plagiarism detection algorithm?

    I'm trying to figure out the theory behind a simple plagiarism detection algorithm I'm making. The essence is that it's a function f:S×S→[0, 1] where S is the set of all strings and [0, 1] is the plagiarism quotient with 0 being no plagiarism and 1 being a completely copied string (that...
  2. 4

    Prove equivalence of elementary operations in Gauss Algorithm

    Homework Statement Prove that replacing one equation in a system of linear equations by a non-zero multiple of itself does not change the solution of the system. The Attempt at a Solution I'm still relatively new to proofs, so this is what I have come up with: Let S be a system of...
  3. O

    Graph Theory - Max. Independent set algorithm

    Graph Theory -- Max. Independent set algorithm Homework Statement Design a polynomial time greedy algorithm to compute a maximum independent set for a graph. Explain the algorithm and compute T_w(n). Homework Equations The Attempt at a Solution My terse and informal...
  4. Sudharaka

    MHB Minimal Polynomial Finding Algorithm

    Hi everyone, :) This is one of the thoughts that I got after thinking about finding the minimal polynomial of a matrix. I know that the minimal polynomial is easy to find when a matrix is diagonalizable. Then the minimal polynomial only consist all the distinct linear factors of the...
  5. Jameson

    MHB Log likelihood function and EM algorithm

    I'm going to start by asking about an example from class and then hopefully use that to work on the problem I need to solve. Here is an example: Let's say we have a multinomial distribution $x \sim M(n;.5+.25\theta,0.25(1-\theta),0.25(1-\theta),0.5\theta)$. The likelihood function of $\theta$...
  6. I

    Linear Algebra Matrix Addition Algorithm

    Homework Statement let L and M be two symmetric nxn matrices. develop an algorithm to compute C=L+M, taking advantage of symmetry for each matrix. Your algorithm should overite B and C. What is the flop-count? Homework Equations How to minimize the number of flop count? I want to make...
  7. A

    Java How to Adapt the Nelder Mead Algorithm for a Custom Function in Java?

    Hi This is a question somewhere between maths and numerical methods... I am using the algorithm for Nelder Mead found here: http://www.ssl.berkeley.edu/~mlampton/neldermead.java in java. It works nicely with the two example functions - rosen and parab. I am trying to adjust it to my function...
  8. .Scott

    Flexibility in Grover's Algorithm?

    Grover's Algorithm is a QM process for finding a high-scoring element in a large data base. (http://arxiv.org/abs/quantph/0010040) My specific curiosity if of a biological system that would generate a superpositioning of data that represented potential intentions, to estimate the...
  9. B

    Dsp algorithm for voice analysis

    What are good dsp algorithms for voices analysis? input from a computer microphone
  10. B

    Algorithm for Playoff Scenarios?

    If you follow professional golf, you know that the final playoff event before the Tour Championship starts tomorrow. During the regular season, in addition to tons of money, the players earn points according to how they finish in each event. The points charts are here...
  11. J

    Algorithm to find the submatrix with the greatest sum of its elements?

    This is a challenge problem I thought of: Given a real-valued matrix A, develop an algorithm that finds the submatrix with the greatest sum of its element. (If there's a tie, just return an arbitrary submatrix that's tied for the win.) Is there a way other than brute force?
  12. maistral

    Step by step algorithm to calculate VLE data from Redlich-Kwong?

    I keep on reading that VLE data may be calculated from the Redlich-Kwong. In line with this, I have these questions: 1) How accurate is the VLE data generated with the Redlich-Kwong as compared to using the vapor pressures to calculate these VLE data? 2) Can you guys give me a link, or even...
  13. C

    Best algorithm for an object that moves across an area

    Imagine a rectangular plane with dimensions X and Y. On that plane is a car. The car is about Z meters wide (the front bumper width, or up-down width in the image below). The car travels at a velocity v and moves across the entire surface as shown below: The car in the image above can move...
  14. J

    Can I Create a Fair Match Schedule for a Competition with Less Than 60 Teams?

    Hello, I am having a competition with up to 60 teams. My idea was to break the 60 teams into 10 groups of 6 teams each and run a Round Robin tournament for each individual group. Simple. Here is my problem: What if less than 60 teams show up to the competition (i.e. 58 teams)...
  15. I

    Hough algorithm to deskew an image

    https://en.wikipedia.org/wiki/Hough_transform http://www.codeproject.com/Articles/13615/How-to-deskew-an-image I follow the second link but since I am a complete novice in image processing, I am having a hard time to figure out what it is all about and how to determine the point to make the...
  16. J

    MHB Fleury's Algorithm: Finding Next Edge

    Using Fleury’s Algorithm in the graph to the bottom left, I deleted three edges and I got the graph to the bottom right. If I am currently at the starred vertex, list all possibilities for the edge I should travel next. A B Left graph 3 2 C D 1E F A B...
  17. C

    Combinatorics - UEFA Champions League Draw Algorithm

    Homework Statement I need to create a draw algorithm similar to the UEFA Champions League / Europa League draw. Example: I have 32 teams, up to 5 teams can be from the same country. I need to create: A) pairs (round robin style), no 2 teams from the same country can meet B)...
  18. J

    MHB How can an algorithm determine if a list is sorted?

    The question is as follows: "How does the algorithm know when the list is sorted?" Is this the correct answer to this question: The array is already sorted, but an algorithm does not know if it is completed. The algorithm need one whole pass without any swap to know it is sorted.
  19. B

    Proving termination and correctness of the algorithm

    I've been trying to prove the following, without much success. Let ##B## and ##C## be nonempty finite subsets of an ordered field ##\mathbb{F}##. Define the swapping operation ##S## as follows: It takes an element ##b## from ##B##, an element ##c## from ##C##, removes ##b## from ##B## and gives...
  20. S

    Levenberg-Marquardt Algorithm for more than one function

    I have been looking how to use the Levenberg Marqurdt algorithm for minimizing the errors of two functions at the same time. I looked up this topic in the internet and the only useful thing I found was a thread between "I like Serena" and "thomas430" in summer 2011...
  21. matqkks

    MHB How best to teach the division algorithm?

    What is the best way to introduce the division algorithm? Are there real life examples of an application of this algorithm. At present I state and prove the division algorithm and then do some numerical examples but most of the students find this approach pretty dry and boring. I would like to...
  22. matqkks

    How best to teach the division algorithm?

    What is the best way to introduce the division algorithm? Are there real life examples of an application of this algorithm. At present I state and prove the division algorithm and then do some numerical examples but most of the students find this approach pretty dry and boring. I would like to...
  23. A

    Understand the Metropolis Algorithm - Physics Student Guide

    Can someone tell me how the Metropolis Algorithm selects configurations for further iterations? I am an undergraduate physics student and I don't know a lot of statistics. Also, I want to read more about the Metropolis Algorithm. Please help me with some good links. Thank You
  24. M

    MHB Finding Shortest Path in G: Dijkstra's Algorithm

    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...
  25. S

    What should the proper name for the QuickSort algorithm be?

    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...
  26. O

    Testing Algorithm for Global Minima of Test Functions

    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.
  27. M

    Python What is the Purpose of the Arc Function in Python's Turtle Graphics?

    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...
  28. C

    Velocity and acceleration algorithm

    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])...
  29. X

    Algorithm or expression to put n elements in k sets

    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
  30. C

    Need help understanding Remez Algorithm and Chebyshev Polynomials

    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...
  31. J

    Help me make a very mathematical encryption algorithm

    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...
  32. A

    An algorithm for data compression?

    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...
  33. D

    What Does the 'Split' Function Do in Google's Go Language Tutorial?

    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...
  34. I

    Modifying a Gaussian Elimination Algorithm to Perform Gauss-Jordan E.

    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...
  35. M

    EM algorithm convergence KF log likelihood decrease

    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
  36. T

    Using the Euclidean algorithm .I think

    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...
  37. B

    Algorithm for multidimensional constrained root finding

    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...
  38. maistral

    Numerical Methods for PDEs, basic algorithm?

    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...
  39. J

    Looking for tips on a recommendation algorithm

    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...
  40. K

    Determining efficiency of multiplication algorithm

    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...
  41. M

    Convert algorithm to a formula

    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
  42. S

    Division Algorithm proof explanation

    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...
  43. R

    Algorithm for optimized diversification of x members over y equal groups

    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...
  44. V

    General algorithm for a magic square

    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 ?
  45. S

    MATLAB code for Aldous-Broder algorithm from spanning trees of a graph

    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...
  46. J

    Could someone explain to me how this clustering algorithm works?

    So MathWorks.com shows this as an example: [FONT="Courier New"]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...
  47. K

    How to Analyze Bubble Sort Algorithm Efficiency?

    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
  48. C

    What Is the Best Algorithm for Finding the Cheapest Supplier Combination?

    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...
  49. P

    Metropolis Algorithm - Why does it work?

    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...
  50. F

    Java Trying to come up with simple algorithm of significant time complexity in Java

    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...
Back
Top