instruction
stringlengths
0
29.8k
⌀
Straight to the point, I really like to learn AI. But I want an advice from the experienced CS guys, as to when should I jump to Artificial Intelligence. What are the prerequisites needed in order for me to better grasp the AI concepts?
When should I learn artificial intelligence?
|artificial-intelligence|
You will need some discrete mathematics. Graphs, trees, and so forth. These are the structures underlying AI. You will need some programming skills, especially in languages such as Prolog and LISP. A lot of AI systems are programmed in these languages. You will need some logic. Propositional and predicate calcu...
You will need some **discrete mathematics**. Graphs, trees, and so forth. These are the structures underlying AI. You will need some **programming** skills, especially in languages such as Prolog and LISP. A lot of AI systems are programmed in these languages. You will need some **logic**. Propositional and pre...
A "shortcut" to the solution; first calculate the <code>NEEDED = MAX - ALLOCATED</code>resources: ALLOCATED MAX NEEDED A B C A B C A B C P1 0 1 0 7 5 3 7 4 3 P2 2 0 0 3 2 2 1 2 2 P3 3 0 2 9 0 2 6 0 0 P4 2 1 1 2 2 2 0 1 1 ...
[Ramkrishnan and Gehrke][1]'s database book discusses these things in some detail. [1]: http://www.amazon.co.uk/Database-Management-Systems-Raghu-Ramakrishnan/dp/0071151109/ref=sr_1_1?s=books&ie=UTF8&qid=1347994679&sr=1-1
Are there any grammars, which are true subset of Chomsky level 2 but not equal to level 1?
Are there grammars, which are between Chomsky level 1 and 2?
|formal-grammars|
sum = 0; for (i = 0; i < n; i++) for (j = 0; j < i; j++) sum++; Let's trace this out: * When i=0, the inner loop will not run at all (`0<0 == false`). * When i=1, the inner loop will run once (for j==0). * When i=2, the inner loop will run twice. (for j==0 and j==1). This algo...
Are there any grammar classes which are true subsets of Chomsky level 2 but not equal to level 1?
Are there grammar classes between Chomsky level 1 and 2?
|formal-languages|formal-grammars|
I write this code in python: def sub(ma): n = len(ma); m = len(ma[0]) if n != m : return n2 = int(ceil(n/2)) a = []; b = []; c = []; d = [] for i in range(n2): a.append(ma[i][0:n2]) b.append(ma[i][n2:n]) c.append(ma[n2+i][0:n2]) d.append(ma[n2+i][n2:n]) ...
Computing the running time of a divide-by-4-and-conquer algorithm
null
**Problem 1** The case of $(x\rightarrow y \vee \overline y)$ should be a "non conditional variable" with respect to $x$ (ie. that $\overline x$ should now be inserted into $W$). If this is not true, then your algorithm needs an extra step to infer this. Assuming $(x\rightarrow y \vee \overline y)$ is a "*non condit...
null
null
Within the k-anonymization paradigm (and it's refinements) you want to create datasets where every tuple is identical from k-1 others. However I'm in a situation where people are in the dataset many times. And I want to follow their progress through the health care system, so I need to know who is who. If I give eac...
Anonymization of datasets preserving unique identities
|algorithms|
Anonymization of dataset preserving unique identities
Substation method fails to prove that $T(n) = \Theta(n^2) $ for the recursion $T(n)= 4T(n/2) + n^2$, since you end up with $T(n) < cn2 \leq cn2 + n2 $. I don't understand how to subtract off lower-order term to prove that substation works. Came up with: $T(n) \leq cn^2 - bn^2$ Assume it holds for $T(n/2) \leq c(...
Subtracting lower-order term to prove subtitution method works
|recurrence-relation|landau-notation|
Substation method fails to prove that $T(n) = \Theta(n^2) $ for the recursion $T(n)= 4T(n/2) + n^2$, since you end up with $T(n) < cn2 \leq cn2 + n2 $. I don't understand how to subtract off lower-order term to prove that substation works. Came up with: $T(n) \leq cn^2 - bn^2$ Assume it holds for $T(n/2) \leq c(...
Substation method fails to prove that $T(n) = \Theta(n^2) $ for the recursion $T(n)= 4T(n/2) + n^2$, since you end up with $T(n) < cn2 \leq cn2 + n2 $. I don't understand how to subtract off lower-order term to prove that substation works. Came up with: $T(n) \leq cn^2 - bn^2$ Assume it holds for $T(n/2) \leq c(...
Within the k-anonymization paradigm (and it's refinements) you want to create datasets where every tuple is identical with k-1 others. However I'm in a situation where people are in the dataset many times. And I want to follow their progress through the health care system, so I need to know who is who. If I give eac...
The source of this question comes from an undergraduate course I am taking, which covers an introduction to the analysis of algorithms. This is not for homework, but rather a question asked in CLRS. You have a slow machine running at $x$ MIPS, and a fast machine running at $y$ MIPS. You also have two algorithms of t...
|algorithms|algorithm-analysis|runtime-analysis|mathematical-analysis|
Consider your last inequality: $\qquad \displaystyle n < \frac{c_2y}{c_1x}\log(n)$ Now, $C\log n$ with $C = \frac{c_2y}{c_1x}$ is a [concave function](https://en.wikipedia.org/wiki/Concave_function). Therefore, there are at most two intersections, and only one of them is interesting for you; that is, solve $\q...
|asymptotics|recurrence-relation|landau-notation|
Substation method fails to prove that $T(n) = \Theta(n^2) $ for the recursion $T(n)= 4T(n/2) + n^2$, since you end up with $T(n) < cn2 \leq cn2 + n2 $. I don't understand how to subtract off lower-order term to prove that substitution works. Came up with: $T(n) \leq cn^2 - bn^2$ Assume it holds for $T(n/2) \...
null
Substation method fails to prove that $T(n)=\Theta(n^2) $ for the recursion $T(n)=4T(n/2) + n^2$, since you end up with $T(n) < cn^2 \leq cn^2 + n^2$. I don't understand how to subtract off lower-order term to prove that substitution works. Came up with: $T(n) \leq cn^2 - bn^2$ Assume it holds for $T(n/2) \l...
null
null
The $k$-anonymization paradigm (and its refinements) means to create datasets where every tuple is identical with $k-1$ others. However I'm in a situation where people are in the dataset many times. And I want to follow their progress through the health care system, so I need to know who is who. If I give each perso...
|algorithms|security|databases|
I was watching the [video lecture from MIT on Prim's algorithm for minimum spanning trees][1]. Why do we need to do the swap step for proving the theorem that if we choose a set of vertices in minimum spanning tree of $G(V,E)$and let us call that $A$ such $A\subset B$, the edge with the least weight connecting $A$ ...
Why do the swap step in Prim's algorithm for minimum spanning trees?
|algorithms|algorithm-analysis|greedy-algorithms|trees|
The point of k-anonymity is that you can't uniquely identify your patients. So I will rephrase your question: > Given two anonymized tuples $x$ and $y$, can we tell if they are anonymizations of the same person? Let's suppose for purposes of contradiction that we could. Then this means there is a "meta-tuple" whi...
null
I need to create a bloom filter of 208 million URLs. What would be a good choice of bit vector size and number of hash functions? I tried a bit vector of size 1 GB and 4 hash functions, but it resulted in too many false positives while reading.
Bloom Filter for 208 million URLs
|data-structures|
At my local squash club, there is a [ladder][1] which works as follows. 1. At the beginning of the season we construct a table with the name of each member of the club on a separate line. 2. We then write the number of games won and the number of games played next to each name (in the form: player wins/...
How to efficiently determine whether a given ladder is valid?
|algorithms|
I've been doing some reading (I'll name drop along the way) and have selected a few scattered ideas that I think could be cobbled together into a nifty esoteric programming language. But I'm having some difficulty assembling the parts. Kleene's Theorem states: Any Regular Set can be recognized by some Finite-State M...
What piece am I missing to turn this idea into a programming language?
|finite-automata|arrays|neural-networks|
At my local squash club, there is a [ladder][1] which works as follows. 1. At the beginning of the season we construct a table with the name of each member of the club on a separate line. 2. We then write the number of games won and the number of games played next to each name (in the form: player wins/...
|algorithms|graphs|
Assuming P $\neq$ NP, NP-complete problems are "hard to solve, but have answers that are easy to check." Does it make any sense to consider the opposite, that is, problems for which it's easy to compute a correct answer, but hard to verify an arbitrary certificate? I think such a problem would imply exponentially m...
Are there any problems that are easy to compute but hard to verify?
|complexity-theory|
|programming-languages|finite-automata|arrays|neural-networks|machine-models|
|algorithms|graphs|algorithm-analysis|greedy-algorithms|spanning-trees|
If you are fine with artificial problems, you can make plenty of them. Here are a few: * _Given a positive integer <i>n</i> in unary, answer a satisfiable 3CNF formula in <i>n</i> Boolean variables._ Giving one satisfiable 3CNF formula is easy, but deciding whether a given 3CNF formula is satisfiable or not is 3...
If you are fine with artificial problems, you can make plenty of them. Here are a few: * _Given a positive integer <i>n</i> in unary, answer a satisfiable 3CNF formula in <i>n</i> Boolean variables._ Giving one satisfiable 3CNF formula is easy, but deciding whether a given 3CNF formula is satisfiable or not is 3...
null
I think problem 2 is decidable.<br> We shall prove that $B$ is computable by describing a 2-tape $TM M$ that decides it:<br> $M$ will simulate $M_\alpha$ on $x$ and will keep on its 2nd tape the configurations (= state, head position and symbols currently on tape) $M_\alpha$ has been in. Each time $M_\alpha$ "moves"...
I think problem 2 is decidable.<br> We shall prove that $B$ is computable by describing a 2-tape $TM M$ that decides it:<br> $M$ will simulate $M_\alpha$ on $x$ and will keep on its 2nd tape the configurations (= state, head position and symbols currently on tape) $M_\alpha$ has been in. Each time $M_\alpha$ "moves"...
This sounds more like the makings of a computational model rather than a programming language, as such, perhaps in the same way that the quantum computation can form the basis of a programming language such as the [quantum lambda calculus][1]. Perhaps ask yourself: * What kinds of computation are you trying to p...
Charles Leiserson is presenting a proof to what is known as the **blue rule** in Tarjan's "Data Structures and Network Analysis" book. The proof goes by contradiction, that is you assume that the edge $(u,v)$ is not in the MST $T$. Don't be confused by the board, it has to be $(u,v)\not \in T$. Let $(a,b)$ the edge...
This sounds more like the makings of a computational model rather than a programming language, as such, perhaps in the same way that the quantum computation can form the basis of a programming language such as the [quantum lambda calculus][1]. Perhaps ask yourself: * What kinds of computation are you trying to p...
Is it possible to reduce MaxUNSAT to [MaxSAT][2] in a polynomial way ? When considering the MaxSAT problem, one often considers also the `MinUNSAT` problem, which is almost the same. And for a propositional formula `f` in [CNF][1] it holds: |f| = MaxSAT(f) + MinUNSAT(f) where `|f|` is the number of clauses...
How to reduce MaxUNSAT to MaxSAT?
|optimization|reductions|
Is it possible to reduce MaxUNSAT to [MaxSAT][2] in a polynomial way ? When considering the MaxSAT problem, one often considers also the `MinUNSAT` problem, which is almost the same. And for a propositional formula `f` in [CNF][1] it holds: |f| = MaxSAT(f) + MinUNSAT(f) where `|f|` is the number of clauses...
null
This sounds more like the makings of a computational model rather than a programming language, as such, perhaps in the same way that the quantum computation can form the basis of a programming language such as the [quantum lambda calculus][1]. Ask yourself: * What kinds of computation are you trying to perform? ...
Perhaps another way to prove **Q1** is the following: 1) we can automatically build the transition table of a $TM_{(m,x)}$ that on every input $w$ simply adds the fixed string $\#m\#x$ at its end (the tape content of $TM_{(m,x)}(w)$ is $w\#m\#x$), and return to the intial tape position; 2) we can explicitly build...
I want to define a semantics of a DSL through transition semantics. However I don't know how to do it!. Can someone provide me with an example?
Looking for a simple example of Transition Semantics
|semantics|
What do you mean by "transitional semantics"? If you mean structural operational semantics using transition systems, then maybe a good place to start is a good text on the semantics of programming languages, Examples: * Winskel's [Formal Semantics of Programming Languages](http://www.amazon.com/Formal-Semantics-Pro...
Perhaps another way to prove **Q1** is the following: 1) we can automatically build the transition table of a $TM_{(m,x)}$ that on every input $w$ simply adds the fixed string $\#m\#x$ at its end, and bring the head to the intial tape position (the final tape content of $TM_{(m,x)}(w)$ is $w\#m\#x$); 2) we can ex...
Is there any optimal algorithm for finding the shortest path in an undirected weighted graph?
Finding the Shortest path in undirected weighted graph
|algorithms|
I'm being asked to create a "top down grammar" for a certain language (I'm pretty sure there's no such thing as a "top down grammar" but I think it means write a grammar that an LL(k) parser can parse). I'm pretty sure the language is not LL(1), but I can remove left-recursion and common prefixes from it and still h...
Can an LL(k) parser parse any grammar without left recursion or common prefixes?
|parsing|
This isn't an answer, but just a thought about your setup. The outcome seems to depend on the choice of the initial element. For example, if one point was really far out, and all the other points clustered together. If we start with the far point, then the initial `d` is huge. Thus we can only ever add new points to...
The value of f depends on the set X aty hand, and the order in which You test the elements. For example, if the elements are points on a line, then testing the elements in order will give You more elements in the final set than testing them in a random order. In short, it is not possible to choose f that works...
OK, another answer :) Size of the set X' clearly depends on the distribution of points, choice of starting points, and random chance. If the points are always chosen from the same distribution, I'd try drawing |X'| as a function of f and |X|. To do that, I'd just do some monte-carlo simulations. Also notice th...
We have a set X of N elements. We want to get a new set X' having a size M < N. Choose a first element x from X and put it in X' for each element x in (X - X') Let x' the element from X' which is the closest to x (that is x' = argmin distance(x, x') for all x' in X') d = distance(x, x') ...
hurestically determine a value f such that a probability d/f approches 1/2