Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x

Algorithms

An algorithm is a self-contained step-by-step set of operations to be performed. Algorithms exist that perform calculation, data processing, and automated reasoning. Starting from an initial state and initial input (perhaps empty), the instructions describe a computation that, when executed, proceeds through a finite number of well-defined successive states, eventually producing "output" and terminating at a final ending state. The transition from one state to the next is not necessarily deterministic; some algorithms, known as randomized algorithms, incorporate random input.

Share tech news, updates, or what's on your mind.

Sign up to Post

Bloom Filter
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data definitely won't be found. Read on to find out more...
3
Tech or Treat! - Giveaway
LVL 10
Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

I have here what I think is a classical O.R. (operations research) problem. I'm looking to formulate it mathematically and look at the options available to solve it.

We have a list of say 100 recipes.

These recipes combined use 400 ingredients.

The quantity of ingredients required for all the recipes could be defined by a matrix dimension 100 x 400.

We can combine recipes into meal plans, so that the ingredients required for a meal plan is the total of the ingredients required for each recipe in the meal plan.

Each ingredient has an associated cost, that varies depending on the quantity bought.

Say the cost variations can be expressed with no more than 5 cost buckets per ingredient. Eg.

Bucket, Cost / kg
< 1kg, £4.00
1-5kg, £3.50
5-20kg, £3.00
20-100kg, £2.80
> 100kg, £2.50

The ingredient costs can be expressed in two matrices each of dimension 400 x 5:
a) One matrix 400 x 5 giving the buckets for each ingredient
b) Another matrix 400 x 5 giving the unit costs per ingredient and bucket number (1 to 5)

A given meal plan will have a given ingredient requirement, with associated total cost determined via the above matrices.

Suppose we constrain the number of meals in the meal plan to say 4 meals, and these 4 meals must be different recipes. For simplicity (!) we have no other constraints for now.

Our objective is to choose our meal plan (4 meals) such that the total cost is minimised.

Questions:
1. How do we formulate this problem?
0
There are huge amount of different slot machines available online, like in the given list here bettingcasinoslots.com. All of them powered by own random generated algorithm. So I would like to know if there some strategies to play slots? I mean when you are playing for money and you want to make even a little profit and it would be great it the strategy does not include loosing money. Researches and publications are appreciated too.
0
Watching this 6 minute video, I leaned HAARP shoots 72,000 times the maximum amount of energy for an AM station in the United States.

https://www.youtube.com/watch?v=ZUIiRHrUbpE

My question is what's a better analogy?

For example, how much energy is that compared to the output of a small nuclear plant?

I am just having a hard time sensing the scope of the comparison they created and hope someone can come up with a better description.

Thanks.
0
I have heard that Blockchain Database are secure because of their use of "Byzantine fault tolerance."

I am told, Blockchain algorithms use encryption techniques to intertwine new data with existing data using this type of cryptography.

Please verify this and explain in more detail where the term "Byzantine fault tolerance" comes from and what it is exactly?

Thanks
0
All,

I'm looking to find a way to visualize in a very clear way the age of project tasks. What I have in mind is some sort of bubble chart or distribution of points (that can be shown on a web page) where each point or bubble takes on a certain color based on the time since it was last modified. If possible I would also like to group these points based on the project they are contained within, the person responsible for executing the task or some other type of relationship or tagging scheme.

Over time and as the number of tasks increase it would be easy to see how we are doing overall simply based on the predominant colors on the chart. A lot of green or green-ish colors would mean we are doing fine and are keeping up with all of our projects and a lot of red would mean that a lot of tasks have been left unattended for a long time.

Since this is totally new territory for me I am simply looking for some good advice and pointers on where to start my research. Are the good software to use for this? Are there any special algorithms or other theoretical concepts I should read up on and so forth.

Any advice will be greatly appreciated.

Best regards
Daniel Södling
0
I would like to know how to compute the x-intercepts of a cubic graph based in a given equation. If there is a formula that does this, then i would like to know this formula, if not then i would like to know the steps required to compute said values.
0
What options are there to protect a web service from a DOS attack?

IF the web service were accessed only by my Objective-C iPhone application, and nowhere else, is this web service protected by the "security through obscurity" model? Or, can hackers crack open the source code of the iPhone app, like Apple can?

What about if I put the URL to the web service into the SQLite database and encrypted the Path?

So, when my app needs to request information from the web service, it does a DB lookup in the SQLite database for the path to the web service. When it gets it, it decrypts it. Then, using a variable (in memory) only, it makes the web service call.

Does this protect from a DOS attack to that web service call?

Are there easier ways?

Will this work on Java for the Android?

What about on my website?

Thanks.
0
What technologies are best suited for the highest performance web services to handle the heaviest loads? Thousands (even millions) of transactions per second?

I know that Node.js can handle thousand(s) sessions on a single thread. And I do not know of any other technology which handle more than one session per thread. Am I right about that? Are there others that can do this also?

What about real-time programming as it relates to web-services. Is there such a thing?

And how about a few general words about hardware deployment? Having a central API call which distributes calls to hundreds of more specialized web servers? What about Caching for successive related calls?

And what about Machine Learning? Can algorithms be optimized by existing Machine Learning algorithms that reduce the average response times of the most heavily load web service?

Thanks.
0
What should I expect by forking the BitCoin open source code? What kinds of things can one do in customizing the code?

What language(s) is it in? What platform does it run on?

What about the code run by Bookkeepers? And the generation of the BlockChain database updates?

And lastly, what "engine" determines which algorithms need to be mined and what is managing the connections to this peer-to-peer network?

Thanks
0
How to Use the Help Bell
LVL 10
How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

X = 1   2
       3   4

y = 3   1
       4   2
how can i convert x to y????
0
I need to create a language agnostic hashing algorithm for a custom PHP-based application that I'm developing.  

The reason it needs to be language agnostic is because the PHP application that I'm developing needs to be able to communicate with another 3rd party application (hosted on Heroku) .. and both applications need to be able to apply the same exact algorithm.

I understand that its considered bad practice to use a hardcoded SALT value when applying hashing algorithms, but in this particular scenario, I suspect that it may be unavoidable.  I'm all ears, however.  Still .. let me explain what it is that I need to do first.

Here's what I currently have set up in my PHP application:

$param1= 'beta';
$param2= 'noodle';
$param3= '1502719494';
$hashstring = $param1. $param2. '-' . $param3;  
$options = [
  'cost' => 10,
  'salt' => 'Dk2jdfPIJFddf32948jdfg809fiejf',
];      
echo password_hash($hashstring, PASSWORD_BCRYPT, $options);

Open in new window


What I'd like to do is to somehow re-write this in a way where it could be interpreted universally in pretty much any programming language, .. but where they can both use the same hardcoded SALT value, and both return the exact same result.  The Heroku application is apparently a Node.js powered application (written in Google V8 JavaScript) .. if that information helps any.  

Anyways, .. I'd be interested to hear anyone's thoughts regarding what I'm trying to accomplish here.

Thanks,
- Yvan
0
Trending Tech Everyone Should Know About - My Thoughts
I've been thinking about this subject for a few days now, trying to come up with something unusual. But the thing that keeps coming to mind—even though I feel it's an obvious answer that everyone already does know about—is Artificial Intelligence & Machine Learning.

Why? Well first, it's technology that impacts everyone, regardless of how involved you are in the tech industry. I've got little doubt that we're right on the cusp of major social change as a result of machine learning—change as significant as the Industrial Revolution. We've got self-driving cars inevitably hitting the mainstream in the near future. There's cancer detection systems that are faster and more accurate than human analysts. AI systems being trained to defend against cyberattacks. Movie dialog being written by algorithms. The list goes on and on...

And second, while these advancements will absolutely push us forward in exciting new ways, they'll also destroy many jobs. And while that job loss can be terrifying, AI opens us up for entirely new sorts of jobs, major changes to the way work is done, and more that we can't even fully conceive of yet.

Will most knowledge workers of the future become "bot wranglers"? Will some sort of universal basic income
2
Imagine you have a dataset of rowers. You have X variables such as weight, benchpress, deadlift, squat, nutrition, etc. You also have each rower's lap time.

Now, let's say for a given rower, you want to optimize her lap time, but you can only train along ONE DIMENSION. How would you identify the best attribute to optimize?

I thought about a grid search, but that seems awful. Which family of machine learning algorithms would be best for this type of problem, and how would you attack it?

Thanks a million!
0
I have the Excel file below with 3 columns.
On one row I have a pair of q, k corresponding to a certain x.
In the sheet are different values for x.
I need to find what pairs of q, k are common for all values of x.
How do you do that fast and easy?
Pairs.xlsx
0
What is the best and easiest approach, method, software to solve a system like the one below?

1=1*(3.14*2^p-1*1*[(23.14-5)*2^q-1*1*(3.14-3)/2^k]/2^r)/2^s
3=8*(3.14*2^p-8*8*[(23.14-5)*2^q-8*8*(3.14-3)/2^k]/2^r)/2^s
50=128*(3.14*2^p-128*128*[(23.14-5)*2^q-128*128*(3.14-3)/2^k]/2^r)/2^s
2896=8192*(3.14*2^p-8192*8192*[(23.14-5)*2^q-8192*8192*(3.14-3)/2^k]/2^r)/2^s
4096=16384*(3.14*2^p-16384*16384*[(23.14-5)*2^q-16384*16384*(3.14-3)/2^k]/2^r)/2^s

Could you help to find a set of solutions? I guess are more than one.
This is not homework, but rather one of that engineering approximation problem that ended up in a set of unknown variables.

Basically the function is.
S5(x)=x*(PI*2^p-x*x*[(2PI-5)*2^q-x*x*(PI-3)/2^k]/2^r)/2^s
with p, q, k, r, s unknown.
And next known set of solutions with 1 digit approximation allowed for S5x:
x - S5x
1 - 0
2 - 1
4 - 2
8 - 3
16 - 6
32 - 13
64 - 25
128 - 50
256 - 101
512 - 201
1024 - 401
2048 - 799
4096 - 1567
8192 - 2896
16384 - 4096
0
I have question about the GA application in an intrusion detection, what programming language can be applied for this type of problem.
0
Hey,

I have an audio file, many actually, that are an interview between the interviewer and interviewee.  The same person is asking questions in each file, while the people answering are different.

I need to separate the answers out by generating silence over the interview questions. I'm currently doing this by hand with audacity, but it is extremely time consuming.

Any help would be greatly appreciated.  I am a software developer, but audio is not my area, so code is am option if there isn't a program available.

Thanks
0
If I am comparing my algorithm to another algorithm. My algorithm has a complexity f O(n) whereas the other algorithm is O(n2).

I then measured the running time by implementing the algorithms.

Should the running time of the other algorithm be the square of the running time of my algorithm?

For example of my algorithm running time is 3 ms should the other algorithm running time be 9?
0
Free Tool: IP Lookup
LVL 10
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

I got a requirement from my client that he wishes to encrypt/ password protect some of the documents, before sending over to another user in another regional office.

By not writing the password into the email body.

How can the user in another regional office knows the password to decrypt/ open the protected documents?

What approach should be adopted? Is there any standard/ algorithm I can refer to? But we prefer not to use any 3rd party software/ utility.

Thank you.
0
the array has series of numbers Need to find all pairs in the array using a hash table
integers ...
0
The problem: I want to display a row of rectangles placed shoulder to shoulder, on a grid page (think graph paper). The width of the page where the rectangles appear will be an unknown integer variable (but always greater than 100).  The height of the rectangles will be a constant integer value (e.g., 20 units high). I want to fill a row on this page with as many rectangles as possible where the rectangle width will be equal or greater than the predefined rectangle height and where there will be no gap/margin at the end of the row.

I realize that this is only possible when the page width (e.g. 200)  can be evenly divided by the rectangle height (e.g., 200 / 20).  If the page width is 201, it is impossible to have rectangles all with the same width and at the same time have no gap/margin at the end of the row of rectangles. But if the page width is 210, I can fit 10 rectangles which are 21 units wide. That's fine. I don't mind stretching the rectangles a bit, as long as the rectangle width is never less than the predefined rectangle height constant (in this example, is 20). So, if the page width is 220, that works fine for I can get 10 rectangles of 22 units across the page with no gap/margin at the end of the row. I don't mind the rectangle width growing a bit so as to ensure no right margin/gap results. But there would be a limit to the rectangle width changing from its original desired width (which is equal to the rectangle height constant).  So I would need the …
0
How to disable disable any 96-bit hmac algorithms in centos
0
I have an array that will have approx 3000 elements. Within each element is an array that contains two key:value pairs. I want to sort the elements of the outer array based on the value of the first key:value pairs within each element.

e.g.
array = [{"key1":"group9","key2":["20170222","20170531"]},{"key1":"group3","key2":["20170221"]},{"key1":"group7","key2":["20170321"]}, ..................]

so sorting gives e.g. (the elements are arranged based on sorting the groupX value of key key1 i.e. the first key:value pair)

array = [{"key1":"group3","key2":["20170221"]} ,{"key1":"group7","key2":["20170321"]} ,{"key1":"group9","key2":["20170222","20170531"]},................................]


I've implemented a merge sort and it works fine. But I want to look at what is the most efficient algorithm to use, as my colleagues have suggested bubble sort (I thought this was one of the worst algorithms, but it really depends on how large the dataset is).

Can anyone advise?

I'll (learn to) implement this on a webpage so I'm using Javascript/JQuery/ReactJS
0
I know that a circle has 360 degrees and Pi has a very specific an known value.

The question is, must a circle had 360 degrees? Or was that a decision that was made so each quarter would have 90 degrees?

So, was Pi "backed into"?

If Euclid had wanted a circle to be 400 degrees, could he have simply used a different formula to generate Pi?

Curious.

And what is that formula to generate Pi, if you have it.

Thanks
0

Algorithms

An algorithm is a self-contained step-by-step set of operations to be performed. Algorithms exist that perform calculation, data processing, and automated reasoning. Starting from an initial state and initial input (perhaps empty), the instructions describe a computation that, when executed, proceeds through a finite number of well-defined successive states, eventually producing "output" and terminating at a final ending state. The transition from one state to the next is not necessarily deterministic; some algorithms, known as randomized algorithms, incorporate random input.