Problem Detail: Given an integer $n$ and set of triplets of distinct integers $$S subseteq {(i, j, k) mid 1le i,j,k le n, i neq j, j neq k, i neq k},$$ find an algorithm which either finds a permutation $pi$ Read More …
Author: ignougroup
[Solved]: How can I compute the average weight of an undirected graph?
Problem Detail: Given a weighted, undirected graph $G = (V,E)$, how can I compute the average weight of edges? It seems an easy problem (divide the total weight to the number of edges!) but I couldn’t manage to find the sum Read More …
[Solved]: ILP and number of variables in constraints
Problem Detail: This question is about the time impact of the length (i.e. number of variables) of the constraints in an Integer Linear Programming formulation. Most people try to reach the minimum number of constraints/variables, but I couldn’t find anything that Read More …
[Solved]: Is a secondary TM sufficient to detect all loops?
Problem Detail: Procedure: Start a secondary TM in parallel with the first, but have the second perform exactly 1 step each 2 steps the first TM performs (i.e. it runs at half speed). If the second machine ever reaches the same Read More …
[Solved]: Lamport Timestamps: When to Update Counters
Problem Detail: In the timepiece (excuse the pun) that is Time, Clocks and the Ordering of Events, Lamport describes the logical clock algorithm as the following: Each process $Pi$ increments $Ci$ between any two successive events. If event a is the Read More …
[Solved]: Can an artificial neural network convert from cartesian coordinates to polar coordinates?
Problem Detail: Given cartesian coordinates $x$ and $y$ as input, can a neural network output $r$ and $theta$, the equivalent polar coordinates? This would seem to require an approximation of the pythagorean theorem (which requires approximations of $x^2$ and $sqrt{x}$) and Read More …
[Solved]: Bidirectional Dijkstra vs Dijkstra
Problem Detail: Are there any kind of graphs where Bidirectional Dijkstra would expand more than Dijkstra? I tried to come up with an argument like this: Let node $n$ be expanded by Bidirectional Dijkstra. Now there are two possibilites: Node $n$ Read More …
[Solved]: Greedy algorithm correctness proof for “Elegant Permuted Sum” (UVa 11158)
Problem Detail: Given a sequence of $2 leq n leq 50$ numbers $s = (s_1,s_2,…,s_n)$, find a permutation $a = (a_1,a_2,…,a_n)$ of $s$ such that $$sum_{i=1}^{n-1} |a_i – a_{i+1}|$$ is maximized. I found many codes that get “Accepted” in the online Read More …
[Solved]: How many permutations in a trainset?
Problem Detail: If I have the following pieces to a train set: (12) Curve (4) Straight Such as this train set. I’m looking for an algorithm (to which I can write a program) that creates/lists all permutations. It’s not as simple Read More …
[Solved]: Type-system combining type-states and typed effects?
Problem Detail: Has anyone succeeded in implementing or designing a type-system that combines both type-state (linear types) and effect types (e.g. Koka)? Asked By : Olle Härstedt Answered By : Matija Pretnar Edwin Brady has done some work in that area using dependent Read More …