Search Results

Search found 1933 results on 78 pages for 'genetic algorithms'.

Page 20/78 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • What is the Big-Oh nitation for this? [closed]

    - by laniam
    procedure quartersearch (x : inter, a1, a2, ?, an) : increasing integers) i := 1{i is left endpoint of search interval} ? j := n {j is right endpoint of search interval} while i < j begin m :=? ?(i + j)? / 4 if x am then ?i := m+1 else if x am then ?m : = ?(i + j)? / 4 else if x am then m := 2 ?(i + j)? /4 else ?if x am then m := 3 ?(i + j)? /4 else j := m end if x = ai then location := i else location := 0

    Read the article

  • Initialize array in O(1) -- how is this trick called?

    - by user946850
    There is this pattern that trades performance of array access against the need to iterate it when clearing it. You keep a generation counter with each entry, and also a global generation counter. The "clear" operation increases the generation counter. On each access, you compare local vs. global generation counters; if they differ, the array has been reset. This has come up in StackOverflow recently, but I don't remember if this trick has an official name. Does it? One use case is Dijkstra's algorithm if only a tiny subset of the nodes has to be relaxed, and if this has to be done repeatedly.

    Read the article

  • sum with matlab code

    - by user27089
    i need help it is only put sum in a code line if you can understand in below i have a code in this line below -> X(i,k+1) = X(i,k) + (( X(j,k)-X(i,k))); i want to change it as: X(i,k+1) = X(i,k) + sum(( X(j,k)-X(i,k))); briefly how can I put sum on the code line clear;rand('state', 1); global xLocation; N = 4; xLocation = rand(N,1); t=2;k=1;X=[N,t]; for i=1:N X(i,1)=xLocation(i); end while( k < t ) for i = 1 : N for j = 1 : N X(i,k+1) = X(i,k) + (( X(j,k)-X(i,k))); end end k = k + 1; end

    Read the article

  • Attempt at Merge Sort: Is this correct? [migrated]

    - by Beatrice
    I am trying to write a merge sort algo. I can't tell if this is actually a canonical merge sort. If I knew how to calculate the runtime I would give that a go. Does anyone have any pointers? Thanks. public static void main(String[] argsv) { int[] A = {2, 4, 5, 7, 1, 2, 3, 6}; int[] L, R; L = new int[A.length/2]; R = new int[A.length/2]; int i = 0, j = 0, k; for (k = 0; k < A.length; k++) { if (k < A.length/2) { L[i] = A[k]; i++; } else { R[j] = A[k]; j++; } } i = 0; j = 0; for (k = 0; k < A.length; k++) { System.out.println(i + " " + j + " " + k); if (i < L.length && j < R.length) { if (L[i] < R[j]) { A[k] = L[i]; i++; } else { A[k] = R[j]; j++; } } } }

    Read the article

  • Where to find algorithms for standard math functions?

    - by dsimcha
    I'm looking to submit a patch to the D programming language standard library that will allow much of std.math to be evaluated at compile time using the compile-time function evaluation facilities of the language. Compile-time function evaluation has several limitations, the most important ones being: You can't use assembly language. You can't call C code or code for which the source is otherwise unavailable. Several std.math functions violate these and compile-time versions need to be written. Where can I get information on good algorithms for computing things such as logarithms, exponents, powers, and trig functions? I prefer just high level descriptions of algorithms to actual code, for two reasons: To avoid legal ambiguity and the need to make my code look "different enough" from the source to make sure I own the copyright. I want simple, portable algorithms. I don't care about micro-optimization as long as they're at least asymptotically efficient. Edit: D's compile time function evaluation model allows floating point results computed at compile time to differ from those computed at runtime anyhow, so I don't care if my compile-time algorithms don't give exactly the same result as the runtime version as long as they aren't less accurate to a practically significant extent.

    Read the article

  • Is programming or computer science in general, all about algorithms?

    - by wakandan
    As a grad student, I find it more and more common for prestigious companies (like Google, Facebook, Microsoft,...) to put algorithm questions in their test and interviews. A few startups I applied to also asked about algorithms. I wonder if algorithms fluency is the most important thing for software developer in those companies? If the answer being yes, what are the best method or resources for one to learn & practice about algorithms effectively? I can't seem to get interested in solving seemingly too complicated problems found in most textbook or websites. Though easily understand basic algorithms (like quicksort, bubblesort,...), I find it immensely difficult to remember and reuse them later. Thanks. P/S: If you ask me what I like, it's building good softwares to solve users' problems innovatively. I suppose that does not necessarily mean the software has to be very complicated.

    Read the article

  • Dijkstra’s algorithms - a complete list

    - by baris_a
    Hi guys, I have recently asked a question about one of the Dijkstra’s algorithms. But, almost everyone thought it was shortest path. Therefore, I opened this post to gather all the algorithms that were invented by Dijkstra. Please add any if you know. Thanks in advance. 1 ) Shunting-yard algorithm

    Read the article

  • OOP vs PP for algorithms

    - by Ilian
    Which paradigm is better for design and analysis of algorithms? Which is faster? Because I have a subject called Design and Analysis of Algorithms in university and have a time limit for programs. Is OOP slower than Procedure programming? Or the time difference is not big?

    Read the article

  • Amazing families of algorithms over implicit graphs

    - by Diego de Estrada
    Dynamic programming is, almost by definition, to find a shortest/longest path on an implicit dag. Every DP algorithm just does this. An Holographic algorithm can be loosely described as something that counts perfect matchings in implicit planar graphs. So, my question is: are there any other families of algorithms that use well-known algorithms over implicit graphs to achieve a considerable speedup?

    Read the article

  • Algorithms behind load-balancers?

    - by Vimvq1987
    I need to study about load-balancers, such as Network Load Balancing, Linux Virtual Server, HAProxy,...There're somethings under-the-hood I need to know: What algorithms/technologies are used in these load-balancers? Which is the most popular? most effective? I expect that these algorithms/technologies will not be too complicated. Are there some resources written about them? Thank you very much for your help.

    Read the article

  • Genetic/Evolutionary algorithms and local minima/maxima problem

    - by el.gringogrande
    I have run across several posts and articles that suggests using things like simulated annealing to avoid the local minima/maxima problem. I don't understand why this would be necessary if you started out with a sufficiently large random population. Is it just another check to insure that the initial population was, in fact, sufficiently large and random? Or are those techniques just an alternative to producing a "good" initial population?

    Read the article

  • graph algorithms

    - by davit-datuashvili
    now one ask please help me to write a few graph algorithms for example http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm there is given such graph my problem is that i want implement graph algorithms on arrays can anybody help me to imlement ddijkstra algorithm on array i want to see one example because it is difficulty for me to understand this pseudocodes which is in internet i mean classes edges and so on please help me

    Read the article

  • Sync Algorithms

    - by Kristopher Johnson
    Are there any good references out there for sync algorithms? I'm interested in algorithms that synchronize the following kinds of data between multiple users: calendars documents lists and outlines I'm not just looking for synchronization of contents of directories a la rsync; I am interested in merging the data within individual files.

    Read the article

  • Algorithms behind FarmVille Game

    - by Vadi
    What are all the algorithms involved in Farmville game, specifically I am interested in drawing trees that has fruits based on user's activities. I am into a project which has a specific need to draw a tree-type image in SVG. I am not sure how to go about the algorithms to define the tree and based on certain business rules the leafs in the tree grows etc., I think you get the idea. Farmville is just an example I took to explain. Any help is greatly appreciated..

    Read the article

  • Algorithms after load-balancer?

    - by Vimvq1987
    I need to study about load-balancers, such as Network Load Balancing, Linux Virtual Server, HAProxy,...There're somethings under-the-hood I need to know: What algorithms/technologies are used in these load-balancers? Which is the most popular? most effective? I expect that these algorithms/technologies will not be too complicated. Are there some resources written about them? Thank you very much for your help.

    Read the article

  • Artificial Inteligence library in python

    - by João Portela
    I was wondering if there are any python AI libraries similar to aima-python but for a more recent version of python... and how they are in comparison to aima-python. I was particularly interested in search algorithms such as hill-climbing, simulated annealing, tabu search and genetic algorithms. edit: made the question more clear.

    Read the article

  • Is there a shorthand term for O(n log n)?

    - by jemfinch
    We usually have a single-word shorthand for most complexities we encounter in algorithmic analysis: O(1) == "constant" O(log n) == "logarithmic" O(n) == "linear" O(n^2) == "quadratic" O(n^3) == "cubic" O(2^n) == "exponential" We encounter algorithms with O(n log n) complexity with some regularity (think of all the algorithms dominated by sort complexity) but as far as I know, there's no single word we can use in English to refer to that complexity. Is this a gap in my knowledge, or a real gap in our English discourse on computational complexity?

    Read the article

  • Using local classes with STL algorithms

    - by David Rodríguez - dribeas
    I have always wondered why you cannot use locally defined classes as predicates to STL algorithms. In the question: Approaching STL algorithms, lambda, local classes and other approaches, BubbaT mentions says that 'Since the C++ standard forbids local types to be used as arguments' Example code: int main() { int array[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; std::vector<int> v( array, array+10 ); struct pair : public std::unary_function<int,bool> { bool operator()( int x ) { return !( x % 2 ); } }; std::remove_if( v.begin(), v.end(), pair() ); // error } Does anyone know where in the standard is the restriction? What is the rationale for disallowing local types?

    Read the article

  • Recursive vs. Iterative algorithms

    - by teehoo
    I'm implementing the Euclidian algorithm for finding the GCD (Greatest Common Divisor) of two integers. Two sample implementations are given: Recursive and Iterative. http://en.wikipedia.org/wiki/Euclidean_algorithm#Implementations My Question: In school I remember my professors talking about recursive functions like they were all the rage, but I have one doubt. Compared to an iterative version don't recursive algorithms take up more stack space and therefore much more memory? Also, because calling a function requires uses some overhead for initialization, aren't recursive algorithms more slower than their iterative counterpart?

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >