instruction
stringlengths
35
29.1k
I have a search problem, finding the shortest path for 3 vehicles to their parking spots, in a continuous environment (inputs are continuous for velocity, turn speed) and the location is continuous, ie. the landscape is a discrete grid but within each grid it is continuous. There are areas where the top forward velocit...
In the field of mining of data streams the algorithm of Datar-Gionis-Indyk-Motwani (DGIM, M. Datar, A. Gionis, P. Indyk, and R. Motwani, “Maintaining stream statistics over sliding windows,” SIAM J. Computing 31, pp. 1794–1813, 2002.) is known. Given is a binary stream with a sliding window of length $N$, where $N$ is ...
Prove that $T(n) = 2T(\frac{n}{2}) + \frac{n}{\log_2n}$ is $O(n\log_2\log_2n)$, where $T(1) = Θ(1)$. I tried to form the Induction Hypothesis but didn't succeed in choosing the right one. Try 1: If we assume $0 ≤ ck\log_2\log_2k,\forall k < n$, must show $T(n) ≤ cn\log_2\log_2n$. $$ T(\frac{n}{2}) ≤ c(\frac{n}{2})\log_...
I have always though that NP consists of problems solved in a non polynomial time by a deterministic Turing machine. Recently I discovered that NP classifies all the problems solved by a non deterministic Turing machine in polynomial time. Do those 2 machines solve the same problems? Meaning, can a deterministic Turing...
I've been self-studying the book Algorithms by Papadimitriou, Dasgupta and Vazirani. I am having a hard time with a question about local search involving the traveling salesman problem (TSP). We'll say a local search algorithm is exact if it always returns a globally optimal solution. Consider a local search algorithm ...
I'm interested in software verification and therefore only interested in algorithms which always terminate in predictable amount of time and can determine whether the final result is expected or not, hence I think the computable functions are a good place to start as as I understand it these are functions which can be ...
I would like to define a pseudo-boolean function $f$ such that $f(x) = 0$ for all logically valid combinations of $x\in{0,1}$ and $f(x) > 0$ for all logically invalid combinations of $x\in{0,1}$. Suppose I have the following constraint where $x_i \in {0,1}$: $x_1 + x_2 + x_3 \leq 2$ $x_1$ $x_2$ $x_3$ Valid 0 0 ...
I am an 2nd year undergraduate student, majoring in Mathematics. I am interested in computer science as a whole. Are there any journals/magazines which might be accessible to read, so as to get a better flavour of the field ? (besides the assignments and tests that already are part of general coursework).
How can you solve the recurrence $$3T(n) = T(n/3)+ \sqrt{\log n}$$ using the master theorem? I am lost in this question.
I am new to machine learning but had a question about a labeling method. If I had the following two images: Is there a way to use the second image as the label for the first one (i.e. anything in white is the object I want to detect)? As I understand it, labels are typically defined by vector points, but in my case, ...
I am trying to use the Thompson's method to draw an NFA for a RegEx given by: $(a+b|c?)c$ I am wondering if I should deconstruct the RegEx as - Concatenation of $a+$, $(b|c?)$ together with $c$ OR Union of $a$ and $(b|c?)$ concatenated with $c$ In either case, I would the need the atomic NFA construction for the $c?$...
Im new at CS and would like to gather preliminary information to approach an interactive art project. I want to construct a grid of videos - think about a matrix M = m x n where Mi,j is a video that cover a certain portion of the screen. I want to interact with the screen, so that if I trigger a certain action, the vid...
I came across factorial semantics using lambda calculus: $$fact = \lambda n. if(iszero~n) (1) (mult~n(fact(pred~n)))$$ I am not sure why the above does not make sense. Why we just can not keep substituting $fact $ please? Other semanticss of $if, iszero, mult, pred$ are defined as follows: $$ \begin{align*} if = (\lamb...
I've been self-studying the book Algorithms by Papadimitriou, Dasgupta and Vazirani. I am having a hard time with a question about local search involving the traveling salesman problem (TSP). We'll say a local search algorithm is exact if it always returns a globally optimal solution. Consider a local search algorithm ...
I am able to implement the default uniform cost search (python) to find the shortest path between two nodes (path cost). I followed this pseudocode: Now, I want to calculate the shortest path with fuel constraint. Each edge in the graph is associated with a pair of values (, ) where denotes the distance and denotes ...
I'm going through the problems of the Brute Force chapter from Introduction to Analysis and Design of Algorithms by A.Levitin. One problem solution caught my eye, though. The problem states as follows: A firm wants to determine the highest floor of its n-story headquarters from which a gadget can fall without breaking...
I would like a reading list of math and formal logic books which give a principled discussion of missing values. Textbooks on mathematics and formal logic - propositional and first-order and higher-order - are very clear and helpful. Different programming languages make their own choices about how to handle missing val...
I am currently learning about the concept of Turing Machines and trying to relate it with my knowledge on the application of the Binary Search algorithm. The problem I am working on is to write an algorithm that can find an unknown natural number between two given natural numbers by guessing. A solution would look like...
Preface Hello! I have a problem here that's difficult for me to Google, and I don't know if there's a name for it. It feels like a set cover problem of some kind, but I'm very unfamiliar with combinatorics and I don't know all the right words that could apply here. I'll do my best to describe it below. (The actual appl...
coming from the computing science side rather than from the data analysis one, I studied the k-means clustering problem for a short time and noticed that the NP-hardness of the problem for $k=2$ seems to be separately proved in various places (publications as well as some online PDFs). For instance, the article NP-hard...
I'm looking for the name of a certain circuit complexity class. It captures, to me, the idea of "shallow physically feasible circuits". I'm looking for the class of problems with: Constant depth Polynomial size Any bounded fan-in gates (at least NOT and AND, which of course suffices for anything else) Some reasonable ...
A family of sets $F = \{S_1, \dots, S_n\}$ on the ground set $S$ is laminar, if for every $1\leq i < j \leq n$, either $S_i \subsetneq S_j$ or $S_j \subsetneq S_i$ or $S_i \cap S_j = \varnothing$ and also for every $1 \leq i \leq n: \varnothing \neq S_i \subseteq S$. The question is given a family of sets $F = \{S_1, \...
Suppose I start with a directed chain graph of length $n$: And then I add $k$ edges, with a restriction that the result is a planar DAG: Is there a name for this graph family?
Given a set of subsets $S_1, ..., S_N$ of a finite universe $E$ of elements $e_1, ..., e_n$ and mapping of those elements to an integer 'weight' $w_1, ... w_n$, select the subset of subsets which maximizes the total contained weight. The empty set has a combined weight of zero. Note: many weights are negative and the s...
Suppose we have the grammar $$S \to aA | BA $$ $$A \to a | bB | \epsilon $$ $$ B \to cB | d$$ I know that I need to write four different functions in order to parse this grammar. They are parse_input(), parse_S(), parse_A(), and parse_B() However, I am having trouble coming up with a parser for this short grammar. Does...
I am looking for a preferably modern book on graph transformation algorithms. I am really interested into general approaches not on mathematical proofs and rigor notations. The easier the read, the better is the book.
Given a 3-SAT instance. How do we convert it into: 1 in 4 SAT instance. 2 in 4 SAT instance. each case minimizing the [number of new variables - number of new clauses] difference? Note: We are not adding any dummy clauses i.e. ones whose addition or removal doesn't affect the solution space of the problem to the SAT i...
In some abstract programming languages there is a concept "setter and getter". Generalizing, should this be the opposite, i.e. "Getter and setter"? I would theorize that one should first get something --- only then set it.
I have satisfiable 3SAT formula like: (x1 or x2 or x3) and (not x1 or x2 or not x3) and some clause which is not in this formula (not x1 or x2 or x3). Are there any methods to find out if this clause will turn formula in unsatisfiable state? Without obviously appending them and solving new formula. Or maybe some method...
Problem: Given a directed graph $A$, produce an undirected graph $B$ with the same vertices and minimum number of edges satisfying the following constraint: For each vertex in $A$, at least one outgoing edge must be replaced by an undirected edge in $B$. If an edge in $A$ is bidirectional, then it can be replaced by a...
I am trying to understand the semantics for stack algebra and queue algebra as introduced in section 8.5, "Specification Algebras" of textbook Software Engineering 1, Abstraction and Modelling, Dines Bjørner, 1st ed. Queue Algebra is given as: $\textbf{hide}$ $\hspace{1em}dq, rq\ \ \textbf{in}$ $\textbf{class}$ $\hspac...
Motivation In a particular board game, players start the game with a country and a special ability. Two players cannot have the same country or the same special ability. Analysis has shown that certain country-ability combinations are better than others. The combinations have been evaluated with an integer where higher...
We know an valid IPv4 address is each part not greater than 255, so, will 256.256.256.256 be considered a valid hostname rather an IP address? I'm just curious how devices in various parts of the internet treat this kind of hostname?
I understand that there are three types of programming languages: Machine languages Assembly languages high-level languages And that: Machine languages have no abstraction Assembly language have little abstraction High-level languages have much abstraction (data types being the difference maker?) Is there a standa...
I am studying hill climbing algorithm and this topic seems so confusing. What is ridge basically? Can you show an example while searching using hill climbing when ridge occurs? I have researched in internet about this topic but it only left me with more confusions. It seems like ridge seems very similar to local ma...
I've just started to study Formal Languages and Automata and my professor assigned me the following exercise to practice: Determine the production rules that satisfies the Language: L = {ww | w ∈ {0, 1}*} And I can't figure it out... Apparently it's a CSL. Can anyone determine these production rules?
If an algorithm takes two numbers $b$ and $n$ and its input size satisfies $O(\log_2{n} + \log_2{b})$ plus its time complexity satisfies $O(b \log_{2}{n})$, what is the time complexity relative to the input size? Can we say it is exponential? An algorithm is said to be exponential time, if $T(n)$ is upper bounded by $...
From Wikipedia: "Each phase increases the length of the shortest augmenting path by at least one: the phase finds a maximal set of augmenting paths of the given length, so any remaining augmenting path must be longer. Therefore, once the initial ${\displaystyle {\sqrt {|V|}}}$ phases of the algorithm are complete, the ...
So I'm following this article and they use the following algorithm to find the min-cut. Algorithm: Run Ford-Fulkerson algorithm and consider the final residual graph. Find the set of vertices that are reachable from the source in the residual graph. All edges which are from a reachable vertex to non-reachable vertex...
I need to show that for any binary optimal code for $n$-letter source the following inequality holds: $$\sum_{i=1}^n l_i \leq 0.5(n + 2)(n −1).$$ By $l_i$ denoted the length of the sequence corresponding to the letter $i$. I know the bound for the average codelength $L_* \leq H(X)$. But how to apply it? Also I know the...
Aaronson mentions in here that: Recall that $\mathsf{PP}$ is the class of problems like the following: Given a sum of exponentially many real numbers, each of which can be evaluated in polynomial time, is the sum positive or negative (promised that one of these is the case)? I simply do not see why this problem is $\...
Consider the example shown in the above figure. Let's consider two orders (1) S, A, B and (2) S, B, A for traversing the graph and updating the distance d (numbers in circle are distance d): 1- start with S -> B = -2, A = 5; Then A -> D = 7; Then B -> A = -1. Algorithm terminates. 2- start with S -> B = -2, A = 5; The...
I was reading [1] about verifying neural networks. $n_{i,r}$ refers to the rth neuron in layer i and all neurons have the ReLU activation function. A neuron $n_{i,r}$ is said to be strictly active if its pre-activation output is always greater than or equal to zero. Similarly, $n_{i,r}$ is said to be strictly inactive ...
Prove that for every regular language $L$, the following language is regular: $L_{pf}=$ $\{x \in L | $ no proper prefix of $x$ is in $L\}$ How should I prove this? I understood that $L_{pf}$ is just subset of $L$ and the words inside it are special such that no word is the prefix of other one, is this right ? it's not ...
For $x,y \in \{0,1\}^*$ a language $L ⊆ \{0, 1\}^*$ is called substring closed, if $y \in L$ and $x \preceq y$ ($x$ substring of $y$) implies $x \in L$. I want to prove that every substring closed language $L ⊆ \{0, 1\}^*$ is regular. Is it enough to have a $L$ such that just $x$ in it, then prove that $L$ is regular?
I was very confused how to solve the problem when there are two levels of cache, My doubt is how does we quantify the performance when there are two caches. Consider a problem like this Cache L1 access time of main memory = T1 and miss rate = X%. Cache L2 access time of main memory = T2 and miss rate = Y%. CPI of proce...
what is the fastest algorithm to compute the gradient of the Gaussian blur of a (grayscale) image, with a blur radius of around 100 pixels, where smoothness of the result is important to me, i.e. no edges or discontinuities? I run the code on the GPU, if that makes any difference. What I'm currently doing, is the fol...
I am working on a object detection system for autonomous driving. I have tried it in controlled environments. I would like to try it on videos taken from a camera in front of a car running on a highway. I have seen some of those on a course I took a year ago. My question is directed to DL practitioners. Where can I fin...
When a runtime error occurs with a program in language likes C or C++ using GCC/G++, it just crashes the process. When it occurs with a program in language like Rust or Golang, a detailed error message will be given.
How to prove the inequality of concatenating two languages? $|AB|\leq |A| \cdot |B|$ I know that: Let $A,B \subseteq \Sigma^*$ and the concatenating of $A,B$ will as following: $AB=\{wx \mid w \in A, x \in B \}$. Hence by definition $\forall x \in w$ will be concatenating with every word in $B$ and vice versa, and if n...
I am trying to solve the recurrence $T\left(n\right)\:=\:3T\left(n-1\right)\:+\:3n^2$ I tried method I saw but I do not fully understand which looks like: $T\left(n-1\right)\:=\:3T\left(n-2\right)\:+\:3\left(n-1\right)^2$ $T\left(n\right)\:=\:3\left[3T\left(n-2\right)\:+\:3\left(n-1\right)^2\right]\:+\:3n^2$ $T\left(n\...
Ciobaca: From Small-Step Semantics to Big-Step Semantics, Automatically describes how to go from small-step to big-step semantics. I need to do the other way around: from big-step to small-step. Is there literature for this? What should I be careful of? EXTENSION: I have a big-step operational semantics for a functiona...
When it comes to optimizing objective functions belonging to Statistical and Machine Learning Models, there seems to be a general rule: High dimensional objective functions with many parameters are "computationally expensive" to optimize As such, there tends to be two general types of algorithms that are used to opti...
Is correct to use ~α as rule to prove KB╞ α? Is possible to unify sentence ~V(x,y) v S(x) with V(N,W)? ~V(x,y) v S(x) ~V(x,y) v S(y) ~S(x) v ~S(y) v U(x,y) V(N,W) ~U(N,W) α = S(P)
I'm studying formal languages and automata, and on the section of learning how to find productions that generates the grammar, I've done some exercises pretty well and was able to do some of the exercises on the format: $L(G_1) = \{wcw^r / w\, is\, on\, \{0,1\}^*\}$ Where $w^r$ is the reverse word, and whose production...
I am trying to understand the lifetime of a procedure, from source code through to being compiled to machine code and being called. I am specifically interested in the context of "live" environments, where (re)compilation can happen at any point during runtime and the new code is seamlessly integrated into an already r...
It is surprising to me that I cannot find a precise definition of universal learner on the internet. I can guess what it should bebut I don't want to make a mistake, therefore I have come here. Here's how I think it should be: A learning algorithm is said to be a universal learner if there exists a function $m:(0,1)^2 ...
I created an algorithm that is doing $\sum_{i=1}^k {n\choose i}$ inference calls to an ML model. Let's assume the inference calls are constant. Can I upper bound this without the binomial coefficient somehow? I would say its $\mathcal{O}\left(k {n\choose i}\right)$ but that's not a very intuitive expression. Is this ex...
So basically we have 2 types of quantifier in first order logic, they are universal quantifier and existential quantifier. Usually we use implies connector(->) when we have universal quantifier in front of our formula and use conjunction connector(∧) when we have existential quantifier in front of our formula. If we h...
Apologies if this is a trivial question - but I can't seem to find a direct answer to this. Say program A manipulates some data, and program B does the same manipulation, except it operates on a deep copy of the data (so now there are two identical versions of the data in memory during execution). Since B essentially u...
When it is said that machine code is specific to a machine, is it specific to an architecture, or is it specific to a machine? Do two identical processors require different machine code? My guess is that people are referencing instruction sets/architecture when they say machine code is specific to a machine? If they a...
I'm looking for a good algorithm for "simple radius-search-based averaging" (or "radius search based sub-sampling") as referred to section 3.4 of the DynamicFusion article. Relevant excerpt from the paper (to save you some reading time): The set of all unsupported vertices is then spatially sub-sampled using a simple ...
Consider the immanent of $n \times n$ complex matrices \begin{equation} \operatorname{Imm}_f(A) = \sum_{\sigma \in S_n} f_n(\sigma) A_{1 \sigma(1)} \cdots A_{n \sigma(n)}. \end{equation} Here $f_n:\pi \to \mathbb{C}.$ I want to investigate the computational complexity of such function by given family of $f_n$. Special ...
Let $K$ be a convex compact set in $\mathbb{R}^d$. Suppose that a Membership Oracle $\mathcal{M}_{K}$ for the set $K$ is available; given a point $x\in \mathbb{R}^d$, the Oracle returns 0 if $x$ is in $K$, and 1 otherwise. Now consider the set $W= K+\epsilon B =\{x+\epsilon y: x\in K, y \in B\}$, where $B$ is the unit ...
Given a graph $(V,E)$, I'm interested in embedding it into a Euclidean space $\mathbb{R}^n$ such that each vertex $v\in V$ becomes a point $x_v\in\mathbb{R}^n$ and $d(x_v,x_u) \leq 1$ (Euclidean distance) iff $(v,u) \in E$. Is this embedding always possible given high enough dimension $n$? If so, given a graph, can we ...
Given a graph $(V,E)$, I'm interested in embedding it into a Euclidean space $\mathbb{R}^n$ such that each vertex $v\in V$ becomes a point $x_v\in\mathbb{R}^n$ and $d(x_v,x_u) \leq 1$ (Euclidean distance) iff $(v,u) \in E$. I know that Maxcut isn't NP-hard for planar graphs. But what if I consider graphs that can be em...
I saw this question and asked myself why the original problem is not solvable through diagonalization. Let $$L = \bigl\{\langle M \rangle \mid L(M) = \{\langle M\rangle\}\bigr\}$$ Take the complement $\overline{L}$. Suppose there is a Turing Machine $M$ which decides this language. We get the following two cases: $\la...
I found this paper: https://courses.engr.illinois.edu/cs373/fa2009/recaut.pdf But it looks like recursion is done along an edge. I would have thought you have state machines nested inside nodes. Then there is an single, innermost (one of many) state machine that is running at any given moment. However, I think that ...
so when doing digital design, lets say building a calculator we only take the 2s complement of a negative number. 13+(-12)=1 001101 + 110100 = (1)000001 the 1 in parenthesis is overflow that "falls off" what is the design so that negative numbers are converted into a 2s complement?
I have a very basic question. $\mathsf{P}$ is the class of decision problems solvable in polynomial time by a Turing machine. $\oplus \mathsf{P}$ is the class of decision problems solvable by an NP machine such that If the answer is 'yes,' then the number of accepting paths is odd. If the answer is 'no,' then the numb...
The problem is the following: You are given a collection( set, list, whatever ) C of sets, and you are given a search set S. We want to find among all sets in C the ones which are subsets of S. Hence, the statement would be: What is the best way to return all sets from C which are a subset of search set S?
I have a noiseless T-user multiple access channel. Let $[Q] = \{1, \dots , Q \}$. The users send symbols $X_i ∈[Q], i = 1, \dots , T$ . The channel is defined as follows $$(X_1, X_2, \dots , X_T) → Y$$ $Y=\cup_{i=1}^T X_i$, $X_i$ are i.i.d uniform For example: $(1, 2, 3) → \{1, 2, 3\}$, $(1, 1, 2) →\{1, 2\}$ How to fin...
Given an (undirected) graph $G = (V,E)$ with $|V| = 2n$, what is the complexity of the problem of finding the subgraph $G' = (V',E')$ with $V' \subset V, |V'| = n$, such that the number of edges $|E'| = |\{(v,u) \in E\ |\ v,u \in V'\}|$ is maximized? I feel like this is similar to Max-Bisection problem but focuses on t...
The Y combinator is defined as $$Y=\lambda f.(\lambda x. f (x x))(\lambda x. f (x x))$$ It has the following useful property: $$Y g = g (Y g)$$ for some expression $g$. It can be easily used to implement a recursive function, e.g. factorial: Y = lambda f : (lambda x : f(lambda v : x(x)(v)))(lambda x : f(lambda v : x(x)...
I am trying to solve a problem set to practice for an exam. How can I approach questions like these ? Is there a way to verify solutions or is it just trial and error ?
Say that two complexity classes are equal, i.e. TIME(n) = TIME(nlogn). Does this imply that for some proper complexity function f(n) >= n we can show TIME(f(n)) = TIME(f(n)(logf(n)))? If so, how can we strongly argue that they are equal and one is not just strictly contained in the other?
Problem: find sum of k element in array and it is biggest? time complexity of my algorithm is O(k*n).Is it linear complexity?
Let $P$ and $Q$ be two disjoint point sets in the plane. (Think of them as a red point set and a black point set.) Let $p \in P$ and $q \in Q$ be two points from these sets that minimize the Euclidean distance $|pq|$. Prove that $pq$ is an edge of $\text{DT}(P\cup Q)$. I know this property of DT, the closest neighbor ...
So essentially as the title says, I just want to understand how its done. I have a light idea from my own research, but its failing at one point, and I feel it maybe due to crucial point missing in my understanding. My understanding is to form a multiplication circuit of 2 n-bit variables, so for ex. X0 x1 .. xn and al...
Problem Background: Let $a\in(0,1)$ to be an irrational number. Suppose there is a black box, the input is a real number in $[0,1]\backslash \{a\}$, denoted as $x$, the black box outputs boolean values according to the following rules: When $x>a$, the output is True. When $x<a$, the output is False. Given $k$, we nee...
i tried to see from my course book at university but i didn't understand much, can someone help me? even looking around on the internet I did not find anything useful
I was reading section 3.2 of Advanced Data Structures by Peter Brass (which is about weight-balanced search trees) for self-study. I got stuck on a proof about rebalancing properties. $\alpha$ and $\epsilon$ are parameters, where $$\epsilon \le \alpha^2 - 2\alpha + \frac{1}{2}$$ The weight of a node is recursively defi...
Here is the source for the problem below: https://leetcode.com/problems/least-operators-to-express-number/discuss/1675169/java-or-recursion-or-greedy-or-math For completeness, below is the problem statement and the code. Following the code are the questions I have that would help me understand the solution better. Prob...
Given a bounded, convex polytope $C \subset R^d$, I have $n$ partitions of the polytope $C$ into at most $m$ smaller polytopes (disjoint on all but sets of measure zero). These smaller polytopes have colors assigned to them. Given a color, I would like to find a point $p \in C$ such that $p$ is that color in the maximu...
There are some threads that discuss it but I haven't came across an inductive one yet. All of them involve creating a finite automaton which I would like to avoid (as per my professors requests).
I keep seeing the term "energy" used in computer vision literature, specifically when speaking about Image Segmentation. For example on this page on Graph-Cut. I'm just wondering if someone could give me a layman's explanation of what "energies" are. I'm pretty new to the subject, and I'm not finding anything online ex...
I am trying to reverse engineer the following image. So far, the way I would take into account of duplicate letter handling is the following . I am unsure how I could code this such that the duplicates are not colored incorrectly. For example, in my code output in the first row, the first "N" should not be yellow, but ...
I want to calculate the runtime of the following code as a function of n: sum = 0 i = 1 while (i < n) j = 1 while ( j < i) k = 1 while ( k < ^2) sum = sum + 1 k = k+ i*i j = j + 1 i = i + 1 If understand correctly then i will run from 1 to n and j from 1 to i in each iterati...
This is my problem: The chess match starts with a board where chess pieces are randomly placed. Both players are controlled by the same deterministic algorithm so if two games start with the same positions both games will end with the same result. I need an algorithm capable of efficiently calculating which player wi...
I tried to solve the following recurrence: $\ T(n) = T(n-5) + \log(n) $ and $\ T(5) = 1 $ using iterative substitution: $$\ T(n) = T(n-5) + \log(n) = \\T(n-10) + \log(n) + \log(n-5) = \\ T(n-15) + \log(n) + \log(n-5) + \log(n-10) $$ and so eventually I get for $\ i$ iterations: $$\ T(n) = T(n-5i) + \sum_{k=0}^{\frac{n}...
To my understanding, the time-complexity of an algorithm is a measure of its actual run time. For instance, an algorithm with a worst-case time-complexity $T(N)=$(constant)$\times N^2+$(lower order terms) has time-complexity $O(N^2)$ and, thus, has a run-time that increases at most quadratically with the size of its in...
So I've been mechanizing some simple linear lambda calculus stuff. The basic framework is $$ \frac{}{x \colon t \vdash x\colon t} $$ $$ \frac{\Gamma \vdash e \colon t \rightarrow t' \quad \Delta \vdash e' \colon t}{\Gamma, \Delta \vdash e \, e': t'} $$ $$ \frac{\Gamma, x \colon t \vdash e \colon t' }{\Gamma \vdash \lam...
Upon googling all I get is the definition of finite-state automaton but what's the difference between it and finite-state automata or are they the same
I've got 14GB of compressed data for a class assignment. I need to run a unit test on modules I've created to make use of the uncompressed data, which will be an object of nested dictionaries with the innermost dictionary having lists for its values. Both my ideas and where I'm getting stuck: My first idea was to have...
For an arbitrary spay tree with n nodes, if we perform n find operations, is there a way of generalizing what the tree would look like after n operations and proving it mathematically? One such example (Sequential Access Theorem): if the splay tree has the elements V1, V2,..., Vn, where V1 ≤ V2 ≤ ... ≤ Vn. And the find...
Edit 3/14 to refer to textbook question: I am trying to understand the concept of external regret better, and am working through the Nisan et al. (eds.) Algorithmic Game Theory book (https://www.cs.cmu.edu/~sandholm/cs15-892F13/algorithmic-game-theory.pdf). I am looking for insights on the second part of Problem 4.8 on...
Consider the following variant of linear programming, where we want to maximize the number of linear inequalities that are satisfied: Input: linear inequalities $A_1x\le b_1$, ..., $A_nx \le b_n$; an integer $k$ Output: does there exist $x \in \mathbb{R}^d$ that satisfies at least $k$ of these linear inequalities? To m...
I have a question that asks me "What is the expected number of observations in a state?" with the note: $$\sum^{\infty}_{d=1}d a^{d=1} = \frac{1}{(a-1)^2}\text{ when } |a| < 1$$ Prior to that I have a Markov Model with 3 states and the transition probabilities as follows: S1: $P(S1) = 0.4$, $P(S2|S1) = 0.3$, $P(S3|S1)...
Are there locality sensitive hashes that work nicely with sets? Each set would get a hash, the order of the elements in the set does not change the hash, and sets that share more elements are closer together. Specifically, I am working with sets that each have approximately 10 elements, and there are a total of 1000000...
I can't understand why the Java HashMap load factor is 0.75. If I understand well, the formula for the load factor is n/m, where n is the number of key and m is the number of position in the hash table. Since HashMap utilize bucket (i.e., a linked list) to store the value it is possible to have a load factor > 1 withou...