Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
0 answers
46 views

I'm trying to replicate results from a published paper that prices call options under a three-factor stochastic model. The option price depends on stochastic volatility, a domestic short rate, and a ...
1 vote
0 answers
41 views

The task was: Write a function generate_semieuler that returns some directed semi-Eulerian graph on n vertices with m edges that has no bidirectional edges, or None if such a graph does not exist. ...
-1 votes
1 answer
74 views

I have a large directed graph, and I try to access every edge for this digraph. The problem is to minimize the number of the access (a connected subgraph is counted as one access). And it reduces to ...
1 vote
0 answers
44 views

I am working on a C# program that generates a maze using a DFS algorithm. The maze generation works correctly, but I'm struggling with the post-processing methods to turn the generated maze into an ...
0 votes
5 answers
126 views

If I have a list of tuples like this [(1, 3), (-6, 3), (1, 7)] and i would like to return a list like this [(7, 1),(1, 3), (3, -6)]. What can I do?, any ideas on how to sort the tuples. The essential ...
0 votes
1 answer
194 views

I'm implementing the Christofides algorithm for solving the Traveling Salesman Problem and have reached the step where I need to find an Eulerian cycle in a multigraph. I'm unsure how to proceed when ...
-2 votes
1 answer
177 views

I am getting time limit exceeded for my solution for CSES Mail Delivery for some test cases. Your task is to deliver mail to the inhabitants of a city. For this reason, you want to find a route whose ...
0 votes
0 answers
100 views

I have the following question that I must prove or disprove: Let G=(V,E)be an undirected connected graph. Let x be the minimum amount of edges one needs to add to G so that the resulting graph ...
0 votes
0 answers
29 views

I need to cover all the edges of a graph with the minimum number of paths. I read that the Eulerian path method is needed here. I tried to reproduce it, but it doesn't work correctly. def split_graph(...
Lib's user avatar
  • 29
0 votes
0 answers
109 views

I have as input a list of n+2 continuous substrings of length 3. My goal is to find out whether there exists a string of length n such that all its continuous substrings of length 2 are exactly the ...
2 votes
1 answer
241 views

For the multidirected graph below I am trying to write an program that visits all edges at least once. For instance, in the below graph I am looking for an outcome similar to "edge(1,2), edge(2,3)...
0 votes
0 answers
316 views

So, these problem appears when I try to run my code in Octave: * T(1.2): subscripts must be either integers 1 to (2^63)-1 or logic I try an euler method to study and here's my code function fxy = fa(...
0 votes
2 answers
291 views

I made an Eulerian path algorithm, what's the problem? #include <cstdio> #include <vector> #include <iostream> #include <list> using namespace std; int graph[1000][1000]; // 1&...
0 votes
1 answer
788 views

I am trying to implement the following Euler Tour in Python. However, I am stuck on storing the top values. My code implementation is: def rmq(root, level, prev=None): if not root: return ...
0 votes
1 answer
689 views

I'm attempting to make a simulation of the SEIR epidemic model. It contains four parts: Susceptibles (non-infected) Exposed (infected but not infectious yet) Infectious (infected and infectious) ...

15 30 50 per page
1
2

AltStyle によって変換されたページ (->オリジナル) /