instruction stringlengths 35 29.1k |
|---|
I have just discovered the filed of data structure and I am fascinated by it. IS there an encyclopedia of data structures? Or at least do you know any recently constructed data structure that is not yet popular?
|
Is the following a context-free language?
$$L = \{a^n w w^R a^n \mid n \geq 0, w \in \{a,b\}^*\}$$
I think no because the number of $w$'s is not equal.
Somebody please guide me.
|
Which of the functions among $2^{3^n}$ or $n!$ grows faster?
I know that $n^n$ grows faster than $n!$ and $n!$ grows faster than $c^n$ where $c$ is a constant, but what is it in my case?
|
I am trying to find an algorithm to smoothly morph a (given) diagram made of convex polygons into another (given) diagram of the same type.
The target diagram is usually generated from the source, where all kind of operations may happen (new polygon popping up, polygon gets deleted etc.)
So for example I may want to go... |
There is an undirected graph $G$. A graph $H$ is constructed by changing each edge $(a,b)$ in $G$ to a pair of directed edges $(a,b)$ and $(b,a)$. How to prove that the maximum flow in $H$ is equal to the maximum flow in $G$?
I don't really have any idea how to start it. I just know that I can use Ford-Fulkerson on $H$... |
Seeing the title, you will probably like to give your explanation as
$n!=n\times (n-1)\times (n-2)\times (n-3)\times\cdots\times 1$
where as
$n^n$ = $n\times n \times n\times n \times\cdots\times n$ $\text{($n$-times)}$
but consider one thing: if we do $\log(n!)$ then it comes out to be $O(n\log n)$.
On the other han... |
Consider an asynchronous and unreliable distributed system. Each node has a value. Suppose that p and q are two neighbor nodes of the system (p_val and q_val are the values of p and q respectively). p and q want to compute the average of their values and change their values to the average. If one node changes its value... |
statement 1: $Γ$ is satisfiable implies $Γ$ is consistent.
statement 2: If $Γ$ derives $α$ then $Γ$ entails $α$.
I can easily prove statement 1 from 2 , but not 2 from 1 (without using strong completeness theorem).
|
What is the standard way for VMs to deal with 0 *= computationallyHeavyFunction()? Given that once the VM sees that left hand factor is 0, it would know that the result of computationallyHeavyFunction() would not matter, is it standard for VMs to still compute computationallyHeavyFunction() or do they tend to omit that... |
Why is the initial value of hash 17 and not 0?
/**
* Returns an integer hash code for this date.
*
* @return an integer hash code for this date
*/
@Override
public int hashCode() {
int hash = 17;
hash = 31*hash + month;
hash = 31*hash + day;
hash = 31*hash + year;
return hash;
}
https://algs4.c... |
Normally increasing the beam width is a better solution, but I have read that this is not necessarily true, is there any proof of this?
|
I came across below problem in this pdf:
Given a TM M, whether M ever writes a non blank symbol when started on the empty tape.
Solution given is as follows:
Let the machine only writes blank symbol. Then its number of configurations in the com computation on w is q × 2, where q is the number of states of M; the fa... |
There is an interesting correspondence between notions of topology and notions of computability theory originating from the ingenious idea of Dana Scott to identify computable functions with continuous functions (in fact it can perhaps be traced back to Brouwer).
Complexity theory can be seen as a refinement of computa... |
For my course I have to memorise a number of algorithms and to know how to perform them by hand. The steps of the quick sort are given as the following in the text book I am using:
Choose the item at the midpoint of the list to be the first pivot
Write down all the items that are less than the pivot, keeping them in o... |
I am writing a program that computes and displays diffs. I implemented Meyers algorithm that computes the LCS between 2 subsequences (seq1 and seq2); its output is one of the possible LCS and a partition of seq1 and seq2, one projection of which is lcs.
I want to improve it so that the LCS displayed minimizes the numbe... |
So, I have to solve for the following set of equations
$q_1$ = $q_1$a + $q_2$b + $\epsilon$
$q_2$ = $q_1$a + $q_2$b + $q_3$a
$q_3$ = $q_2$a
There are two ways to do this.
I did this
$q_1$ = $q_2$b + $\epsilon$ + $q_1$a
$q_1$ = ($q_2$b + $\epsilon$)a* Applying Arden's theorem
Now substituting in $q_2$ the values of ... |
Is $n^{1/\log \log n} = O(1)$ ?
Suppose that $n^{1/\log \log n} = c$ where $c$ is constant.
Taking logs of both sides,
$$\frac{1}{\log \log n}\log n = \log c.$$
I am not able to spot an error. Please help
|
If the machine has enough memory and speed as to compute all states of the Chess game in a reasonable time, can a player with the white pieces - operated by a machine - lose a game?
|
Provide an $O(k)$ algorithm to find $k$- magic pairs of positive integers a and b of type signed int where a magic pair is defined as $\sum_{i=1}^{a-1} i = \sum_{k=a+1}^b k $. You can't use the summation formula $\frac{N \cdot (N+1)}{2}$ as it would result in an overflow. Even you can't run sums such as sum1 and sum2, ... |
I came across this statement on page 85 of the book "understanding machine learning: from theory to algorithms"
The general idea is as follows:
Consider a binary classification problem with the instance domain being $X = \mathbb R$.
For every $n \in \mathbb N$ let $H_n$ be the class of polynomial classifiers of degree $... |
I'm given the following problem:
TLB lookup time is given as 8ns and memory access time for a computer
system is given as 40ns. What should be the TLB miss rate to achieve
effective memory access time 60ns ?
I use the following formula where x is the TLB Hit Rate, and (1-x) is the TLB miss rate:
TLB Hit Rate * TL... |
I have traditionally been doing things like this:
function test() // A
{
if (/* conditions */)
return true;
else
return false;
}
Of late, I have instead starting doing, and converting existing code like the example above, into this:
function test() // B
{
if (/* conditions */)
retur... |
I was recently faced with a hackerrank interview test where I couldn't solve the following problem correctly. I would not want to name the exact problem for privacy purposes, but I can tell that it was nowhere in Google with this name.
Problem
We want to organize an event with as much performers as possible. We are giv... |
The title says it all: is there a deterministic polynomial time algorithm that tests for semiprimality? (A number $N$ is a semiprime if it is the product of two primes.) I don't understand the ''PRIMES is in P'' paper, so I can't judge if it adapts, and I haven't had any luck searching this topic online.
If it is, is t... |
for sorting n elements what is better to use AVL tree or heap data structure and why? Can someone explain in brief?
|
I do not have much experience in mathematics but I would really like to grasp Big-O notation on its mathematical level. I already read What does the "big O complexity" of a function mean? from references, but I still do not understand (even graphically), what does it mean when we say:
T(n) = O(f(n)) if and only if the... |
Wikipedia has a proof that every loop that terminates has a loop variant—a well-founded relation on the state space such that each iteration of the loop results in a state that is less than the previous iteration's state under the relation. Here, well-founded refers to the usual classical definition of a well-founded r... |
I'm trying to solve this from The Algorithm Design Manual:
6-23. Arbitrage is the use of discrepancies in currency-exchange rates to make a profit. For example, there may be a small window of time during which 1 U.S. dollar buys 0.75 British pounds, 1 British pound buys 2 Australian dollars, and 1 Australian dollar bu... |
I want to prove that the basic multiplication algorithm is correct when applied to binary numbers.
I try to follow the steps described here and here but didn't succeed.
The basic implementation algorithm is the multiply function defined below, the other functions are given by completeness (this is F# but it reads as ps... |
I have a grammar: $A\rightarrow Aa|bB|c$
The above is the left recursive grammar.
I understand that I have to remove the string "Aa" from the above grammar or to convert it into the form "aA" to avoid left recursive.
Some body please guide me how to do that.
|
Kindly consider the following productions. How can I identify a useless production?
S->aS|A|C
A->a
B->aa
C->aCb
Somebody please guide me.
Zulfi.
|
Using reduction theorem in NP, we want to prove that Exact cover is NPC by reducing it from Vertex Cover Problem. It is easy to derive it from SAT, but we can't find a solution yet to derive it from Vertex Cover.
|
Given a language $L$ over the alphabet { 0, 1, [, ,, ] } where if $x \in L$ then $x$ is of the form $[x_0, \dots, x_n]$, in which each of the $x_i$ represents unique binary strings (so $x_i = x_j$ only when $i=j$). Prove that this is not a regular language.
Here is what I have. I have used the pumping lemma.
Suppose $... |
I had a look at topological sorting where they mention a possible parallel algorithm that relies on matrix multiplication, but using min-plus matrix multiplication:
One method for doing this is to repeatedly square the adjacency matrix of the given graph, logarithmically many times, using min-plus matrix multiplicatio... |
What will be time complexity for sorting 100 elements using selection sort answer given is O(1), but selection sort time complexity is O(n^2) in every case so how O(1)?
|
I am myself a non-cs graduate and would love to be a machine learning engineer.
I have learned to code and know the basics of Machine learning as well. Now I would like to know what "basics of CS" I should learn to be completely job ready.
I sometimes have difficulties reading CS documentations and don't know how progr... |
Since every deterministic Turing Machine can be translated to a graph of configurations such that $M$ accepts a word $w$ iff there is a path from the initial configuration that matches $w$ to an accept configuration, we can define a decider $D$ for $L$ such that:
$D$ verifies $\langle M \rangle$ is a (deterministic) TM... |
How can it be shown that the expression $O(n^2 + n) + \Omega (n^2 + n \log n)$ simplifies to $\Omega (n^2)$? Why is it not $\Theta(n^2)$?
|
I know the historical importance of the link between linear systems and determinants. I also know that determinants have a beautiful connection with non-singular matrices, i.e., if a matrix is non-singular its determinant is not zero. Furthermore, determinants can be used to characterize the critical points of a $C^2$ ... |
My goal is to recommend jobs to job seekers based on their skill set.
Currently I'm using an SVM for this, which is outputting one prediction, e.g. "software engineer at Microsoft". However, consider this: how significantly different are the skill sets of a software engineer at Microsoft and a software engineer at IBM?... |
I am supposed to calculate all-pair shortest path lengths of a graph. However, I first need the graph to be decomposed/expanded to a simple one based on the presence of parallel edges.
If N parallel edges exist between any two vertices A and B, I need to create N replicas of both vertices. Each replica of A will be co... |
I have a network of labelled digraphs and a I need to perform a unsupervised learning algorithm on this data.
I am interested in embedding a network of description logic documents in a vector space using the ideas in the paper Co-embedding Attributed Networks (which is a variational auto-encoder). look at the picture:
... |
So I get new Coordinates every 10ms even with RTK fixed precision, they jump between 1-3cm. The Coordinates are the current Position of my Vehicle
I have a Vehicle using these Coordinates to follow a drawn Path.
Now as the Coordinates Jump, the Vehicle tries to follow them and is driving in curves instead of a straight... |
Suppose that sequence $A$ contains $n$ integers $a_1,a_2,a_3,\ldots,a_n$ and sequence $B$ contains $m$ integers $b_1,b_2,b_3,\ldots,b_m$. We know that $m \geq n$. We assume without loss of generality that both sequences $A$ and $B$ are sorted in ascending order.
What's the fastest algorithm to determine if there exists... |
I have a set S of high dimensional points in Euclidean space, with convex hull H (not known); and some target point T in that space not in or on H.
Rather than worry about calculating both H and the distance to it explicitly, is there an efficient way to calculate just the distance from T to the closest point on H? I ... |
I have a problem with creating an equation for linear programming solver.
Company wants to open stores in k cities. For the purpose of even coverage of the entire area, these cities should be selected from the available n candidates in such a way that it maximizes the minimum distance between any pair of selected citi... |
Neural network latent (or pre-activation) representations are the weighted sums of inputs to neurons in hidden layers before applying an activation function. The vector of representations of neurons in a layer $l$ can be represented as $\mathbf{z_l}$ where $l$ can be, for example, a fully-connected or convolutional lay... |
I am working on understanding Kolmogorov Complexity. I've been struggling with the following exercise for quite some time now and would appreciate any inputs.
Show that there exists a constant $c$, such that for each $n \in \mathbb{N} -\{0\},$${K((01)^2}^n) \leq \lceil \log_2(n+1)\rceil +c = \lceil\log_2(\log_2(\frac{|... |
I have a question that I have been thinking about. Suppose we have $n$ agents, $m$ tasks, a cost matrix with $M_{ij}$ being the cost of agent $i$ performing task $j$, and are given a value $k \leq n$. How can we find the $k$ unique agents, who when each optimally allocated a unique task, result in a minimum total cost?... |
i was implementing pan-cake sorting. We can implement it by taking largest element to start and flipping it recursively (Like selection sort).
However it is mentioned that the A[i] has to be a permutation of [1, 2, ..., A.length].
My question is, what if A[i] is not a permutation of [1,2,..., A.length]?
How to solve ... |
my professor said that we can transform the reflexive Finally, Globally and Until into irreflexive Finally, Globally, Until.
Can someone explain me this?
For irreflexive Finally we have $w \models F^+ \varphi$ if $\exists i >= 1: w^{(i)} \models \varphi$
For irreflexive Globally we have $w \models G^+ \varphi$ if $\for... |
I want to find the closest string to a fixed set of strings. The strings are all equal in length, and the number of strings in the set is relatively small (compared to all the possible strings of the fixed size). For this problem you can assume the strings only contain the characters 0-9, and if needed, the length will... |
I was trying to prove that Parikh Image of every regular language is semi-linear. Even though it is true for CFL, but this question was about regular languages.
To prove this, I decided to proceed as follows:
Lemma 1: Every regular expression can be written as sum of products with star, i.e., $R = R_1 + R_2+ ... +R_n ... |
Is the constant pi (not Raspberry) ever used in general computer science? If so, how so or when is it applicable?
|
When I am trying to understand logic programming languages e.g. Prolog, I am immediately confused by the following two ways of relating logic systems and programming languages or type systems.
In Types and Programming Languages by Pierce, Section 9.4
Curry–Howard correspondence on p109 has a table
Does it mean that ... |
Say I had two functions called one after the other:
A1, A2 : vector of doubles
B1, B2 : vector of ints
f = dot product on ints
g = dot product on doubles
f(A1, A2)
g(B1, B2)
Does there exist a compiler optimization which could merge the dot product implementations for f and g such that you would get the following co... |
Problem:
Given a list of numbers, and a single number representing the maximum range in a list, break that list up into the fewest lists that can fit all numbers, while grouping such that each list has the lowest variance possible.
Examples:
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, with a max range of 10 can be returned as is ... |
What is the space complexity of Bottom-up merge sort?
It uses iteration rather than recursion so it will not use stack. But will an auxiliary array be used for the merge operation?
Please explain.
Thank you.
|
I have the language $L = \{ \langle M_1, M_2 \rangle : L(M_1) \subset L(M_2)\}$ and I'd like to prove that it is not Semidecidable. To do so, I need to use a reduction from $\neg H$. I cannot use Rice's theorem. I'm having a hard time with this, and would appreciate a walkthrough.
|
I am trying to wrap my head around how to prove the following statement:
There exists some $\Pi_1$-sentence $A$ such that $A \in \textbf{TA}$ but $\{A, \neg A\} \cap \textbf{PA} = \emptyset$.
$\textbf{TA}$ represents True Arithmetic which is the set of statements in the language of arithmetic that are true under the ... |
Is the following assertion true or false?
If the language $L$ is NP-complete and $Q ⊆ L$, then $Q$ is NP-complete.
I know for example that $k$-coloring is NP-complete if I take $k$ as input, but 2-coloring is an infinite subset of this which is in P (see link). Therefore, for me, the assertion is false. However, I'm ... |
I would like to create program in JavaScript (JS) which draws Mandelbrot set with arbitrary precision (zoom). In JS there is build in integer type BigInt which support simple operations like +,*,/,power on arbitrary precision integer numbers. JS not support calculations on arbitrary precision floating point numbers.
Q... |
I have a matrix function, which roughly looks like this:
$$
Y_{i,j,k} = f(coef, A, B) = coef[i] * A_{i,j} * B_{i,k}
$$
def fn(coef, A, B):
return np.einsum("i,ij,ik->ijk", coef, A, B)
Given, say, following values for coef, A, B:
coef = [1, 4, 16]
A = [
[.11, .12],
[.91, .52],
[.31, .32]
]
B = [
[.1... |
Tarjan's algorithm for 2-SAT is based on the truth:
a 2-CNF formula is satisfiable if and only if there is no variable that belongs to the same strongly connected component as its negation.
But I don't find any reason for the right to left direction. how can the inexistence of such variable guarantee satisfaction of ... |
I am looking for a high performance algorithm to check whether I can reconstruct a given string using a given set of substrings. More details:
Let's say our strings are over the alphabet $\Sigma$.
Inputs:
A string $S \in \Sigma^*$
A finite set of strings $A = \{a_1, a_2, ..., a_n\} \subset \Sigma^*$.
Output:
Whet... |
Let's say that you want to invite a person $u$ in party $P$. The
person $u$ will join the party if and only if all the friends of $u$ will join the party as well. Otherwise, $u$ will reject your invitation. Hence, we have two sets: $P$ with all the persons, and $F$ with the friend relations. Suppose $(u, v)$ belongs to... |
I'm working on a problem where I have a large number of pairs
e.g
1 -> 2
4 -> 3
2 -> 8
..
And a "match" would be considered 1 -> 2 and 2 -> 8 to make 1 -> 2 -> 8, as "1 -> 2" ends with 2 and "2 -> 8" starts with 2.
Given a large set of pairs, i'd like to create the longest possible chain. I know I could brute force it,... |
Is {(a* ∪ b)b } intersection {a* b* } a regular language?
|
I would like to find an algorithm which select matrices satisfying certain conditions.
We consider integer matrices (entries of the matrices comes from $\{1,\ldots,n\}$ for some positive integer $n$) and the numbers in each row are different from each other.
Let me first explain some definitions.
We call a matrix $M$ w... |
Consider the CNF-sat problem with n literals and k clauses. If k scales linearly in n, we get np-completeness (e.g., 3-sat where each literal appears at most 4 times). Do we still get np-completeness if we restrict attention to problem instances where k scales sublinearly in n? For this question, I am not requiring cla... |
We have undirected weighted connective graph $G=(V,E)$, We also have a minimum spanning tree $T$ of $G$.
Let $v$ be some vertex.
We have new graphs, $G'$ and $T'$.
$G'$ and $T'$ are same $G$ and $T$, except the extra node $v$ witch is connected (with new weighted edges) to the same nodes in both graphs.
I need to prove... |
We can invert the Burrows-Wheeler with this method:
The inverse can be understood this way. Take the final table in the
BWT algorithm, and erase all but the last column. Given only this
information, you can easily reconstruct the first column. The last
column tells you all the characters in the text, so just sor... |
This is related to this question. Essentially, I want to know whether my reasoning is correct.
We know that parsing with a context free grammar is same as boolean matrix multiplication (forward: Valient 1975, backward: Lee et al. 2002), and the latter has a lower bound of O(n^2) for arbitrary matrices.
If so, then the... |
Problem:
Given a TM $M$ on the alphabet $\{0,1\}$, determine if there is some input on which $M$ executes for at least 5 steps.
Is this problem decidable or not?
To check if the problem is decidable or undecidable, I describe an algorithm as follow:
$A$: on input the TM $M$
$A$ generates all strings $w$ of length a... |
In the following, by “functions” I will mean 2 input 1 output Boolean logic functions (for conciseness).
A function is called “universal” if by using it (sometimes multiple times, chained together), you can construct all 16 functions.
However this isn’t the whole picture. In some esoteric circuit computing models, you ... |
I was wondering if it was possible to create a TM that semi-decides (but doesn't decide) either of the following two languages:
$\emptyset$
$\Sigma^{*}$
I assume for 2, a one-state TM that just automatically accepts would be fine? I don't think it's possible for any input not to halt, or be rejected, so technically t... |
Suppose that we have 5 different instruction categories (1 OP, 2 OP, 0 OP, branch, and sub-routine instructions), how does a CPU manage to know which category is which whenever it reads an instruction from IR register using the least number of bits for each category? For instance, PDP-11 uses 4 bits (15 → 9) for two-op... |
Say we are working with a Prolog-like system where variables are dynamically created in different branch contexts and scopes, yet these variables are also globally viewable by the system regardless of the current context. Is there a way to label each variable with a unique scope ID which can be used to determine if the... |
I am trying to understand the intersection of 2 DFA's. I got the following link:
Intersection of 2 DFAs
I can't understand why they have not used the symbol 'b'. In the DFA's they have symbol 'b' also but they are just talking about symbol 'a'.
For M', we have...
1.E' = {a}
2.Q' = {s0, s1}
3.q0' = s0
4.A' = {s0}
5.f'(... |
In Fred Cohen's paper "Computer Viruses - Theory and Experiments", he proves that for the general case, classifying malware is an undecidable problem. I was wondering whether there might be a similarly well-known proof that an undetectable malware can or cannot be written.
|
This question is from Erickson's textbook on algorithms, p. 376, question 18.
Faced with the threat of brutally severe budget cuts, Potemkin University
has decided to hire actors to sit in classes as “students”, to ensure that every class they offer is completely full. Because actors are expensive, the university wa... |
I was reading about Run-Time Environments.
In the Dragon book (2nd ed.) I came across the following presentation:
[To implement abstractions, the] compiler creates and manages a run-time environment in which it assumes its target programs are being executed. This environment deals with a variety of issues such as th... |
Background:
(I’m a complete beginner in computer science in general, so I do apologise if my question is not formulated in a sensible way. E.g. I have avoided technicalities in formulating my problem, but perhaps this causes issues. I'm willing to edit accordingly if so).
I’m trying to get to grips with the way that ... |
We have undirected connective, weighted graph $G = (V,E)$.
we also know that for every $e,e'$ in $E$, $w(e)≠w(e')$.
Prove that $G$ has a single MSP.
Ideas?
|
Consider the following program:
\begin{align}
\max_x ~& x^TQx
\\ \mbox{s.t.} ~& Ax \geq b
\end{align}
where $Q$ is a symmetric (possibly indefinite) matrix and the inequality is element-wise and constrains feasible solutions to a convex polytope.
This is NP-hard to solve, but what are known approximation results?
A rel... |
I needed help with the following question which belongs to Arden's theorem as I am having a hard time solving it. Please find the question below
Prove:
$$(0+ 11^*0) + (0 +11^*0)(1 +01^*0)^* (1 +01^*0) = 1^*0(1 +01^*0)^*$$
|
I'm having trouble with a pretty basic function that tests whether or not a point is inside of the triangle by trying to find its barycentric points with 2 other points on the triangle. When i run my code my entire triangle fills up, but I'm also getting a fair amount of false positives. If I remove the boundbox condit... |
What is the meaning of lambda here:
$$(b+c)^*(a+\lambda)(b+c)^*(a+\lambda)(b+c)^*(a+\lambda)(b+c)^*$$.
I know that lambda is used in the context of NFA?
Let's suppose we break down the expression to:$$(b+c)^*(a+\lambda)(b+c)^*$$
and to:$$(b+c)^*(a+\lambda)(b+c)^*(a+\lambda)(b+c)^*$$
How the above would generate an em... |
I have made two DFA’s for $ L= \{a^n b^n a | n\ge0\}$.
First one has several states. The second one is accepting an empty string also.
Somebody please guide me the correct one.
Zulfi.
|
I have created the following solution but its left recursive:
S--> a|bSc|cSb|Sbc
Also it is not accepting:
"ab" or "cba" or "abb" or abc.
Somebody please guide me.
Zulfi.
|
during school exercises we worked on decidability problems and there was one I don't really understand. We were provided with solution and explanation regarding this exercise but still I need more guidance.
The problem is:
Proof that
$L = \{ <M> | M$ is Turing machine, $ |L(M) \cap \{a,b\}|= 1\} \notin REC$
Idea of pr... |
For language $O$, by $P^O$ I am referring to the set containing every language that can be decided by a polynomial-time deterministic TM with oracle access to $O$ (see Arora and Barak, Chapter 3, definition 3.5).
|
I have learnt to solve topological ordering using $in-degree$ method where we have to take the vertices having in-degree $0$ at an instance and arrange them in that order.
For example consider this question asked in Graduate Aptitude Test in
Engineering more commonly known as $GATE$ the entrance exam for $IIT$
$M.T... |
Given an array of integers within [1, n] where n = size of array, some elements may appear more than once.
Could we sort it with just 1 extra space and in O(n) time?
|
I'm attempting to formalize some thoughts I've had about paths into data structures. For example, a path into a list of Ts might be a pair of an index with a path into a T; a path into a pair (A, B) would be the tagged union of a path into A or a path into B. Think of a path as a way to specify some small (atomic?) pie... |
If I have program and I want to check whether other programs have the exact same semantics or not, could I always build a machine that could make that decision?
This is a question relevant to information security as metamorphic malware will perform transformations on its own code which will make it look different to st... |
I'm having a bit of trouble understanding how less than a page of memory can be used.
From what I understand, memory is given out in page size chunks - say pages are 4096 bytes, and 4 bytes are requested in a program via malloc, can less than a size of a page be allocated? Or is the rest of the memory in the page waste... |
I understand the concept of LR(1) parsing and lookahead symbols. I have the solution to the exercise and it does not agree with my solution.
I'm trying to fill the LR(1) parsing table for the grammar below:
S->xAz
S->BAx
A->Ay
A->e
B->yB
B->y
Ι don't have to extend the grammar since S does not appear in any right han... |
I am minimizing a scalar function $f$ which takes a $n$-dimensional vector input and outputs a scalar value. I have code that given an input $x$ will compute the output of $f(x)$ (a scalar), its Jacobian (a $n$-dim vector), and its Hessian (a $n \times n$ matrix). In my application, $n \approx 10$. Unfortunately, ev... |
In the Olympic format for sport climbing, eight athletes compete in three rounds of climbing. Their final score is the multiplication of their rankings in each round. For example, an athlete who comes 1st in the first round, 5th in the second round, and 7th in the third will have a final score of $1\times5\times7=35$. ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.