Most Popular
1500 questions
12
votes
1 answer
Find shortest paths in a weighed unipathic graph
A directed graph is said to be unipathic if for any two vertices $u$ and $v$ in
the graph $G=(V,E)$, there is at most one simple path from $u$ to $v$.
Suppose I am given a unipathic graph $G$ such that each edge has a positive or negative weight,…
gprime
- 467
- 1
- 4
- 13
12
votes
1 answer
Is there a data-structure for semilattices similar to a tree data-structure?
If we regard a tree as a partial ordered set, it becomes a special case of a join-semilattice. For a join-semilattice, we want to be able to compute the (unique) least upper bound of two elements (more or less) efficiently. In the case of a tree, a…
Thomas Klimpel
- 5,440
- 29
- 69
12
votes
1 answer
Collection of APX-hard problems
Everyone knows "Garey & Johnson", which is my go-to reference whenever I need a problem to transform from for an NP-hardness proof. However I recently find myself in need of an APX-hardness proof, and I wonder if there is a similar (and more up to…
Lukas Barth
- 243
- 3
- 10
12
votes
4 answers
Can every self-modifying algorithm be modelled by a non-selfmodifying algorithm?
If we have any arbitrary computer program that can modify its instructions, is it possible to simulate that program with a program that cannot modify its instructions?
Edit:
I am new to stackexchange so not sure if I'm allowed to ask a NEW question…
user56834
- 4,244
- 5
- 21
- 35
12
votes
1 answer
Can a RAM calculate its own Gödel number?
You can get the Gödel number of a RAM by making it a list of commands and making this list an integer.
So, what I thought is something like "The RAM that would return its own Gödel number (say, $x$) would have to have the information $x$ in it, so…
palsch
- 223
- 1
- 7
12
votes
1 answer
Solving T(n) = 2T(n/2) + log n with the recurrence tree method
I was solving recurrence relations. The first recurrence relation was
$T(n)=2T(n/2)+n$
The solution of this one can be found by Master Theorem or the recurrence tree method. The recurrence tree would be something like this:
The solution would be:…
RajS
- 1,737
- 5
- 28
- 50
12
votes
0 answers
Optimal meeting point in directed graph
Let $G(V, E)$ be a edge-weighted directed connected graph and $v_1, \dots, v_n \in V$ be some vertices. Let $d(a, b)$ denote the length of the shortest path from $a$ to $b$, for $a,b \in V$.
I need to find a vertex $v \in V$ such that $$\sum_{i=1}^n…
vojta
- 221
- 1
- 4
12
votes
3 answers
Is this special case of a scheduling problem solvable in linear time?
Alice, a student, has a lot of homework over the next weeks. Each item of homework takes her exactly one day. Each item also has a deadline, and a negative impact on her grades (assume a real number, bonus points for only assuming comparability),…
Matthias
- 129
- 10
12
votes
1 answer
Google DeepDream Elaborated
I've seen a few questions on this site about Deep Dream, however none of them seem to actually speak as to what DeepDream is doing, specifically. As far as I've gathered, they seem to have changed the objective function, and also changed…
Bob
- 121
- 3
12
votes
3 answers
Regular languages that can't be expressed with only 2 regex operations
I thought all regular languages could be expressed with regular expressions (if a language is regular, it can be expressed with regex), but
I have been told that you need all three of the regular operations (concatenation, union, and star) for that…
user3295674
- 383
- 4
- 14
12
votes
2 answers
Universal/existential quantification?
I'm struggling to understand the purpose of universal and existential quantification of types. I'm playing around with writing a toy language based on the calculus of constructions. I've been reading about Morte and Henk to help me get a better…
oconnor0
- 403
- 2
- 8
12
votes
1 answer
Finding the longest repeating subsequence
Given a string $s$, I would like to find the longest repeating (at least twice) subsequence. That is, I would like to find a string $w$ which is a subsequence (doesn't have to be a contiguous) of $s$ such that $w=w' \cdot w' $. That is, $w$ is a…
Dan D-man
- 544
- 3
- 9
12
votes
2 answers
Given computable function, what are conditions for computability of inverse function?
If $f:\mathbb{N}\rightarrow\mathbb{N}$ is computable and has an inverse, under what conditions is $f^{-1}$ also computable? I couldn't find that in a textbook, and googling gets some vague suggestions about bijective, but I couldn't find a clearly…
John Forkosh
- 315
- 3
- 12
12
votes
2 answers
Is Post Correspondence Problem in NP?
I just read some pages in Sipser's book Introduction to Theory of Computation about Post Correspondence Problem, and I'm thinking that PCP is actually in NP. The certifier is: for an input configuration of pile
$$(t_1/b_1,…
phhoang
- 125
- 1
- 6
12
votes
1 answer
Finding a minimal cover of a subset of a finite cartesian product by cartesian products
Given a subset of a cartesian product $I \times J$ of two finite sets, I wish to find a minimal cover of it by sets which are cartesian products themselves.
For example, given a product between $I=\{A,B,C\}$ and $J=\{1,2,3\}$, I may observe the…
yuvalm2
- 223
- 1
- 5