I simulated a microcanonical ensemble of 10 ideal gas particles in one dimension and yielded the expected normal distribution of velocities. However, I still did not get how the algorithm works. The demon has non-negative energy content and the demon together with the system constitutes a closed...
Quanta Magazine published this article on a potentially new algorithm for graph isomorphism by Prof Laszlo Babai of the University of Chicago:
https://www.quantamagazine.org/20151214-graph-isomorphism-algorithm/
There's a reference to the Arxiv preprint here:
http://arxiv.org/abs/1512.03547v1
Hello. I am unsure if this subforum is the right place for this question, but without any alternatives, I will dare to post it here.
A few days ago I received an assignment which is about the creation in VHDL of a Sklansky adder. However, before I move to the coding part, I have trouble...
Homework Statement
Homework Equations
Tree data structures.
I think it might also have something to do with minimax algorithm, but it was only mentioned once and never discussed extensively in class so I doubt it is required.
The Attempt at a Solution
[/B]
If both players play as well as...
Let me know if I've invented a valid O(n) sorting algorithm.
public void Sort ( this List<T> L )
{
// Check every second whether L is sorted
// Given enough time, natural bit flips will eventually make L sorted
while ( !L.IsSorted() ) Thread.Sleep(1000);
}
public bool IsSorted (...
Homework Statement
I have the following algorithms: Prime MST with array, Prime MST with priorityq and Kruskal with priorityq. I have to choose the best algorithm to find the minimum spanning tree on a planar graph. A planar graph has the property in which the number of edges is in O(number of...
I've read that this algorithm conserves energy if the system it's applied to conserves energy. I can't find a proof, and it's not a particularly obvious statement, so how would you prove it?
I'm writing a class to format console output and the trickiest method in this class so far is the one for printing a table. I'm having it act like an HTML table in how text fits
public static void PrintTable ( string[][] cells )
{
// Outputs content in cells matrix...
Hey guys and gals. I have come across a problem that I was wondering if anyone recognized.
I came across it while trying to find approximate solutions to a fluid-flow PDE, when the flow is high(The PDE is described in another one of my threads, but that is not important, I will describe the...
I am at the moment working on a project in which I try to minimize the annual running costs of a chemical manufacturing plant. To predict annual running costs I created a model with over 50 inputs, including things such as the type of chemicals and equipment used at different points in the...
Hello! (Wave)
I am looking at the description of the Simplex algorithm.Let $\overline{x_0}$ be a non degenerate basic feasible solution.
We suppose that $\overline{x_0}=(x_{10}, x_{20}, \dots, x_{m0},0, \dots,0)$ with $x_{10}, x_{20}, \dots, x_{m0}>0$.
Thus the first $m$ columns of $A$, i.e...
Suppose you have a list of numbers, say ##{1, 7, 9, 4, 5, 6}##.
You store the first number, and then iterate through this list.
For each number in the list, you flip a coin. If it is heads, you swap that element in the list with the number you stored. If tails, you do nothing. Either way, you...
Homework Statement
Let m and n be natural numbers. Suppose ## min(m, n) \geq 2^k ## for some natural number k. Show that the Euclidean Algorithm needs at most ## 2k ## iterations to calculate the gcd of m and n.The Attempt at a Solution
[/B]
So far I think I need to show that for all the...
Homework Statement
a Write an algorithm to find the median of three distinct integers a,b,c
b Describe D, the set of inputs for your algorithm, in light of the discussion in Section 1.4.3 following Example 1.9. This section discusses Average complexity for an algorithm which involves an...
Homework Statement
We have four integers a,b,c,d each of which are >= 1 and <= n, and are asked to write an algorithm to find all possible solutions to the following equation: a7 + b7 = c7 + d 7
The algorithm should use a heap of at most n elements, and should have worst case runtime of O(n2...
First I'll try to give a summary of what I understand about the anti-##k_T## algorithm (as a continuation for a particle flow algorithm)...
The algorithm uses an iterative clustering with transverse momentum ##p_T## weighted distance parameter and is applying a selection on the "protojets". For...
Hey! :o
Lemma 1.
For any $x$ in the ring $F[t,t^{-1}]$ ($F[t,t^{-1}]$: the polynomials in $t$ and $t^{-1}$ with coefficients in the field $F$), $x$ is a power of $t$ if and only if $x$ divides $1$ and $t-1$ divides $x-1$ (the divisibilities are meant, of course, in $F[t, t^{-1}]$).
Lemma 2...
Homework Statement
so for a side task I'm supposed to assign people to groups for an icebreaker in python, can anyone give me links to theories that I could read up on or give me suggestion
X number of people at my company signed up for a dinner roulette as a way to meet new people. Everyone...
Hi, is there away to find values of m, x, and b for a given value of y. For example, if I have y = 10000, my 'm' could be 100, x = 100, and b = 0, or it could be m = 250, x = 40, and b = 0 or any other combination of m, x, and b. I need to write a C code for my microcontroller. I will be given...
HI everyone. I was just wondering about a career in the IT (I study communication systems engineering, but I'm rather interested in coding, rather than Internet and communcation systems- related stuff). I wanted to ask you, given the advances that technology is making, which skills would be...
Not sure if this is the correct place to post this type of question, so I will relocate if need be. What I'm interested in doing is taking an array of numbers and assigning a rank based on ascending order. Explicitly, the ranking of an array would look like
1.534 - 15
-0.887 - 3
-0.489...
Homework Statement
Hi - I'm on the last chapter of this book and am a bit stuck. I am given a very basic fortran program (code attached in the zip file) and asked to 'investigate its accuracy and stability, for various values of Δt and lattice spacings'. The program is an implementation of the...
Hey! :o
I am studying Cryptology right now and I am facing some difficulties to understand the Pohlig-Hellman algorithm.
Could you explain to me how the algorithm works??
Could you give me a step by step example??
(Wondering)
Hello! (Wave)
I am looking at the following example of Memoized Dynamic Programming algorithm.
memo={}
Fib(n):
if n in memo return memo[n]
if n<=2 F[n]=1
else F[n]=F[n-1]+F[n-2]
memo[n]=F[n]
return F[n]
Could you explain me why we check if $n$ is in memo although memo is a set...
Hi - on the last chapter of this course and was feeling much better about it all, but I now confess to being back in my normal state - confused. I am given a simple fortran program (code attached in the zip file) and asked to investigate its accuracy and stability, for various values of \Deltat...
I don't understand the following aspect of the parity problem and if someone could please explain it to me, I would be grateful.
In the given quantum circuit, the output f(x) is defined to be x.a = x1a1+x2a2+x3a3(mod 2), where a is a fixed |a1a2a3>. For example, if x=|101> and a=|100>, x.a =...
In the quest of searching what are the basic ingredients of quantum theory that provide exponential speed-up to some quantum algorithms, a basic question that is pursued in the literature is when a quantum circuit (or algorithm) can be classically simulated efficiently. One example is this paper...
Given a matrix A of a regular graph G. The matrix A can be divided into 4 sub matrices based on adjacency of vertex ##x \in G##.
## A_x## is the symmetric matrix of the graph ##(G-x)##, where ##C## is the symmetric matrix of the graph created by vertices of ##(G-x)## which are adjacent to...
Hi all,
Im having trouble making a general algorithm for what at first glance appears to be a simple problem. If I have a volume (V) that can be made from two smaller, different volumes how can I decide which volumes to use to get the minimum wastage? So for example if V(required)=300 and my...
This is the core idea-
https://www.physicsforums.com/threads/complexity-analysis-problem-of-an-algorithm.812931/
I would like to write a formal psudoecode (latex), but as new writer I am having hard time to write, whatever I wrote is not easy to understand, so i would appreciate forum...
Hello! (Wave)
A $m \times m$ grid is a graph of which the vertices are ordered pairs of natural numbers $(n_1, n_2)$ with $1 \leq n_1 \leq m$ and $1 \leq n_2 \leq m$.
Two vertices $(k_1,k_2)$ and $(k_3,k_4)$ are neighbors iff $|k_1-k_2|+|k_3-k_4|=1$.
We suppose that a unique number $y_w$ is...
Hey all, we're making a robot that teaches itself to walk using a genetic algorithm(took a hiatus with this but have returned).
So i coded a simulator that to see why the GA wasn't working well with realistic physics.
The GA works like this "A++,B---,D+" would mean motor A's angle increase by...
##A,B## are symmetric matrices of graphs ##G,H## respectively. For ##x \in G##,consider the graph ##(G-x)##, it has vertices adjacent to ##x## and vertices non adjacent to ##x##.## A_x## is the symmetric matrix of the graph ##(G-x)##, where ##C## is the symmetric matrix of the graph created by...
So I've been writing an algorithm to build a function tree and I believe I'm aaaaallllllmost there. The intent is to take a math function like
x^2+x+1*5
and build it into
/ + \
/ + \ / \
/ ^ \ x 1 * 5
x 2...
Hello everyone,
I have been interested in trajectory optimization for a while now and I have read a few papers on that topic and bought the book "Spacecraft trajectory optimization" from Cambridge University Press and want to start programming with the goal to optimize a trajectory in a...
I know from the Fourier Analysis
that any signal can be represented
as summation of elementary
signals i.e. basis functions
.Likewise,any image can be
represented as summation of Basis images.
Is there any available code, or
even an algorithm, that would
allow me to compute Basis images
of an...
Hello! (Wave)
I want to write an algorithm that finds an optimal vertex cover of a tree in linear time $O(n)$, where $n$ is the number of the vertices of the tree..
A vertex cover of a graph $G=(V,E)$ is a subset $W$ of $V$ such that for every edge $(a,b)$ in $E$, a is in $W$ or $b$ is in...
Hey all, writing this simple genetic algorithm but its not working. Any idea why?
static int len = 30;
static char[,] dog = new char[len, 30];
static void breed()
{
sort();
int Ii0 = r.Next(0,15);
int Ii1=r.Next(0,15)...
Hello! (Wave)
Give an algorithm that finds the MST (maximum spanning tree) of a graph $G=(V,E)$.
Prove that the algorithm you gave finds the MST.
I tried the following:
I applied the Kruskal algorithm, but instead of ordering the edges by weights in increasing order I ordered them in...
Hello! (Wave)
The Kruskal's algorithm is the following:
MST-KRUSKAL(G,w)
1. A={}
2. for each vertex v∈ G.V
3. MAKE-SET(v)
4. sort the edges of G.E into nondecreasing order by weight w
5. for each edge (u,v) ∈ G.E, taken in nondecreasing order by weight w
6. if FIND-SET(u)!=FIND-SET(v)...
Hello! (Wave)
Steps to build Huffman Tree
Input is array of unique characters along with their frequency of occurrences and output is Huffman Tree.
1. Create a leaf node for each unique character and build a min heap of all leaf nodes (Min Heap is used as a priority queue. The value of...
Hello! (Wave)
I am asked to write a $Ο (n \lg k)$ - time algorithm that merges $k$ sorted lists into one sorted list, where $n$ is the the total number of elements in all the input lists.
Hint: Use a thin heap for a $k$ -way merging.
Do you have an idea what could be meant with thin heap ...
I am not sure whether this question should go in Quantum Physics, Computers, or Linear Algebra. I am willing to see it moved if appropriate.
In Nielsen and Chuang's "Quantum Computation and Quantum Information", in explaining quantum parallelism in section 1.4.2 (as a preparation for Deutsch's...
Hey! :o
Which of the following sorting algorithms are (or can be implemented as) stable:
Insertion Sort, Merge Sort, Heap Sort, Quicksort ??
How can we determine it?? (Wondering)
I am not sure whether it should be here, or in statistical mathematics or in computers thread...feel free to move it. I am using it here because I am trying to understand the algorithm when it's used in particle physics (e.g. identification of neutral pions in ATLAS).
As I read it:
In general...
I have come across this Proportional Integral- Derivative( PID) control theory. I feel that it is highly beneficial and accurate. I want to create a new algorithm which is more accurate, faster, efficient than PID. Also it should be easily programmable in microcontroller. So what are the...
Hey all, I'm currently working on an app that requires the a sub routine to extract 'blob"s from images, ie if I have multiple black shapes on a white background split them into separate images. Google turned up nothing, my soultion was to
1. flood fill pixel(0,0) with color[0]
2.add color to...
I'm going through an explanation in a number theory book about Tonelli's algorithm to find the square roots of a quadratic residue modulo ##p## where ##p## is prime, i.e. I want to solve ##x^2 \equiv a \pmod{p}## with ##(\frac{a}{p}) = 1##. The book goes as follows:
Let ##p - 1 = 2^s t##, where...