instruction
stringlengths
35
29.1k
Several recent research work has shown that transductive learning/inference outperforms inductive learning/inference during classification problems. This has been found in few-shot learning, other metric learning works, etc. But all of these results are experimental. Is there any theoretical/mathematical reason why thi...
All charts of machine learning performance (y-axis:accuracy 0.0-1.0) across epochs have the below shape. Is there any research that explain how this convergence is bounded O(n) where n is the number epochs (and ultimately the number of examples the algorithm visits).
I am reading Bob Nystrom Crafting Compiler's and in the chapter 5 it says this In the last chapter, the formalism we used for defining the lexical grammar— the rules for how characters get grouped into tokens—was called a regular language. That was fine for our scanner, which emits a flat sequence of tokens. But regul...
I have searched quite a few posts here so that I can prove that the language $$L=\{a^kb^l: 1\leq k\leq l\}$$ is not regular (using Myhill-Nerode's theorem). I know that I must find an infinite number of pairs $(c,d)$ such that if $R$ is the equivalence relation defined by Myhill-Nerode's theorem, there is a string $z \...
I am trying to understand this, especially the last page. For calculating the Page Rank we can use the following formula for matrices: $$ A = \beta M + (1 - \beta) \left(\frac{1}{n}\right)_{n \times n} \quad \quad \quad \quad (1) $$ Then we can use power iteration for the page ranks $r$: $r = Ar$. In order to deal w...
You know how programming languages can be based on Lambda Calculus or the Turing Machine and SQL is based on relational algebra. Is there any such thing for CSS or any foundation that could be used for styling languages in general if we were to design a new language from scratch? Styling and layout in general is someth...
A graph is 2-edge-connected if and only if it has a closed ear decomposition. I am looking for such a theorem for the 3-edge-connected case. Unfortunately, I have not been able to find one. Is there something like this in the literature?
I am trying to find (without success) a sample complexity lower bound for PCA. The concrete problem I am considering is - $X_{1}, X_{2}, \cdots X_{n} \sim D(0, \Sigma)$ are $d$-dimensional vectors sampled IID from a distribution with zero-mean and covariance matrix $\Sigma$. Our objective is to compute an $\epsilon$-ap...
Let $G$ be a connected undirected graph, e.g.: u -- v -- w \ / x I would like to determine the number of sequences in which every vertex of the graph is visited. This is supposed to work as follows: The starting vertex is fixed The next vertex to be visited must be an unvisited neighbor of one of the already visi...
This is a made up question not seen somewhere so I am not sure if a good solution exists but here it is anyways. Given an array $ A $ of $ N $ non-negative integers, find the longest non-decreasing subsequence of this array such that every adjacent pair in the subsequence is co-prime, ie. $ gcd(a_{i}, a_{i + 1}) = 1 \s...
I'd like to compute the inverse of a matrix of size $S^2N \times S^2N$ over complex numbers that is composed of tri-diagonal $S\times S$ size blocks of tri-diagonal $S\times S$ block matrices. This leads to a matrix with tri-diagonal stripes. I know that there exist algorithms with speed-ups for tri-diagonal matrices a...
Designing a datastructure which supports the following operations on integers (It can also be visualized as a datastructure on strings, if the alphabets/characters have total ordering) Operations on the integer string. Insert an element with value $v$ at index i. Delete an element from index $i$ Increment value at i...
Consider the following grammar $G$: $$S \rightarrow SA \ | \ AS \ | \ aXb \ | \ bXa, \ \ \ X \rightarrow \# \ | \ BXB, \ \ \ A \rightarrow a \ | \ b \ | \ \#, \ \ \ B \rightarrow a \ | \ b$$ Decide if complement of $L(G)$ is also a context-free language. My approach was to find a word not in the language, such that for...
With 12 bits, apparently you can represent $2^{12}$ different days or 11 years. But how? If you have 6 characters YYMMDD and each character represents 8 bits, how can this represent $2^{48}$ days?
I'm reading the Wikipedia article on Backpropagation and have some questions on the math. $$ \frac{d C}{d a^L}\cdot \frac{d a^L}{d z^L} \cdot \frac{d z^L}{d a^{L-1}} \cdot \frac{d a^{L-1}}{d z^{L-1}}\cdot \frac{d z^{L-1}}{d a^{L-2}} \cdot \ldots \cdot \frac{d a^1}{d z^1} \cdot \frac{\partial z^1}{\partial x} $$ where $...
I was reading a bit about $NP$-problems and how it is widely assumed that $NP\neq co$-$NP$. This also implies that the complement of $NP$-complete problems are not in $NP$. What is known is that the complement of a $co$-$NP$-complete problem is $NP$-complete and it could be that either $NP=co$-$NP$ or $NP\neq co$-$NP$....
To solve multi-armed bandit problem, the common approaches are UCB or TS and there are many variants of these algorithms. I am wondering if it is possible to model and solve this problem as a linear program? If yes, is it possible to derive regret bound for the algorithm? I have seen some papers that use LP, primal-dua...
I did some thinking and analysis this evening and I'm wondering if what I'm pointing out here is interesting: https://medium.com/@nwcodex/invocation-asymptotics-runtime-cost-based-on-the-anticipated-invocations-of-code-paths-in-the-ed3e0d401970 Could it be that asymptotics are typically only interesting in the context ...
I was reading the section of Data Structures for Disjoint Sets from the text Introduction to Algorithms by Cormen et. al. I made it through the proof, but I'm not sure I understand the very last sentence (and it seems a little handwavy to me) The prerequisites: $$\alpha(n) : \text{Inverse of a very fast growing funct...
I want to calculate average hours worked from below bar graph and following this method but I feel this method is not correct to find average working hours Procedure A: ( 4*1+4*2 +6*3+7*4 + 13*5 +8*6 ) /(1+2+3+4+5+6)sum of worked hours average= 171/21 = 8.14 procedure B: average= ( 4+4+6+7+13+8)/6( total green bar...
Shouldn't this statement be false? To be true the implication should be P=NP or am I wrong? I can't find a formal proof
I want to implement the algorithm provided in this answer: (Please see original post for details.) It calculates every combination of making a provided amount by using coins from a provided list of denominations. I think I have a pretty good grasp of what the algorithm does and I understand that it's a Union, but I'm ...
Intuitionistic logic(s) are usually defined in a purely synthetic way, with their own deduction rules different from classical logic, but they also have semantic interpretations. One of them, more known in mathematical logic, is Kripke semantics, originated in modal logic, in which a formula is valid iff it holds in al...
I have the following question: given a string $X^n$, where $n$ is divisible by $3$, how to build a one-tape Turing machine with complexity $O(n\log n)$ that splits this string into $3$ equal parts? I manage to build an $O(n^2)$ machine that performs this task. By the way, all my attempts always result in an $O(n^2)$ ma...
Proof width (the size of the largest clause in a proof) plays an important part in refuting an unsatisfiable formula. If a formula has a bounded-width resolution proof of its unsatisfiability, then the length of the proof is polynomially bounded, since there are only $O(n^k)$ distinct $k$-clauses over $n$ variables. We...
Is it possible to (theoretically) develop a CPU having a hybrid ISA such that half of the cores in it use the x86 architecture and the other half uses the ARM architecture? The x86 cores would run the x86 instructions that the CPU receives, while the ARM cores would run the ARM instructions. This would allow the CPU to...
Can anyone please explain (not just through examples) that why does the greedy approach does not work in this case? Or more generally, is there any particular condition under which only the greedy solution work? The problem link -https://codeforces.com/problemset/problem/1832/B. The problem states that we have an array...
My question is admittedly simple, but the desire is to have an insightful view on it behind a conventional definition. In different foundational or axiomatic systems, I have come to consider “compositionality” as possibly the single most general concept to use as a structuring principle, in any system that gives rise t...
I’m working on a custom exporter for a 3d project. I have groups of faces (quads) that are always multiples of 4, each quad could be further subdivided into another group of 4, but in the editor they are all part of the same mesh/group (no parent/child). I would like to export these quads by iterating through the “supp...
Hey to everyone I am trying to understand A* algorithm not the real time A* algorithm To understand this I created the following problem Node s is connected with Α and the heuristic value of Α is 4 with travel cost 2 Node s is connected with Β and heuristic value of Β is 4 with travel cost 3 Node Α is connected...
I've tried a to implement a Regex to DFA converter, and it works, so far, but I don't understand how to implement "parsing preferences" in the DFA. A classic example is $a^*$. This regex is ambiguous unlike $^\wedge a^*\\\$$, because given a string aaaa, we can accept a, aa, aaa, and aaaa. Usually, the engine will say ...
The definition of ZPP seems to be $$ZPP = RP \cap coRP.$$ I think ZPP should then be equivalent to P, because for any language L in ZPP, there is an algorithm A and B proving that it is in RP and coRP, respectively. Since A must tell for any x s.t. $x \notin L$ the truth and B for any x s.t. $x \notin L$ as well, we ca...
I have $L_1=\{b^*+b^*a(b+ab^*a)^*ab^*\}$ and $L_2=\{(b^*ab^*a)^*b^*\}$. I want to prove or disprove that they are equivalent. I have proved that $L_2\subseteq L_1$ and I tried to transform the second expression in $L_1$ in order to find an expression contained in $L_2$ (without any luck so far). I tried also to find a ...
After watching 3b1b's brief primer on blockchains here, I noticed a bit of a "flaw" with blockchains. It isn't really a flaw, but I'm not sure how it is alleviated. If we have two players, Alice and Bob, who are transacting with one another, each person stores their own copy of the blockchain. This is a given, as block...
Is there a pair of connected graphs for which the k-wl test always fails (= judges isomorphic when not isomorphic) for any k? If so, please give an example. How about the following image? Are they non-isomorphic? I'm not sure... now i got they are non-isomorphic. so then, does this correspond to the pair the question...
I am given a group $A$ of real numbers and I have to find the minimal group $B$ such that for each $a$ in $A$ there exists at least one $b$ in $B$ such that $|a-b|\leq 1$ So what I think the algorithm should do is first sort $A$, then insert $A[0]+1$ to $B$, and then iterate on $A$ and check if the last number we added...
I would like to solve a shortest path problem on a graph $\mathcal{G}= (\mathcal{V},\mathcal{A})$, which comes to minimize : \begin{equation} \label{eq:1} \underset{\{x_{ij}\}}{\text{argmin}}\biggl\{\sum_{(i,j)\in\mathcal{A}}a_{ij}x_{ij}\biggr\} \end{equation} in which $a_{ij}$ is a non negative scalar quantifying the ...
Consider the following datatypes in Haskell: data Foo = Halt | Iter Foo newtype BigInt = BigInt {nthBit :: Foo -> Bool} Foo is Peano numbers compactified by one limit point, namely fix Iter. BigInt represents arbitrary-length integers in two's complement. The limit point fix Iter forces the field nthBit to eventually ...
I would like to solve the $k$ shortest paths on a directed graph $\mathcal{G}= (\mathcal{V},\mathcal{A})$ : \begin{equation} \label{eq:1} \underset{\{x_{ij}\}}{\text{argmin}}\biggl\{\sum_{(i,j)\in\mathcal{A}}a_{ij}x_{ij}\biggr\} \end{equation} in which $a_{ij}$ is a non negative scalar quantifying the cost of arc $(i,...
Is there a polynomial algorithm which for each graph G and each value k determines whether all the cliques of G have size smaller than k? Is it correct to say that it doesn't exist because clique is NP-Complete?
Vol. III of The Art of Computer Programming, chapter 5 (Sorting, intro) mentions: Computer manufacturers of the 1960s estimated that more than 25 percent of the running time on their computers was spent on sorting, when all their customers were taken into account. In fact, there were many installations in which the ta...
I have two dataframes representing products two distributors sell. They look like this: df1 for distributor 1. Country, Age group, Product {USA, Canada}, {Toddlers, Teens}, {Jeans, Shoes} {USA, Mexico}, {Teens, Adults}, {Hair bands, Mufflers} So, the distributor 1 sells jeans and shoes for toddlers and teens in USA an...
As it stands, the general consensus seems to be that BPP = P. If this conjecture were indeed true, what would be some of the philosophical implications beyond theoretical computer science? I know that the construction of my question is rather fuzzy. This is in the hopes of getting a diverse set of interpretations to yi...
I am Balchandar Reddy, a research scholar. I am currently working on the parameterized complexity of a problem for the parameter clique width. The problem is known to be polynomial-time solvable on graphs with bounded clique width; does this indicate that the problem is FPT for the parameter clique width? Similary, if ...
The code for degree elevation of curves in The NURBS Book by Les Piegl and Wayne Tiller pages 206--209(The_NURBS_Book) assumes the knot vector for the curve is given as: $$(0,...,0,...,1,...,1)$$ where there are p+1 0's and p+1 1's and numbers greater than 0 and less than 1 are in between the last 0 and the first 1 of ...
Is the statement in question true? how can i prove it formally? I know that PSPACE=CO-PSPACE and NP ⊆ PSPACE and CO-NP ⊆ CO-PSPACE
I am studying this ERD: The bank and the customer are obviously strong entities because they are a bank and a person. The bank branch is clearly a weak entity because it depends on the bank associated with it. How are a account and a loan not weak entities? Since a loan and a account depend on the customer and the ban...
Let there be $n$ processes in a general connected network with no leader such that each process has a distinct UID. Each edge has a weight , with weights being positive or negative. Assume that each process knows $D$, the diameter of the network. I need to find a subset of edges such that the subgraph formed by them is...
In this variant of #Positive-2-SAT ,we divide set of all possible clauses like this : A = [ab ,ac ,ad ,.... ] B =[bc ,bd ,be ,....] C=[cd ,de ,....] D=[de ,....] .... In this variant ,we are allowed to select clauses from only 3 sets mentioned ,And for every k variable there are k such sets but for k variables ,we are ...
The dragon book lists properties of an NFA N(r) created using Thompson's construction, in particular: Each state of N(r) other than the accepting state has either one outgoing transition on a symbol in Σ or two outgoing transitions, both on ϵ. However, the same book shows NFAs created using Thompson's construction ...
I believe a general or pure definition of a “graph” in mathematics can be from algebraic topology, where a graph can be more abstractly seen as a simplicial complex, or a cell complex, or with scheme theory. I am interesting in how many different “ways” a person could denote the structure of a given graph, in some nota...
I Let $G$ be the set of simple graphs on $n$ nodes. Given a $g \in G$, we denote the number of triangles in $g$ with $n(g)$. Given some positive real-valued parameter $w$, we define the the function $Z(w)$ as follows: $$Z(w)= \sum_{g}\exp(w\cdot n(g))$$ I think its an intractable problem to compute $Z(w)$, but I don't ...
I'm considering a binary error-correction scheme, but I'm missing the correct terms to dig further into it. The idea is to decide the code-rate during encoding, but for the decoder to decide how that's used, depending on its resources (and estimate of the actual transmission error rate). For example, let's say our code...
I need to design the following algorithm: Given an undirected, simple, and connected graph $G=(V,E)$ and some positive weight function $w$. The algorithm needs to scan the edges from the heavier edge to the lightest; in each phase the algorithm removes the edge only if the graph remains connected after removal of the e...
I'm trying to modify xv6-riscv to perform a copy-on-write mapping when executing fork(), but I'm struggling to determine a concise way to manage the copy-on-write pages. Most sources I can find online suggest to keep reference counter of how many processes currently are able to read from a given copy-on-write page, sto...
If a polygon is represented by its vertices(latitudes, longitudes), is it possible to find all the possible points or nodes(latitudes, longitudes). If so, what kind of algorithm is used. The polygon does not intersect itself and it does not have any holes.
This may be a simple problem ultimately. I am picturing a “rule” of “relative enumeration”. Let’s say you start with “19”. This means, there was another choice you missed - implying that you will input “1” and “9” in some order, you could also have done “91” - so now you do it, to balance it out. Now you have: “1991”. ...
I'm looking for more examples of the following model of state machines: in David Spivak's book on category theory, he gives in section 3.1.2.10 and in application 4.3.1.9, a description of a finite state machine in terms of category theory. The basic definition is that you fix an alphabet $\Sigma$ and take the list mon...
Suppose we have a program like this: def feedback(number): final(number) def final(number): if number=2 or number=4: print(number) else: feedback(number/2) which is self referential in a way how can we predict the output of such programs? Do we have to brute force the result or is there a cl...
I'm looking at Shannon's source coding theorem for symbol codes. It provides a very nice bound on the expected code length $S=|f(X)|$ of an optimal code $f$ over the sequence variable $X$: $$ \frac{H(X)}{log_2(a)} \le \mathbb{E}[S] \lt \frac{H(X)}{log_2(a)} + 1 $$ It does not however prescribe an algorithm that can lea...
I was reading: https://stackoverflow.com/questions/34724201/whats-the-time-complexity-of-monte-carlo-tree-search Where it says: The runtime of the algorithm can be simply be computed as O(mkI/C) where m and k are the same as before, and I is the number of iterations and C is the number of cores available. According t...
The IR given in Appel's book (Compiling with Continuations) is certainly well explored and battle-tested in production compilers. I have been able to find several works based on or inspired by it (either by Appel himself, such as Shrinking Lambda Expressions in Linear Time, or by other people, as this one by Kennedy, C...
I'm still a bit confused about the transp operator in Agda: transp : ∀ {ℓ} (A : I → Set ℓ) (r : I) (a : A i0) → A i1 Is found this paper and I wonder if there is a relation? As far as I understand, the $\mathsf{comp}^i$ operator lets you transport an $n$-dimensional cube along $i$ and if you already know how some...
$\newcommand{\nuSwap}{\nu\textsf{-swap}}$ Two Hamiltonian cycles are different if and only if there is at least one edge they do not share. Let $L$ consist of all graphs with exactly two Hamiltonian cycles. What complexity class does it belong to? Let us construct an NTM $M$ that decides $L$ in polynomial time. Take an...
I found the following question in my book: For probabilistic games like backgammon, where there is a resource limit, the RB-Expectimax algorithm is used. Assume that it is known that the heuristic function h in the Expectimax-RB algorithm holds: -1 <= h(s) <= 1 for each state s. How can this algorithm be pruned? Descr...
Given a function like: f(x) = x=y then 1 else 0 The number y is a natural number, other than that is unknown I had two approaches in mind: The function is computable since an algorithm exists, that can compare two numbers, and tell whether they are equal return 1, otherwise 0. The function is not computable, since we...
I want to prove that the language $\text{Max-Unique-Clique} = \{<G> | \text{The maximal clique of $G$ is unique}\}$ is in $\Sigma_2^p$ by using the following $\Sigma_2^p$ machine: The machine guesses $k$ and verifies that there is a subset of size $k$ that is a clique. If not, it rejects. It verifies that all other su...
Given a directed graph $G=(V,E)$, I'm wondering if there's a way to determine the largest size of a set of edges that are disconnected pairwise. There is a similar problem for vertices (Maximum Independent Set). However, I'm unable to think of the corresponding problem for edges. When I say "two disconnected edges" I ...
We proved that, there exist no algorithm so it can tell us if an algorithm halts or not (a.k.a. the halting problem is undecidable). But it surely can handle some of those; can we tell which of those it can handle, and which not? If we can't, can we tell which of those we can tell if it can handle or not? And even if n...
Arithmetic encoding is one of the most famous entropy encoding techniques, and I am using it to encode an image. For this, I am using the built-in function of Matlab that also gives other values such as seq, counts, and source along with the binary code. From theory, compression is done based on the probability distrib...
Prove if $A,B$ are NP-complete then $((a, b) \mid a \in A \lor b \in B)$ is also NP complete I can understand why the union and intersection of 2 NP-complete languages are true but for statement above I can't understand why and how to prove.
I have an object that is moving towards target points and I want to determine when it will reach or pass through them. I receive points in real time, which represent the current position of the object. The position is a 6-D vector. The data can be download from here Initial approach For each received point: Calculate ...
I am a research scholar currently working in computational complexity. I am working on a decision problem $P$ that is known to be W[2]-hard parameterized by the solution size on split graphs. As split graphs are chordal graphs, if a problem is NP-complete on split graphs, it is also NP-complete on chordal graphs. I won...
Given two sets of nonnegative numbers $X=\{x_1,...,x_n\}$ and $Y=\{y_1,...,y_n\}$, my problems consists in finding the partition $S \subseteq \{1,...,n\}$ and $\bar{S}=\{1,...,n\}\backslash S$ maximizing the following quantity: $$\frac{\displaystyle\left(\sum_{i\in S}x_iy_i\right)^2}{\displaystyle\sum_{i\in S}x_i^2}+\f...
I have a (2D) point cloud of reasonable size (say some thousands of points) and a set of (2D) polylines also of a reasonable size. I want to assess the discrepancies between the two geometries and for this I want to find the nearest point to every segment. This can be solved with the Voronoi diagram of the segments fol...
Since design ideas, and even the concept of Physical Design (exactly where you put your files), are such a broad topic, may I give a definite example and ask for feedback on the example? Suppose you are tasked with making a C++ application that does a whole bunch of complex mathematics. And, beforehand, you are given t...
I can't find this from surface search in the literature When one observes/simulates NFA after processing several characters, one has to consider both "internal states of NFA" (individual nodes) and "state of the whole NFA" - which nodes are active - that can be seen as state of DFA that that automata is equivalent to. ...
I know there are three barriers of computation; the thermodynamic barrier, the light barrier and the quantum barrier. Let’s say we figure out how to send signals FTL, learn how to get rid of excess heat and continue down the ladder of nanotech, picotech and femtotech. Is there a 4th barrier we might encounter at some p...
In the paper Tight Bounds for Lp Samplers, Finding Duplicates in Streams, and Related Problems, the authors consider the universal relation problem in 2-party communication complexity, which is defined as follows: Consider the following two player communication game. Alice gets a string $x \in \{0,1\}^n$, Bob gets $y \...
I’m curious about an embedding technique where every possible “tokenization” of a text gets an embedding - not just individuals words, but every single 2-gram, 3-gram, and n-gram. Does this exist? Or is it the bag of words approach? What I would really like is to explore in real time how the addition of a token changes...
I'm kind of struggling with this excercise. The obvious thing to try is to show that 3-COL $\leq_p$ 3-COL-$K_4$-FREE ($\leq_p$ stands for polynomial reduction). It is clear that 3-COL-$K_4$-FREE is in $NP$. The first thing that comes to mind then is to take the trivial reduction that maps a graph $G$ to itself, but thi...
We were taught to use reductions in order to show that a given L is undecidable. My question is, given some definition of a new L, is there a way to find a reduction $$ L\leq_mHALT $$ So that I can determine $L \in RE$? More specifically, given the quite common problem of the decidability of $$ L=\{\langle M\rangle | |...
A linear equation $Ax=b$ can be solved by reducing the matrix $A$ to upper triangular form by using Gaussian elimination or LU decomposition. If $A$ is symmetric and positive definite one can use Cholesky decomposition which is more efficient than LU decomposition. If the entries of $A$ are all integers one can use the...
On the 7th of June 2023, Google DeepMind released an article about AlphaDev. AlphaDev is an evolution of AlphaZero (used to beat world champions at Go, Chess and Shogi), and it can produce assembly code for a task if said task is represented as a game. All of this information can be found here. Now, they tested AlphaDe...
$FINITE_{TM} = \{\langle M \rangle\mid M\text{ is a TM and }L(M)\text{ is finite}\}$ $A_{MT} = \{\langle M,w \rangle \mid M\text{ is a TM and }M\text{ accepts }w\}$ I'm trying to prove that $FINITE_{TM}$ is not Turing-reducible to $A_{MT}$ by contradiction. Supposing it is, I get that there's an oracle Turing machine $...
A contiguous single polygon is specified by it's vertices $(v_1, \ldots, v_n)$, given in order such that the line between $v_i$ and $v_{i+1}$ is an edge of the polygon (there's also an edge between $v_n$ and $v_1$). For example, a triangle might look like $v_1=(0, 0), v_2 = (1, 1), v_3 = (2, 0)$. Anyways, given two poi...
I am trying to program a Turing machine that performs unary subtraction, $m-n$, but if $m<n$, the machine writes the $!$ symbol on the tape $|m-n|$ times. If $m=1$ and $n=3$, the machine would only leave $!!$ on the tape. Now, I have successfully created a machine that performs unary subtraction $m-n$ where $m<n$ and i...
I have read the GPT-1 paper, and my understanding is that it works as follows: $U$ is input tokens, $h_0=UW_e+W_p$, $h_i=\text{transformer_block}(h_{i-1})$ and the output is a probability vector $P(u)=\text{softmax}(h_nW_e^T)$, and the hidden states are the final latent layer before softmax, so the hidden states are $h...
Why does Java's HashSet have an underlying HashMap, not the other way around? HashMap could have contained an internal HashSet of Map.Entrys, and HashSet wouldn't have stored a reference to an internal "dummy" Object per each element (while implementing the hashtable data structure itself). Is there (could there be) so...
AFAIU, there are only two issues, that VM solves: Scarcity of RAM; Access control to "unknown" memory, where SW tries to read from or write to the memory it does not own or share with other processes. While p.1) is becoming a non-factor for more use-cases, than it probably was in the past, are there any solutions for...
I've had the following question on a test and I answered: 'False', my answer was incorrect and I'm trying to understand why. $VC = \{<G,k> |\ G =$ undirected graph with a vertex cover of size $k\}$ $IS = \{<G,k>|\ G =$ undirected graph with an independent set of size $k\}$ Ture or False: Assuming there exists a languag...
I'm trying to practice recurrence equations, so I'm trying to solve this typology by unfolding method. I was wondering if what I write below was correct and obviously the result: $T(n) = n^2 + T(n-4) = n^2 + [n^2 + T(n - 8)] = n^2 + n^2 +[n^2 + T(n-12)] = n^2 + n^2 + n^2 + [n^2 + T(n-16)] = ...$ In general we can say t...
I need to generate maze with 100x100 rooms. Each room connected only with 1 other room. Here are example of correct 2x2 mazes: +-+-+ |...| +-+.+ |...| +-+-+ And here are some incorrect 2x2 mazes: +-+-+ +-+-+ +...+ |.|.| +.+.+ +-+.+ +...+ |...| +-+-+ +-+-+ For scoring our 100x100 maze we use following system...
I have an upper row of $N$ equally spaced 'units' and a lower row of $N$ equally spaced 'units'. I would like to connect any of the upper row of units to the lower units via orthogonal connectors (consisting of horizonal and vertical line segments) such that although a horizontal and a vertical line segment, e.g. conne...
My goal is to solve the above-constrained minimization problem where my vector to be optimized is x. The matrix A and the vector y are known to me. There are a lot of non-PyTorch libraries like CVXPY and scipy.minimize that do it, but they are very slow when the matrices become large and I am going to run this algorith...
The "input-encoding problem" is where the binary representations of symbolic input variables to a Boolean function are chosen to minimize the decode logic complexity. The "Espresso-MV" software can be used to do this, here's one of the most cited papers on the topic by the developer, from the mid-late 80s. The relevant...
I am working on an NP-Complete problem, i.e., the dominating set. Given a graph $G = (V, E)$, a set $S$ is a dominating set if every vertex $v \in V \setminus S$ has at least one neighbor in $S$. I am looking for the complexity of the problem in trees. I have tried the greedy method to solve this problem. But, looks li...
Suppose we have a grid of points (which can also be very dense 10000x10000) like the one in the figure in which the points are marked with two different colors. What is the best algorithm from a performance point of view that allows me to reconstruct the outline of the red dots connecting the points of the grid itself...
I am studying for an MSc in AI and I am currently thinking about attending a bootcamp on a computer science subject. The motive is that I want to gain hands on experince on practical applications and the MSc course may be a bit too "academic". The question is: which subjects combine well with an MSc in AI. For example ...
I'm learning LTL (linear temporal logic) and we learned that a model $M$ and a starting position $q_0$ satisfies a LTL formula $\psi$ iff for every path $\pi$ starting at $q_0$ it is true that $\pi \models \psi$. I also learned that the Next ($X$) operator is dual to its negation meaning $X \neg p = \neg Xp$. This conf...