instruction stringlengths 35 29.1k |
|---|
Does anyone have any ideas on a seating chart optimization formula for a call center environment? There are "docks" in which the workers sit. Each dock has approximately 15 seats, some more some less. The workers are on teams and work the same schedule and sit in their dock together. The problem is there are more teams... |
I'll try to formulate my problem through an example.
Lets suppose we have a collection of items of type a,b,c,d,e,f.
a1, a5, a7
b2, b3
c5, c6, c7, c8
d4, d5
e1, e2, e3
f3, f7, f8
If we take one element from each type there are 3*2*4*2*3*3 abcdef lines (combinations).
We have another random line
a1b5c7d1e5f7.
I want to... |
In linear programming, if we model the solution as a polytope, every vertex is a solution.
I'm trying to prove the following statement:
If $x$ and $y$ are two solutions with $n-1$ joint constraints, there exists a solution vector $c$ such that, for each $v\in P$ (the polytope of the problem) that is different from $x$... |
What is the minimum number of comparisons required to determine if an integer appears more than $n/2$ times in a sorted array of $n$ integers?
I am trying binary search on the array A.
Algorithm(A):
x = A[mid], where mid is the middle element of the array.
Compare x with A[n/4] and A[3n/4].
If x = A[n/4] and x ≠ A[... |
Given a 2D lattice with coordinates $1 \leq x \leq c$ and $1 \leq y \leq d$, we define $f(x, y) = xy$.
We wish to find a boolean function $I(x,y)$ that determines in $O(1)$ time whether or not $(x,y)$ belongs to the set of points $S$ of size $k$ such that the sum $Z(S) = \sum_{(x,y) \in S} f(x,y)$ is smaller or equal ... |
We have two circular sequences, which means there is no start or end in the sequences, how to test if two sequence are equal or not in linear time? I have two circular sequences of E. Coli bacteria with length (4,639,221). I thought about attaching two sample of the first sequence and find the other one in it in linear... |
I am trying to understand how a simple image recognition of an image with dynamic size could work. What I have seen is that parts of the images are taken and evaluated. For example a simple finger recognition could be done turning the image grayscale, taking parts of the image and evaluating them. What I understand is ... |
Given DTIME($n^2$) contains NTIME($n^{100}$) show that P=NP.
I think it's supposed to be straightforward but I just can't see it.
Take $L$, a language in NP. $L$ has a Turing machine which runs in NTIME$(f(n))$. If $f(n)$ is $\Omega(n^{100})$ it's obvious, but what about $O(n^{100})$?
|
I am trying to find the name of this feature that is implemented with SQL Databases:
Given a Record $R^1$ in table having two values for two different fields, e.g.
Let value of field 1 $F_1$ be $V_1$, Let value of field 2 $F_2$ be $V_2$
A any query requiring records s.t. $F_1 = V_1$ should contain $R^1$.
Also any quer... |
Can True Randomness be achieved by composing prngs in different states and with different algorithmsv(e.g. have $n$ different composition algorithms, use a prng to select any permutation of them. A lot $(\sum_{i=1}^{n}{^nP_i})$ of permutations exist. Compose the algorithms selected using the permutation. Whenever a new... |
In generating reports, sometimes there is a need to produce quite involved phrases in one of natural languages given numerical or boolean parameters.
To get a feel of it, it is enough to take a look at convert integers into words or time ago algorithms.
These solutions use (procedural/OO/functional) programming and Tur... |
As you know in computation theory, there is a simple programming language equivalent in power to Turing machines. It is described as follows:
Values: natural numbers only, but of unlimited precision.
• Variables:
– Input variables X1, X2, X3, . . .
– An output variable Y
-Local variables Z1, Z2, Z3, . . .
• Instruct... |
Reading Crystal Programming Language They says it is inspired from many programming language and Go.
I would like too know which part of Golang, since it is not its syntax.
|
Given an unknown $x$ and an oracle $O(r)$ such that:
If $O(r)$ is true then $x \geq r$.
If $O(r)$ is false then $x < 2r$.
Conversely, the oracle has a defined behaviour only outside the interval $(x/2, x]$, and may output anything between.
We want to find a factor 2 approximation of $x$.
What is the strategy with a m... |
I wanted to Solve the following Recurrence Equation using Master Theorem and Back substitution but Im stuck at certain point . can u pls help me how to proceed further
$T(n)=T(\sqrt{n})+n+c$
Using Master Theorem,
put n = $2^{m}$
$ T(n)=T(2^{m})= S(m)$ ie $T(\sqrt{n}) = S(\frac{m}{2})$
Hence the Recurrence Relation will... |
int IsPrime(n)
{
int i, n;
for (i=2; i<=sqrt(n);i++)
if(n%i == 0)
{printf("Not Prime \n"); return 0;}
return 1;
}
Here the loop executes for $ \Theta (\sqrt{n}) $ time . But my teacher said that it is not because the lower bound is $ \omega (1) $ I was not able to understand why it so ... |
I'm preparing for CS201 exam and I stumbled upon an interesting problem.
Input:
A sequence of random positive and negative integers (up to 1.0000).
Output:
A contiguous (to be clear: subsequence of consecutive elements) subsequence of the original sequence, such that after its reversal in the original sequence the bal... |
This variant is almost similar to the normal nim game which states -
Two players take turns to remove one or more items from a single, non-empty pile. The player who removes the last item from the last non-empty pile is declared as a winner.
The twist is an inclusion of a "pass" move for each non-empty pile. To make... |
Large scale optimization (for example using AMPL) can be used to solve equilibrium systems which have components with fixed mathematical relationships. What is the difference between this and using an equation-based simulation system (like Modelica) to solve an equation-based system?
Of course, most simulations have a ... |
I am doing a project on task assignment with geographic constraints which naturally leads to the following question.
Let $\mathbb{N}$ denote the set of integers. Given a finite subset $A \subset \mathbb{N}$ and a function $T: A \rightarrow \mathbb{N}$, let $R(T)$ denote the range of $T$ and define $${\rm cost}_r(T)= \... |
I was reading this paper by Shamos, M.I, on "Geometric Intersection Problems" (http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.366.9983&rep=rep1&type=pdf) , and was trying to understand it's Theorem 6, which says " Whether any two of N convex k-gons intersect can be determined in O(N(k+log N log k)) time."
... |
I'm not exactly sure whether this question belongs to this SE or not, but it doesn't seem to fit elsewhere.
Say a process behaves in a deterministic fashion (that is, it gives the same output when an input is entered over and over again), then can we build it as an algorithm?; if not, can you think of a counter-example... |
Every time I ask why most people think that P ≠ NP, I get a response like "because theorem proving is harder than proof checking".
From this, I understand that proving theorems is hard. But why is this? In fact, it is known that a theorem, in mathematics, is a statement that has been proved on the basis of previously ... |
Given the following pseudocode for function AP(x, y: integer) which returns an integer,
function AP(x,y: integer):
if x = 0 then return y+1
else
if y = 0 then return AP(x-1,1)
else return AP(x-1, AP(x,y-1))
I need to prove, $\forall x (AP(x, y) > y)$.
I have tried solving it using mathemati... |
We have the following function which determines the Nth fibonacci number:
int fib(int n){
if(n<=0) return 0;
else if (n==1) return 1;
return fib(n-1)+ fib(n-2)
}
Find the time complexity
I am currently reading the book "Cracking the coding interview" and the answer it gave is quite disappointing. The b... |
Here is the "naive" implementation of Dijkstra's algorithm that the professor uses:
For a directed graph $G = (V,E)$ as input
Initialize:
$X = \{s\}$ (the vertices processed so far)
$A[s] = 0$ (computed shortest path distance)
$B[s] = empty path$ (computed shortest path)
Main Loop:
While $X \neq V$:
Among a... |
I am wondering if there is a log time WBT (weight balanced binary search tree) data structure in which for any node, the sizes of its left and right subtrees diff at most by 1.
PS: I have read through Balancing weight-balanced trees but the weights of subtrees can differ up to a factor of $\Delta$.
|
I came across a bridge crossing problem. It got me wondering: Can it be reduced to some sort of scheduling problem. If not, is there any other general problem it can be reduced to?
Here is the problem:
John, Paul, George and Ringo are standing at one end of a bridge crossing. All four must get to the other side. Each ... |
The naive prime test goes something like this:
is_prime(n):
for(i=2; i<=sqrt(n); ++i):
if n mod i == 0 :
return false
return true
If $n$ is prime the loop runs for $\sqrt(n)$ iterations. I was wondering what the "average" runtime is. It is of course troublesome to define this properly, because there is... |
Could anyone tell me If I can prove regularity of given language using pumping lemma like I did below? If my prove is wrong could anyone tell me how to prove that the language is not regular using pumping lemma?
$$
L = \left\{ a^{n}b^{i}c^{n}\in L \mid (m,n,i >=0)\ and\ ((m +n)\%3 = 0 ) \ and\ ( m + n >= i ) \right\}
$... |
I have two datasets $A$ and $B$:
$A = \{1, 5, -34, 34.34323, -23.5444, 9.43, ....\}$
$B = \{-0.5, 44, -0.243, -3455, 2.22221, -23.23, ....\}$
Those datasets contain a big amount of "random" numbers (They are actually not random, but their source does not matter for this question). Both datasets always have the same siz... |
There is an integer array that contain $n$ numbers, in the array there are $k$ distinct elements up to $k = 50$.
Is it possible to sort this array in linear time, by using only comparisons?
I know that comparison sorts cannot perform better than $\mathcal O(n\log n)$, so maybe I have to show a sort function that sort t... |
My favourite algorithm textbook: The Algorithm Design Manual S. Skiena.pdf
had this interesting problem:
1-28. [5] Write a function to perform integer division without using either the / or * operators. Find a fast way to do it.
What's the lower bound for asymptotic complexity of this problem? `
P.S: I know repeate... |
I have been trying to find a solution both theoretical and practical to my problem but I just can't. The question is you have x players that should play some rounds y of games in groups of 4. Now if a player was in a game with somebody else, he is not allowed to be ever again with that player in the same group. Now the... |
Short version: common MT (and MT64) implementations have a tempering parameter 'd' (a bit mask). The papers I've looked at describing MT don't include it. Where is it from? When was it added?
Long version! :)
I'm looking at using a family of MT's with different parameters (for reasons). Nishimura published this paper d... |
In order to tackle this problem I first observed that
$$\phi(p_1^{e_1} \space p_2^{e_2} \cdots \space p_k^{e_k}) = (e_1 + 1)(e_2 + 1)\cdots(e_k +1)$$
Where $\phi(m)$ is the number of (not necessarily prime) divisors of $m$. If $m$ is the smallest integer such that $\phi(m) = n$, then
$$\phi(m) = n$$
$$(e_1 + 1)(e_2 + 1... |
I need to prove that
$\forall a>0.BPP[{a,a+\frac{1}{n}}]=BPP$
$BPP[a,b]$ definition:
A language L is in BPP(a,b) if and only if there exists a
probabilistic Turing machine M, such that
M runs for polynomial time on all inputs For all x in L, M
outputs 1 with probability greater than or equal to b For all x
not i... |
For a given regular is expression, once we construct a deterministic finite automaton: is that automaton unique for that expression? In a sense, that no other DFA (different number of vertices or transitions) can be constructed from that same regular expression.
|
Consider the following problem:
Is $L_1 * L_2$ is of $LType$?
where we know that both $L_1$ and $L_2$ are of type $LType$ and $LType$ is closed under $*$ operation.
Above, by $LType$, I mean any type of language that is known to belong to any type of Chomsky hierarchy. So it may be regular (Chomsky Type 3), CFL or ... |
The dwarves of the Black Forest live in houses that are each painted either red or blue. Some dwarves are friends, and some aren’t. Every so often, a dwarf will think about repainting his house. To decide whether to repaint, he looks at the colors of his friends’ houses. If his house is red, but more of his friends liv... |
Let $(A,\leq)$ be some finite poset. For $a,a' \in A$ we can determine in constant time whether or not $a \leq a'$. The height of an $A$ is by definition the greatest $n$ such that there are elements
$$
a_0 < a_1 < \cdots < a_n
$$
of $A$. By treating $(A,\leq)$ as a directed acyclic graph, we can determine the height o... |
What's the name for a DAG (directed acyclic graph) that has a unique root or source node from which every other node can be reached?
Alternatively, if you change the direction of the arrows, what's the name for a DAG that has some unique sink node that is reachable from every other node?
Here's an example graph:
|
Given a problem
List all steps to move n disks from rode 1 to rode 2.
I guess you are familiar with Towers of Hanoi rules.
I couldn't find a proper answer for the complexity class of this problem. My first guess would be NP or even NP-hard yet the output is exponential and no matter how hard we try there's no chance... |
I recently learned about Q-learning, a reinforcement learning technique that directly estimates the expected value of taking an action in a state.
I'm wondering if there exists techniques to do "dynamics learning", in order to estimate the dynamics of a system. A "dynamics learning" agent might choose actions which he... |
I tried to format my 32 GB SanDisk pendrive. But it showed me that " the disk is write protected" . I tried using CMD but it failed. I can't format it even using safe mode. Please help me to recover from this issue
|
Suppose I wanted to find a proof of the pigeonhole principle or show that no proof shorter than $L$ exists. I understand that proof-checking is in NP, so I could write a CNF formula that is satisfiable iff. such a proof exists. What I want to know is, how exactly would one do that? I understand I would assume a set of... |
To keep througput close to 1/cycle when there is a multi-cycle stage that sends a command to a far module then gets answer(10 clocks per send or receive), could separating it in two(send + receive) and putting idle stages(18x1 clocks) between them solve the problem?
For example, with just a single stage that takes 20 ... |
Im not sure if this the right place to ask but I'm wondering why a computer takes forever to open huge text file like 1GB but if I open a video file (mkv) for example with 10GB like a movie it will be opened very fast.
Why the computer doing this ? What is the difference between the two operations?
|
When solving an adversarial problem there are two basic approaches: one that takes into account the thinking process of both sides, and as opposed to that the non-psychological computations.
For example, in poker a computer can be programmed to simply compute the "best" moves for both sides, or alternatively could try ... |
I have it as a homework question to compare dual programs in the following way:
Take a canonical program and write its dual
Take the same canonical program, write it as a standard program, take the dual of the latter, then write it as a canonical program.
In the following image, option 1 is starting with the upper le... |
Lets define a counting PDA as equivalent to a PDA except that the transition relation can use the stack size.
Formally, let's define the transition relation as
$\Delta:Q\times (\Sigma \cup \{ \epsilon \}) \times (\Gamma\cup\{\epsilon\})\times \mathbb{N} \to P(Q\times (\Gamma\cup \{ \epsilon \}) )$
Meaning that $(q,\bet... |
I am currently solving a problem that I have reduced to computing the following function efficiently.
$$T_k(n) = T_k\left(\left \lfloor \frac{n}{2} \right \rfloor\right) + T_k\left(\left \lceil \frac{n}{2} \right \rceil\right)$$
The base cases are $\forall n < k: T_k(n) = 0$ and $\forall k \leq n < 2k: T_k(n) = 1$ No... |
Let's say my dictionary is {a,b}
I want to ccind a regular expression for the languge of the words that does not contain bbb in the most minimal way.
All I can think about is '+'ing between prefixes but I think that there is a way to get a shorter answer.
|
According to Wikipedia, both bad character table and good suffix table can be created in $O(n)$ time, where $n$ is the length of the pattern. It is pretty obvious how bad character table can be computed in linear time, but I don't understand how good suffix table can be computed in linear time. I thought about it a lot... |
Which of the following features will characterize an OS as multiprogrammed OS?
More than one program may be loaded into main memory at the same
time.
If a program waits for certain event another program is
immediately scheduled.
If the execution of a program terminates,
another program is immediately sch... |
Indirect addressing allows you to reference memory locations, larger than the operand limit of a CPU.
i.e
1 | ADD 2 3
2 | #2
3 | *32000
...
32000 | #5
This will add memory location 2 and 3, 3 points to location 32000, so when it's evaluated, the effect is:
1 | ADD 2 32000
Even though 32000 may exceed the operand size... |
I've been seeing all over stack Overflow, e.g here, here, here, here, here and some others I don't care to mention, that "any program that uses recursion can be converted to a program using only iteration".
There was even a highly upvoted thread with a highly upvoted answer that said yes it's possible.
Now I'm not sayi... |
Kinda stupid question, but makes me a bit confused. If my OS (Win 7) is 64-bit type system and my CPU is 64-bit, why Program Files directory is marked (x86), x86 stands for 32-bit OS?
|
I am a little bit confused about how to calculate the memory capacity.
word=data lines size
byte=8 bit
n=adresse lines size
Most of the people use this formula to calculate the capacity of the
memory: C=(2^n*word)/8 octet
Is this formula correct when speaking about byte-addressable? Because if we have byte-address... |
$L = \left \{ ab^{n}a^{n}|n>0 \right \} \bigcup \left \{ aab^ka^{2k} | k>0 \right \}$
What can be said about the given language L ?
According to me, I think it is CFL and not DCFL as I tried to somehow parse it through a NPDA but not sure though.
|
If I had a single core with other cores that have access to a BUS the problem of transactional memory makes sense with the setting of the T bit and letting cores be able to see the caches of the other cores so they know if they're working on shared memory and they can therefore resolve the conflict.
The problem I'm hav... |
In exactly a month I will face a Java exam. My problem is that even if I know all Java theory (the exam won't face GUI), I have problems creating programs: sometimes I can't understand how to make a fast program or how to implement what I want my program to do. So how can I improve my Java habilities? What kind of exer... |
Given a bipartite graph $G = (X, Y, E)$ with $|X| = |Y|$, vertices from $X$ are to be deleted sequentially. As $d_x \le |X|$ vertices are deleted from $X$, let the total number of degree zero vertices of $Y$ be $d_y$. The goal is to seek a most "balanced" deletion, i.e., minimizing the maximum of $(d_x - d_y)$ for $d_x... |
I am referring to section 8.1 of this paper, https://www.cs.cmu.edu/~odonnell/papers/maxcut.pdf. Can someone kindly give me a concrete definition of what it means to "construct a PCP" and if that is the same as a "PCP verifier". Are they the same things?
Its not clear to me as to what it means to say that "Let the bit... |
I have the following context-free grammar from which I have to remove epsilon transitions:
$S \to 0A0|0$
$A \to BC|2| CCC$
$B \to 1C | 3D | \epsilon$
$C \to AA3 | \epsilon$
$D \to AAB | 2$
By algorithm, I create $N_{0}$ that will hold all non-terminals that contain $\epsilon$ and in next steps add non-terminals that h... |
Imagine i get an input 123 my goal is to return 112233.How can i get that?I can't use strings because i have to multiply that same later
|
I want to prove that:
$\{\langle M, n, w\rangle \mid \text{$M$ has $n$ states, $w ∈ \Sigma^*$ and $M ∈ B(n,w)$}\}$ is undecidable.
Here $w$ is a string and $B(n,w)$ is the set of all $n$-state machines that halt on input $w$ after exactly the maximum number of steps. I don't know how to prove this. I tried finding anot... |
Let $G(V, E)$ be a complete undirected graph and $p = v_1, \dots, v_\ell$ a path of unique arbitrary $\ell$ vertices of $V$. Each vertex of $V$ is a point in a two-dimensional discrete space (e.g., $v_i = (x, y)$ with $x, y \in \mathbb{N}$).
Is it possible to find a path $p'$ that contains the same points of $p$ in a d... |
Silverstein et al., Analysis of a Very Large AltaVista Query Log, SRC Technical Note '98 looked at 43 days of queries in 1998 and pulled out how many terms there are per query, what the top 25 queries were, and how correlated query terms were.
There are various papers on an Excite dataset from the 90s, which include si... |
Let UID denote a unique identifier. UID's are represented as 6-digit positive integers.
I want to insert a collection of UID's in a hash table with $M$ buckets, where $M$ is a prime number (for example, 524309).
If I am not mistaken, since $M$ is prime, dividing an UID with $M$ generates a unique remainder, as there i... |
gcc is a collection of compilers, based on the file extension it compiles a source file. But compilers are only supposed to convert a preprocessed code into assembly code. And after that assembling and linking is done and an executable is generated.
But several definitions says that compilers are the ones who convert s... |
I'm studying some of computation theory and i encounter a big question mark. I have an optimization problem and i have to proof that is NP-HARD. I know that my problem can be reduced to another np-complete problem so my problem is np-hard. But my question is: why some algorithms are np-hard for the combinatorial versio... |
I'm working on an exercise from The Nature of Computation concerning polynomial-width circuits computing parity. In particular the exercise asks to sketch a proof that the depth of such a circuit has the lower bound $\Omega(\log\log n)$ where $n$ is the number of input variables.
There is quite a large amount of litera... |
An array of $n$ distinct elements is said to be un-sorted if for every index $i$ such that $2≤i≤n−1$, either $A[i] > max \{A [i-1], A[i+1]\}$, or$A[i] < min \{A[i-1], A[i+1]\}$. What is the time-complexity of the fastest algorithm that takes as input a sorted array $A$ with $n$ distinct elements, and un-sorts $A$?
A.$... |
This isn't a question about what NP-completeness or hardness is, but about what, in general and informally, make a problem NP-complete? That is to say, what features of a problem might make me suspect a problem is NP-complete/hard?
To elaborate, for instance, lets say I’m seeing the graph coloring problem for the first... |
Skiena writes:
In one of my research papers [Ski88], I discovered a comparison-based sorting
algorithm that runs in $O(n\log\sqrt{n})$. Given the existence of an $\Omega(n \log n)$ lower bound for sorting, how can this be possible?
I believe the research paper he is referring to is Encroaching lists as a measure of... |
I seek to sort a sequence S of n integers with many duplications, such that
the number of distinct integers in S is $O(\log n)$. Give an $O(n \log \log n)$ worst-case time algorithm to sort such sequences.
I tried quick-sort, Merge-sort, selection-sort but not getting the required running time. So the question is to d... |
I came across $2$ translation schemes of Syntax Directed Translation (SDT) in compilers which are as follows :
Using a top-down translation scheme, we can implement any
$L$-attributed definition based on a $LL(1)$ grammar.
Using a bottom-up translation scheme, we can also implement any
$L$-attributed definition based ... |
Suppose you got a directed acyclic graph of positvely and negatively weighed nodes $T\hspace{-0.02 in}$.
Now I have to find the the subset $M\subseteq T$ such that the sum of
the weights of the nodes in $M$ is maximised, but if $v \in M$ then all
children of $v$ as well as their children, and so on have to b... |
You have $n$ congruent sticks (they have the same length). You want to divide them equaly among $m$ friends. To avoid envy, each friend should receive congruent parts, that is, the set of cutted sticks of one friend is exactly the same of any other friend.
Questions: Which is the minimal number of cuts in terms of $n$ ... |
You want to print vectors with n elements, where:
the first element can have the values: e1.1, e1.2, e1.2;
the second element can assume the values: e2.1, e2.2, e2.3;
...;
...;
the nth element can assume the values: en.1, en.2, en.3.
I should print all possible vectors; eg:
{e1.1, e2.1, en.1 ...};
{e1.2, e2.1, en.1 .... |
i have a context free grammar
i want to create a tokens from the language
is there any techniques to do that ?
for example , this CFG from Prof.Alex Aiken notes :
D -> D ; P | D
D -> def id(ARGS) = E ;
ARGS -> id, ARGS | id
E -> int | id | if E1 = E2 then E3 else E4 | E1 + E2 | E1 - E2 | id(E1,...,En)
how c... |
I am currently preparing for exam. While studying Finite Automata, i got confused. I know a DFA can have multiple accepting states, but can an NFA also have multiple accepting states?
|
I'm developing a IMHO very interesting algorithm for integer division. This algorithm uses boolean shifting(It shifts left for multiplication by 2). I'm wondering if << c is $O(c)$ or $O(n)$. I'm hearing it depends on architecture. Algorithms ideally should be architecture independent. So for the purposes of analysing ... |
I am unsure I expressed myself correctly.
Anyway, I want to figure out what is the initial state of an automata who had its epsilon transitions removed and who was determinised.
In my text book it is stated, that suppose A is NFA with $\epsilon$-moves, suppose $q_0$ its initial state. Then the initial state of the equ... |
Say I have a bunch of regex expressions which are used as filtering rules. (Any special extraction capabilities are unnecessary here, the set of regular expressions I have is only used for filtering down sentences).
Can any pure regex be converted into BNF? (ABNF, EBNF, etc.)
Are there well known algorithms (or existin... |
I was asked by a friend to help installing windows 10 in an acer E3-111-290X that was previously running windows 7, but after installing windows 10 the touchpad stopped working.I've tried several solutions such as synaptics drivers but didn't work.
Anyone with an answer or knowing a better place to get the solution for... |
The paper Feral Concurrency Control:
An Empirical Investigation of Modern Application Integrity uses the term "feral" in a way I have never seen before.
Rails has developed a range of concurrency control strategies,
two of which operate external to the database, at the application
level, which we term feral concur... |
Definition of convex layers can be found at wikipedia.
I was trying to understand this algorithm , which works in O(n log n) time, which is optimal.
In the paper, the author has described two types of deletions, among which
one is direct deletion.
In direct deletions, the author deletes the a point of the previous ... |
I have a box of stickers. It contains $n$ stickers. Each sticker is labelled with a different number from $\mathbb{Z}$.
I have infinite supply of boxes.
Box labelling game: I pick a random sticker and stick it on the box that has largest label smaller than current sticker. If all the currently labelled boxes have lab... |
I wrote an algorithm for integer division. I'm wondering how fast it is asymptotically. I used RAM model myself to asymptotically analyse it, but I found out that:
Elementary CPU instructions like shifting and adding, are not constant as the integers grow arbitrarily large.
So it seems my analysis is wrong. I'd l... |
Are there features in programming languages that allow you to directly access the $k^{th}$ bit of a number. Treating it like an integer.
I'm not talking of using bit shifting to retrieve a number. But directly access the bit at index $i$ of a number as if it were an array.
I'm looking at this feature to replace shiftin... |
I'm creating a timetable generator using GA's, and I'm stuck in the crossover part.
Each generation, I just basically copy the best individuals (the 50% fittest individuals inside the population), and perform my crossover operator between them.
I'm using a 2 point crossover. I represent all my TT courses as a List. E... |
In Alloy Tutorial they denote some reflexive transitive closure with Kleene star saying that they admit zero or more elements at that position.
// File system is connected
fact {
FSObject in Root.*contents
}
In Alloy, in can be read as "subset of" (among other things). The operator "*" denotes reflexive tr... |
How do we classify formal systems' (propositional logic, first-order logic, second-order logic, higher-order logic, Hoare logic and type theory) expressivity?
In the same way that grammars (CSG, CFG, ...), languages (CSL, tree-adjoining language, ...) and abstract machines (Turing machine, ...) 'fit' into the Type 0-... |
We know that for some online problems, algorithms can decrease their competitive ratio greatly if they are allowed to change some of their past decisions (see http://epubs.siam.org/doi/pdf/10.1137/1.9781611973402.35).
I wonder if there are instances of online problems such that the competitive ratio does not decrease e... |
I'm reading this well-known paper On Universes in Type Theory.
At first I expected something similar to Setω in Agda, but it turns out that it's even something more general.
It seems to generalize the universe construction from a plain inductive-recursive type to a binder (similar to $\Pi$ and $\Sigma$).
The main quest... |
Can you explain how this expression follows the grammar of the lambda calculus?
$$\lambda x.x((\lambda y.yy)x)x = λx.x(xx)x$$
I am not sure why we have the parentheses following the $.x$ (on both sides of the equation).
|
I am trying to construct an equivalent Deterministic Rabin Automata (DRA) given a Linear Temporal Logic (LTL) Formula. One (expensive) way to do this would be to construct an equivalent Non-deterministic Buchi Automata and then determinize it using Safra's construction.
I am interested to know whether there exist effi... |
I'm revising for an upcoming exam and was wondering if someone could help me with a practice problem:
We model a set of cities and highways as an undirected weighted graph $G = (V,E,l)$, where the vertices $V$ represent cities, edges $E$ represent highways connecting cities, and for every undirected edge $e = \{v, w\}... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.