In mathematics and computer science, an algorithm is an effective method expressed as a finite list of well-defined instructions for calculating a function. Algorithms are used for calculation, data processing, and automated reasoning.
1
vote
1answer
133 views
Puzzle solving: Minimum number of steps to achieve a goal
I have been doing some programming contest problems, and I have noticed that many of them involve something along the lines of "get the minimum number of steps necessary to achieve a certain goal".
...
1
vote
4answers
241 views
Approach to simplifying an algorithm
For completely random reasons*, I wrote some code that calculates and displays the following expression:
P=1*(2+2)(3+3+3)(4+4+4+4)..(n+n...…
Which is equivalent to (n!)^2
The version I wrote ...
10
votes
7answers
364 views
Generating random math expression
I have this idea running around in my head, to generate and evaluate random mathematical expressions. So, I decided to give it a shot and elaborate an algorithm, before coding it to test it.
Example:
...
1
vote
2answers
91 views
What is the best programming language to do crypto running time measurement?
I am trying to measure the running time of different crypto algorithm. e.g. how long it takes to encrypt/decrypt a block of plaintext. May I ask if C with OpenSSL is the best PL to do this?
0
votes
2answers
194 views
Creating alien symbols or signs that look natural [closed]
I was reading some Cthulhu Mythos stuff and started to think about those various signs and symbols that are used in the texts. Of course those are made by humans but point is that they look natural to ...
0
votes
2answers
102 views
How can I compute maximal area including only given integer pairs of (x,y) coordinates?
The values of a function of two variables z = f (x, y), where x, y, z take integer values are stored in sql db. Calculate (appoint) the largest surface area of the flat. By 'flat area' we mean an ...
8
votes
1answer
265 views
Does any know of a Algorithm that allows for a figure like this image?
Does anyone know how to create an algorithm capable of making the figure just like in the picture, when given a set of specific points (3D array)
1
vote
2answers
288 views
Can we create a program that writes out its source code?
Can we create a program that print out its source code what if we (or the program itself) compile than the new program would have the same exact functionality what the original program has? So somehow ...
-2
votes
0answers
76 views
Lectures on data structure [closed]
I am looking for good online video lectures on advanced data structures. From advanced data structure I mean topics like trees, hashing , Dynamic memory management , heaps. Any reference for good ...
0
votes
4answers
213 views
What does it mean to perform an operation “In Place” for Interpreted Languages?
Programming question:
Reverse words in a string (words are separated by one or more spaces).
Now do it in-place.
What does "in-place" mean in the above context for an interpreted language ...
3
votes
4answers
269 views
How to determine most challenging test-cases to test any algorithm?
While solving any problem, we write algorithms. Some efficient, some not, some work, some fail. But sometimes we end up writing something which is mostly a success when we do a dry test run, perhaps, ...
0
votes
0answers
22 views
What is the formal name of the 'KeyTips' on ribbon framework and 'link-hints' mode in vimium? What are the algorithms used in it?
What is the formal name of the KeyTips on ribbon framework and link-hints mode in vimium?
I sometimes assume that the key sequences are generated using some sort of brute-force algorithm.
Are there ...
1
vote
1answer
80 views
finds all possible permutations of a certain numbers of distinct digits
I am stuck on the following problem. I want to find an algorithm that finds all possible permutations of a certain numbers of distinct digits and then put them in a large matrix for instance. For ...
0
votes
1answer
88 views
How to find local maxima in matrices?
I need to develop an algorithm for finding all the local maxima in a two-dimensional array: how to search for local maxima in the the most efficient way? Are there algorithms about it?
Moreover, the ...
0
votes
1answer
58 views
Linear probing hashing collision resolution
So I have a quick question about the linear probing method of collision resolution in hash tables. So by definition a linear probing method would look like:
while (hashTable[hash] != null)
hash = ...