Algorithm Definition and 651 Threads
-
R
C/C++ How to Create a Spiralling Algorithm in C++ for Printing Patterns
Hey, I got an assignment to write and algorithm in C++ to print this pattern: 35 34 33 32 31 30 16 15 14 13 12 29 17 04 03 02 11 28 18 05 00 01 10 27 19 06 07 08 09 26 20 21 22 23 24 25 As you...- ron_jay
- Thread
- Algorithm C++
- Replies: 3
- Forum: Programming and Computer Science
-
H
How to Find the Shortest Path Through N Points in a Weighted, Undirected Graph?
I've got a small assignment to do on graphs but it's a bit frustrating that no standard algoritms such as Dijkstra, Bellman-Ford, etc. can be used or at least I don't know how could they help. Given a graph one is to find shortest path through N points. That's it. Starting point can be...- haki
- Thread
- Algorithm Assignment Graph
- Replies: 10
- Forum: Programming and Computer Science
-
M
Proof of Multiplicative Inverses of Coprime Numbers via Euclidean Algorithm
Hi I am currently studying Information Theory. Could I please have anyone's ideas on the following question: Using the Euclidean algorithm, show that coprime numbers always have multiplicative inverses modulo each other. I tried the following proof, using Fermat's little theorem, let me...- miccol999
- Thread
- Algorithm Euclidean
- Replies: 2
- Forum: Set Theory, Logic, Probability, Statistics
-
H
Complexity of divide and conquer algorithm?
Let's say I have some algorithm with complexity O(n^k) for some constant k. and let's say it runs in some time T. Now, I want to implement a divide and conquer approach for this algorithm, by dividing the problem in half each recursion. So basically, the first time i run my algorithm it will run...- homomorphism
- Thread
- Algorithm Complexity
- Replies: 4
- Forum: Programming and Computer Science
-
P
MATLAB Saving Matrices Generated by Matlab Algorithm
Hi I have a question, I have to save to file the matrixs generated by an algoritm in Matlab. So i was wondering if is it possibile and how, to use in the filename a variable of the algoritm. Let's say "i" is the counter of my cicle and i would like to save the matrix generated at every cicle...- PhilippH
- Thread
- Algorithm Matlab Matrices
- Replies: 3
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
D
Proving a Division Algorithm for Real Numbers?
How might I prove a Division Algorithm for the Real numbers? That is to say, if x, \alpha \in \mathbb{R}, then x=k \alpha + \delta for some k \in \mathbb{Z}, \delta \in \mathbb{R} with 0 \leq \delta < \alpha where k, \delta are unique.- Doom of Doom
- Thread
- Algorithm Division
- Replies: 4
- Forum: Calculus
-
V
Is My Integer Factorization Algorithm Flawed?
I am posting an integer factorization algorithm that I have developed. I am hoping for feedback on any obvious flaws that I might have missed before writing a computer programme to test it out. Thanks in advance Visu- visu
- Thread
- Algorithm Factorization Integer
- Replies: 9
- Forum: Linear and Abstract Algebra
-
I
Top Algorithm Design Book Recommendations for Non-CS Programmers
can someone recommend a good algorithm design book? like the end all be all of algo design? so that i don't have to read anything else cause I'm not a cs major just someone who wants to be decent at programming- ice109
- Thread
- Algorithm Book Design
- Replies: 6
- Forum: Programming and Computer Science
-
R
Expectation for # Exchanges (Quicksort Algorithm)
Hi I am reading Hoare's original paper where he derives the complexity of quicksort. I am trying to figure how he derives the expectation for the number of exchanges (sorry if this is a very CS-specific question): \frac{(N-r-1)(r-1)}{N} \frac{N}{6}+\frac{5}{6N} I can't see...- rwinston
- Thread
- Algorithm Expectation
- Replies: 3
- Forum: Set Theory, Logic, Probability, Statistics
-
B
Modular Algorithm for Solving Equations with Unknowns Modulo 100
how can i solve this problem? [ x1= a (mod 100) , a= 20 (mod 37) ] [ x2= b (mod 100) , b= 15 (mod 37) ] [ x3= c (mod 100) , c= 18 (mod 37) ] must be ; x2= a.k + y (mod100) and x3= b.k + y (mod100) i need find b and c.. thank you best regards..- booney1983
- Thread
- Algorithm
- Replies: 6
- Forum: Linear and Abstract Algebra
-
S
How Do You Calculate a(t+dt) Using the Velocity Verlet Algorithm?
Homework Statement I am going to use the velocity verlet algorithm to simulate the position, velocity and acceleration at time t of some particle. Homework Equations We got the Langevin equation: a(t) = -v(t)/tau - U'(x) / m + F_f(t) / m Where tau is the mass divided by the friction...- shad0w2000
- Thread
- Algorithm
- Replies: 2
- Forum: Advanced Physics Homework Help
-
M
Euclid's Algorithm Homework: Stuck & Need Help
Homework Statement http://aycu33.webshots.com/image/44152/2001827062284448769_rs.jpgThe Attempt at a Solution pretty stuck...- Mattofix
- Thread
- Algorithm
- Replies: 5
- Forum: Calculus and Beyond Homework Help
-
S
MATLAB Finding Primes using Algorithm in MATLAB
Hi all, i understand the following however i don't know how to put this on matlab. any help or hints will be very appreciated. The following algorithm enables us to identify the prime number up to a given integer N, by eliminating all non-primes in that interval. It starts from a lower end...- sara_87
- Thread
- Algorithm Matlab Primes
- Replies: 3
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
H
Data Structures and Algorithm Analysis
Has anyone here taken this class before? I've been in this class for two weeks, and I still can't get a feel for how difficult or time consuming it may be. My instructor keeps mentioning discrete mathematics (which I haven't taken), although it wasn't a prerequisite for the course. Additionally...- hotcommodity
- Thread
- Algorithm Analysis Data Structures
- Replies: 13
- Forum: STEM Academic Advising
-
B
Estimating Pi with Twister Algorithm & Monte Carlo Simulation
okay new problem here. I am doing a Monte Carlo simulation to estimate pi. The question deals with throwing darts randomly at a board with a radius 1 with a square inscribed in it. I have done a script that randomly selected a number b/w -1 and 1. Then I was supposed to generate the results of...- bobsmiters
- Thread
- Algorithm
- Replies: 2
- Forum: Precalculus Mathematics Homework Help
-
S
Fast Algorithm for Determining Path Existence in a Graph?
Is there an algorithm which is O(1) or O(log n) (basically a very fast algorithm) which can tell whether there is a path from a node A to a node B in a graph? Thanks- sid_galt
- Thread
- Algorithm Graph Path
- Replies: 3
- Forum: Programming and Computer Science
-
E
The limit of a factoring algorithm
Hi Ho! It is easy to observe that to get all factors of an integer n, one does not need to try whether a divides n for 1 < a < n. But, rather using the following observation: Suppose n is 24, then 24 / 1 = 24 24 / 2 = 12 24 / 3 = 8 24 / 4 = 6 -------------(!) 24 / 6 = 4 24 / 8...- Eus
- Thread
- Algorithm Factoring Limit
- Replies: 11
- Forum: Linear and Abstract Algebra
-
P
Levenberg-Marquadt Algorithm (GSL implementation)
Hello there, I have to fit a one term exponential curve: y = a*exp(-b*t), and I have to implement the fitting procedure in a C program. Some days ago I discovered the GSL (GNU Scientific Library), and I told myself better later than never ;-) When reading the GSL documentation and the...- pisuke
- Thread
- Algorithm
- Replies: 7
- Forum: General Math
-
M
Developing an Algorithm for Calculating Range of Oerlikon 20 mm Auto-Cannon
I've been assigned a relatively funky physics project, and the process of writing the algorithm for said project has completely stumped me. I have chosen to research the Oerlikon 20 mm auto-cannon, and have done all of my research and am at the point where I am supposed to write an... -
M
How Do I Design an Algorithm to Convert Height and Weight Measurements?
Homework Statement The assignment was to design an algorithm that asks for a user's height in feet and inches and their weight in pounds. The output of user's height and weight is suppose to be the user's height in meters and the user's weight in kilos. So I'm basically just suppose to convert...- mikedot
- Thread
- Algorithm Assignment
- Replies: 2
- Forum: Engineering and Comp Sci Homework Help
-
Solving Shor's Algorithm to Factor 15: Results & Analysis
hey I have a quick question about this. I was trying to understand the QFT operator, so I manually used shor's algorithm to factor 15. I used 2 for the random number. My results seem a bit weird tho. below are the probabilities of observing each number (the correct answer is 4, since the...- michael879
- Thread
- Algorithm
- Replies: 1
- Forum: Quantum Physics
-
Z
Simplify Decimal to Radical Decimal to Radical Algorithm
decimal to radical algorithm? does anyone know if there is a method of writing a decimal number in its simplified radical form?? I really would like to know if there is- Zerobu
- Thread
- Algorithm Radical
- Replies: 2
- Forum: Programming and Computer Science
-
C
Deterministic time/space for an algorithm?
can someone point me to some resources to help find deterministic time and space for algorithms? Is there any software I can download which will help me determine these? Also is there any software which will help me come up with a growth function? Perhaps plotting data etc.- Coolphreak
- Thread
- Algorithm
- Replies: 18
- Forum: Programming and Computer Science
-
D
Problem with summation algorithm
Hi there, I'm trying to right a program for class that 1st assigns random single precission floats from 0 to 1 to the elements 1-d array and then sums them up. Next I'm supposed to compare to this thing called the Kahan summation algorithm for different values of N (array size) using the...- Dathascome
- Thread
- Algorithm Summation
- Replies: 2
- Forum: Programming and Computer Science
-
Understand Shor's Algorithm & Quantum Fourier Transform
hey, from what I've read here: http://www.quantiki.org/wiki/index.php/Shor%27s_Algorithm , I understand most of the algorithm. The one thing that I don't get is what the quantum Fourier transform does to the input register. Can someone either explain how this works or what exactly it does?- michael879
- Thread
- Algorithm
- Replies: 2
- Forum: Quantum Physics
-
Why is the brute force factoring algorithm exponential time?
ok so I thought of this factoring algorithm, and I did some quick analysis on it (attached picture, time is in seconds * 5). It appears to be polynomial. However, when I see the basic brute force factoring algorithm I think that's also polynomial. So before I get excited over nothing. Can...- michael879
- Thread
- Algorithm Factoring Time
- Replies: 9
- Forum: General Math
-
C/C++ Is It Challenging to Write a Perceptron Learning Algorithm in C++?
Have you ever written a perceptron learning algorithm? http://en.wikipedia.org/wiki/Perceptron Which language did you use? Would it be overly complicated to try to write it in C++ (compared with, say, MATLAB)?- Math Is Hard
- Thread
- Algorithm
- Replies: 5
- Forum: Programming and Computer Science
-
A
Generic algorithm for probability any propositional formula
Ciao all, Is there a generic algorithm to compile the probability P(A) of any propositional formula A (provided that we have only the probability of each atoms constituting A)? For example, we have that A= a1 and not (a2 and a3 and ( not a4 and not a5 and not a6 ..) , or any other...- Aldebaran2
- Thread
- Algorithm Formula Probability
- Replies: 9
- Forum: Set Theory, Logic, Probability, Statistics
-
C
Guessing Number-Generating Algorithm
Hey everyone. Before I get started on the actual problem, here's a quick background story: Last year my math teacher gave out passwords to check grades online. They were constructed in the following manner - 1st initial, 2nd initial, random 1 digit number. The students in the class...- caldiar
- Thread
- Algorithm
- Replies: 6
- Forum: Linear and Abstract Algebra
-
L
How to Convert Between Julian Day and Gregorian Date?
Hi guys, I have another weak problem here if you would care to help, please. I am trying to convert between the julian day and the gregorian date, and I found a eally good website:http://www.ortelius.de/kalender/calc_en.php The only problem is that when I run into the centennial cycle...- lewis198
- Thread
- Algorithm Explanation
- Replies: 1
- Forum: General Math
-
N
Diagonalization Algorithm for Large Matrices: Any Suggestions?
Does anyone here know of any fast algorithms to diagonize large, symmetric matrices, that are mostly zeros? (by large I mean 300x300 up to several million by several million)- NeoDevin
- Thread
- Algorithm Diagonalization
- Replies: 17
- Forum: Programming and Computer Science
-
Q
Ultra-lossless compression algorithm
About a year ago I came up with an idea for a compression algorithm which could potentially compress any type of data (pictures, movies, text, ect) with equal ability, and could potentially compress it to 1/1000 or less of its original size. It is such a simple idea that I am sure that if it...- q3snt
- Thread
- Algorithm Compression
- Replies: 11
- Forum: Computing and Technology
-
A
Converting an algorithm into an equation
Hello. I've got a simply ballistics program with a very simply algorithm to deal with air friction. However, I am trying to find a mathematical forumula equivalent. Here is the algorithm: G = accel due to gravity (universal constant) F = projectile air friction factor (constant for a given... -
H
Noise handling algorithm in 8 wire touch screen
Noise handling algorithm in 8 wire touch screen here's how a touch screen work http://focus.ti.com/lit/an/slaa298/slaa298.pdfProblem: when the touch pen is stationary on a point and reading ADC values from a touch screen using the micro controller, the ADC values are never the same eg, 1st...- hanhao
- Thread
- Algorithm Noise Screen Wire
- Replies: 9
- Forum: Engineering and Comp Sci Homework Help
-
Z
Algorithm Flow Chart: Create Easily & Automatically
Algorithm flow chart?? I don't know if the exact word is flow chart, It's a direct translation from a french word, it's something that you represent an algorithm with bunch of circles, rectangles, parallelograms, and Rhombus. Anyone know what I'm talking about ? in case someone does, is there...- ziad1985
- Thread
- Algorithm Flow
- Replies: 5
- Forum: Computing and Technology
-
B
Algorithm question - totally lost
Homework Statement Write an algorithm that returns the index of the first occurence of the largest element in the sequence s[SIZE="1"]1,...,s[SIZE="1"]n. Example: If the sequence is 6.2 7.9 4.2 8.9 the algorithm returns the value 4. I am new here...I...- bretta
- Thread
- Algorithm Lost
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
S
Best ODE algorithm to use for time/velocity independent potentials?
Hello, I am not sure if this is the right place to ask this, but I don't readily see a "numerical methods" forum here so I assumed this would be the place to go. Sorry if I overlooked another place to post this! Anyway, I have some points interacting via potentials that are dependent only on...- Signifier
- Thread
- Algorithm Independent Ode Potentials
- Replies: 2
- Forum: Programming and Computer Science
-
M
Algorithm for solving system of nonlinear equations
I'm trying to find an algorithm to solve a 4 variable system of nonlinear equations.. the variables are named w,x,y,z and a,b,c,d are constants: a = x - y + z b = w + x c = y * z d = x * y / w Can anyone offer any advice? Much appreciated...- mooshasta
- Thread
- Algorithm Nonlinear System
- Replies: 1
- Forum: Linear and Abstract Algebra
-
D
Calculating Square Roots - Matrix Algorithm
Hi. I only just recently found out about an algorithm for calculating the square roots of a number. Lets say i want to evaluate \sqrt {n}. I can make an approximation by inspection, and say \sqrt n \approx \frac{a}{b}. Now, using this approximation, i can write: \left[...- danago
- Thread
- Algorithm Matrix Roots Square
- Replies: 7
- Forum: Precalculus Mathematics Homework Help
-
F
Solving Connected Graphs with Algorithm: K Blue/Red Edges
Homework Statement Given a connected graph G = (V,E). Let n = |V |. Each edge in G is already colored with either RED or BLUE. Devise an efficient (i.e. polynomial-time) algorithm which, given an integer k, 1 <= k <= n − 1, either (a) returns a spanning tree with k BLUE edges and n − 1 −...- frank_buf@yahoo
- Thread
- Algorithm Hi
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
V
What is the most useful algorithm ever written?
Which algorithm is the most useful and compact that anyone has written?- verdigris
- Thread
- Algorithm
- Replies: 13
- Forum: Programming and Computer Science
-
Need an algorithm to calculate a function
I'm trying to calculate a table of x vs t, with x as the dependent variable from this formula t + C = \frac{1}{2}(x\sqrt( 1 - x^2) + arcsin(x) ) C=0.4783 is given when t=0 and x = 1/2 I thought it would be simple but my code is giving nonsensical results, viz. a straight line ! I do...- Mentz114
- Thread
- Algorithm Function
- Replies: 2
- Forum: Advanced Physics Homework Help
-
B
Write Algorithm to Find the Index of Largest Element in Sequence
I am having the hardest time getting this algorithm written: Write an algorithm that returns the index of the first occurrence of the largest element in the sequence s1,..., sn. If the sequence is 6.2, 8.9, 4.2, 8.9, the algorithm returns the value 2. Input: s, n Output: ?? I'm...- Bucs44
- Thread
- Algorithm Writing
- Replies: 1
- Forum: Calculus and Beyond Homework Help
-
H
List of increasing integers algorithm
Specify the steps of an algorithm that locates an element in a list of increasing integers by successively splitting the list into four sublists of equal (or as close to equal as possible) size, and restricting the search to the appropriate piece. (Hint: see binary search algorithm.) can...- hyderman
- Thread
- Algorithm Increasing Integers List
- Replies: 1
- Forum: Calculus and Beyond Homework Help
-
B
Algorithm to find smallest element
I'm working on an algorithm that finds the smallest element among a, b, and c. Here is what I have so far: Input: a,b,c Output: small; smallest element in the sequence a,b,c a = 2, b = 4, c = 3 Small = a If b < small, then small = b If c < small, then small = c Is...- Bucs44
- Thread
- Algorithm Element
- Replies: 6
- Forum: Calculus and Beyond Homework Help
-
H
Help with Algorithm Homework: Locating Last Occurrence of Smallest Element
hello any one can help me with this thanx The Horner’s method is an algorithm that evaluates polynomials. The following pseudocode shows how to use this method to find the value of anxn + an-1xn-1 + . . . + a1x + a0 at x = c. procedure Horner(c, a0, a1, a2, . . . , an : real numbers) y...- hyderman
- Thread
- Algorithm Homework
- Replies: 6
- Forum: Calculus and Beyond Homework Help
-
A
Quantum Algorithm: Implementing Shor's & Finding Simpler Algorithms
For a computer science project I am creating a simulation of quantum computer memory structure and operations and implementing Shor's algorithm for number factorization. I have been readings its steps and sort of get it but I want to see a simpler quantum algorithm in action to solidify my...- Atomos
- Thread
- Algorithm Quantum
- Replies: 2
- Forum: General Math
-
0
Check for Cycles in Undirected Graphs: O(|V|) Algorithm
I'm just posting a random graph algorithm problem for discussion fodder, since another interesting graph algorithm post was removed due to a threatening-sounding title and lead-up. This is from Cormen, Leiserson, Rivest, & Stein, 22.4-3 (not a homework problem of any kind, just for fun--I had...- 0rthodontist
- Thread
- Algorithm Cycles Graphs
- Replies: 25
- Forum: Programming and Computer Science
-
S
Mathematica Solving Math Algorithm Problem with rand(1,1) Function
Hello I have to write an algorithm that randomly chooses between A B and C. I have to use the function (rand(1,1) which gives me a radndom number from the following (0,1,2,3,4,5,6,7,8,9).. I was thinking of assigning A = 1:3 B = 4:6 C = 7:9 But I run into the problem of the random...- sapiental
- Thread
- Algorithm Mathematical
- Replies: 1
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
S
MATLAB How Can I Assign 3 Objects to 10 Randomly Generated Numbers in Matlab?
Hey there, I was just wondering if anyone in here could help me out with a short algorithm I have to write for my class. Lets say the function fix(10*rand(1,1)) gives u a random number out of (0,1,2,3,4,5,6,7,8,9) now, you need to use the number from the generator to pick out of 3...- sapiental
- Thread
- Algorithm Mathematical Matlab
- Replies: 2
- Forum: MATLAB, Maple, Mathematica, LaTeX