24 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
46
views
Monte Carlo Euler discretization for a 3-factor financial option pricing model yields price bias
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
Why does my generate_semieuler function fail the edge-case tests for semi-Eulerian directed graphs?
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
Find the minimum number of connected subgraph that covers the whole digraph
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
Post-Processing Maze to Eulerian Issues in 2D DFS Maze Generator
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
Reordering a list of tuples to match the value of the next element in the list
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
Determining Eulerian Cycle in Multigraph for Christofides Algorithm
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
Suggestions needed for improving eulerian path algorithm for CSES Mail Delivery problem
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
Can a Euler cycle be made from a one-vertex graph?
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
Incorrect output for covering all graph edges
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(...
0
votes
0
answers
109
views
Reconstruct a string from n continuous substrings of fixed length
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
Route Inspection of Directed Graph in ASP
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
T(1.2): subscripts must be either integers 1 to (2^63)-1 or logicals
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 Eulerian path algorithm(Euler-path). what's the problem?
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
Implementing Euler Tour in Python
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
differentiating the SEIR model in Java
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)
...