instruction
stringlengths
35
29.1k
Can you provide an example of NN algorithm failure on the Euclidean traveling salesman problem? I was trying to construct a specific example of this for my friends and was failing.
I recently realized that there is some sort of relation between Russellian type theory and type systems, as found e.g. in Haskell. Actually, some of the notation for types in Haskell seems to have precursors in type theory. But, IMHO, Russell motivation in 1908 was to avoid Russell's paradox, and I am not sure how that...
After learning Haskell and other not so pure FP languages I decided to read about Category theory. After gaining good understanding of Category theory I started thinking about how the concepts of category theory can be used to think about designing programs but no matter how hard I tried it seems this is not the way to...
For my Bachelor's thesis, I consider the class of languages recognized by symmetrical DFAs, that is, deterministic (complete) finite automata satisfying the following condition: Let $A$ be a complete DFA over the alphabet $\Sigma$. If, for every $a\in \Sigma$ and every transition $u \stackrel{a}{\longrightarrow}v$ in ...
In the following function, let $n \geq m$. int gcd(n,m) { if (n % m == 0) return m; n = n % m; return gcd(m, n); } How many recursive calls are made by this function? $\Theta (\log_2 n)$ $\Omega (n)$ $\Theta (\log_2(\log_2 n))$ $\Theta ( \sqrt{n} )$ I think the answer is $\Theta (\log_2(\log_2n))$, ...
The proof of the undecidability of $A_{TM}$ in Michael Sipser's textbook* contains the definition of a Turing Machine, which accepts the encoding of a TM, if this TM doesn't accept its own encoding, and rejects it, if it does. If this TM is run on its own encoding, there is problem: it should accept if it doesn't accep...
It's known that the following language, the so-called acceptance problem is undecidable: $A_{TM} = \{\langle M,w\rangle\,\vert\,M\text{ is a TM which accepts }w\}$ The proof is by contradiction: Assume there is a TM $H$ which decides $A_{TM}$. Let $D$ be another TM. Given the code of a TM $M$, $\langle M\rangle$ as inp...
My question is related to this question posted on math.SE: Given an odd number, what is the quickest (constant-time) algorithm for finding its largest factor and suppose you can call a helper function $B$ which takes as its input $(N, k)$ and outputs True iff $N$ has a factor greater than or equal to $k$? Obviously, t...
I wanted to define syntax for a graph path considering it may branch out anywhere. For instance, I have a path going from a to e following b, c, d: a, b, c, d, e. Let's consider it (may) branches from b now: a, b, (x | y), d, e which actually means three different paths: 1) a, b, d, e 2) a, b, x, d, e 3) a, b, y, d, e...
Wikipedia Pushdown automaton (as of aug 16, 2013) states: In general, pushdown automata may have several computations on a given input string, some of which may be halting in accepting configurations. If only one computation exists for all accepted strings, the result is a deterministic pushdown automaton (DPDA) My p...
As a software engineer, I write a lot of code for industrial products. Relatively complicated stuff with classes, threads, some design efforts, but also some compromises for performance. I do a lot of testing, and I am tired of testing, so I got interested in formal proof tools, such as Coq, Isabelle... Could I use one...
This problem arose from software testing. The problem is a bit difficult to explain. I will first give an example, then try to generalize the problem. There are 10 items to be tested, say A to J, and a testing tool that can test 3 items at the same time. Order of items in the testing tool does not matter. Of course, fo...
I need to prove that this language is in co-NPC: $\{ \langle M,x,1^n \rangle \mid M $ is a TM and for all $c \in \Sigma^*$ , $M$ accepts in $ $$n$ steps when given $(x,c)$ as input $\}$. I tried to do so by showing that the complement is in NPC, that is $\{ \langle M,x,1^n \rangle \mid M $ is a TM and there exists $c ...
Similar questions have occurred quite a number of times (1) (2) (3), but I have, say, a specific instance of one. I'm aware of a bunch of applications of finite automata, but would you provide an academic exposition of applications of finite state machines (like, e.g., Mealy machines) in cryptography and ciphers? There...
If we have an array $A$ of length $N$, which is partitioned into $\sqrt{N}$ adjacent subarrays $A(i)$, each of which is monotonically ordered from $\min(i)$ to $\max(i)$ (it is known what places have those bounds in A for each subarray), with the following conditions: min(i) < min(i+1), max(i) < max(i+1), min(i+1) < ma...
I have the following Bayesian Network and need help with answering the following query. EDITED: Here are my solutions to questions a and b: a) P(A,B,C,D,E) = P(A) * P(B) * P(C | A, B) * P(D | E) * P(E | C) b) P(a, ¬b, c ¬d, e) = P(a) * P(¬b) * P(c | a, b) * P(¬d | ¬b) * P(e | c) = 0.02 * 0.99 * 0.5 * 0.99 * 0.88 = 0...
If the set of regular languages is closed under the concatenation operation and is also closed under the reverse operation ($x^R$ is the reverse of $x$) then is the language generated by $$\{ww^R|w\in\Sigma^*\}$$ for some input alphabet $\Sigma$, also regular? If not, why not? I've been trying to find a proof for this ...
Tag systems are Turing-complete. I was wondering if there is any easy way to create tag systems that simulate finite automata. So create tag systems that recognize languages, e.g. by having at the end just one output symbol "A" for accepting the initial input or "R" for rejecting it. I guess a solution would be to make...
I wonder why in JavaScript 0.1 + 0.2 // return 0.30000000000000004 4%0.1 // return 0.09999999999999978 http://jsbin.com/oHISAfU/1/edit (Example) In C the math.h library fmod function printf("%f", fmod(4.0,0.1)); // print 0.100000 http://ideone.com/RG5Wyv (Example) And in Spotlight (search feature in the Mac OS X...
I just read that IBM's Watson would have a hard time answering questions like "tell me about your first kiss." If you asked a modern, state-of-the-art chatbot questions like "tell me about a song that means a lot to you and why" or "tell me about a time when you felt vulnerable" would the chatbot be able to answer in w...
I am trying to think if we can have an injective mapping $\mathcal{f}$, say something like $\Sigma_{bool}= \{0,1\}^* $ to $\Sigma_{5} = \{0,1,2,3,4\}^* $ such that $|x| \leq 2.|\mathcal{f}(x)|$ The motivation here is simple, consider I have a word $110110110110110110110$, so i can compress and represent that as $(110)^...
Is there common formal definition of Document in information retrieval field? In many researches authors don't define the term Document(maybe because it is evident for them). Wikipedia says "text file, document (computer science) a computer file that contains text" but it doesn't seem as common formal definition. Do y...
Imagine that an algorithm A runs in worst-case time $f(n)$ and that algorithm B runs in worst-case time $g(n)$. Answer either yes, no, or can’t tell and could you explain me why? Is A more faster than B, for all $n>n_0$ if $g(h)=Ω(f(n)\log n)$? Is A more faster than B, for all $n>n_0$ if $g(n)=O(f(n)\log n)$? Is A more...
I wonder about cases in which knowing several languages can lead a researcher to interesting results in natural language processing. For example, knowledge of foreign languages can without doubt contribute to better machine translation, it's the most obvious example. In what other fields of NLP can a researcher benefi...
The following question is related to the max cut problem in cubic graphs. In this survey paper Theorem 6.5 states A maximal cut of a cubic graph can be computed in polynomial time Browsing through some other related results (for example this SODA paper) one gets the impression that this problem is actually NP complet...
I'm interested in a slight variant of tiling, the 'jigsaw' puzzle: each edge of a (square) tile is labeled with a symbol from $\{1\ldots n, \bar{1}\ldots\bar{n}\}$, and two tiles can be placed adjacent to each other iff the symbol on one tile's facing edge is $k$ and the symbol on the other tile's facing edge is $\bar{...
For example, I've a chromosome with 10 genes, the first 5 genes represent a specific property of phenotype and the last 5 genes represent another property of phenotype. So, I need a crossover operator that performs the cross considering this configuration, where the parent1's first 5 genes are cross with parent2's firs...
Given a whole number N.. Arrange 1 to N in a sequence such that no two numbers have their average sitting between them... Note - If N=20.. average of 19 and 2 = 10.5 is not a whole number .. hence we do not need to worry about such numbers and their averages.. In other words, if average of two numbers is not a whole ...
I am new to this and an amateur... please help. My Question in practical terms: Given The three following inputs... determine the number of unique group arrangements as an ordered set. INPUT: 'a' = Students 'b' = Groups 'c' = students per group OUPUT ANSWER: 'z' as an integer OUTPUT RULES: - All elements considered ar...
What is the difference between encoding and modulation? I have seen these terms used sometimes inter-changeably and sometimes differently (the ratio is 50:50). Can somebody clearly explain this with some non-technical and technical examples both? I have searched this a lot on net and in the end I end up scratching my h...
Please suggest some books on Parallel Algorithms which teach efficient programming techniques like the ones taught in Udacity course(Introduction to Parallel Programming with CUDA). Also wanted to know that from which reference book or papers are the concepts in the udacity course on Parallel Computing taught...? I wis...
I am building a classifier for short texts in a chat system. My features are words and pairs of words. Naturally, the sentences contain spelling mistakes. If a particular wrong spelling of a certain word hasn't appeared in the training corpus, the classifier has no chance to identify it. I consider taking an existing s...
I have been studying the book Introduction to Computation by Michael Sipser on my own, and I'm stuck on this exercise from the chapter on Pushdown Automato and Context-Free Languages. The exercise is to show that $$A=\{x\#y\,|\, x \neq y\}$$ is a context-free language. I'm having a hard time proving this because of t...
I have started reading about Decision Support Systems which according to wikipedia is "a computer-based information system that supports business or organizational decision-making activities". I have seen papers suggesting intelligent decision support systems, does that means a DSS necessarily utilizes Machine Learning...
I'm trying to find an algorithm to solve the seating chart problem. The goal is to place pepole at one (or multiple) tables such that the overall happiness is maximized. Each seat has neighbors. A person on a seat can talk to persons on neighboring seats (note that these neighbors normally sit next to each other or on ...
I need to keep a collection on integers in the range 0 to 65535 so that I can quickly do the following: Insert a new integer Insert a range of contiguous integers Remove an integer Remove all integers below an integer Test if an integer is present My data has the property that it often contains runs of integers in th...
One possible motivation for studying computational complexity classes is to understand the power of different kinds of computational resources (randomness, non-determinism, quantum effects, etc.). If we look at it from this perspective, then it seems like we can obtain one plausible axiom for any attempt at characteri...
Why are neural networks initial weights initialized as random numbers? I had read somewhere that this is done to "break the symmetry" and this makes the neural network learn faster. How does breaking the symmetry make it learn faster? Would'nt initializing the weights to 0 be a better idea? That way the weights would b...
In his lecture Reflections on Trusting Trust, Ken Thompson describes a virus that infects a compiler; the infected compiler installs backdoors into programs, but the key part is that the infected compiler also infects all compilers it compiles. K. Thompson notes that if this was implemented at the Microcode level, it w...
The decision problem Given a Boolean formula $\phi$, does $\phi$ have exactly one satisfying assignment? can be seen to be in $\Delta_2$, $\mathsf{UP}$-hard and $\mathsf{coNP}$-hard. Is anything more known about its complexity?
Having: $\qquad \begin{align} S &\to aT \\ T &\to a \mid UTV \\ U &\to ab \mid ba \\ V &\to ac \mid ca \end{align}$ What language would be generated by this? How can I obtain an $LL(1)$ grammar using factorisation? I've tried a number of combinations but do not get how to represent the UTV part: Someth...
What is the term for an algorithm that always requests the same sequence of pages? I recall seeing this concept before but haven't been able to find anything on Google without more specific vocabulary. One algorithm in this category is a linear scan to (say) find the minimum of a set of data. Each page is accessed in...
I have just used a function 'rand()' in my algorithm. In fact, it was arc4random() that I used. However, it got me thinking, how is randomness created in a computer system? Can anything ever truly be random when it is produced by a computer?
If you have two computers with only one thread, a and b. And computer a runs twice as fast as computer b. Does this mean that computer a and can do twice as many operations in a given time in comparison to computer b? To increase the Hertz of a computer, i.e. the speed of the computer and the number of operations it c...
I'm sitting an exam on Computer Architecture in a few days and i'm stuck on a particular type of question. I'm asked to: Provide a detailed schematic for a functional unti that implements the following micro-operations Any help would be great even just a nudge in the right direction.
I've recently started casually reading into combinatorial logic, and I noticed that a higher-order function that I regularly use is a combinator. This combinator is actually pretty useful (you can use it to define addition on polynomial equations, for example), but I never gave it a decent name. Does anyone recognise t...
Is there any difference between the two? As per Ullman's book, compilers convert one language to another (usually low level) language, and so does an assembler. How are the two different?
I am reading this article about compiler. I am facing some problem in understanding the content of the token file. Specifically, what is the meaning of the following lines: [ \t\n] ; [a-zA-Z_][a-zA-Z0-9_]* SAVE_TOKEN; return TIDENTIFIER; [0-9]+\.[0-9]* SAVE_TOKEN; return TDOUBLE; ...
As part of my continual improvement plans, I'm reviewing algorithm analysis and I've hit a roadblock. I cannot figure out how to determine the Big O complexity of $\log(n+7)^{\log(n)}$. I've spent the last few days rolling this over in my head and I still haven't made any progress in solving it. Could someone tell me w...
I do not understand the proof for this. I know that every word in $(A^*)^*$ is made up of words from $A^*$, and that this is made up from words in $A$. But how does this help with showing that $(A^*)^*$ is a subset of $A^*$.
Ramsey's theorem states that every graph with $n$ nodes contains either a clique or an independent set with at least $\frac{1}{2}\log_2 n$ nodes. I tried to look it up at a few places (including Sipser) but I could not make out a lot of sense from the proofs. I would appreciate it if someone can give me a proof (or cle...
Definitions: Alphabet $Σ$: finite, non-empty set Language: subset of $Σ^*$ Grammar: Unrestricted grammar (Chomsky Type 0) Language of a grammar: all words that can be produced by applying $P$ multiple times, starting from $S$ Grammars are finite, therefore there are only countable infinite of them. But there are unco...
If $u,v \in \mathbb{R}^d$ are two $d$-dimensional vectors, say that $u\le v$ if $u_i \le v_i$ for all $i=1,\dots,d$. In other words, comparisons on vectors will be pointwise. Let $S,T$ be two subsets of $\mathbb{N}^d$ of size $m$. Is there an efficient way to test whether there exists $s\in S, t \in T$ such that $s\l...
This is a Google interview question. I got it from a website. You have two arrays source and target, containing two permutations of the numbers [0..n-1]. You would like to rearrange source so that it equals to target. The only allowed operations is “swap a number with 0”. Find the minimum number of swaps? e.g. {1,0,2,...
Currently I am playing around with time series forecasts (specifically for Forex). I have seen some scientific papers about echo state networks which are applied to Forex forecast. Are there other good machine learning algorithms for this purpose? It would also be interesting to extract "profitable" patterns from the t...
Given this question: $L$ is an infinite language of encoded Turing machines who always halt. $L$ might be decidable $L$ might be in RE but not in R both 1. and 2. are correct I know the solution to this question is 3., but I seem to lack the understanding on how am I suppose to get to that solution. Could you expla...
I get that R is a set of languages that are decidable by a Turing Machines And that RE is a set of languages that a each language can be recognized by a TM, that is the machine will halt when given a word from that language and loop otherwise. But I can't wrap my head around co-RE. Is there a good way to describe it? ...
Suppose we have two entities $A$ and $B$ and some relationship between them. If there is an $M:N$ relationship between them (i.e. an $M$ on the line connecting $A$ to the relationship and an $N$ connecting the relationship to $B$), how do we read this? Would it be the following: A single instance of $A$ is related to $...
Most specifically, his use of small epsilon introduced at the end of section 1 of "Types, Abstraction and Parametric Polymorphism" is throwing me, but in general I would like references to symbols in the Type and Logical Relations literature.
I found something in my notes I don't really understand, maybe you could help. Let $A$ = Independent Set and $B$ = Clique. Then, we clearly have $A \in \mathsf{NPC}$ and $B \in \mathsf{NP}$. Now, the claim is that $A \setminus B \notin \mathsf{NP}$ with the following explanation. If it was in $\mathsf{NP}$ then $\mat...
For a language to be regular it needs to be recognized by DFA/NFA. Let $L = \{ xy^rzyx^r \mid |x| , |y|, |z| \ge 1 \}$ over the alphabet $\{0,1\}$. $x^r$ means the reverse of $x$. A DFA has no memory, so how can it handle the reverse check?
If you could include your thought process in determining why it's regular it would help me a lot. $L_1 = (0^*(10)^*11)$ $L_2 = \{ \langle M \rangle \mid M \text{ is a Turing machine that halts on all inputs from }L_1 \}$ $L_3 = \{ x \in \{0,1\}^* \mid \exists y \in L_2. xy \in L_1 \}$ Why is $L_3$ regular? It's a set...
Where can I find introductory books, articles, notes or slides on Game Semantics? I have searched a lot on the internet but I'm not satisfied by the material I found. It either is too informal, or it assumes too much knowledge of/attitude to other kind of semantics, and it's hard to follow for a beginner. Ideally the m...
Does anyone know where I could get an access to a project that contains all the artefacts (documents) that were created during the development? So I would like to get all the word, pdf, power designer, etc. files as well as all the source code. If possible, I would prefer that all this files are stored in some of the s...
Suppose we are using a dual core processor and we run 2 applications (1 with 80% resource requirements and the other with 20% resource requirements).Now the first program is parallelizable for 40% and the second one not parallelizable.My question is what would be the speed up achieved in this case.By speed-up i mean th...
I need help with deciding if $L$ is context-free. $$L = \{a^pb^{q+r}c^sd^{q+t}e^{p+r} \mid p, q, r, s \ge 0\ , s > t\}$$ Can be rewritten into: $$L = \{a^pb^qb^rc^sd^qd^te^pe^r \mid p, q, r, s \ge 0\ , s > t\}$$ When we see the first occurrence of $c$, we push the $c$:s onto the stack. But we can't make difference betw...
By a vanilla Turing machine, I mean a Turing machine with one tape (no special input or output tapes). The problem is as follows: the tape is initially empty, other than a string of $n$ $1$s and $0$s terminated by an end-of-string character. The tape head starts at the beginning of the string. The goal is for the tape ...
A shuffling algorithm is supposed to generate a random permutation of a given finite set. So, for a set of size $n$, a shuffling algorithm should return any of the $n!$ permutations of the set uniformly at random. Also, conceptually, a randomized algorithm can be viewed as a deterministic algorithm of the input and so...
Suppose I have two polynomials $f(x)$ and $g(x)$ and I somehow represent their coefficients. I have a couple of ways to hold a polynomial depending on how many significant coefficients the polynomial has. I want to determine the amount of significant coefficients in the results of $f(x) + g(x)$ ,$f(x) \cdot g(x)$ , $f(...
Given $n$ nodes in the plane, connect the nodes by a spanning tree. For each node $v$ we construct a disk centered at $v$ with radius equal to the distance to $v$’s furthest neighbor in the spanning tree. The interference of a node $v$ is then defined as the number of such disks that include the node $v$. The problem I'...
Given two integers $n$ and $m$, how many numbers exist such that all integers have all digits from $0$ to $n-1$, the difference between two adjacent digits is exactly $1$, and the number of digits in the integer is at most $m$? The integer cannot start with a $0$. All digits from $0$ to $n-1$ must be present. Example: ...
In other words, given a graph with nodes $N=\{n_0,n_1,...,n_j\}$, and a set of nodes in the graph $M=\{n_a,n_b,...,n_k\}$ with $M\subseteq N$, I'm looking for what to call the node or nodes $n'$ which minimize: $\sum_{m\in M}d_{min}(n',m)$ where $d_{min}(x,y)$ is the shortest distance from node $x$ to node $y$, as trad...
I'm a bit confused how worst case complexity is estimated for the DPLL algorithm. Is it in terms of number of clauses, number of variables, or something else?
I would like to sample a uniformly random point in a polygon... If sample a large number they'd be equally likely to fall into two regions if they have the same area. This would be quite simple if it were a square since I would take two random numbers in [0,1] as my coordinates. The shape I have is a regular polygon, b...
This is a homework question, so I am only looking for hints. I got a question in an assignment which states : Design a DFA that accepts strings having 1 as the 4th character from the end, on the alphabet {0,1} I have been at this for a few hours now, and I think that designing such a DFA is not possible. However, I a...
I want to construct a complete graph where each node is connected to every other node. The link between the nodes give a distance function (does not follow triangle inequality) between them. What I require is to merge the closest nodes, (bounded by a threshold) into a single node and recompute the graph each time, recu...
How is Quantum Algorithms and Complexity Theory essentially different from Classical Counterparts? Also how are non-deterministic Turing Machines(NTM) different from Quantum Turing Machines(QTM)? More precisely, Is there an QTM that can solve the SAT 'fairly fast'? I wanted to know how are QTMs different from NTMs, ...
I am not experienced in machine learning but I have been looking at the Python toolklit scikit-learn. I have thousands of mammograms and I have written an algorithm to find the outline of the images. I have some cases where the outline of the mammogram is not correct. I would like to be able to take these thousands of ...
When it comes to the design of algorithms, one often employs the following techniques: Dynamic Programming The Greedy-Strategy Divide-and-Conquer While for the first two methods, there are well-known theoretical foundations, namely the Bellman Optimality Principle and matroid (resp. greedoid) theory, I could not find...
In the edge-disjoint paths problem (EDP), we are given a (possibly directed) graph $G=(V,E)$, and a set of distinct source-sink pairs $\{ (s_i,t_i) \mid 1 \leq i \leq k \}$, and we want to maximize the number of pairs that can be simultaneously connected in an edge-disjoint manner. When we add the constraint that the p...
I'm studying for the computer science GRE, and as an exercise I need to provide a recursive algorithm to compute Fibonacci numbers and show its correctness by mathematical induction. Here is my recursive version of an algorithm to compute Fibonacci numbers: Fibonacci(n): if n = 0 then // base case retur...
I am preparing for my exam in formal languages and I need some help with one question from one old exam. I know that the number of equivalence classes of some regular language L, is the number of states of the minimal DFA for that language. But how do I give a DFA for one of the equivalence classes ? Thanks in advan...
Is there an "official" name for this slight variant of the well known Tag System model of computation, and/or has it been used somewhere? a finite alphabet of symbols $\Sigma$ a halt symbol $H$ an ordered set of production rules: $$P_i: \alpha_i \rightarrow \beta_i, \quad \alpha_i \in \Sigma^+, \beta_i \in \Sigma^* \...
The problem can be formulated as: $\min f(\textbf{x})=\sum_{i=1}^{n} \prod_{j \in N(i)}(1-F(x_i))$ s.t. $\sum_{i=1}^n x_i \leq B$ $N(i)$ is a set of i. And $F_{x_i}$ can be any function with range between [0,1]. if $F(x_i)$ is a convex function and $\prod_{j \in N(i)}(1-x_i)$ is concave, the objective function is a co...
I am looking for algorithms to classify words in a paragraph of text. I am particularly interested in a classification to determine if a certain word is noun, verb, etc., but also looking for any kind of word-classification algorithms. I am given a smaller input (e.g. 200 words) so there is no many options for machine ...
Is there any difference between free variable and global variable? Or they are just synonyms? In which situations I should use one or another?
I was wondering how many binary trees we have with height of $h$ with $n$ nodes(another question is how many binary trees we have with height $ \lfloor{lg (n)}\rfloor$). Edit: I forgot to add the number of nodes.
As far as I know idempotent operation is a operation that can be applied many times with the same effect. Also I learnt recently that updating a tuple in a database is also idempotent. I thought that an idempotent operation was like a read-only stateless call (thanks to HTTP world with its famous GET request example). ...
I have a system of mono-disperse spheres inside a cubic box. I am studying the volume distribution inside the sample, after tessellating it with either Voronoi and Delaunay tessellations. I am interested on some properties which should not depend on the tessellation. Currently, I am comparing with the values obtained f...
In trying to gain a better understanding of finite state machines, I stumbled across this idea and have been confused as to how to approach this case in terms of a DFA. The set of binary strings of length at least 3 where every substring of length 3 contains at least two 0s. So in other words, something like 100100...
I understand that $\Pi$ types are generalizations of functions and can be interpreted similar to $\forall$ in logic. I also know that $\Sigma$ types are generalizations of tuples and can be interpreted similar to $\exists$ in logic. But whereas I find it easy to imagine $\Pi$ type examples by thinking in Haskell, I am ...
I am new to Algorithms and am currently confused about the running time of the ThreeSum program. If we look at ThreeSum's count function: public static int count(int[] a) { int N = a.length; int count = 0; for (int i = 0; i < N; i++) <-- A for (int j = i + 1; j < N; j++) <-- B for (int k = j + 1; k...
The state space is decribed with 3 boolean variables $p,q$ and $r$ (so we have 8 states total). We have an action, let's say $a$. Action $a$ can be executed when $p=\text{False}$ and $q=\text{True}$ and the result is $p=\text{True}$, $q=\text{False}$ and $r=\text{False}$ How can we describe this action with STRIPS? My ...
I was trying to solve this problem on SPOJ: Given a sequence of $n$ numbers $a_1, a_2, \ldots, a_n$ and a number of $d$-queries. A $d$-query is a pair $(i, j)$, $(1 \leq i \leq j \leq n)$. For each $d$-query $(i, j)$, you have to return the number of distinct elements in the subsequence $a_i, a_{i+1}, \ldots, a_j$. S...
I formulate the question in terms of universal distributions. Fix a version of Solomonoff's universal distribution $\mathbf M$ and consider the following procedure for generating an infinite binary sequence $\omega$. Start with some $\omega_0$. Each subsequent element is given by $\omega_n=\arg \max_a\mathbf M(a|\omeg...
I'm interested in learning about how facial recognition works. I'm especially interested in the algorithms or approach that is used. What are the leading methods for facial recognition? Is there a good overview or source to learn about a few of the most widely used algorithms for facial recognition? What would be t...
Some humans can lip-read fairly well: by watching someone who is speaking, they can tell what the speaker is saying (even without hearing the speech). Has there been any work on building computer software to lip-read? In other words, given a video of someone speaking, is it possible to build software to infer what the...
For proofs by well-ordering principle the general template is to consider the negation of some predicate $P(n)$. Then assume the set of all elements that fulfill $\lnot P(n)$, i.e. $\qquad N = \{ n \mid \lnot P(n) \}$ has a smallest element according to WOP, say $m = \min N$, and if we manage to prove that there is ano...
What exactly is the job of a syntax analyzer? Suppose I have a mathematical expression. Is it true that the order of execution of the operations is found with the help of syntax analyzer? Any example on exact jobs of Syntax Analyzer?
I know that in an infinite language there are infinite number of strings. I want to know what type of the languages are C, C++ and JAVA? I can have infinite number of variables in all these languages, so I think all these languages are infinite. Please correct me if I am wrong.