# Questions tagged [algorithms]

An algorithm is a sequence of well-defined steps that defines an abstract solution to a problem. Use this tag when your issue is related to design and analysis of algorithms.

11,347 questions
Filter by
Sorted by
Tagged with
13 views

### Edge connectivity using flow network

Find an algorithm for edge connectivity in undirected graph using flow networks. Try to use $O(m)$ edges. So basically the flow network should be used as a "helper function" and the graph ...
1 vote
47 views

### Worst Case Scenario Quick Sort

I'm aware that the worst case scenario recurrence relation corresponding equation is: $$T(n) = T(n-1) + T(0) + \Theta(n)$$ However, I really don't get how the last term $\Theta(n)$ was determined. ...
30 views

### 3 Processor Scheduling

A set of n independent tasks, each having integer execution times, are to be executed using three identical processors. A task can be executed in any of the three processors. Develop a sequential ...
52 views

### Optimizing Delivery Routes in a Graph-Based Network to Minimize Maximum Delivery Time

In a graph with N nodes, where each node represents a house and is labeled from 0 to N-1, an ...
93 views

1 vote
45 views

### How to evaluate the complexity of a code

Here is my code for computing the product of sequences of matrices ...
1 vote
84 views

### Algorithm for optimal item selections

I'm trying to find an algorithm for this problem: I'm going to the shop and need to buy X grams of an ingredient. The shop does not necessarily have an "X grams of ingredient" product. But ...
32 views

### Lookup Using Path Matrix in Floyd Warshall Algorithm

How is the path matrix created by the Floyd Warshall algorithm used for path lookup? The 2 images show the graph (b) and the path matrix (c). Both are taken from the book: Foundations of Algorithms by ...
93 views

### Finding all stable matchings in stable marriage problem

I need to find an algorithm for a modified version of the stable marriage problem. In particular, I need to find all possible stable matchings and not only one (unlike what the Gale-Shapley algorithm ...
13 views

### Finding all stable matchings in stable marriage problem [duplicate]

I need to find an algorithm for a modified version of the stable marriage problem. In particular, I need to find all possible stable matchings and not only one (unlike what the Gale-Shapley algorithm ...
38 views

### fast estimation of the amount of unique combinations

Let's say I have a set of two columns - Name, Surname. I have a list of possible values for Name -> Jacob, John Surname -> Mayerson, Kindle. I want to generate a set of unique combinations for ...
1 vote
90 views

### Is there an efficient algorithm for this ecommerce optimization problem?

Consider the problem of minimizing the checkout price of a shopping basket in the presence of some discount rules: There are $n \gt 0$ distinct products in our shopping basket. Each product is ...
36 views

### Round-robin tournament scheduling, with teams that may share their home field

I need to implement an algorithm to create schedules for round-robin tournaments (where each team faces each other team exactly once), but with the constraint that up to 2 teams – that may play in ...
104 views

### Finding the error probability of a Monte Carlo algorithm

Let's say I have a Monte Carlo algorithm $A$ that gives the correct answer with a probability $p$ > $1/2$. I don't have any information on if it's decisional or not. I understand that I can make ...
76 views

### Calculating cells encompassing points in a grid

I have a sequence of points over time, and a grid of X by Y cells to which I need to calculate the cells in which the points fall, as depicted in the diagram below Another point now arrives (as ...
33 views