Search Results

Search found 5070 results on 203 pages for 'algorithm'.

Page 47/203 | < Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >

  • 7 Card Poker Hand Evaluator

    - by Peter
    Hey, Does anyone know a fast algorithm for evaluating 7 card poker hands? Something which is more efficient than simply brute-force checking a every 21 5-card combination of hands from a set of 7. Cheers, Pete

    Read the article

  • Recommended Math textbooks for programmers

    - by Tony
    I learned math in a non-English environment, I recently read some books about algorithm analysis, I found some math concepts were confusing, and seemed not the same as what I've learned. What math textbooks would you recommend that covers math concepts from the scratch and suitable for self-learning ?

    Read the article

  • question about sorting

    - by skydoor
    Bubble sort is O(n) at best, O(n^2) at worst, and its memory usage is O(1) . Merge sort is always O(n log n), but its memory usage is O(n). Which algorithm we would use to implement a function that takes an array of integers and returns the max integer in the collection, assuming that the length of the array is less than 1000. What if the array length is greater than 1000?

    Read the article

  • How to detect if an ellipse intersects(collides with) a circle

    - by php html
    I want to improve a collision system. Right now I detect if 2 irregular objects collide if their bounding rectangles collide. I want to obtain the for rectangle the corresponding ellipse while for the other one to use a circle. I found a method to obtain the ellipse coordinates but I have a problem when I try to detect if it intersects the circle. Do you know a algorithm to test if a circle intersects an ellipse?

    Read the article

  • Software to Tune/Calibrate Properties for Heuristic Algorithms

    - by Karussell
    Today I read that there is a software called WinCalibra (scroll a bit down) which can take a text file with properties as input. This program can then optimize the input properties based on the output values of your algorithm. See this paper or the user documentation for more information (see link above; sadly doc is a zipped exe). Do you know other software which can do the same which runs under Linux? (preferable Open Source)

    Read the article

  • Calculating permutations in F#

    - by Benjol
    Inspired by this question and answer, how do I create a generic permutations algorithm in F#? Google doesn't give any useful answers to this. EDIT: I provide my best answer below, but I suspect that Tomas's is better (certainly shorter!)

    Read the article

  • Rush Hour - Solving the game

    - by Rubys
    Rush Hour if you're not familiar with it, the game consists of a collection of cars of varying sizes, set either horizontally or vertically, on a NxM grid that has a single exit. Each car can move forward/backward in the directions it's set in, as long as another car is not blocking it. You can never change the direction of a car. There is one special car, usually it's the red one. It's set in the same row that the exit is in, and the objective of the game is to find a series of moves (a move - moving a car N steps back or forward) that will allow the red car to drive out of the maze. I've been trying to think how to solve this problem computationally, and I can really not think of any good solution. I came up with a few: Backtracking. This is pretty simple - Recursion and some more recursion until you find the answer. However, each car can be moved a few different ways, and in each game state a few cars can be moved, and the resulting game tree will be HUGE. Some sort of constraint algorithm that will take into account what needs to be moved, and work recursively somehow. This is a very rough idea, but it is an idea. Graphs? Model the game states as a graph and apply some sort of variation on a coloring algorithm, to resolve dependencies? Again, this is a very rough idea. A friend suggested genetic algorithms. This is sort of possible but not easily. I can't think of a good way to make an evaluation function, and without that we've got nothing. So the question is - How to create a program that takes a grid and the vehicle layout, and outputs a series of steps needed to get the red car out? Sub-issues: Finding some solution. Finding an optimal solution (minimal number of moves) Evaluating how good a current state is Example: How can you move the cars in this setting, so that the red car can "exit" the maze through the exit on the right?

    Read the article

  • Algorithms or OO stuff or new technology

    - by Prashant
    I am trying to learn new stuff about jquery, html, asp .net mvc. I see two school of thoughts - Those who use oo concepts a lot and stress on more object oriented approach Those who rely heavily on algorithms and say a particular problem should take o(n) etc. I am not sure where to spend more time ? . Should I spend more time learning OO stuff or learn new stuff like jquery etc or learn travelling sales man algorithm etc ?

    Read the article

  • Perl vs Python but with more style than normally

    - by user350571
    I'm learning perl and everytime I search for perl stuff in the internet I get some random page with people saying that perl should die because code written in it looks like a lesson in steganography. Then they say that python is clean and stuff like that. Now, I know that those comparisons are always stupid and made by fellows that feel that languages are a extension of their boring personality so, let me ask instead: can you give me the implementation of a widely known algorithm to deal with a data structure like red-black trees in both languages so I can compare?

    Read the article

  • Perl vs Python: implementation of algorithms to deal with advanced data structures

    - by user350571
    I'm learning perl and everytime I search for perl stuff in the internet I get some random page with people saying that perl should die because code written in it looks like a lesson in steganography. Then they say that python is clean and stuff like that. Now, I know that those comparisons are always stupid and made by fellows that feel that languages are a extension of their boring personality so, let me ask instead: can you give me the implementation of a widely known algorithm to deal with a data structure like red-black trees in both languages so I can compare?

    Read the article

  • Sorting a string in array, making it sparsely populated.

    - by S1syphus
    For example, say I have string like: duck duck duck duck goose goose goose dog And I want it to be as sparsely populated as possible, say in this case duck goose duck goose dog duck goose duck What sort of algorithm would you recommend? Snippets of code or general pointers would be useful, languages welcome Python, C++ and extra kudos if you have a way to do it in bash.

    Read the article

  • C# RSA Cryptographic Algorithm

    - by karthik
    Hi, Is C# 'RSACryptoServiceProvider' cryptographic algorithm is a part of Microsoft- CryptoAPI? Any advantage we have for normal asymmetric encryption by using CryptoAPI over 'RSACryptoServiceProvider' in .Net? I cannot understand the difference between them?And which one is best and safty? Could you please help? Thanks Karthik

    Read the article

  • Practical Uses of Fractals in Programming

    - by Sami
    Fractals have always been a bit of a mystery for me. What practical uses (beyond rendering to beautiful images) are there for fractals in the various programming problem domains? And please, don't just list areas that use them. I'm interested in specific algorithms and how fractals are used with those algorithms to solve something in practice. Please at least give a short description of the algorithm.

    Read the article

  • Algorithm to merge adjacent rectangles into polygon

    - by Glitch
    I guess that my problem is related to "convex hull", but no the same. All shapes in the drawing are rectangles with same width and height. Many are adjacent to each other. I want to combine those adjacent rectangles into polygons. Unlike "convex hull", the resuled polygons could be "hollow" inside. Is there any open source algorithm available?

    Read the article

  • Generate all unique substrings for given string

    - by Yuval A
    Given a string s, what is the fastest method to generate a set of all its unique substrings? Example: for str = "aba" we would get substrs={"a", "b", "ab", "ba", "aba"}. The naive algorithm would be to traverse the entire string generating substrings in length 1..n in each iteration, yielding an O(n^2) upper bound. Is a better bound possible? (this is technically homework, so pointers-only are welcome as well)

    Read the article

  • about Select algorithm

    - by matin1234
    Hi I have read about the select algorithm and I have a question maybe it looks silly!!! but why we consider the array as groups of 5 elements ?? can we consider it with 7 or 3 elements??thanks

    Read the article

  • How to convert closed bezier curves to Bitmaps?

    - by Sorush Rabiee
    I need an algorithm to convert a closed bezier curve (perhaps self-crossing) to a binary bitmap: 0 for inside pixels and 1 for outside. I'm writing a code that needs to implement some operations on bezier curves, could anybody give me some resources or tutorials about beziere? Wikipedia and others didn't say anything about optimization, subtracting, union, knot insertion and deletion and other operations :-)

    Read the article

  • Training sets for AdaBoost algorithm

    - by palau1
    How do you find the negative and positive training data sets of Haar features for the AdaBoost algorithm? So say you have a certain type of blob that you want to locate in an image and there are several of them in your entire array - how do you go about training it? I'd appreciate a nontechnical explanation as much as possible. I'm new to this. Thanks.

    Read the article

  • Big O, how do you calculate/approximate it?

    - by Sven
    Most people with a degree in CS will certainly know what Big O stands for. It helps us to measure how (in)efficient an algorithm really is and if you know in what category the problem you are trying to solve lays in you can figure out if it is still possible to squeeze out that little extra performance.* But I'm curious, how do you calculate or approximate the complexity of your algorithms? *: but as they say, don't overdo it, premature optimization is the root of all evil, and optimization without a justified cause should deserve that name as well.

    Read the article

< Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >