instruction stringlengths 0 29.8k ⌀ |
|---|
Find the minimal number of runs to visit every edge of a directed graph |
Undecidable problems about context free grammars, and hence, pushdown acceptors as well, which are restricted TMs [from Wikipedia](http://en.wikipedia.org/wiki/Context-free_grammar#Undecidable_problems)...
1. Given a CFG, does it generate the language of all strings over the alphabet of terminal symbols used in its ... |
When the OS runs a process such as "init", it would have sent signals to other sub-systems/device managers etc, like the memory, I/O devices, etc. The interrupt is just a way of telling the processor or the OS that it is ready, or it has new input, etc. So sometime during init, the OS is waiting for sub-systems to be r... |
I've decided to read Operating Systems Concepts (8th edition) over the summer and I've gotten to a topic that's confusing me and was hoping someone on the forum could clear things up a bit. So my question is in regards to interrupts and there role as it relates to operating systems.
The text says that an operating ... |
Need some clarity on what is meant by Interrupts in the context of Operating Systems |
|untagged| |
the operating system driven by interrupts, this means that:
If there are no processes to execute, no I/O devices to service, and no users to whom to respond, an operating system will sit quietly, waiting for something to happen. Events are almost always signaled by the occurrence of an interrupt or a trap, a trap is... |
Interrupts allow the operating system to take notice of an external event, such as a mouse click. Software interrupts, better known as exceptions, allow the OS to handle unusual events like divide-by-zero errors coming from code execution.
The sequence of events is usually like this:
1. Hardware signals an int... |
null |
The probability $P$ that a uniformly chosen random prime between $1$ and $n^c$ satisfies $a \equiv b \mod{p}$ is the number of primes in this range that satisfy $a \equiv b \mod{p}$ divided by the total number of primes in this range. Writing $[C] = 1$ if $C$ is true and $[C] = 0$ if $C$ is false, and $\pi(x)$ for the ... |
I am looking for an algorithm to find the minimum number of runs needed to visit every edge of a directed graph, given a start vertex and a terminating vertex. A run is a path from the start vertex to the terminating vertex; one run may visit a node more than once.
To illustrate my needs, I give a simple graph and p... |
I am looking for an algorithm to find a minimal traversal of a directed graph of the following type. Two vertices are given, a start vertex and a terminating vertex. The traversal consists of several runs; each run is a path from the start vertex to the terminating vertex. A run may visit a node more than once. The len... |
|operating-systems|computer-architecture|process-scheduling| |
null |
An interrupt is an "unusual" event that happens which needs to be processed *immediately*, regardless of whatever else is going on. I say "unusual" in quotes, because they're not necessarily unexpected or bad, but "unusual" from the point of view of the CPU because they "just happen" while it's busy executing code that... |
Here I'm really interested in lowering barriers to mathematical education.
Target:
I'd like to see created for the JavaScript community, an equivalent of the Python-based/linked scientific and high-performance computing libraries (great lists of which are available at http://sagemath.org/download-packages.html, h... |
Consider this example (taken from this document: [Showing that language is not regular][1]:
$${1^n\ |\ n\ is\ even} $$
According to the Pumping Lemma, a language L is regular if :
- y # ε
- |xy| < n
- for all k ϵ N, $$xy^kz\ ϵ\ L$$
In the above example, n must be even. Suppose we have n = 4, we can expres... |
Why is this example a regular language? |
|regular-languages|automata| |
|formal-languages|regular-languages|automata| |
1. Pumping lemma is not a sufficient condition for being regular, it is only a necessarily condition. Satisfying it does not imply that the language is regular.
2. In the pumping lemma, some parameters are chosen adversarily, i.e. you don't have control over them. If a language is regular then pumping lemma says tha... |
The language is regular:
S -> 1S1 | e |
What are devices and their interconnections used alongwith Quantum Processors? Are they compatible with hardware devices like Cache, RAM, Disks of current computers? |
Organisation and Architecture of Quantum Computers |
|computer-architecture|quantum-computing| |
null |
Consider this example (taken from this document: [Showing that language is not regular][1]):
$$L = \{1^n \mid n\text{ is even}\} $$
According to the Pumping Lemma, a language $L$ is regular if :
- y # ε
- |xy| < n
- for all $k \in N$, $xy^kz\ \in\ L$
In the above example, $n$ must be even. Suppose we have... |
Not really. Quantum-computers will need to be able to process [quantum-bits (qubits)][1] rather than "classical" bits.
Current devices (RAMs, disks) use nowdays technology to maintain classical bits: for instance, a memory cell (say, a capacitor) with high-voltage is "holding" the bit value "1"; if the voltage is l... |
Not really. Quantum-computers will need to be able to process [quantum-bits (qubits)][1] rather than "classical" bits.
Current devices (RAMs, disks) use nowdays technology to maintain classical bits: for instance, a memory cell (say, a capacitor) with high-voltage is "holding" the bit value "1"; if the voltage is l... |
The language is regular:
S -> 11S | e |
I need to detect whether a binary pattern P of length m occurs in a binary text T of length n where: m < n.
I want to state an algorithm that runs in time O(n) where we assume that arithmetic operations on O(log2 n) bit numbers can be executed in constant time. The algorithm should accept with probability 1 whenever... |
Randomized Pattern Matching |
|algorithms|probability-theory|pattern-recognition|probabilistic-algorithms| |
About String Matching, how can I prove that
$$\delta(q,a) = \delta(\pi[q],a) \text{ if}\ q = m \text{ or } P[q+1]\not=a$$
where:
* $q$ is a finite automaton's state
* $a$ is an arbitrary symbol from the alphabet
* $\delta$ is the automaton's transition function
* $P[1..m]$ is the Pattern
* $m$ is the len... |
I need to detect whether a binary pattern $P$ of length $m$ occurs in a binary text $T$ of length $n$ where $m < n$.
I want to state an algorithm that runs in time $O(n)$ where we assume that arithmetic operations on $O(\log_2 n)$ bit numbers can be executed in constant time. The algorithm should accept with probabi... |
What is the expected space used by the skip list after inserting n elements?
I expect that in the worst case the space consumption may grow indefinitely.
Wikipedia says Space O(n).
How can this be proven one way or another? |
Expacted space consumption of skip lists |
|data-structures|space-complexity| |
What is the expected space used by the skip list after inserting $n$ elements?
I expect that in the worst case the space consumption may grow indefinitely.
[Wikipedia](http://en.wikipedia.org/wiki/Skip_list) says space $O(n)$.
How can this be proven one way or another? |
Expected space consumption of skip lists |
About String Matching, how can I prove that
$$\delta(q,a) = \delta(\pi[q],a) \text{ if}\ q = m \text{ or } P[q+1]\not=a$$
where:
* $q$ is a finite automaton's state
* $a$ is an arbitrary symbol from the alphabet
* $\delta$ is the automaton's transition function
* $P[1..m]$ is the Pattern
$$\delta(q,a) ... |
About String Matching, how can I prove that
$$\delta(q,a) = \delta(\pi[q],a) \text{ if}\ q = m \text{ or } P[q+1]\not=a$$
where:
* $q$ is a finite automaton's state
* $a$ is an arbitrary symbol from the alphabet
* $\delta$ is the automaton's transition function
* $P[1..m]$ is the Pattern
$$\delta(q,a) ... |
In this [paper][1] it is proven that there exists a constant $\alpha$ such that the probability of the space exceeding $\alpha n$, is less than $1/2^{\Omega(\sqrt{n})}$. Thefore, the more elements there are, the less likely it is to exceed this space bound.
[1]: http://www.cse.iitd.ernet.in/~ssen/journals/skip.pdf |
Is it possible to build an undecidable problem for a Linear bounded automata?(avoiding the empty set language trick) what about for a deterministic finite automaton? (put aside intractability).
I would like to get an example(if possible) of undecidable problem **without needing Turing Machine**
Is Turing complet... |
null |
The Knuth-Morris-Pratt algorithm does this in linear time without any error. http://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm |
null |
The answer to the question `"Is it possible to build an undecidable problem for an automaton less powerful than a Turing Machine"` is **yes**.
In fact, for every type of automaton [one can always identify][1] an undecidable problem.
This also applies to LBA. Moreover, [any problem][2] that is undecidable for a T... |
What you describe as current computers is known as the [von Neumann architecture](http://en.wikipedia.org/wiki/Von_Neumann_architecture). This approach is one of many ways to think about classical computation and there are other [classical approaches that might or might-not have relevant generalizations to quantum comp... |
It is not clear what you are asking in the later part of the question, mainly because "a problem about machine model X" is not defined.
>I would like to get an example(if possible) of undecidable problem without needing Turing Machine
Let be $\{M_i\}$ be a class of machines and lets use $i$ as the code of $M_i$. ... |
If you really want worst case bounds, and not expected bounds, then take a look at the [deterministic skip list][1] which has better space performance than popular balanced binary tree implementations (i.e. $\theta(n)$ with better constants).
However, if you want a random skip list, then technically the worst-case... |
> "Is it possible to build an undecidable problem for an automaton less
> powerful than a Turing Machine?"`
Yes. An automaton is a consistent axiomatic formulation of number theory and therefore by [Gödel's 1st incompleteness theorem][1] it must include undecidable propositions.
**Example:**
[Any problem][2]... |
> "Is it possible to build an undecidable problem for an automaton less
> powerful than a Turing Machine?"`
Yes. An automaton is a consistent axiomatic formulation of number theory (e.g. see [(1)][1]) and therefore by [Gödel's 1st incompleteness theorem][2] it must include undecidable propositions.
**Example:**... |
Consider this example (taken from this document: [Showing that language is not regular][1]):
$$L = \{1^n \mid n\text{ is even}\} $$
According to the Pumping Lemma, a language $L$ is regular if :
- $y \ne ε$
- $|xy| \lt n$
- $\forall k \in N, xy^kz \in L$
In the above example, $n$ must be even. Suppose we ... |
It is not clear what you are asking in the later part of the question mainly because "a problem about a machine model" is not defined.
>I would like to get an example(if possible) of undecidable problem without needing Turing Machine
Let be $\{M_i\}$ be a class of machines and lets use $i$ as the code of $M_i$. W... |
It is not clear what you are asking in the later part of the question mainly because "a problem about a machine model" is not defined.
>I would like to get an example(if possible) of undecidable problem without needing Turing Machine
Let be $\{M_i\}$ be a class of machines and lets use $i$ as the code of $M_i$. W... |
> "Is it possible to build an undecidable problem for an automaton less
> powerful than a Turing Machine?"`
Yes. An automaton is a consistent axiomatic formulation of number theory (e.g. see [(1)][1]) and therefore by [Gödel's 1st incompleteness theorem][2] it must include undecidable propositions.
**Example:**... |
As it is, how do you prove that 3-SAT is NP-complete?
I know what it means by NP-complete, so I do not need an explanation on that.
What I want to know is how do you know that one problem, such as 3-SAT, is NP-complete without resorting to reduction to other problems such as hamiltonian problem or whatever. |
how do you prove that 3-SAT is NP-complete? |
|complexity-theory| |
I wanted to confirm something and will appreciate your help. Suppose we have three nodes called A,B and C. All are connected to a switch whose port supports 1 Gbps. Now suppose, Node's A network card is 100 Mbps while the the remaining have a 1 Gbps. Following are the constraints;
1) A can send B only with a maximum... |
How will broadcast behave with a certain capacity? |
|computer-networks| |
null |
how do you prove that SAT is NP-complete? |
As it is, how do you prove that SAT is NP-complete?
I know what it means by NP-complete, so I do not need an explanation on that.
What I want to know is how do you know that one problem, such as SAT, is NP-complete without resorting to reduction to other problems such as hamiltonian problem or whatever. |
I believe 3-SAT was originally reduced from the more general SATISFIABILITY in Karp's paper that outlined [21 NP-complete problems](http://en.wikipedia.org/wiki/Karp%27s_21_NP-complete_problems).
[Wikipedia has a description](http://en.wikipedia.org/wiki/Cook%E2%80%93Levin_theorem) of how to show that SATISFIABILITY... |
I am currently reviewing the potentials of cloud computing regarding energy efficiency and green IT. In connection with this review I am having a look on techniques for increasing energy-efficiency in data centers (computing), hardware, networking and storage devices.
Specificially for computing/servers I have found... |
What techniques exist for energy-efficient computing and networking? |
|power-consumption| |
null |
null |
This looks like a minimum-cost flow problem, but with demands instead of capacities.
A _flow_ in a directed graph $G = (V,E)$ is a function $\phi: E\to \mathbb{R}_{\ge 0}$ that assigns a non-negative real value to every edge, such that for every vertex $v$ _except_ $s$ and $t$, the total flow into $v$ is equal to th... |
Define $Prefix (L) = \{x| \exists y .xy \in L \} $ . I'd love your help with proving that $RE$ languages are closed under $Prefix$.
I know that a recursively enumerable languages are a formal languages for which there exists a Turing machine that will halt and accept when presented with any string in the language... |
proving that $RE$ languages are closed under $Prefix (L) = \{x| \exists y .xy \in L \} $ |
|formal-languages|turing-machines| |
Below is a hint for working with the Turing Machine (TM) formalism for RE languages. But finishing that approach from the hint depends on how you've been working with TMs.
You have a TM, say $T_L$ to accept L and you want to construct a new TM $T_L^'$ for $\text{Prefix}(L)$. You can start $T_L^'$ on a string $x$ an... |
Define $\mathit{Prefix} (L) = \{x\mid \exists y .xy \in L \} $ . I'd love your help with proving that $RE$ languages are closed under $\mathit{Prefix}$.
I know that a recursively enumerable languages are a formal languages for which there exists a Turing machine that will halt and accept when presented with any s... |
You wish to find the minimal set of ($s$-$t$)-paths such that each edge is covered. I believe this problem is very similar to the chinese postman problem. Add a directed edge from $t$ to $s$ to make a new graph $G'$. If $G'$ is eulerian it happens to be a simple eulerian tour. Otherwise there exists vertices in $V(G')$... |
You wish to find the minimal set of ($s$-$t$)-paths such that each edge is covered. I believe this problem is very similar to the chinese postman problem. First, add a directed edge from $t$ to $s$ to make a new graph $G'$. If $G'$ is eulerian it happens to be a simple eulerian tour. Otherwise there exists vertices in ... |
Proving that $RE$ languages are closed under $\mathit{Prefix} (L) = \{x\mid \exists y .xy \in L \} $ |
I assume you want to broadcast from A.
The fastest is probably to broadcast at 80 Mbps and the end of the broadcast is then at 200 seconds (3.33 minutes) for both B and C.
Broadcasting at 100 Mbps will prevent C for receiving your file, since your switch can't store the exceeding 400 MB.
But I don't understand... |
You wish to find the minimal set of ($s$-$t$)-paths such that each edge is covered. I believe this problem is very similar to the chinese postman problem. First, add a directed edge from $t$ to $s$ to make a new graph $G'$. If $G'$ is eulerian the solution happens to be a simple eulerian tour. Otherwise there exists a ... |
null |
i am struggling with hashing and binary search material.
And i read that instead of using lists for storing entries with the same hash values, it is also possible to use binary search trees. And i trying to understand what is the worst-case and average-case running time for the following operation:
1.Insert, Fi... |
Hashing using binary search instead of lists - Running time |
|algorithms|complexity-theory|time-complexity| |
Lets $L_z \ := \{ a^i b^i c^i : 0 \leq i < z \}$
$\{a,b,c\} \in \sum^*$
there is a DFA with $\frac{z(z+1)}{2}+1$ states - How can I prove this?
And I need largest possible number $n_z$, for which i can prove that every NFA, which accepts $L_z$, have $n_z$ states, at least!
But first I need to show that ... |
DFA with limited states |
|regular-languages|automata|finite-automata| |
|formal-languages|regular-languages|automata|finite-automata| |
I will give you an indication: first, write an automaton which recognizes exactly the language $M_n=\{b^nc^n\}$. How many states has this automaton?
Now use the [pumping lemma][1] to prove that this is the minimum number of states for $M_n$. The pumping lemma can be refined for automata with fixed number of states w... |
For lists, insertion, find and delete are respectively in $O(1)$, $O(n)$, $O(n)$. Sorted list are worse. [Binary search][1] itself is for sorted arrays, in which the operations are in $O(n)$, $O(\log n)$, $O(n)$. If you want "insertion" and "delete" operations then you need more than just binary search.
You probably... |
I will give you an indication: first, write an automaton which recognizes exactly the language $M_n=\{b^nc^n\}$. How many states has this automaton?
Now use the [pumping lemma][1] to prove that this is the minimum number of states for $M_n$. The pumping lemma can be refined for automata with fixed number of states w... |
### Constructing a DFA
There is an algorithm to construct a [minimal DFA](http://en.wikipedia.org/wiki/Dfa_minimization) for a regular language. In this case, it isn't too hard to come up with a DFA with $z(z+1)/2$ states.
Observe that $L_z = \{\epsilon, abc, aabbcc, \ldots, a^{z-1}b^{z-1}c^{z-1}\}$. Once you kno... |
In the worst case, if you happen to store only elements with the same hash values, a hash table stores every element in the same bucket. If you use lists to store the elements of a bucket, then lookup is $O(n)$ in the worst case (where $n$ is the number of elements in the table — more generally, $n$ is the number of el... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.