instruction stringlengths 0 29.8k ⌀ |
|---|
The following predicate logic formula is invalid: (Valid means tautology)
$\forall x,\exists y. P(x,y)\to \exists y, \forall x.P(x,y)$
Which of the following are counter models(examples) for it?
1. The predicate $P(x,y)= \; 'y.x=1' \; $where the domain of discourse is $\mathbb{Q}$.
2. The predicate $P(x,y)=... |
I am self studying discrete math and I am going through MIT Mathematics for CS lecture notes but they do not have solutions available. I got stuck at [Problem 3.14](http://www.scribd.com/doc/101941032/3cf) (pages 64-65 of [this document](http://courses.csail.mit.edu/6.042/spring12/part1.pdf)). The problem is about the ... |
The following predicate logic formula is invalid (*i.e.* not a tautology):
$\Bigl[\forall x \,\exists y {\,.\,} P(x,y)\Bigr] \implies \Bigl[\exists y \, \forall x {\,.\,} P(x,y)\Bigr]$
Which of the following are counter-models (*i.e.* counterexamples) for it?
1. The predicate $P(x,y) \equiv \bigl[ y \cdot x... |
null |
null |
{"Voters":[{"Id":98,"DisplayName":"Raphael"}]} |
First of all, I assume that $C_1^4 \equiv O \iff (X_2 \lor A)$ in accordance to $F_1$. Second, note that 3CF as defined in the exercise is equivalent to [3CNF](https://en.wikipedia.org/wiki/3-CNF). In the following, I will denote with $\phi_X$ the subformula of the given formula $F$ which has been assigned new variable... |
|logic|satisfiability|3-sat|normal-forms| |
When testing algorithms, a common approach is random testing: generate a significant number of inputs according to some distribution (usually uniform), run the algorithm on them and verify correctness. Modern testing frameworks can generate inputs automatically given the algorithms signature, with some restrictions.
... |
null |
null |
I'm trying to understand the proof of the time hierarchy theorem appearing in sipser's book. The proof requires a TM M to simulate an arbitrary TM N without too much slowdown. In particular it is assumed that the encoding of N's tape alphabet using M's alphabet causes only a constant factor slowdown. This seems plausi... |
Theory question about time hierarchy in Sipser |
|complexity-theory|turing-machines| |
null |
Given a set $M$ of integers, which are all upper bounded by a polynomial $n^k$, $n \in \mathbb{N}, c $ constant. What is the runtime of computing $\prod_{m \in M} m$ |
run time of product of polynomial bounded numbers |
|time-complexity| |
null |
There are a lot of algorithms out there that solve this particular problem. My main problem is in trying to understand how they work; where to start. Most of the algorithms are academic in nature.
There is a master list of product names. We feed in an input file into the program with product names, but the names of ... |
name matching algorithms from partial input |
|algorithms| |
null |
A cheap but possibly low-precision, low-recall way is to compute something similar to Soundex or Metaphone codes for your product names and candidates. This only really accounts for misspellings, and even then not reliably or in a principled way. But it's cheap to compute.
Alternatively, for a language-independent a... |
null |
First of all, I assume that $C_1^4 \equiv O \iff (X_2 \lor A)$ in accordance to $F_1$. Second, note that 3CF as defined in the exercise is equivalent to [3CNF](https://en.wikipedia.org/wiki/3-CNF). In the following, I will denote with $\phi_X$ the subformula of the given formula $F$ which has been assigned new variable... |
I'm trying to understand the proof of the time hierarchy theorem appearing in sipser's book. The proof requires a TM M to simulate an arbitrary TM N without too much slowdown. In particular, it is assumed that the encoding of N's tape alphabet using M's alphabet causes only a constant factor slowdown. This seems plaus... |
For the time hierarchy theorem, how is the input translated efficiently? |
|complexity-theory|turing-machines|simulation| |
Given a set $M$ of integers, which are all upper bounded by a polynomial $n^k$, $n \in \mathbb{N}, c $ constant. What is the runtime of computing $\prod_{m \in M} m$? |
Run time of product of polynomially bounded numbers |
|time-complexity|integers| |
Let $MIN_{DFA}$ collection of all the codings of DFAs such that they are minimal regarding their states number. I mean if $<A> \in MIN_{DFA}$, so every other DFA with less states, $L(A)\ne L(B)$. I'm trying to figure out how come that $MIN_{DFA} \in R$? how come it is decidable?
What is about this kind of DFAs that ... |
$MIN_{DFA} \in R$? |
|formal-languages|undecidability| |
There are a couple of test sets mentioned in [Stochastic blockmodels and community structure in networks][1] by Karrer and Newman. One of them is the Karate Club Network, which is rather small, and the other is the Political Blog Network which is bigger. As far as I know, there is no gold-standard for testing clusterin... |
Let $M$ denote a set with $|M| = n$, so that for all $m \in M$
$$
m \in \mathcal{O}(n^c)
$$
holds. What is the runtime of computing $\prod_{m \in M} m$.
|
Given two DFAs $A,B$, it is decidable (even efficient!) whether $L(A) = L(B)$: use the product construction to get a DFA for $L(A) \triangle L(B)$, and now use reachability analysis.
In order to determine whether $A$ is a minimal DFA, one can just try all DFAs $B$ with less states, looking for one satisfying $L(A) =... |
Computing the product sequentially, we need to perform $n-1$ multiplications of numbers of size $O(C^n n^{cn})$, for some constant $C$ corresponding to the constant in $O(n^c)$. Using algorithms for fast integer multiplication, each of these requires $\tilde{O}(C\log n + cn \log n) = \tilde{O}_c(n)$, so in total the ti... |
Let $\mathrm{MIN}_{\mathrm{DFA}}$ collection of all the codings of DFAs such that they are minimal regarding their states number. I mean if $\langle A \rangle \in \mathrm{MIN}_{\mathrm{DFA}}$ then for every other DFA $B$ with less states than $A$, $L(A)\ne L(B)$ holds. I'm trying to figure out how come that $\mathrm{MI... |
Is the set of minimal DFA decidable? |
|formal-languages|computability|automata|finite-automata| |
I'm not even sure if this is the right StackExchange to post this, but it seems like sentiment analysis would go here.
What would be the best approach to determine if two people on Twitter are actually friends?
I think that the first criteria would be that they are following each other. This would eliminate all o... |
Analyzing Twitter Relationships |
|algorithms|machine-learning| |
Call a family of sets $F$ "diverse" if each set in $F$ has at least one unique element. What are possible approaches for finding the largest diverse set $F$ in a family of sets $G$?
One approach is to solve a modified set packing problem. Suppose $G=(S_1,...,)$. Let $K$ be a subset of elements, $K \subset \cup G$,... |
Problem similar to set packing |
|combinatorics| |
null |
On this website: http://www.engr.mun.ca/~theo/Misc/exp_parsing.htm
the author starts with the following grammar for arithmetic expressions:
E --> E "+" E | E "-" E | "-" E | E "*" E | E "/" E | E "^" E | "(" E ")" | v
which is quite bad, because it's ambiguous and left-recursive. So he starts from removing t... |
Arithmetic expressions grammar transformation |
|formal-languages|formal-grammars|context-free| |
|algorithms|machine-learning|computer-networks|social-networks| |
|algorithms|time-complexity|integers| |
|algorithms|combinatorics|heuristics| |
The missing step:
E --> P T
T --> B E T |
rewrite E in T:
E --> P T
T --> B P T T |
Simplify T:
E --> P T
T --> B P T |
Equivalent to:
E --> P T
T --> {B P}
And there you are.
|
To factor a grammar you need to check the alternatives of productions (those separated by `|`) whether they have some common symbols in sequence. For example, whether they have a common prefix (that is, whether they start with the same symbol). Join together as many subsequet common symbols (common factors) as you can,... |
Huffman coding is optimal for letters and can certainly be adapted to sequences. For instance, if the sequence "ab" results in fewer bits than the bits for "a" and "b", then simply add it to the tree ...and so on.
...you can also probably use some simple library which does that all for you with near optimal performa... |
I am curious as to how one might *very compactly* compress the domain of an arbitrary [IDN][1] hostname and suspect this could become an interesting challenge.
One can build data models not only from the formal requirements that
* each A-label be a string matching `^[a-z\d]([a-z\d\-]{0,61}[a-z\d])?$`; and
* th... |
Compression of domain names |
|untagged| |
I am curious as to how one might *very compactly* compress the domain of an arbitrary [IDN](http://en.wikipedia.org/wiki/Internationalized_domain_name) hostname (as defined by [RFC5890](http://tools.ietf.org/html/rfc5890)) and suspect this could become an interesting challenge. A Unicode host or domain name (U-label) c... |
|strings|data-compression|natural-language-processing| |
[Natural language processing](http://en.wikipedia.org/wiki/Natural_language_processing) studies the algorithmic analysis and production of texts in human languages. It is closely related to [computational linguistics](http://en.wikipedia.org/wiki/Computational_linguistics). Modern NLP techniques make heavy use of [tag:... |
Natural language processing (NLP) |
null |
In the article [Parsing Expressions by Recursive Descent by Theodore Norvell (1999)](http://www.engr.mun.ca/~theo/Misc/exp_parsing.htm) the author starts with the following grammar for arithmetic expressions:
E --> E "+" E | E "-" E | "-" E | E "*" E | E "/" E | E "^" E | "(" E ")" | v
which is quite bad, bec... |
null |
As far as I know, the more collision-persistent a hash function is, the better. But is there any way to define a hash function with *predicted* collisions? In other words, a hash function that collides for some known set of possible inputs and avoids collisions for other input values. To state the problem simplier:
... |
A hash function with predicted collisions |
|hash| |
Let $M$ denote a set of $n$ positive integers, each less than $n^c$.
What is the runtime of computing $\prod_{m \in M} m$?
|
null |
null |
Let $M$ denote a set of $n$ positive integers, each less than $n^c$.
What is the runtime of computing $\prod_{m \in M} m$ with a deterministic Turing machine?
|
null |
|cryptography|hash| |
|algorithms|strings|natural-language-processing|data-compression| |
Generally the collisions in a hash function are, in a way, what winds up improving the running time.
This is because running time (or size, or insertion time) is generally defined in terms of worst-case input. If you use an algorithm without any randomness or hash, you need to deal with the worst case. For example... |
null |
Of large sparse biparite graphs (say degree 4) with N verticies, roughly speaking, which of them causes the worst case running time of the Hopcroft Karp algorithm? ie What is their general structure and architecture, and why does it cause a problem?
Further, in many implementations the DFS part is implemented using... |
Hopcroft Karp Algorithm Worst Case For Sparse Graphs |
|algorithms|complexity-theory|graphs| |
Using the techniques of artificial intelligence and machine learning to extract patterns from large data sets and transforming those data into a useful, organized form for future processing. |
null |
{"Voters":[{"Id":98,"DisplayName":"Raphael"}]} |
I do not have any argument opposing why we need only a single universal class. However why not we have two universal classes, say an Object and an AntiObject Class. In nature and in science we find the concept of duality - like Energy & Dark Energy; Male & Female; Plus & Minus; Multiply & Divide; Electrons & Protons; I... |
Why classes implicitly derive from only the Object Class? |
|programming-languages| |
This is only an answer to answer the question in the title.
Languages such as Java have every class deriving from Object for two reasons.
Firstly, to increase the amount of polymorphism available. This was particularly required before generics were added to the language. Without Object, a collection classes would... |
This is only an answer to answer the question in the title.
Languages such as Java have every class deriving from Object for two reasons.
Firstly, to increase the amount of polymorphism available. This was particularly required before generics were added to the language. Without Object, collection classes woul... |
|programming-languages|type-theory|object-oriented| |
Questions about the principles of the object-oriented programming paradigm. |
|programming-languages|artificial-intelligence|algorithm-design|object-oriented| |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.