instruction
stringlengths
35
29.1k
I got the following as an interview question: Count the number of tours from the upper left corner to the lower left corner in a grid world where you can move in any manhattan direction. This is the number of Hamiltonian paths from upper left to lower left: a path such that every vertex is visited only once, and (this...
From Wikipedia: In theoretical computer science, correctness of an algorithm is asserted when it is said that the algorithm is correct with respect to a specification. But the problem is that to get the "appropriate" specification is not a trivial task, and there is no 100% correct method (as far as i know) to get the ...
Let $A$ be a decision problem with at least one yes instance and at least one no instance. Also let $B \in \textbf{P}$. How could I prove that B reduces to A in polynomial time? Thanks in advance.
I'm trying to understand how we can get the time complexity of Dijkstra's Algorithm down from O(V²) (for a matrix-implemented Dijkstra's) to O(V) if the edge weights of our graph are bounded by a constant C. I've read up on this MIT lecture but can't really wrap my head around the explanation. It says that all paths a...
I am trying to figure out how to make an unambiguous grammar for palindromes over the alphabet {a, b}. I have the following, but it is ambiguous and causes conflicts in yacc. S -> a S a | b S b | a | b | ε Is there a way to convert this to an unambiguous grammar? Or is there another solution?
PARTITION: Given a set of positive integers $A=\{a_1,...,a_n\}$ does there exist a subset of $A$ with sum equal to the sum of it's complement? SUBSET SUM: Given a set of positive integers $A=\{a_1,...,a_n\}$ and another positive integer $B$, does there exist a subset of $A$ such that it's sum is equal to $B$? I was try...
Brief problem description I'm using a Basel Morphable Face Model, which was labeled with MPEG4 and Farkas landmarks. I can generate different faces, use different lighting conditions, rotations, perspective etc. I want to use it to train an algorithm in order to find these landmarks on real pictures further. More stric...
I was reading the venerable "How to Find or Validate an Email Address [using Regex]", and I came across the following statement at the bottom of the page: [A] true regular language cannot enforce a length limit and disallow consecutive hyphens at the same time. This seems wrong to me. I feel like if the length of a...
In wikipedia NFA-ε transition function defined as follows $Δ : Q × (Σ ∪ \{ε\}) → P(Q)$, where $Σ$ is an alphabet and $ε$ - empty string. I don't understand the meaning of $ε$ in this context. Assuming $ε$ means a sequence of symbols with length of zero, as per definition. Alphabet $Σ$ is a set of symbols. But symbol $\...
So, I've been conferred upon the opinion that: Union, difference, cross product, selection, projection form the "complete set of relational operations". That is, any other relational operation can be expressed as a combination of these (excluding domain manipulation operations like aggregate functions I assume). Qu...
I have created an algorithm to find all palindromes in a string, and studied the related theory (Manacher, Suffix trees) and prior work and don't think my algorithm relates to any of the existing ones, and the implementation of my algorithm is 3 times faster than a Manacher implementation. Now I want to get it peer-rev...
Can anyone please help me try to understand what will the state diagram look like for this question: Let $L = \{x_0y_0z_0x_1y_1z_1\ldots x_{n-1}y_{n-1}z_{n-1} \mid \exists n,x,y,z \, x+y=z \land x=\sum_{j=0}^{n-1} x_j2^j \land y=\sum_{j=0}^{n-1} y_j2^j \land z=\sum_{j=0}^{n-1} z_j2^j \land \forall i \, x_i,y_i,z_i \in...
Consider strings $s \in \{0,1\}^*$. Define $c_1(s)$ to be the ones' complement of $s$; i.e., the string obtained from $s$ by inverting all of its bits. So, for example, $c_1(000111) = 111000$. Call a language $L \subset \{0,1\}^*$ ones' complement closed, or OCC, if $s' \in L$ $\iff$ $c_1(s') \in L$, provided $s'$ is n...
Can a Turing machine $M_A$ determine if the Turing machine $M_B$ accepts the set $W_k$? I am curious about the answer to this as I am thinking about using the truth value of it on using it for a recursive enumerability proof.
I don't really understand how we can use the fact that the edge weights are integers in the range [1, 2, ... , C] in order to speed up the computation of Dijkstra's algorithm. I read this lecture but I still don't really get it. I understand why we make an array of size |V|C + 1 holding buckets where we put nodes with ...
I have been studying Process Synchronization and inter-process communication in Operating Systems Engineering and have come across multiple problems like "Sleeping Barbers", "Producer Consumers", "Dining Philosophers" and "Reader Writers" . While working on these problems I found them very interesting and I get a sort ...
I'm trying to train a load-balancing system with reinforcement-learning (RL) s.t. the incoming jobs are queued evenly at the available servers. The system will not be able to directly dispatch the jobs, but it will only offer suggestions to use a set of servers over another. The system will also be capable of reducing ...
I want to calculate the determinant of a matrix. Currently I'm using LU decomposition. To check my algorithm I wrote a unit test with random matrices. In one part I set one row to be equal to another row to test if the resulting determinant would be 0. This is the matrix: $\begin{pmatrix} 0 & 0 & 33 & 17 & 42 & ...
I am developing an ontology. I've got the classes, relationships and I guess I could come up with instances at this point too. But what I'm really focused on is the axioms. I've learnt that the axioms restrict the knowledge so that reasoning can be done which then reveals the consistency or satisfiability of the ontolo...
I am attempting to prove via the pumping lemma that $1^{n^2}$ is not a regular language. I started with $w = 1^{p^2}$ I then divided $w$ into $xyz$, where: $x = 1^{l}$ $y = 1^{m}$ $z = 1^{{p^2}-l-m}$, where $l+m \le p$ and $m \ge 0$. Now, when I choose $i=2$ in order to get $xy^2z$, I end up with: $1^{{p^2}+m}$, since...
So I have been trying to create a Deterministic Finite Automaton(DFA) in Jflap that accepts all strings from the alphabet {a, b, c} except those that contain the substring "abc". However i keep running into issues where certain strings that should be allowed aren't, such as "acbc". Do you have any tips or tricks that c...
I was reading up on Ehrenfeucht-Fraïssé and came by this example at http://www.math.cornell.edu/~mec/Summer2009/Raluca/lesson3.html Shouldn't there be a line between b4 and b2 (or b3 and b1), otherwise I don't see how the duplicator has a winning strategy in 3 rounds. Is this a mistake or ami I missing something? than...
The maximum (unweighted) coverage problem is defined as follows: Instance: A number $k$ and a collection of sets $S = \{S_1, S_2, \ldots, S_m\}$. Objective: Find a subset $S^{'} \subseteq S$ of sets, such that $\left| S^{'} \right| \leq k$ and the number of covered elements $\left| \bigcup_{S_i \in S^{'}}{S_i} \right|...
I am reading Probabilistic counting algorithms for database applications. In the introduction an algorithm for finding an intersection is specified: Sort A, search each element of B in A and retain it if it appears in A. It is claimed that if a, b are number of elements in A and B, and $\alpha, \beta$ are the number of...
For my application problem, I am searching for an algorithm that can find all symmetric vertex sets of an undirected labeled graph. My definition of symmetric vertex set is: Let $G$ be a graph with vertex set $V$ and edge set $E = \{u,v\}, u,v \in V$. If $S \subseteq V$ and there exits an isomorphism $f$ on this graph ...
Given that language $L = \{a = b ⊕ c \mid a, b, c ∈ \{0,1\}^*, a = b \oplus c\}$, with an alphabet $Σ = \{⊕, =, 0, 1\}$, I need to prove that this language is not regular. The following is as far as I have gotten in my proof, but I am getting stuck when showing why it is contradicting the pumping lemma: $s = (1^p = 1^p...
Let $\Sigma = \{0,1\}$, and consider the language $$L = \{\langle M \rangle \mid M \text{ is a TM and } L(M) \text{ is a subset of } Σ^* \text{ and all strings in this set have an even number of 1s}\}.$$ I think $L$ is undecidable. But I am stuck on proving it. I think it is equivalent to prove $L = \{\langle M \rangl...
Imagine I can specify a certain process as a Petri Net. Is there any good software, open source or not, that can verify my process against some conditions I declare (or code) in some language? In case not, is there an open source software that does at least simulations?
Let the alphabet be $\Sigma=\{0,1\}$. I want to construct a DFA which accepts strings ending with either '110' or '101', additionally there should be only one final state. I have a solution with more than one final state, but cannot come up with a solution which has only one final state.
I am doing a study on I found on youtube called OpenSecurityTraining: Introductory Intel x86. From what I understand there are registers like EAX, ECD, EDX, ect... and each have a purpose and hold/move information in memory. Are these registers per stack/application? Meaning, each application will have it's own EAX, ED...
My understanding is that most popular implementations of a mutex (e.g. std::mutex in C++) do not guarantee fairness -- that is, they do not guarantee that in instances of contention, the lock will be acquired by threads in the order that they called lock(). In fact, it is even possible (although hopefully uncommon) th...
Is a lower bound of $\Omega(n^2)$ known for the size of any constant depth circuit expressing a digital comparator for two $n$-bit numbers? Two $n$-bit binary numbers can be compared using a digital comparator circuit. The straightforward way to implement such a circuit is to compare the high-order bits; if they are ...
I'm learning the Ant Colony Optimization Algorithm and I would like to apply it to a variation of the TSP problem (find the path that start from a node, crosses all nodes and finish in the initial node) where you can cross a node or edge more than once. Actually, my problem wouldn't have solution for the TSP because so...
It is well known that the universality problem for NFA (deciding whether $L(A)=\Sigma^*$) is $PSPACE$-complete. However, what if every state of the NFA is known to be accepting? It seems to me that the problem is at most in $co$-$NP$, as a counterexample (unlike in the case of a general NFA) is polynomial (even linear)...
Is the following statement correct? If a decision problem is NP-complete, the corresponding optimization problem can not be solved in polynomial time.
I'm new to DFS algorithm and I'm trying to figure it out. The main concepts I get from it is that you have a stack of nodes, and they have a value, and can contain children-nodes (Even called branches or leaves) that can contains nodes with values. So let's say that I have a Tree containing 15 nodes like this. I would...
There are several graph traversal algorithms in computer science ( vis. depth first, breadth first, etc. ). Furthermore, each of these algorithms can be implemented in pre-order, in-order, and post-order. What do those terms mean? How do I properly categorize an algorithm as pre-order, in-order, or post-order?
I understand how one can generate a latent vector space from a collection of words or documents, using something like Glove, word2vec, doc2vec, etc. I don't understand how this representation can be turned into features for something generating these documents at a "higher level", like a user or a product. Here's a con...
Multi Key Multi Value Dictionary is a dictionary in which each value is associated with a set of keys and each key is associated with a set of values. Several values can be associated with the same key, and several keys can be associated with the same value. Let's define a $get$ operation over Multi Key Multi Value Dic...
The Problem Suppose we have an array A[1...n] of integers, with values ranging from 0 to K (so 0<=A[i]<=K for each i). We need to describe an algorithm to find an (X,Y) partition from the set {1,2,...,n} such that |Sx-Sy| is minimum, where Sx and Sy are the sums of the elements in X and Y. i.e., if A=[1,3,1,1], then X=...
I apologize for the long title, but I really didn't know how to write it different without lacking informations about the content. I recently had an university exam about Parallel Algorithms. One exercise asked me to write an algorithm to determine if the elements of an array, let's call it A, were repeated an equal nu...
Suppose you have a minimization problem $\Pi$. You know that finding a feasible solution to $\Pi$ is NP-hard. You have designed an algorithm $\mathfrak{A}$ to solve $\Pi$ and you prove the following: If $\mathfrak{A}$ finds a feasible solution to $\Pi$, then its value is upper bounded by $\rho\mathit{OPT}$ for some $\...
Formulation This problem has four entities: A universe: $U = \{1, 2, ..., n\} $ of $n$ elements, indexed with $u$ A set of available colors: $C \in \{1, 2, ..., m\} $ with $m$ colors, indexed with $c$ A collection of sets: $S = \{s_1, s_2, ..., s_k\}$ where there are $k$ sets, indexed with $i$. These sets contain elem...
What would be the most space-efficient way to represent a multiset (a set that can contain duplicates) using a (static) bit string (bit vector, bit array, etc.)? All of the elements in the multiset would be integers from a limited range. My current approach is to find the greatest frequency and allocate that number of...
I would like to know cases that an algorithm runs without any data entry.
I have a directed, unweighted graph that obeys the following rules: The number of nodes and edges is finite Each node can eventually be reached from any other node by some path Each node has an equal number of incoming and outgoing edges Like this: I am trying to develop and algorithm that starts in any node and tra...
Apologies if I butchered the question, I wasn't quite sure how to word it. In the Ramakrishnan text (2nd edition) on page 423 (in the section on functional dependencies) this statement is made: If $X \rightarrow Y$ holds, where [$X$ is the set of key attributes and] $Y$ is the set of all attributes, and there is some ...
I've tried searching this up, but from my what I think it is. It means there are no duplicate elements (ie. all elements are unique elements)?
For instance let's say that I have a Interval class, that has startPoint and endPoint fields, getter and setter methods (functions) accordingly. and I need to create a method that returns boolean value of startPoint == endPoint. And have a question regarding naming point. How to call this method? isEmpty() or isZeroLen...
Can someone please explain to me how the Wikipedia example on the left for a balanced binary tree is correct? One common balanced tree structure is a binary tree structure in which the left and right subtrees of every node differ in height by no more than 1 For node ABCDE, isn't the height of left subtree 2 and the h...
What is the reason to study planar graphs and algorithms on such graphs (as well as algorithms allowing to check a graph's planarity)? Where in industry this knowlege is needed? I know that planarity arises in microchip design ("wires" intersection). I also found the following excerpt from a lecture notes: The study o...
Background: This is to be seen in the context of formal languages, very beginner-level. My professor claims that concatenation is not distributive over intersection, meaning that $L \circ (L_1 \cap L_2) \neq (L \circ L_1) \cap (L \circ L_2)$ and $(L_1 \cap L_2) \circ L \neq (L_1 \circ L) \cap (L_2 \circ L)$. While it s...
The lemma 13.1 of CLRS proves that the height of a red black tree with $n$ nodes is $$h(n) \leq 2\log_2(n+1)$$ There's a subtle step I don't understand. The property 4 reported at the beginning of the chapter states: If a node is red, then both its children are black. And because of such property it is later stated ...
For an array A = [a1, a2, a3, a4] of distinct numbers, I have built heap using binary decision tree by Incremental and In-place method. Incremental method: In-place method: Is there a way to build heap using decision tree for inputs of size 4 that uses fewer decisions in the worst-case, compared to above methods? Not...
Suppose I have a probabilistic Turing machine for a language such that $$ x \in A \implies \Pr(M \text{ accepts } x) \ge \frac{1}{n}$$ $$ x \notin A \implies \Pr(M \text{ accepts } x) = 0$$ I want to show that the above language is in $\mathsf{RP}$. In particular, I need a probabilistic Turing machine $N$ such that $$...
Definition: Well-Characterized also known as Good-Characterized is defined as follows: Problem that have Yes and No certificates i.e., are in NP $\cap$ co-NP, are said to be Well-Characterized. (Reference: V.Vazirani, Approximation Algorithm) Does exist any Well-Chracterized problem that is also being NP-Complete...
I'm seeing seemingly contradictory information about this around. On the one hand, it seems that for undirected graphs, you need at least 3 nodes to make a cycle. On the other other, I've also seen people differentiate between trivial and non-trivial cycles. Let's say in your directed graph you have two nodes A and B w...
I have completely understood how Aho Corasick works for finding one pattern in a text, and how to construct the automaton for a certain pattern. I have studied the CLRS book and watched this video. But the problem is that I cannot find any material on how to build an automaton for more than just one pattern. For examp...
I am reading about/working on the knowledge representation using OpenCog framework http://wiki.opencog.org/w/OpenCog_Framework which essentially is special kind of probabilistic logic (s.c. PLN - Probabilistic Logic Networks) that smoothly generalizes crisp logic (by assigning strength and confidence to the crisp truth...
My initial algorithm: Compare element 0 with every other element, keeping track of how many elements are less than it. Repeat for each element until an element that is greater than exactly (k-1) elements is found. I assume this would take $O(n^2)$ in the worst case. Can a faster runtime be achieved without sorting t...
I have a question about undecidability. And I hope you could point out where I am wrong. The question is: to decide the following question as (A) recursive, (B) RE but not recursive, (C) not RE. $L = \{\langle M\rangle|M \text{ is a TM and } |L(M)| \geq 3\}$ If we use $HP$ as halting problem and $\overline{HP}$ as the ...
I want to predict language from the given regular expression. Regular Expression: $$(b^* (aaa)^* b^*)^*$$ As per my assumption language may be like: Let the string contain alphabet $\{a,b\}$ where every string contain number of $'a'$ divided/multiply by $3$. Let me know whether my assumption is correct or not. Thanks
I am working on a programming assignment to implement a Minimax algorithm and heuristic for the game Lines of Action. The rules are pretty simple, each player alternates turns moving a single piece. A piece may move in rows, columns, and diagonals and it must move the exact number of spaces that there are other pieces...
I try to understand how the relational division can be expressed by primitive operations of the relational algebra. So, I found this formula (I writed it such as I found it in the same format): $A \DIVIDEBY B = A[X] \MINUS ((A[X] \TIMES B) \MINUS A)[X]$ But I can't get this. If we use $\TIMES$ (the Cartesian product) t...
Problems which run in deterministic polynomial time given polynomial sized advice are in class P/poly. Problems which run in probabilistic polynomial time given polynomial sized advice are still in class P/poly. What about problems which have an expected randomized polynomial time given polynomial sized advice under ...
Using Stirling's approximation, we have $\log_{2} (n!) = n\log_{2} n - (log_{2} e)n + O(log_{2}n)$. Most lecture notes I have come across say that $ n\log_{2} n - (log_{2} e)n + O(log_{2}n) = \Omega (n\log_{2} n)$. Can someone give a rigorous proof of the last line using the basic definitions of big-O and big-Omega? Th...
Fix a Gödel numbering, and write $\phi_n$ for the function coded by $n$. Rice's theorem states that if $P$ is the set of partial computable functions, and $A \subseteq P$, then the decision problem Given $n$, does $\phi_n \in A$? is decidable if and only if $A = \emptyset$ or $A = F$; that is, if the decision problem...
You are given a tree of $N$ nodes with colors assigned to each node. You need to find for each node $X$, a value $AR[X]$. $AR[X]$ = The sum of values of $CALC(X , i)$ for each $i$ from $1$ to $N$. $CALC(A,B)$ = Count the number of non-repeating colors in the path from $A$ to $B$. Can somebody suggest an efficient solut...
We know (by Rice's theorem) that is it not possible to decide a non-trivial property of a given TM. We could say therefore that we cannot be sure at 100 percent that a given TM has a certain non-trivial property. Therefore we cannot know if it is 100 percent impossible to show that a given TM has a certain non-trivial ...
I just started with my "Algorithms" course. But my CS-background is lower than that of an average CS-student (I'm a data science student). Only had intro-2-prog course (Python/Java), that's it. Cormen states on page 23: "...when working with inputs of size n, we typically assume that integers are represented by c lg n ...
I'm currently in a course, and I for the life of me cannot figure out what my professor is doing. I could really use a working example, and I was hoping someone here might oblige. Suppose we have this recurrence: $$ T(n) = 2T(n/2) + \log n$$ How would we figure out running time for this, and specifically, how would...
I am reading a paper and ran into this word Ontology-based, What does it really mean? I did searching about it but still ambiguous to me, can someone elaborate this concept with an example? Thank you
I'm trying to construct a truth table from a finite state machine of flags in a NASCAR race. Flag meanings: green=start yellow=caution red=stop black=get off white=one lap left checkered=finish line In an example with a stoplight in class, the variable that makes the current state go to the next state on the stoplight ...
For any string $s \in \{0,1\}^*$, let the ones' complement of $s$, denoted $1_c(s)$, be the string obtained by flipping all bits in $s$. For example, $1_c(001100) = 110011$. Now call a language $L \subset \{0,1\}^*$ ones' complement asymmetric or OCA for short, if for every string $s \in \{0,1\}^+$, precisely one of $...
I am on studying a consistency model: weak consistency. weak consistency This model was first defined by Dubois et al. (1986), by saying that it has three properties: Accesses to synchronization variables are sequentially consistent. No access to a synchronization variable is allowed to be performed until all previous...
For instance, consider the following recurrence relation. T(n) = T(n/2) + T(n/3) + T(n/4) + n Would you use the substitution method for this?
I am a computer engineering student and trying to get the idea behind all these Artificial Intelligence Concepts and applications. I know little theoretically about machine learning and some high level brief introduction of artificial intelligence as a whole and neural network. What i am interested in is knowing the si...
In StarCraft Brood War, a map's maximum dimension in either the X or Y direction is 256 cells. A map's dimension is required to be a multiple of 32. Each cell is 32 pixels in both directions (And probably some path finding limitations) and I assume this is the reason for the previous requirement. Thus 256*32=8,192. But...
In chapter 2 of this book the map overlay algorithm, which takes as inputs two doubly connected edge lists, is explained. "Basically" a line intersection algorithm allows to update both the half edges records and the vertices records. After such step the detection of boundary cycles is applied, and later a graph is bui...
There is a nice decomposition called trapezoidal to process point location queries given a set of disjoint generally curvilinear segments. I found the randomized algorithm for building this type of decomposition in Berg's book on computational geometry. Can someone point me out papers which report deterministic algorit...
The Ethernet MAC address FF:FF:FF:FF:FF:FF is reserved for broadcasts. If all frames are naturally broadcast in a LAN, what is the need for a broadcast address?
In a layered approach to OS design, each layer can only access routines from the layers below itself. For example, say I had two levels: memory management and the CPU scheduler Where does the CPU scheduler sit in a layered OS design? My understanding is that it must be above the memory management component, since the ...
I'm learning about superscalar processors and struggling with it a bit. I wrote an assembly program and now must move it through in-order in-issue completion and I have a question about instructions as they move through the latter stages of the pipeline. I have two instructions I1 and I2. I1 performs an operation on R1...
I know, it is not possible to decide whether a context free grammar is ambiguous or not. However, I am having a really hard time preparing for an upcoming exam in which I'll have to give a prove of un-/ambiguity for a given grammar. Up until now, the first thing I'd do is to look for a word (via try and error) which co...
I'm curious as to if there's any way to check (without having to run a 'whole' maximum-flow-algorithm) whether a given flow $f_e$ is the maximum flow of the flow graph $G$ in $O(|E|)$ time complexity. I've thought about running one iteration of Ford-Fulkerson to see if there is an augmenting path from the source $s$ to...
Suppose you have two large lists of integers of length $N$, and you want to find two pairs $(a_1, b_1)$, $(a_2, b_2)$ from the lists such that $a_1 + b_1 = a_2 + b_2$ (modulo the integer width). Say for example, that $N = 2^{32}+1$ and the integers are 64 bits. Is there any efficient way to do this? I know that if yo...
I made a SLAM (Simultaneous Localization And Mapping) using Extended Kalman Filter (EKF) and it works really good, but I want to see if it works better using Neural Networks. For the EKF I used an initialization step, prediction step and update step,how can I change that to Neural Networks? Thanks
There are already good answers from several perspectives regarding the "hardness" of $PSPACE$-complete problems, such as this: What is practical difference between NP and PSPACE-complete? But what are the practical implications when we actually try to solve (decide) a $PSPACE$-complete problem on a deterministic Turing...
Suppose we have a directed graph $G = (V,E$) represented with adjacency lists. Is it possible to convert $G$ into its undirected equivalent* $G'$, also represented with adjacency lists, in $O(|V|+|E|)$ time? The obvious algorithm walks the adjacency list of each vertex $v$, and for each adjacent vertex $u$, inserts ed...
A dominating set on a directed graph $G=(V,E)$ is a subset $D$ of $V$ such that for all $v\in V$ it holds that $v\in D$ or there is an $u\in D$ such that $(u,v)\in E.$ For a concrete problem (size reduction of endgame tablebases), I want to approximate the dominating set of a directed acyclic graph with the following ...
Let's assume that we have a directed acyclic graph $G = (V, E)$, non-negative vertex weight functions $w_a(v)$ and $w_b(v)$, and a non-negative edge weight function $t(u,v)$. We want to divide vertices in two subsets $V_a$ and $V_b$, such that $V_a \cap V_b = \emptyset$ and $V_a \cup V_b = V$. The set of edges $E_{ab}$...
I have a problem which I'm looking to see if there is literature on: Consider three types of actors, a Director, Aggregator, and Follower. The Director talks to multiple Aggregators, the Aggregator talks to multiple Followers. The director gives simple commands to the Aggregator, who then can portion out the commands t...
So in my APCS class today we played around with generating pi, and approximating to a user defined number of places. We used the Leibniz formula for π. As we began playing around with it we tried throwing in 2147483647, the largest value for an int, but noticed it wasn't going to finish anytime soon. I googled runti...
I know ML is used in real horse-racing and other sports, where team/player history matters and can be used as a predictor for future games. What about for "simulated" games, where the outcome is decided by probability? Here's an example of what I mean: Suppose there are 3 tracks T1 to T3, and 12 horses H1 to H12. Ever...
I am reviewing the document" Learning occupancy grid maps with forward sensor models, S.Thrun, 2008" (http://faculty.iiit.ac.in/~mkrishna/ThrunOccGrid.pdf) i am really confused about formula (26), which is merged by formula (22), (24), (25) in an "intersection of probabilities" computed in (22),(24),(25). So, it should...
I'm a student, so I apologise if this is an idiotic question: Is there a fundamental reason/limitation, such as $P \not = NP$, that prevents computers from being able to do mathematics (posing conjectures, proofs, etc.)? Why or why not? I have heard arguments that computers will never be able to do mathematics close to...
Infix, prefix (polish notation) and postfix (reverse polish notation) are all forms of arithmetic operations. As I understand it, infix is what we use in maths where the rules of BODMAS (Bracket, Order, Division and Multiplication, Addition and Subtraction) are used to decide what order the operations are used in. I ca...
I have a task to search through an array of items. I want to narrow the search down to some partitions. I thought of hash tables, but the difference in my case is that the "hash-function" is not unique; in my case, it rather should be called "partition-function". Here's a fizz-buzz example: [-1]:1,2,4,7,8,11,13,14,16 ...
I am studying some page replacement algorithms. I found an interesting algorithm called "New" algorithm. From page 17 of this slide (https://web.stanford.edu/class/cs346/2015/notes/Lecture_One.pdf) The algorithm guarantees that each relation has a working set by subdividing the buffer pools. I want to read the publishe...
There is a grid of size WIDTH * HEIGHT. X fruits are randomly distributed on the grid. Each player is randomly placed on the grid. The game runs for X / 2 turns. Each turn, a player can move left, up, right, down or not move at all. At the end of each turn, the fruits on each player's square are added to their score, r...