Algorithm Definition and 651 Threads
-
MATLAB Computing Sections of a Graph Which Can Be Removed By Removing Two Edges
Hi. I have graph which I am analyzing in MATLAB. I would like to determine sections of the graph which could be removed from the rest of the graph by removing only 2 edges. (The graph represents the network of atomic bonds from a simulation of silica, and I am attempting to locate strands of...- person123
- Thread
- Algorithm Computing Graph
- Replies: 7
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
S
Efficient Q-Tree Algorithm: Understanding Parent-Child Relationships
Hi, I don't get what the conditions below exactly means. Its which u they are talking about? Is the u the parent or children? Does it mean u = B? and the children are A,C,D? if u is in the quadtree rooted by v:NW then u:x < v:x and u:y ≥ v:y; Thanks,- sayuri2009
- Thread
- Algorithm Search
- Replies: 1
- Forum: Programming and Computer Science
-
A Quantum CSP Algorithm for Aircraft Recovery Problem
The Aircraft Recovery Problem: consists of finding solutions for a disrupted aircraft flight schedule such that a set of constraints is satisfied, namely continuity, turn-round time, scheduled maintenance, and airport departure/arrival capacity. My approach consists of finding the domains for...- Francis
- Thread
- Algorithm Quantum
- Replies: 1
- Forum: Quantum Physics
-
A Conditional phase shift for Grover's algorithm
I am trying to understand the following deduction: "The conditional phase shift can be represented by the unitary operator 2|0> <0| - I:" for eq. 4a) I was expecting to be: [2 |0><0| - I] |0> = 2 |0> <0|0> - I|0> = 2|0> - |0> = |0> as for eq. 4b I can't understand it at all. Why does the...- Francis
- Thread
- Algorithm Conditional Phase Phase shift Shift
- Replies: 2
- Forum: Quantum Physics
-
Problems with Landau Wang algorithm in fortran
I have been struggling for over a month now with a problem I cannot fix. I would really appreciate any comment or guidance. Thank you! I am considering an Ising-like model with N agents that han hold one of the following 3 states, represented by vectors: state + : vector (1 0) state 0 : vector...- IreneFerri
- Thread
- Algorithm Fortran Ising model Landau Monte carlo
- Replies: 8
- Forum: Atomic and Condensed Matter
-
Interpolation in the Marching Square Algorithm
Marching Square - article In the "Linear Interpolation" section This article discusses how to interpolate the values when the lines are oblique. For example, for Case#2 it has the following calculation: I have written the following source code to implement the Marching Square algorithm...- user366312
- Thread
- Algorithm Interpolation Square
- Replies: 1
- Forum: Programming and Computer Science
-
Can a Body Language Algorithm Reveal Our True Emotions?
These days there is a question confuses me if it can be real or not. 2-3 years ago when I was looking around papers about computer sciences on the web, I came across to a sceintific paper which mentions an algorithm about analysing your language even it's a foreign language. So when you speak...- w4y021
- Thread
- Algorithm Body Language
- Replies: 7
- Forum: Programming and Computer Science
-
E
B Algorithm for checking if a set of digits are all distinct
If I give you 9 digits ##u_1, u_2, \dots, u_9##, is there an operation/set of operations you can perform to check whether all the digits from 1 to 9 are represented in that set? Just asking because my solution was a boring brute force check. I don't think anything useful becomes of the product...- etotheipi
- Thread
- Algorithm Set
- Replies: 25
- Forum: General Math
-
I The period-finding circuit for Shor's algorithm
I've been trying to learn about Shor's algorithm by writing out implementations of the circuit for modular exponentiation, ##{ a }^{ x }\; ({ mod }\; N)##, to find the period ##r## for small numbers such as: ##(N=15,\quad a=11)\quad \longrightarrow \quad r=2##, ##(N=35,\quad a=13)\quad...- tomdodd4598
- Thread
- Algorithm Circuit
- Replies: 3
- Forum: Quantum Physics
-
A
Developing Algorithm to Recursively Walk Array: arr[4] Example
I want to write code walk around the array recursively. For some reason I cannot share my code. Let's say I have a array like this: arr[4], I want to look 012 123 013 or 01 12 23 02 03 13. In code I write I can look 012 123 or 01 12 23 but I cannot look 013 or 02 03 13. What algorithm should I...- anonim
- Thread
- Algorithm Array Example
- Replies: 8
- Forum: Programming and Computer Science
-
S
C/C++ Could someone translate this Donald Knuth algorithm to C/C++?
[Can't embed image. Keep getting 500 Internal Server Error ...] https://i.stack.imgur.com/rmDuR.jpg Image added by mentor- SlurrerOfSpeech
- Thread
- Algorithm
- Replies: 10
- Forum: Programming and Computer Science
-
Reaction kinetics + Gillespie algorithm: Propensity function?
I'm trying to simulate a simple series reaction stochastically using Gillespie's algorithm. I found this file: What is this 'propensity function'? Say for example I have the simple reactions: A --(k1)--> R R--(k2)--> S are these 'propensity functions' the rates (a wild guess)? I mean; α1 =...- maistral
- Thread
- Algorithm Function Kinetics Reaction
- Replies: 1
- Forum: Materials and Chemical Engineering
-
Comp Sci Galaxy simulation with the velocity Verlet algorithm
To simulate the trayectories of solar systems around a black hole (i.e. a galaxy) I have 3 classes in C++: cSystem, cBlackHole and cGalaxy. cSystem assigns initial values of position, velocity, etc to a solar system. cBlackHole does the same but just for the black hole. And cGalaxy mixes...- Adec
- Thread
- Algorithm C++ Galaxy Simulation Velocity
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
D
What is the sum of existing partial products in Booth's Algorithm?
Trying to understand Booth's Algorithm. There's some YouTube videos online but I decided I'd try by reading Booth's original paper http://bwrcs.eecs.berkeley.edu/Classes/icdesign/ee241_s00/PAPERS/archive/booth51.pdf Can anyone explain what is meant by "sum of existing partial products"? (Page 3...- domabo
- Thread
- Algorithm
- Replies: 9
- Forum: Programming and Computer Science
-
I Number of qubits required for Shor's algorithm to factor a number < 2^n
Hey there, There are plenty of proposed implementations of Shor's algorithm which require different numbers of qubits, ##q##, to be able to factor a number ##N## of size ##<2^n##, i.e. a number of length at most ##n## bits. Most of these require ##q## linear in ##n##; for example, this...- tomdodd4598
- Thread
- Algorithm Quantum computation Qubits
- Replies: 2
- Forum: Quantum Physics
-
A
Code for BCC Lattice Algorithm: Start Here
I need to write a code for my simulation for which I have to create bcc lattice. Can anybody suggest how I can start since I am jumbled up this 3d lattice coordinate writing?- anupama sharma
- Thread
- Algorithm Lattice
- Replies: 3
- Forum: Programming and Computer Science
-
Z
Prime Number Detection: Running Time of Algorithm
Hi, I want to know if the algorithm to find prime number has running time O(sqrt(N)) or O(log^2N). log^2N is better than sqrt(N). Also for large values can it become a pseudo polynomial algorithm? Zulfi.- zak100
- Thread
- Algorithm Detection Prime Running Time
- Replies: 4
- Forum: Programming and Computer Science
-
Have you heard of the VDSR upscaling algorithm?
Hi All Here is an interesting algorithm for up-scaling images: https://arxiv.org/pdf/1511.04587.pdf It has 20 3x3x64 (some I have read use 3x3x16) convolutions. Now my understanding of convolutions means, the first produces 64 images from the 64 filers, then in the second convolution each of...- bhobba
- Thread
- Algorithm
- Replies: 1
- Forum: Programming and Computer Science
-
How Does the Verlet Algorithm Compare to R-K Methods in Energy Conservation?
I am trying to understand the verlet algorithm but I am kind of stuck. I guess first we are findind the ##v(t + 1/2h)## then we are leaving it there and starting a loop for 8.78 ? Also I did not understand the meaning of the equation 8.78 ? We are never using ##v(t + 3h/2)## ? Or in the...- Arman777
- Thread
- Algorithm
- Replies: 11
- Forum: Programming and Computer Science
-
S
Text color detection algorithm giving pixels of text
I'm creating a type of image processing software and I have a need to get the color that best represents text once I have identified the pixels in a region of text. I've tried using simple strategies like "averaging" the pixels or taking the most common pixel, but these produces bad results An...- SlurrerOfSpeech
- Thread
- Algorithm Color Detection Text
- Replies: 6
- Forum: Programming and Computer Science
-
Algorithm for the min. distance over a set of points randomly distributed
The only restrictions are: -There are N points randomly distributed over an X-Y plane and it is necesary to pass every point at least 1 time, in order to get the path of the minimun distance throught all of them. -If does not matter how many times you pass any of this points. -You have to pass...- JorgeM
- Thread
- Algorithm Distributed Points Set
- Replies: 3
- Forum: Programming and Computer Science
-
T
XOR algorithm to find the missing number in a given array
Recently I have been reading up about the logical operations OR, AND and XOR. Whilst reading about XOR I cam across a method using XOR to find the missing number in a given array, but I just can't understand how or really why it works. The algorithm is displayed below. A = [2, 3, 1, 4, 6, 7]...- Taylor_1989
- Thread
- Algorithm Array
- Replies: 13
- Forum: Programming and Computer Science
-
V
A On uniform boundedness of the GD algorithm
Consider a function ##f\in\mathcal{C}^2## with Lipschitz continuous gradient (with constant ##L##)- we also assume the function is lowerbounded and has at least one minimum. Let ##\{x^k\}_k## be the sequence generated by Gradient Descent algorithm with initial point $x^0$ and step-size...- Vulture1991
- Thread
- Algorithm Uniform
- Replies: 2
- Forum: Calculus
-
Who needs qubits? Factoring algorithm run on a probabilistic computer
https://arstechnica.com/science/2019/09/who-needs-qubits-factoring-algorithm-run-on-a-probabilistic-computer/- jedishrfu
- Thread
- Algorithm Computer Factoring Qubits
- Replies: 2
- Forum: Computing and Technology
-
B
Pivoted Cholesky decomposition algorithm
Hi at all! I need to implement the Pivoted Cholesky Decomposition in C++ and I know that is possible implement it without rows permutations. Where can I find the algorithm described clearly and/or codes example in other language to replicate in C++? Thanks!- BRN
- Thread
- Algorithm Decomposition
- Replies: 3
- Forum: Programming and Computer Science
-
E
Comp Sci Time Complexity Algorithm Proof
Use the formal definition of Big-Oh to prove that if f (n) and g(n) are nonnegative functions such that f (n) = O(g(n)), f (n) + g(n) = Ω(g(n)). By the definition of Big-Oh: If f(n) and g(n) are non-negative functions such that f(n) = O(g(n)) there must be positive constants c and n0 such...- enigmatic01
- Thread
- Algorithm Algorithms Complexity Proof Time
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
F
Complexity of this heap algorithm
I'm trying to count running time of build heap in heap sort algorithm BUILD-HEAP(A) heapsize := size(A); for i := floor(heapsize/2) downto 1 do HEAPIFY(A, i); end for END The basic idea behind why the time is linear is due to the fact that the time complexity...- fiksx
- Thread
- Algorithm Complexity
- Replies: 1
- Forum: Programming and Computer Science
-
1D peak algorithm (correct implementation)
array_values = [[0], [0,0], [1,2], [3,1,2], [1,2,3], [4,6,2,1], [8,9,0,2,1]] def peakfinder(xarray): if len(xarray) == 0: print("You entered an empty error !") raise ValueError if len(xarray) == 1: return xarray[0] if len(xarray) == 2: return...- Arman777
- Thread
- 1d Algorithm Peak
- Replies: 13
- Forum: Programming and Computer Science
-
Python How can I create a density reachable algorithm in DBSCAN
I am new to data science and I am trying to create an algorithm for the DBSCAN. I can label each point as core-border-noise. But after this step I am stuck. How can I separate the density reachable cores and create clusters from these points ?- Arman777
- Thread
- Algorithm Density
- Replies: 1
- Forum: Programming and Computer Science
-
I Proof of the Division Algorithm
In many books on number theory they define the well ordering principle (WOP) as: Every non- empty subset of positive integers has a least element. Then they use this in the proof of the division algorithm by constructing non-negative integers and applying WOP to this construction. Is it...- matqkks
- Thread
- Algorithm Division Proof
- Replies: 3
- Forum: Set Theory, Logic, Probability, Statistics
-
MHB Proof of the Division Algorithm
In many books on number theory they define the well ordering principle (WOP) as: Every non- empty subset of positive integers has a least element. Then they use this in the proof of the division algorithm by constructing non-negative integers and applying WOP to this construction. Is it possible...- matqkks
- Thread
- Algorithm Division Proof
- Replies: 3
- Forum: General Math
-
I In quantum search algorithm, how to interpret the effect of U(t)?
In Nielsen's QCQI, in page 259, it reads, $$U \left ( \Delta t \right ) = \left ( \cos^2 \left ( \frac {\Delta t} 2 \right ) - \sin ^2 \left ( \frac {\Delta t} 2 \right ) \vec \psi \cdot \hat z \right ) I \\ -2 i \sin \left ( \frac {\Delta t} 2 \right ) \left ( \cos \left ( \frac {\Delta t} 2...- Haorong Wu
- Thread
- Algorithm Quantum Search
- Replies: 4
- Forum: Quantum Physics
-
R
Algorithm analysis problem turned into a math problem
The equation listed is the implicit form. I achieved this a weird way. \begin{array}{|c|c|c|} \hline 1 & 1 & 1*1 \\ \hline 2 & 6 & 2*3 \\ \hline 3 & 18 & 3*6 \\ \hline 4 & 40 & 4*10 \\ \hline 5 & 75 & 5 * 15 \\ \hline 6 & 126 & 6 * 21\\ \end{array} Focusing on the third column now, I can...- r0bHadz
- Thread
- Algorithm Analysis
- Replies: 6
- Forum: Precalculus Mathematics Homework Help
-
S
MHB Discrete maths problem - tracing an algorithm
Hello, I'm working on a discrete mathematics for computing paper and am stuck on what a symbol is trying to convey. Sorry if this seems like a stupid question (I feel stupid for not being able to work it out myself), I've just started this subject and am still getting used to it. My question...- Sterling1
- Thread
- Algorithm Discrete tracing
- Replies: 3
- Forum: Set Theory, Logic, Probability, Statistics
-
Equation of motion using Runge-kutta 4 and Verlet algorithm
import numpy as np import matplotlib.pyplot as plt G=6.67408e-11 M=1.989e30 m=5.972e24 X0=-147095000000 Y0=0 VX0=0 VY0=-30300 T=365*24*60 def rk(ax,ay,x,y,vx,vy,h): t=0 n=int(T/h) A=[[t],[x],[y],[vx],[vy]] for i in range(1,n): k1x=vx k1y=vy q1x=ax(x,y)...- FahdEl
- Thread
- Algorithm Equation of motion Motion Runge-kutta
- Replies: 3
- Forum: Advanced Physics Homework Help
-
L
I Algorithm to determine the roulette curve
I am trying to develop an equation or algorithm to determine the roulette curve that results from rolling a curve over another fixed curve. A general method to determine the roulette using any two curves, rolling and fixed, seems to be presented here...- LAP3141
- Thread
- Algorithm Curve
- Replies: 1
- Forum: Differential Geometry
-
Z
Time Taken by this Algorithm in Terms of m, p, t_add, t_s and t_w
Hi, Kindly consider the Question 4.8 on the following link http://parallelcomp.uw.hu/ch04lev2sec18.html ##t_s## = start up time ##t_w## = per-word transfer time m = size of message p = number of processors The total time for communication for ##logp## steps is: ##T = (t_s + t_w*m) * log_2 p##...- zak100
- Thread
- Algorithm Terms Time
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
SmarterEveryDay on Youtube Video Algorithm Hacking
SmarterEveryDay is posting a series of videos (this is the first one) on Youtube Video Identification hacking, what it is and how it affects what we see online. Its really good even though the notion of manipulating the Youtube algorithm is very disturbing.- jedishrfu
- Thread
- Algorithm Hacking Video Youtube
- Replies: 9
- Forum: Computing and Technology
-
R
Modified Euclidean Algorithm proof
gcd(f_n,f_{n-1}) gcd[f_{n-1},f_n - f_{n-1}] gcd[(f_n - f_{n-1}), (f_{n-2} - f_{n-1})] gcd[(f_{n-2} - f_{n-1}),f_{n-3} - f_{n-2})] gcd[(f_{n-2} - f_{n-3}),(f_{n-4} - f_{n-3})] . . . gcd(f_2,f_1), where f_2 = 1, f_1 = 1 I assume LateX is not working yet. Not sure if I am on point here or not...- Robb
- Thread
- Algorithm Euclidean Proof
- Replies: 6
- Forum: Calculus and Beyond Homework Help
-
MPPT algorithms, perturb and observe algorithm etc
Hi, I had thought that "hill climbing method" is a general terminology to refer to methods such as perturb and observe and incremental conductance. The same is also said here, "The hill climbing based techniques are so named because of the shape of the power-voltage (P-V) curve. This technique...- PainterGuy
- Thread
- Algorithm Algorithms
- Replies: 7
- Forum: Electrical Engineering
-
Q
I "Basic" question about Grover's Quantum Computing algorithm
Hi everyone, I'm a computer scientist (not a physicist), so I will ask a computer scientist's question. In all the descriptions I found of Grover's algorithm, there is an element that is puzzling the computer scientist in me: it seems that you need to tell the Oracle about the position of the...- QComp
- Thread
- Algorithm Computing Quantum Quantum computing
- Replies: 13
- Forum: Quantum Physics
-
P
I Why is the Phase Shift in Grover's Algorithm Applied to All Elements Except 0?
Hi everybody, I've read some pages in Nielsens "Quantum Computing" book, it's very interesting, but especially at Grover's algorithm, there occurs a question for me. It is said that a phase shift is performed, which is defined as follows: ##|0\rangle \rightarrow |0\rangle \\ |x\rangle...- Peter_Newman
- Thread
- Algorithm Phase Phase shift Quantum basics Shift
- Replies: 4
- Forum: Quantum Physics
-
P
I Grover algorithm geometric interpretation
Good day everybody, I'm currently working on the Grover algorithm. You can also illustrate this process geometrically and that's exactly what I have a question for. In my literary literature one obtains a uniform superposition by applying the Hadamard transformation to N-qubits. So far that's...- Peter_Newman
- Thread
- Algorithm Geometric Geometric interpretation Interpretation Superposition Vector
- Replies: 2
- Forum: Quantum Interpretations and Foundations
-
E
Programming algorithm expressed in math notation
Hey everyone, I wasn't sure if this belonged in the general math forum or not, so I posted it here instead (mods - feel free to move if it belongs elsewhere). What I want to know is how to properly write out a computer algorithm in proper math notation. Take this code for example: Height...- elusiveshame
- Thread
- Algorithm Notation Programming
- Replies: 7
- Forum: Programming and Computer Science
-
F
Can someone recommend an algorithm to optimize this data
I have a data set of samples, and I made up some variables that filter out unwanted samples from the data set. Say each sample has values ##\vec{x}=x_1, x_2,..., x_n##, and I know the values of ##\vec{x}## for each sample. Also, if I sum up all of the samples, I get a value, ##Z##, which tells...- fahraynk
- Thread
- Algorithm Data Optimization
- Replies: 25
- Forum: Programming and Computer Science
-
R
MHB What Type of Math is Used in Fortune's Algorithm?
I've heard that Fortune's Algorithm is the fastest algorithm yet found to generate a voronoi diagram. I am far from being able to understand it, but I got interested in it because I want to learn about procedural generation. My question is, what sort of mathematics would I have to be familiar...- RidiculousName
- Thread
- Algorithm Type
- Replies: 1
- Forum: Programming and Computer Science
-
N
Crossword Puzzle Generation Algorithm
Hey all, for a dictionary app I have to code I have to implement as crossword game as a side feature, unfortunately this is compulsory, I can't figure out a good way of finding words that intersect each other (esp words that intersect multiple others) without a hell of a lot of goto and while's...- NotASmurf
- Thread
- Algorithm Generation Puzzle Recursion
- Replies: 5
- Forum: Programming and Computer Science
-
Finding the Inverse of 2 (mod 17): Euclidean Extended Algorithm
Homework Statement Hi, I'm doing a problem by solving congruences but my question is simply trying to find the inverse of 2 \enspace (mod\enspace 17) from 2x \equiv 7(mod \enspace 17). Homework Equations It's hard to find a definition that makes sense but if you check my upload images you...- FritoTaco
- Thread
- Algorithm Euclidean
- Replies: 6
- Forum: Calculus and Beyond Homework Help
-
Z
How to frame a genetic algorithm for this problem?
Hi, I have a random array which represents method calls. For instance: [3, 4, 7, 40, 39, ...] meaning that method 0 is called 3 times, method 1 is called 4 times, method 2 is called 7 times, method 3 is called 40 times, method 4 is called 39 times and so on upto n. Now consider a module as a...- zak100
- Thread
- Algorithm Frame
- Replies: 3
- Forum: Programming and Computer Science
-
I Roulette Prediction Algorithm Problem
The roulette prediction algorithm is described here: http://pingless.co.il/roulette.pdf And I have a problem with the formula attached Where teta θ is position, velocity and acceleration of the ball. g is garvity force. r is the ball radius from center of the roulette. a is stator incline...- shlomi123
- Thread
- Algorithm Prediction
- Replies: 13
- Forum: Other Physics Topics