instruction stringlengths 35 29.1k |
|---|
I was reading the article about the SHA1 hashing function (I know it is not secure anymore) and I've found a pseudocode implementation on Wikipedia.
I can see that there are a lot of mathematical operations, and what I wanted to know is the justification of each step in this hashing function. I want to know, for exampl... |
I am given the following decision problem:
A program $ \Pi $ takes as input a pair of strings and outputs either $true$ or $false$.
It is guaranteed that $\Pi$ terminates on any input. Does there exist a pair ($I_1,I_2$) of strings such that $\Pi$ terminates on ($I_1,I_2$) with output value $true$?
It is clear that $\... |
I have a system of linear inequalities of the form $A^t x \leq b$, where each of the $x_i$'s is a binary variable in $\{0, 1\}$. Are there any known fast and practical algorithms that can find a feasible solution or prove that the system has no solutions?
I need this to generate an initial solution to the heterogenuou... |
Can a running interrupt handler be pre-empted by another interrupt handler?
If this is possible, in which scenarios is this safe, and in which scenarios is it not?
If this is not possible, why?
|
When an interrupt occurs, the processor preempts the current process and calls kernel code to handle the interrupt. How does the processor know where to enter the kernel?
I understand that there are interrupt handlers which can be installed for each interrupt line. But since the processor only executes 'hardwired logic... |
Suppose I want to build an operating system based on a very small native lower kernel that acts as a managed code interpreter/runtime and a larger upper kernel compiled to a non-native machine language (Java bytecode, CIL, etc.). Examples of similar operating systems would be Singularity and Cosmos.
What pitfalls and d... |
A microkernel implements all drivers as user-space programs, and implements core features like IPC in the kernel itself. A monolithic kernel, however, implements the drivers as a part of the kernel (e.g. runs in kernel mode).
I have read some claims that microkernels are slower than monolithic kernels, since they need... |
I've been thinking of writing a hobby operating system for some of the ARM processors. There are many popular single-board computers with ARM MPU, so I simply wanted to purchase one of those (choosing one with more open documentation). I was surprised when I found out, that even boards with really enough memory do not ... |
My question is regarding time-sharing and multi-tasking systems.
Time-sharing operating system assigns time slot to each task while multi-tasking OS runs various jobs in parallel.
But as I get it, on a single processor system, time-sharing is the only way to achieve multi-tasking. (I don't know if I am correct on this... |
I have read it at various places like this, that Hyper-threading leads to performance degradation.
I am unable to get why or how hyper-threading leads to degradation.
Why it is so that even when Hyper-threading allows the OS to utilize free resources does the degradation happens.
Though benchmarks does indicate hyper-t... |
There are POSIX signals (linux man), and various event-based operating systems (such as TinyOS, most seem to be targeted at embedded systems). But the mechanisms seem very similar.
Are the terms 'signal' and 'event' interchangeable? Or are signals a sub-set of events? Or are they two fundamentally different for some re... |
I think I know what a "hard" real-time operating system is. It is an operating system with a scheduler that provides a contract with the application programmer. An application provides a deadline with each resource allocation request. If the deadline requests are feasible, the scheduler guarantees that each resource... |
What are some of the best practices when implementing system call functionality for handling/avoiding "Time of check to time of use" (TOCTTOU) security issues?
|
I have read that OSes like Android and iOS are somehow optimised to improve battery life.
My understanding is that a CPU executes a certain number of operations in a certain time, so I would think that you can speed up applications by reducing number of operations required, but since the CPU will still do x operations ... |
Some hypervisors optimize memory usage using a method that is called ballooning (at least that's what KVM calls it), this method deduplicates memory between VMs and sets common pages to read-only with copy on write.
This is sort of the opposite of a fork call.
Is it feasible to implement on an OS level for processes (I... |
Quoting wikipedia, a system call is:
In computing, a system call is how a program requests a service from
an operating system's kernel. This may include hardware related
services (e.g. accessing the hard disk), creating and executing new
processes, and communicating with integral kernel services (like
scheduli... |
On Linux, the files /dev/random and /dev/urandom files are the blocking and non-blocking (respectively) sources of pseudo-random bytes.
They can be read as normal files:
$ hexdump /dev/random
0000000 28eb d9e7 44bb 1ac9 d06f b943 f904 8ffa
0000010 5652 1f08 ccb8 9ee2 d85c 7c6b ddb2 bcbe
0000020 f841 bd90 9e7c 5be2 eec... |
Many small embedded systems have a limited amount of RAM, 10k or less. I know you can run an RTOS on such systems, however, a realistic number of tasks in such a system is very low, mainly because every task needs its own stack area.
Is it possible to share the space needed for the stack of some of these tasks?
I under... |
We know that operating system is responsible for handling memory allocation, process management etc. CPU can perform only one task at a time(assuming it to be single core). Suppose an operating system has allocated a CPU cycle to some user initiated process and CPU is executing that. Now where is operating system runn... |
Few years back, I stumbled across Return Infinity - the OS framework designed around flat, 64bit memory model, with minimal MMU / VM overhead, etc.
I'm wondering if there are any public benchmarks or success stories of that approach - I'm eyeing it as something to practice doing low latency / high performance computing... |
Say we have a simple OS with a filesystem, and some programs on that filesystem. How then does a program get executed by the OS?
My understanding is that the executable file gets loaded into memory, but after that I'm a little fuzzy. I understand the OS creates a process, but I'm not sure exactly how it works. How does... |
In a single-processor architecture, A process might be New, Ready, Running, Blocked and Terminated.
Are there any additional states in a multi-processor architecture?
|
I am going to have Introduction to Artificial Intelligence in this semester & I know that our main resource would be "Artificial Intelligence A Modern Approach", since I want to learn deeply and Implement all the algorithms we are going to learn, I want to implement a simple intelligent mini-game for each material in t... |
Person(name, phone)
Mike 456-789
Mike 123-456
John 230-785
$\dots \dots$
How to get those people who have more than one phone numbers with relational algebra? This sounds simple, but I am frustrated with all materials that I've learned.
Is it correct syntax to use count() like $\pi_{name}(\sigma_{count(phone)... |
We are given numbers $n \leq 200$, $k \leq 10$ and an array of $3n$ positive integers not greater than $10^6$. Find the maximum possible sum of a subset of elements of this array, such that in every contiguous $n$ elements there are at most $k$ chosen.
As this is an old high-school level contest problem, I ask for some... |
I wish I could think of a better way to word my question. Maybe some one here could offer s suggestion for that, as well.
On to my question. Before I do, this is a class question that has been asked, answer, and considered to be over; however, I'm struggle accepting the answer. For this reason, I'm here hoping someone ... |
I am not clear on whether it's data and control hazards, or control hazards only. Also, the "solved" word confuses me - technically, instruction reordering is used to solve dependences and thus prevent hazards from happening in the first place. Once they do happen, though, it's stalls and forwarding. Would that make th... |
In class, we were discussing creating a Turing Machine $M$ based on the set of input strings it should accept, i.e. define a Turing Machine that accepts only the input $\{ w\ \#\ w\ |\ w \in \{0,1\}^*\}$. However, we proceeded to discuss when a language is recursively enumerable vs machines that are deciders etc, and t... |
Given $L$ is regular, the proof that $\mathrm{HALF}(L)$ is regular is pretty straightforward to me (e.g., #11 in this link): simply making a NFA and meeting in the middle with 2 original DFAs, the creation of such NFA proving it is regular.
However, what if you wanted to prove the 2nd half string is regular, not the 1s... |
I am not 100% sure about the definition of recursively enumarable languages. Yes I know how are they defined: There has to exist a Turing machine that accepts all wrods of the language and halts but it does not have to halt on different inputs.
But suppose I have a language consisting of uncountable size with words of ... |
Often we are asked to write regular expression for the set of words that contain a certain string pattern, like $aba$. But what about the opposite?
Is there any generic way to write a regular expression for the set of all words that do not contain a certain pattern?
|
Currently I am developing a piece of software that solves the vehicle routing problem.
The task is the following:
I have several vehicles along the town
I have lots of destination points along the town
Vehicles have delievering product on board, and the product is uniform (it doesn't matter if you receive it from vehi... |
I've learned that one can represent natural numbers with lambda calculus like this:
\begin{align*}
c_0 &= \lambda s. \lambda z. z\\
c_1 &= \lambda s. \lambda z. s~z\\
c_2 &= \lambda s. \lambda z. s~(s~z)\\
c_3 &= \lambda s. \lambda z. s~(s~(s~z))\\
\end{align*}
But could one also write
\begin{align*}
c'_0 &= \lambda z.... |
Can anyone explain, how lamport clocks implementations are used in modern distributed systems?
Can you name an open source package which implements this algorithm?
|
I'm looking for a complete proof of $\mathrm{PH=SO}$. The (admittedly few) textbooks and papers i've looked at all either state that it's a corollary from Fagin's Theorem, or leave it as an exercise to the reader. Even Stockmeyer's original paper on the hierarchy (this one, right?) proves the result in a "Remark." sect... |
I've been teaching computer science in a developing country and I've seen how the everyday challenges are very different from what I was used to. The students are different. The teachers are different. The system is different.
So now that I'm starting to get over the culture shock, I'd like to draw more attention to t... |
One nice aspect of Motwani and Raghavan's classic textbook, Randomized Algorithms, is that the notes for many chapters include open questions marked as "research problems." However, the textbook is ~20 years old at this point, and it's unclear what progress has been made on these problems in that time.
My question is w... |
Given
mult = \x -> \y -> x*y
I am trying to reduce
(mult (1+2)) (2+3)
with each of the strategies:
normal-order
applicative-order
call-by-name
call-by-value
My attempt:
For both applicative and by-value I get the same (because no intermediate lambda expression contains anything reducible, hence applicative does not... |
Two related things I have heard/know of are,
(1) That there exists a polynomial algorithm to find a cover of the vertices by $k$ vertex disjoint cycles. (Can someone give a reference for this?)
(2) That its NP-complete to decide if $k$ vertex disjoint paths can cover all the vertices of a graph.
Are there edge anal... |
I've been trying to solve the following problem:
Problem is the following:
Given a graph and a pair of nodes $s$, $t$ you have to find the path from $s$ to $t$ which minimises the sum of its two largest edges.
Here's what i've come up with:
I am executing the Prim algorithm with a slight modification. The cost of... |
I was wondering about its proof. The direct use of pumping lemma here is not a viability. So a certain teacher of mine proved this with the notion that $a^{n}b^{n}$ being a subset of this language $L=\{w\mid\#_{a}(w)=\#_{b}(w)\}$ and non-regular (simple proof using pumping lemma) implies that the language $L$ can there... |
I am currently preparing for an exam. In one of the old exams, you have to create a $\lambda$ expression $add$ that can add two church numerals. But the church numerals are not the usual ones, but defined like this:
\begin{align}
s_0 &= &\lambda x.\ x\\
s_1 &= &\langle c_{false}, s_0 \rangle\\
s_2 &= \langle c_{false},... |
There exist very rich literature on discrete optimization problems such as variants of knapsack problem, traveling salesman problem, orienteering problem, tourist trip design problem and etc. Recently, I have encountered a question during my research which I like to know what this problem is? Is it a variant of a famou... |
$$ T(n)=\sqrt{n}T(\sqrt{n})+n $$
$$T(1)=T(2)=1$$
the answer is given as $$ \Theta(n\log \log n) $$
I tried to draw recursion tree, it got all crazy
I tried using substitution method instead
$$\sqrt{n}=2^{m}$$
$$T(2^{m})=2^{m/2}T(2^{m})+2^{m}$$
$$S(m)=\frac{m}{2}S(m)+m$$
$$\frac{S(m)}{m}=\frac{1}{2}S(m)+1$$
am I right?... |
From "Misconception 1" from Søren S. Pedersen's blog, and as many have seen before, a major misconception in Big-O (and others) notation is to say a function is "equal" to Big-O of some other function:
$f(n) = O(g(n))$
where what we actually mean is this:
$f(n) \in O(g(n))$
What is the origin of this misconception? And... |
In general, a string $x$ is a subsequence of $w = w_1\dots w_n$ if there are integers $i_1<\dots< i_k$ such that $x = w_{i_1}\dots w_{i_k}$. The subsequence is proper if $k < n$ and $k > 0$.
With this definition given, a homework problem asks the following: Suppose $L$ and $L_1$ are languages, and define $L \diamond L... |
With respect to abstract datatypes (ADTs), are the terms "dictionary" and "associative array" perfect synonyms or are there slight differences between them?
|
In the book introduction to automata theory and languages, $L^*$ is defined as
$$L^* = \bigcup_{i=0}^\infty L^i $$
The book also says that $\emptyset^* = \{ \epsilon \}$. But since $\emptyset$ is the empty set
$$L^* = L^0 \cup L^1 \cup L^2 ... $$
$$= L^0 \cup \emptyset$$ -- since $ \emptyset\emptyset = \emptyset ... |
FCM algorithm or Fuzzy C-Means Algorithm is a clustering algorithm with a matrix with values between 0 to 1 to representing the membership function as membership function in K-means 0-1 approach.
When the distance function in FCM algorithm is the Euclidean distance, the objetive function to minimize is:
with constrain... |
The class $BPP$ contains all the languages decided by a probabilistic Turing machine in polynomial time with probability of success more that 2/3 for every input.
The class $\Sigma^p_2$ contains all the languages for which there is a polinomial time Turing machine $M$ and a plynomial function $q : \mathbb{N} \rightarro... |
Consider a nondeterministic Mealy machine, $M$, defined as follows:
$M = (Q, \Sigma, \Delta, \delta, \tau, q_0)$ where
$Q$ is a finite set of states
$\Sigma$ is an input alphabet
$\Delta$ is an output alphabet
$\delta : Q \times \Sigma_{\varepsilon} \to \mathcal{P}(Q)$ is the transition function
$\tau : Q \times \Sigm... |
I am investigating a small database in a paper:
Each line is a selling record. For instance, Line 2 expresses that Store 100 in Week 383 sold Product 653; for this selling, the move was 16 and the price was 2.19, thus the profit was 16*2.19*2=7.01 (the other columns are not very important).
The authors then show a UM... |
I am trying to learn from http://www.cs.uiuc.edu/class/su08/cs273/lectures/lect_06.pdf #2 and I understand everything except for the 2nd line of delta prime prime function,
I having breaking down the syntax to english, my attempt it
for the function delta'' for a given state q and a symbol t the r inside the original... |
I have the following problem:
Given a set of tasks and their duration, i need to arrange them taking in consideration some constraints; Here's an example:
Suppose we are scheduling talks in a conferece. Each talk has a duration, and we can use as many rooms as we need. For each room, we have two sessions: one in the mo... |
A couple of questions:
When choosing $C$ do I have to choose an integer? I see nothing in my definitions preventing fractions, but I haven't seen any in anything I've looked up, either
Given $f(x)=O(g(x))$, is there anything preventing me from choosing $f(x)=g(x)$ such as $f(x)=x^2$ and $g(x)=x^2$?
|
I have recently been working on an applied project where I have to solve optimization problems.
I have found that it is much easier to solve an integer linear program (ILP) as opposed to a mixed-integer linear programs (MILP), in the sense it is faster for me to find feasible solutions as well as to prove optimality.
... |
Say I have a very large, arbitrary number of variables, each of which I can assign to be type A, B, or C.
The types come with expenses: Type A's are the least expensive, and C's are the most expensive, but their expense varies from variable to variable.
For example {A, C, C} may actually be more expensive than {C, A, A... |
We are given a bipartite graph of $n \leq 200$ vertices in both the first and the second partite set. Let $U$ be some set of vertices in the first set, and $V$ those vertices from the second that are conected to some of the vertices from $U$. If for every choice of $U$ we have $|U| \leq |V|$ (Hall's condition) then the... |
It seems to me that when the outermost|toplevel function is itself an expression to be evaluated (i.e.: a higher-order function returning the function to be applied at top-level), then normal-order evaluation "gets stuck".
For example $(\lambda x . (\lambda y . (y^x)) 2) (5+1)$ is such that I have to evaluate $\lambda ... |
I asked two questions about NP-hard problems here Relationship between an NP-hard problems with the subsets of them? and here https://cs.stackexchange.com/questions/30018/does-this-manner-of-proof-for-being-np-hard-is-true but unfortunately maybe I could not describe my question clearly. Therefore here I will do it.
As... |
I've got a System, which is defined as follows:
A limited number of stations is given (n), which can offer different services (for now there are two services). A station can either offer one of the services or both (maybe it will be extended one day, then it should work with x different services and a station can offe... |
Find the approximate number of messages (n) that need to be tried
before finding two that had the same message digest (size k) with probability 0.8.
You need to find n as a function of k . What is n when k= 2^(160) ?
please guide me how to start to solve this question
|
One way of looking at regular expressions is as a constructive proof of the following fact: it's possible to construct the regular languages by starting with a small set of languages and combining them via a small, fixed set of closure properties. Specifically, if we start with the empty language, the language containi... |
I would like to find out how to prove this statement. Thank you.
Well I think that I proved one part of the statement, but my proof doesn't really look elegant.
My proof of $(L\cup M)^* \subset (L^*M^*)^*\!$.
We know that $\epsilon, L \in L^*$ and $\epsilon, M \in M^*\!$. Hence $L \subset L^*M^*$ and $M \subset L^*M^*... |
With the recurrence relation:
$$ T(n) = 2T\left(\frac{n}{2}\right) + \frac{n}{\log(n)}$$
The "sum for all levels" in the recurrence tree is:
$$ \sum_{i=0}^{\log n -1} \frac{n}{\log n - i} = \sum_{i=1}^{\log n} \frac{n}{i} = n \sum_{i=1}^{\log n} \frac{1}{i}$$
Inside the analysis of the recurrence, $\sum 1/i$ appe... |
Let us say for instance I am doing string processing that requires some analysis of two strings. I have no given information about what their lengths might end up being, so they come from two distinct families. Would it be acceptable to call the complexity of an algorithm $O(n * m)$ or $O(n + m)$ (depending on if we us... |
Pruned fast Fourier transforms compute only a specified subset of the result indices in faster time, although sometimes with a slower implementation constant (because FFT is generally so optimized). They can also exploit sparsity in the input vector to further accelerate computation.
On http://www.fftw.org/pruned.html... |
Wikipedia says that weakening is a structural rule where the hypotheses or conclusion of a sequent may be extended with additional members and that contraction is a rule where two equal (or unifiable) members on the same side of a sequent may be replaced by a single member (or common instance). However, I can't seem to... |
How are Signed integers different from unsigned integers once compiled?
I already know about twos compliment and the like but my question is how can you tell the difference when looking at 8 bit integers when in binary eg 10000001 if this is a signed integer it would be equal to -127 but if it is unsigned it would be e... |
I'd like to know the name and the algorithm for the following problem which I'm guessing is a classic, but is slightly different from graph connectivity.
Consider a undirected graph G=(V,E). What is the minimum number of vertices which removal (vertices and their adjacent edges) makes the resulting sub-graph empty of ... |
The ABD algorithm in paper: Sharing Memory Robustly in Message-Passing Systems can emulate single-writer multi-reader atomic registers in message-passing systems, in the presence of processor or link failures.
Looking into the details of this algorithm (in Figure 2, page 133), I found that it implicitly assumes the "c... |
I'm implementing the algorithm presented in "Improved Parameterized Upper Bounds for Vertex Cover" paper (PDF).
I'm a bit stumped by the General-Fold procedure.
What it should do is reduce the number of vertices (and) edges in the graph by finding specific structures (almost-crowns) and replacing them with a single ver... |
Does there exist a simple approximation to the minimum vertex cover problem that aims to find a smaller (or equal) set to the minimum?
Usual algorithms seems to aim to find an approximation such that the output is a cover, but may have more vertices than the minimum cover. Instead, I want a smaller set - I don't mind i... |
An array $\mathcal{A}$ of $n$ distinct integers $\{a_1,a_2,\ldots,a_n\}$ is given. I'm asked to design a randomized (esp. Las Vegas) algorithm to make a Binary Search Tree out of these elements, such that the height of the tree is $\lceil \log{_{2-\epsilon}n}\rceil$, where $\epsilon=\frac{2}{9}$.
If we had to make a pe... |
I'm having trouble showing how to solve this problem in particular the part where it asks "To Show that the following pseudo-code fragment finds the value of the polynomial..."
How do I exactly show that? I don't understand what that would entail and my professor isn't exactly that helpful he says to prove it for all ... |
Given a polynomially computable continuous function which is a composite of m strictly monotone functions, can we guarantee the existence of polynomially computable inverse?
The function I have in mind is a rational function and all the coefficients (in the numerator and denominator) are positive integers but are unkn... |
You have $n$ sticks of arbitrary lengths, not necessarily integral.
By cutting some sticks (one cut cuts one stick, but we can cut as often as we want), you want to get $k<n$ sticks such that:
All these $k$ sticks have the same length;
All $k$ sticks are at least as long as all other sticks.
Note that we obtain $n + ... |
I am really struggling with determining the decidability of languages and cant figure out whether this problem is decidable or not.
I have a language
$\qquad\displaystyle
L = \{ (R(M_1), R(M_2)) \mid L(M_1) \cap L(M_2) = \emptyset \}$,
where $R(M_1)$ and $R(M_2)$ are representations of Turing machines $M_1$, resp $... |
Consider a four stage pipeline, and each stage has delays D1, D2, D3 and D4, so the total delay because of the various stages should be N * (D1 + D2 + D3 + D4) where N is the number of instructions, but I see that this is not the case, I see here that the delay is calculated as N*max(D1,D2,D3,D4) , why is only the max ... |
Let
$$
PAL = \lbrace x \in \lbrace 0, 1, \# \rbrace^* | x = rev(x) \rbrace
$$
How do I show that a turing machine deciding $PAL$ must use space $\Omega(\log n)$?
I have a feeling that I need to use crossing sequences when crossing the middle of the input tape, but I'm not sure how to relate that to space.
|
I'm working with graphs of a very large size (> 60k vertices), and want to speed up B.C. measurements. It is defined here: http://en.wikipedia.org/wiki/Betweenness_centrality The algorithm that I am using to compute B.C. is Brandes' algorithm: http://www.inf.uni-konstanz.de/algo/publications/b-fabc-01.pdf
For undirecte... |
The Chomsky-Schutzenberger representation theorem states that a language $L$ is context-free iff there is a homomorphism $h$, a regular language $R$, and a paired alphabet $\Sigma = T \cup \overline{T}$ such that $L = h(D_\Sigma \cap R)$, where $D_\Sigma$ is the Dyck language over $\Sigma$. This is a necessary and suff... |
Somewhere on Internet I read : Whenever word size is greater than memory cell size, then there is a need for accessing multiple memory cell
Example:
for 16 bit processor:
MOV AX [2000]
To transfer memory content, we need to transfer 16 bit data , so we need to access 2 memory cells
M[2000 H]
&
M[2001 H]
But I didnt ge... |
I have a table that contains only bits. I would like to be able to do the following two queries:
SET any bit to 0 or 1;
GET the number of bits that are set to 1 from the beginning of the table up to a specifique index i.
Is there a data structure that is more efficient than a binary indexed tree, i.e. a Fenwick tree?... |
I have for example 10 planes with their equation: Ax + By + Cz = D and a list of 3D points.
Those plane can make regions, some of them closed, and others not, the task is to count the number of points in each region.
I just need some ideas about how to solve, or if there is an algorithm for that.
|
I'm familiar with the Steinhaus–Johnson–Trotter algorithm, which allows for the iterative yielding of permutations of a sequence by performing a single swap per iteration. It has the behavior, however, that it tends to swap elements further along the sequence early in the iteration. For 4 elements, my understanding i... |
I have a weighted digraph graph $G = (V,E)$ where the weights are positive and negative integers. The graph $G$ is not necessarily acyclic.
The question is: given 2 nodes $v_1$ and $v_2$, is there a path from $v_1$ to $v_2$ with a weight $w$.
I would like to know if there are any known complexity results for this prob... |
For the following two instruction
[Note: MOV Destination, Source ]
i1 : MOV R1, R2
i2 : ADD R2, R3
Since i1 is reading from R2 and i2 is writing to R2 there is a WAR data dependency and by register renaming like below we can remove this hazard
i1 : MOV R1, R2
i2 : ADD R4, R3
What are the other possible situations wh... |
The problem of deciding whether an input is a palindrome or not has been proved to require $\Omega(\log n)$ space on a Turing machine. However, even storing the input takes space $n$ so doesn't that mean that all Turing machines require space $\Omega(n)$?
Of course, there's no contradiction here, since any function tha... |
Here is the regular expression I made for it
This is my first answer, used the naive method aka don't know what am doin' method.
$$
\epsilon \cup a^* \cup (a^*b) \left((a| b^*a) | \left( (a|(b^*a))ba^*\right) \right) ^*
$$
this is my re-worked answer, with the state removal method.
$$
\left( a^* \cup (b)(a \cup bb^*a)... |
I'm trying to understand CTL formulae, and until now I've understood everything (or at least I thought I did). I have the following Kripke strucure:
Now given the following CTL formulae A(g U EG (b v y)) , which states does it satisfy?
I know that the answer is {s1,s2,s3} (according to lecture notes), but I don't unde... |
I started with POS: (a+b+c)(a+b'+c)(a'+b+c)(a'+b+c')
and after a long while, I got: ab+ac'+a'b'+a'c+b'c'+bc
and then I'm not sure how to simplify this. I thought maybe I can cancel the ab with a'b', and b'c' with bc and end with ac'+a'c but it doesn't seem to be right if I look at the truth table...
|
I'm trying to compare two functions, such as f(n)=n^n and g(n)=n^10^10. I'm unsure if f(n) is O(g(n)) or vise-vera where g(n) is O(f(n)). From my understanding, n^n can be worse than n! and although g(n) is being raised to a large constant, it can be bounded by f(n) if multiplied by a certain constant. I am new to this... |
Suppose we have a polynomial time algorithm for computing a function (we think of as existing on rational numbers between $0$ and $1$ of limited binary length n). We know that this function is made up of $m$ strictly monotone functions or equivalently that it has up to $m-1$ maxima/minima. Can we find these maxima in t... |
I was wondering if finding if a graph has k or more isolated nodes is a NP-Complete problem. I found the following problem:
Prove that the following problem is NP-Complete. Given a set of T
transactions: $T = \{t_1,t_2,\dots,t_m\}$ where each transaction $t_i$ is a
pair of banks $(b_{i1},b_{i2})$. Find if, given ... |
I understand that for something like Linear search, this would be the key comparison:
if(itemToFind == a[i])
return i;
If I put this method into another method, say a Sorting method, do I still count the linear key comparison plus the sorting key comparison? Or do I only care about the sorting key comparison?
Exa... |
$f_1$, $f_2$, $g_1$, and $g_2$ are functions such that:
$$f_1 = \Theta(f_2)$$
$$g_1 = \Theta(g_2)$$
I was able to prove that:
$$\frac{f_1}{g_1} = \Theta\biggl(\frac{f_2}{g_2}\biggr)$$
But I can't understand why the following statment is not necessarily true:
$$f_1 - g_1 = \Theta(f_2 - g_2)$$
|
I was fooling around the other day on this website: http://regexcrossword.com/ and it got me wondering what the best way to solve it was.
Can you solve the following problem in polynomial time or is it NP-hard?
Given an NxM grid with N regular expressions for the columns and M for the rows, find any solution to the gr... |
Let's say we have the following grammar
expr1 ::= ... // Actual definition doesn't matter
expr2 ::= ... //
expr3 ;:= ... //
foo ::= expr1 | expr2 | expr3
When it comes to parsing foo we note that foo could be parsed in parallel.
p1 = task parse( expr1 )
p2 = task parse( expr2 )
p3 = task parse( expr3 )
Question
W... |
I don't quite understand the concept of spatial locality in cacheing. I understand that on a cache miss, not only the specific address we want is loaded into the cache, but also "nearby addresses" are loaded too.
However, I can't understand WHICH addresses are loaded. I have an assignment with the following question:
T... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.