instruction stringlengths 0 29.8k ⌀ |
|---|
There are a few good books on the TSP problem where you are likely to find some relevant information:
Lawler et al., eds. The traveling salesman problem: A guided tour of combinatorial optimization. Wiley, 1985.
G. Reinelt. The traveling salesman: computational solutions for TSP applications. Springer, 1994.
G... |
I am an undergraduate student in Industrial Engineering. I have taken the topic of Travelling Salesman Problem as a Research Project for my final year. More specifically, I am focusing on **Convex Hulls for solving the Euclidean TSP**.
I have gone through the published literature and have found that there is no appr... |
Recommended Reading for non-CS undergraduate student doing a research Project on Travelling Salesman Problem |
|books| |
|artificial-intelligence|reasoning| |
By the standard definitions, a **language** is always a set of (finite-length) **words**. This means that "$a$" is not a language, but either a symbol or a word.
If $R$ denotes all the regular languages (or alternatively, all the recursive languages), then indeed $a \notin R$. On the other hand, $\{a\}$ is a langua... |
null |
Before I begin, I must say, I'm not sure if I'm on the right StackExchange. This might belong to CS Theory or Mathematics; if it does, please move it.
I'm currently in a class on Computability and we just finished looking at formal grammars before moving onto finite automata. We were given an several examples of a f... |
What if a formal grammar cannot be terminated? |
|computability|formal-grammars| |
When you are given a grammar $G$, then the language it produces, $L(G)$, is all the (finite) words it can generate. All the other "derivations" that don't yield any legal word, can be ignored.
For instance, for the grammar $G_1$:
> S -> SS | Sa | aS
the language that the grammar produces is $L(G_1)=\emptyset$, a... |
You can apply any rule in the set of productions P. The result is called a __sentential form__. A sentential form belongs to the language recognized by the grammar if it consists of terminal symbols only. Variables that derive no terminal strings can be removed safely (without changing the language). |
I am a 16 year old male who has recently been gifted a big encyclopedia on computer science by a friend of mine. I am usually not that interested in computers and technology, but computer science has started to fascinate me. I do however intend to study Physics and/or Mathematics and not CS, so my question is, would it... |
Self-Study of Computer Science |
|reference-request| |
I would say that anyone in a Science/Engineering track should have at least some CS. Familiarity with at least one programming language, data structures, and basic knowledge of algorithms will come in handy more than you think...
I never thought it would matter much, but now I wish I had tackled these things earli... |
I think that learning about computer science certainly can be an advantage. Here are a number of skills computer science has to offer.
1. **Programming** – knowing how to program is a useful skill for any discipline. Statisticians and sociologists, geographers and engineers, and so on, often find themselves needin... |
Computers are a great tool for phisisians, say you want to run a simulation about a phisics phenomenon it would be useful to know the fastest algorithm avaliable, if it can be computed in a reasonable amount of time, etc.
I'm a software engineer and love computer science, it's good to know what problems computer can... |
I am converting the OCaml [Num][1] module which does I/O and maintains state in a record with mutable values. As such it is a good candidate for me to convert to pure [F#][2], pure [C#][3] and a hybrid.
Since this is a toss-up for me on the three versions, I am interested to know of any research papers that indicate... |
Is there any research to indicate programmers are/are not moving to a hybrid of functional and object-oriented? |
|reference-request|functional-programming|object-oriented| |
null |
I think that learning about computer science certainly can be an advantage. Here are a number of (related) skills computer science has to offer.
1. **Programming** – knowing how to program is a useful skill for any discipline. Statisticians and sociologists, geographers and engineers, and so on, often find themsel... |
I am converting the OCaml [Format][1] module which does I/O and maintains state in a record with mutable values. As such it is a good candidate for me to convert to pure [F#][2], pure [C#][3] and a hybrid.
Since this is a toss-up for me on the three versions, I am interested to know of any research papers that indic... |
I was reading about Turing machines and realized I'm not sure about the difference between the following scenario. Given the alphabet $\Sigma = \{a, b \}$, we have the following assertions:
1. $a \in R $
2. $\{a\} \in R$
I think that assertion $1$ is incorrect because $a$ is just a symbol, not a language. On t... |
I have attempted concentric convex hulls to solve the TSP before, but I discovered that if a vertex happened too close to a hull, it distorts the form of the hull where it is located, so the result is not optimal. I got better results if I removed those vertices from the graph, then added them latter.
I got my best ... |
I am an undergraduate student in Industrial Engineering. I have taken the topic of Travelling Salesman Problem as a Research Project for my final year. More specifically, I am focusing on **Convex Hulls for solving the Euclidean TSP**.
I have gone through the published literature and have found that there are no app... |
|optimization|books| |
If $\Sigma = (x_1,...,x_n)$ is the alphabet of the $m$-tracks $TM$, just use an expanded alphabet $\Sigma' = \Sigma \times ... \times \Sigma$ for the single-track $TM'$ ($|\Sigma'| = n^m$).
Every vector $\bar{x}_i$ of $m$ symbols from $\Sigma$ can be mapped to a unique alphabet symbol $u_i$ in $\Sigma'$: $\bar{x}_i... |
Two heads on a single tape are more powerful (in real time) than two single heads on two distinct tapes.
See [T. Jiang, J.I. Seiferas and P.M.B. Vitanyi, 1994, "Two Heads Are Better than Two Tapes"][1]
**EDIT**: I just read the proof and it is not trivial (and I didn't read the details):
The language $L = \{ x... |
Two heads on a single tape are more powerful (in real time) than two single heads on two distinct tapes.
See [T. Jiang, J.I. Seiferas and P.M.B. Vitanyi, 1994, "Two Heads Are Better than Two Tapes"][1]
**EDIT**: I just read the proof and it is not trivial (and I didn't read/understand the details :-):
The lang... |
Two heads on a single tape are more powerful (in real time) than two single heads on two distinct tapes.
See [T. Jiang, J.I. Seiferas and P.M.B. Vitanyi, 1994, "Two Heads Are Better than Two Tapes"][1]
**EDIT**: I just read the proof and it is not trivial (and I didn't read/understand the details :-):
The lang... |
Does accepting mean that the TM will read and recognize a char from the cell it's currently reading from? And is it the case that a TM halts iff the input is decidable? |
What is the difference between halting, accepting, and deciding in the context of Turing machines? |
|turing-machines| |
If they are different, what are the typical problems in each that do not fall on the other category? Or are the mutually exclusive or does one completely capture the other?
|
What is the difference between decidability and computability? |
|computability| |
Accepting and rejecting the state a Turing machine eventually may enter, based on the string it reads from the tape, not just the symbol from one cell. Of course, the decision about entering an accepting or rejecting tape is ultimately made on the basis of one symbol.
A Turing machine can either eventually enter an... |
null |
I saw a RAM model diagram that displayed an input tape, output tape, the program (read-only), the instruction pointer, and the memory registers. However, when I look at questions of time complexity, it is relevant how much time the program needs to spend on one action. Say you want to read one integer symbol from the r... |
What constitutes one operation/cycle/move in the RAM model? |
|time-complexity| |
is the following true
$ (L^R)^* = (L^*)^R $ |
Is star closure of reverse of language equivalent to reverse of closure of that language |
|formal-languages|automata| |
See this [question on Stack Overflow][1]. You should provide reference for an algorithm when you did not write it, at least explain how you came up with it if you "created" it.
Terminology: this question is about finding the **majority element** of an array.
The invariant at step $i$ is:
- `A` occurs at leas... |
is the following true
$ (L^R)^* = (L^*)^R $
I tried the following to prove it true.
let u,v belong to L then $ L^* = \{ u,v, uu, vv, uv, vu ... \} $
and $ (L^*)^R = \{ u^R, v^R, u^Ru^R, v^Rv^R, v^Ru^R, u^Rv^R ... \} $
now $ L^R = \{ u^R, v^R \} $ so
$(L^R)^* = \{ u^R, v^R, u^Ru^R, v^Rv^R, u^Rv^R, v^Ru^R ..... |
null |
Take any $w\in {(L^*)}^R$. Then $w$ can be writen as $w=(u_1\cdot u_2\cdots u_n)^R$, with $u_i\in L$. We have
$$
w =(u_1\cdot u_2\cdots u_n)^R =u_n^R \cdot u_{n-1}^R \cdots u_1^R,
$$
and therefore $w\in (L^R)^*$.
Assume now that $w\in {(L^R)}^*$, then by the same argument
$$
w =u_1^R \cdot u_{2}^R \cdots... |
|algorithms|time-complexity|algorithm-analysis|machine-models| |
|terminology|turing-machines|undecidability| |
If they are different, what are the typical problems in each that do not fall on the other category? Or are the mutually exclusive or does one completely capture the other?
|
|computability|terminology| |
I have a problem that is almost equal to the standard one of the dining philosophers, but has a quirk: while a philosopher thinks, he still holds the fork on his left.
If after the period of thinking (which isn't infinite), I get back to the normal solution, that is release the fork on the left, then acquire forks i... |
Variation of the dining philosophers: is the standard solution still valid? |
|untagged| |
|concurrency|synchronization|concurrent-algorithms| |
|reference-request|education| |
|reference-request|programming-languages|functional-programming|object-oriented| |
I'm currently in a class on Computability and we just finished looking at formal grammars before moving onto finite automata. We were given an several examples of a formal grammar, and one stuck out in particular:
V: { S, A, B, C }
T: { a, b, c }
P: {
S -> aA | λ | ASA
AA -> aA | a
... |
|formal-grammars| |
|reference-request|artificial-intelligence|reasoning| |
If you just draw a couple of graphs, you'll be in good shape. Wolfram Alpha is a great resource for these kinds of investigations:
![equations][1]
![Graph][2]
Generated by [this link][3]. Note that in the graph, log(x) is the natural logarithm, which is the reason the one graph's equation looks a little funn... |
I understand that O(n) is faster than O(n*log n) and slower than O(n/log n). What is difficult for me to understand is how to actually compare O(n*log n) and O(n/log n) with O(n^f) where 0 < f < 1.
For example, how do we decide O(n/log n) vs. O(n^2/3) or O(n^1/3)
I would like to have some directions towards proce... |
n*log n and n/log n against polynomial running time |
|untagged| |
For many algorithms, it sometimes happens that the constants are different, causing one or another is faster or slower for smaller data sizes, and are not as well-ordered by algorithmic complexity.
Having said that, if we only consider the *super-large* data sizes, ie. which one eventually wins, then `O(n^f)` is fas... |
When comparing running times, it always helpful to compare them by using big values of n.
For me, this helps build intuition about which function is slower
In your case think of n = 10^10 and a = .5
O(n/logn) = O(10^10/10) = O(10^9)
O(n^1/2) = O(10^10^.5) = O(10^5)
Hence, O(n^a) is faster than O(n/logn... |
Log n is the inverse of 2^n. Just as 2^n grows faster than any polynomial n^k regardless of how large a finite k is, log n will grow slower than any polynomial functions n^k regardless of how small a nonzero, positive k is.
n / log n vs n^k, for k < 1 is identical to:
n / log n vs n / n^(1-k)
as n^(1-k) > log n... |
|asymptotics| |
Just think of $n^f$ as $\dfrac{n}{n^{1-f}}$. So for your example, $n^{2/3}=n/n^{1/3}$. Then it is easy to compare the growth of
$$ \frac{n}{\log n} \quad \text{vs.} \quad \frac{n}{n^{1-f}}.$$
Remember that $\log n$ grows asymptotically slower than any $n^\varepsilon$, for every $\varepsilon>0$. |
I understand that $O(n)$ is faster than $O(n\log n)$ and slower than $O(n/\log n)$. What is difficult for me to understand is how to actually compare $O(n \log n)$ and $O(n/\log n)$ with $O(n^f)$ where $0 < f < 1$.
For example, how do we decide $O(n/\log n)$ vs. $O(n^{2/3})$ or $O(n^{1/3})$
I would like to have s... |
$\log n$ is the inverse of $2^n$. Just as $2^n$ grows faster than any polynomial $n^k$ regardless of how large a finite $k$ is, $\log n$ will grow slower than any polynomial functions $n^k$ regardless of how small a nonzero, positive $k$ is.
$n / \log n$ vs $n^k$, for $k < 1$ is identical to:
$n / \log n$ vs $n / ... |
Let $f \prec g$ denote "f grows asymptotically slower than g", then you can use the following easy rule for polylogarithmic? functions:
$$n^{\alpha_1}(\log n)^{\alpha_2}(\log \log n)^{\alpha_3} \prec n^{\beta_1}(\log n)^{\beta_2}(\log \log n)^{\beta_3} \Longleftrightarrow (\alpha_1, \alpha_2, \alpha_3) < (\beta_1, \... |
I have a problem that is almost equal to the standard one of the dining philosophers, but has a quirk: while a philosopher thinks, he still holds the fork on his left.
If after the period of thinking (which isn't infinite), I release the fork on the left and then apply the normal solution (that is, acquire forks in ... |
null |
null |
How can we assert that the performance of an implementation matches the expected performance defined in terms of Big-$\mathcal{O}$ and friends by generating best/worst case inputs? I'm thinking of a table whose columns are __input length__, __expected running time__, __actual running time__. Are there general methods f... |
How to generate inputs to evaluate the performance of an implementation? |
|performance|benchmarking| |
If $K(s)$ is the [Kolmogorov complexity][1] of the string $s \in \{0,1\}^*$,
<blockquote>
Can we prove (or disprove) the following statement:
<br><br>
"Every string $s$ is a prefix of an incompressible string; i.e. for every string $s$ there exists a string $r$ such that $K(sr) \geq |sr|$" ?
</blockquote>
In ... |
Prefixes of incompressible strings |
|kolmogorov-complexity| |
If $K(s)$ is the [Kolmogorov complexity][1] of the string $s \in \{0,1\}^*$,
<blockquote>
Can we prove (or disprove) the following statement:
<br><br>
"Every string $s$ is a prefix of an incompressible string; i.e. for every string $s$ there exists a string $r$ such that $K(sr) \geq |sr|$" ?
</blockquote>
A s... |
Kolmogorov complexity of string concatenation |
If $K(s)$ is the [Kolmogorov complexity][1] of the string $s \in \{0,1\}^*$,
<blockquote>
Can we prove (or disprove) the following statement:
<br><br>
"Every string $s$ is a prefix of an incompressible string; i.e. for every string $s$ there exists a string $r$ such that $K(sr) \geq |sr|$" ?
</blockquote>
In ... |
I understand that $\Theta(n)$ is faster than $\Theta(n\log n)$ and slower than $\Theta(n/\log n)$. What is difficult for me to understand is how to actually compare $\Theta(n \log n)$ and $\Theta(n/\log n)$ with $\Theta(n^f)$ where $0 < f < 1$.
For example, how do we decide $\Theta(n/\log n)$ vs. $\Theta(n^{2/3})$ o... |
Let Alice and Bob be two users chosen uniformly at random from a social network (e.g. Facebook). What is the probability that they are friends assuming that they share $k$ mutual friends?
I am interested both in the experimental values (or estimates) from currently existing social networks (e.g. Facebook) and values... |
What is the probability of friendship conditioned on the number of mutual friends |
|graphs|combinatorics|social-networks|random-graphs| |
null |
null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.