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

Hi,

I looking for a measure of fragmentation, and occupancy of a calendar.

This is to assist in managing calendar events in order to reduce gaps between events and increase overall efficiency.

Attached is an example calendar, the grey bars are events. Each row is a resource. The events can sometimes be moved to different resources, and it can be helpful to quantify the benefit of a move.

What kinds of analysis techniques exist in this area?

Are there any analogies to other systems that could be helpful. eg if the calendar were a river, the bars islands, maybe efficiency might be the average flow rate of the river?

Thanks for your thoughts here.

example calendar
0
Fundamentals of JavaScript
LVL 13
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

Hi,
I want to add the following algorithms to my ssh and sftp server.
aes128-ctr hmac-sha1
As per my knowledege aes128-ctr is something related to encryption and
hmac-sha1 is related to authentication.
I have a sftp server running on a machine.
I want it to support these two.
Does it need to be added to sftp server ?
or ssh ?
The machine is having openSSH 7.9

My aim is that ultimately anyone connecting to the sftp server these two algorithms should be available..


Thanks
0
Hi friends,

I have some visualisation project where textual info is displayed on a colored background (that is not disputable). The background color is meant to give a mental shortcut to the value, and it could be basically any color in the 3 byte RGB space. Nevertheless the textual info needs to be easily readable against the background.

I've found some algorithms to generate contrasting colors from background color by inverting (XOR with #FF) the R, G and B bytes of the background color, some with improvements for R/G/B values near 128. Unfortunately these algorithms generate some color combinations which are (to be very, very euphemistic) more insulting to the eye than mere unergonomic .

What I need is some algorithm that produces contrasting, but eye-friendly companion foreground colors out of the values of the background color values. (I'd take ready-to-use code, too ;-)

Any idea ?
0
Can someone explain to me where consensus algorithms fit within the TCP/IP model?  Let use Raft as an example.  Does it use multicast?  Does it use it's own transport number or TCP/UDP?  Does it live on the application layer?

Thanks
0
Request help from the experts to suggest the best name matching algorithm, logic description and code to reuse for executing name matching function - java or excel can do..
0
Dual pipe producer/consumer blocked by read.

The issue is in the producer:
        read(consumer_to_producer[0], &cnt, sizeof(cnt));
        read(consumer_to_producer[0], shared_arr, sizeof(shared_arr));

Open in new window

prevents the producer from working because the consumer has yet to write anything, how can I avoid this?


#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#define SIZE 10

int shared_arr[SIZE];
int cnt = 0, in = 0, out = 0;
int consumer_to_producer[2], producer_to_consumer[2];

void consumer();
void producer();

int main() {
    pipe(consumer_to_producer); // consumer to producer
    pipe(producer_to_consumer); // producer to consumer

    if (fork() == 0) {
        /* child process */
        consumer();
    } else {
        /* parent process */
        producer();
        sleep(3);
    }

    exit(0);
}

void consumer() {
    /* consumer process */
    close(producer_to_consumer[1]); // Close write end, we don't need it
    close(consumer_to_producer[0]); // This fcn doesn't need read end
    while (1) { 
        /* if buffer is full, consume it */
        // read in cnt from producer so we can check if it's full
        read(producer_to_consumer[0], &cnt, sizeof(cnt));

        if (cnt == SIZE) { /* If full, consume */
            read(producer_to_consumer[0], shared_arr, sizeof(shared_arr));
            printf("I am consuming\t%d\t%d\n", shared_arr[in], out);
            out = (out + 1) % SIZE;
            cnt--;
        } 

        

Open in new window

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
Hi
I am working on GIS applications and found the slope algorith in the net :

ftp://ftp.ecn.purdue.edu/jshan/86/help/html/gmd/slope_percent.htm

attached is an example I used to apply the above algorithm for calculating slopes from a DEM. I am not good in math so I got two results.
Can you help me please . I got 73, -33, 56.648 and I do not how to do the arctan.
slope.doc
slope.doc
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.

Top Experts In
Algorithms
<
Monthly
>