instruction stringlengths 35 29.1k |
|---|
Given sorted array $A[1..n]$. We want to find an element such that
$A[i]=3i+2$ in $O(\log n)$(binary search).
I trying to relate to problem finding element in sorted array $A$ such that $A[i]=i$, but i can't use that technique to solve mentioned problem. Any hint be appreciated.
|
I'm trying to apply the following algorithm from DPV's textbook to an example to see how it works. First, the algorithm is as following:
Algorithm [DPV, p. 60]
Input: Coefficients of two polynomials. A(x) and B(x), of degree d.
Output: Their product $C = A . B$
Selection: Pick some points $x_0, x_1, x_2, ..., x_{n-1}... |
Definition: Distribution $D$ on $\{0,1\}^n$ is called $k$-independent if for every random variable $X$ with distribution $D$ and for all $i_1, \dots, i_k \in \{1,2,\dots,n\}$ random variable $X_{i_1,\dots, i_k}$ has distribution $U_k$ (uniform distribution on $\{0,1\}^k$).
Problem: Consider probabilistic algorithm $A$ ... |
Suppose given a binary search tree $T$ with $n$ nodes with depth $h$.
We did $n$ times search with cost $c_i$ for search $i^{th}$ search on
$T$ ,and $\sum_{i=1}^{n}c_i=O(n\log n)$. what we can say about $h$?
I think $h=O(\log n)$, but instructor say it's not true.
|
Given a set of keys $\{i^2|0\leq i\leq 100\}$, and a hash table such that
collision resolve by chaining. Our hash function is $ k \mod m$ .
What is option is best for $m$ to decrease our search for items in hash table and why?
a.7
b.9
c.11
d.12
I think c is the best choice, but i can't prove it.
|
The code snippet below is the "beginning lines of an assembly language program" used to display a single line string .
stack segment para stack 'stack'
db 16 dup(0)
stack ends
my question is : why stack segment is available in assembly program? And how do I define this 'stack'? Any help will be appreciated. My... |
Known codition:
four pixels shown in the image $(i,j),(i+1,j),(i,j+1)$ and $(i+1,j+1)$
$a=0.9$ and $b=0.4$
I was able to calculate the bilinear interpolation using the algorithm provided by https://en.wikipedia.org/wiki/Bilinear_interpolation.
But how should we calculate the Average Interpolation and Nearest Neighbo... |
Under Huffman Encoding, what circumstances codeword length of each character
be equal?(suppose number of character is power of 2)
I think if all frequency of characters is same then codeword length of all characters be the same.
Surprisingly, if there are two characters that differences between frequency of two char... |
How to efficiently exit from a maze where you know the initial position of the player (1,1), the exit (49,49)?
You don't know the maze configuration but you know where your player is, and which direction are opened from his position.
Another point, the player can move RIGHT/DOWN/LEFT/UP, and the exit is at the bottom r... |
for(int i = 1;i<=n;i++){
for(int j = i+1;j<=n-i;j++){
print("hello");
}
}
The first loop has time complexity of n and second for loop is dependent on i. That means for every i, the number of time inner for loop gets executed is: $\sum_{k=1}^{n/2}(n-2k)$ After doing some algebra, I get: $\frac{n... |
Let $\Sigma=\{0, 1, \#\}$.
Is the following language regular; context-free but not regular; or not context-free?
Justify your answer
$$L=\{x\#y :\ x, y \in\{0, 1\}^∗\text{ and }\operatorname{bin}(x) + 1 = \operatorname{bin}(\operatorname{rev}(y))\}$$
|
We've definied the splitting lemma for starfree languages as follows:
Let $L \in \mathsf{SF}(\Sigma^*)$ and $A, B \subseteq \Sigma$ with $A \cap B = \emptyset$. Then it holds true that for $K_i, L_i \in \mathsf{SF}(B^*)$: $$L \cap B^* A B^*= \bigcup_{\text{finite}} K_iAL_i$$
I can not see why this is useful by any mean... |
I'm new to writing languages in context-free or regular grammar, so I'm struggling how to do this one. It is a bit more complicated that simpler ones I've practiced doing. The problem is to construct a grammar for the following language:
$$\{a^n (bc)^m \in \{a, b, c\}^* \mid m, n \ge 1 \land m < n/2\}$$
An explanation ... |
Let $M$ be a monoid (e.g. $M = \Sigma^*$) and $L \subseteq M$.
Then $\mathsf{RAT}(M)$ is the set of rational sets of $M$ and the elements of $\mathsf{RAT}(M)$ are inductively defined as follows:
$|L| < \infty \implies L \in \mathsf{RAT}(M)$
$L_1, L_2 \in \mathsf{RAT}(M) \implies L_1 \cup L_2 \in \mathsf{RAT}(M)$
$L_1,... |
Stuck on a problem with my roommate and can't seem to find any parallels to this.
The problem is simple to understand: you have two possible binary options: T or F.
You are given an array which already has some of these options filled out e.g.
[T, X, X, F, X, T] - (Here X means unfilled)
What we want to do is to fill t... |
Intro
The job shop problem is a classic scheduling theory problem. Given $N$ jobs and $M$ machines, a typical goal of the JSP is to minimise the makespan (starting time of the last operation + its processing time) over the set of jobs. Jobs must be processed on a sequence of machines in a particular order. An operation... |
Algorithm question:
Given a binary array, find the maximum length of a contiguous subarray with equal number of 0 and 1.
Example 1:
Input: [0,1] Output: 2
Explanation: [0, 1] is the longest contiguous subarray with equal number of 0 and 1.
Example 2:
Input: [0,1,0] Output: 2
Explanation: [0, 1] (or [1, 0]) is a longes... |
I am using Matlab daily. But I just realized that I even do not know what algorithm Matlab is using for calculating the exponential function $e^x$.
The power series expansion is obviously not appropriate for a big $|x|$.
|
Given an undirected graph and a start and end node, I am trying to find two node-disjoint paths such that the sum of their lengths is minimized. In particular, each path must start at the start node, end at the end node, and no node (other than the start or end node) can be visited by both nodes. Is there an efficien... |
I work in 52:17 work:break intervals, as there's some evidence showing it's an effective way to structure the day. However, meetings or planned breaks often require shifting that schedule, moving, shrinking, or expanding certain parts.
I'm trying to write a program which will do this for me, given a start time, an end ... |
Say we have some function $f(n)=\Theta(\log n)$ and another function $g(n)=\Theta(n+\log n)$. Is it valid to substitute $f(n)$ for $\log n$, giving us $g(n) = \Theta(n + f(n))$? This seems obvious to me but I'm not sure if there is a weird edge case where this isn't true.
|
Given an undirected graph and a start and end node, I am trying to find two edge-disjoint paths such that the sum of their lengths is minimized. In particular, each path must start at the start node, end at the end node, and no edge can be traversed by both nodes. Is there an efficient algorithm to solve this problem... |
Consider a second order equation $F=ma=m\ddot{x}$.
In the language of Euler's method
$\ddot{x}(t+dt)=F(t,x(t),\dot x(t))$
$\dot{x}(t+dt)=\dot x(t)+\ddot x(t)dt$
$x(t+dt)=x(t)+\dot x(t)dt$
Basically, the entire iteration was the second order force equation $F(t,x(t),\dot x(t))$.
However, here one wanted to apply Runge... |
I'm a beginner learning about Assembly language and I was doing questions where I have to identify different addressing mode in 8086 processor.
One such instruction is:
mov ah,09h
Here the source operand has immediate address mode and destination operand has Register address mode.
In many tutorials online they have jus... |
I encountered the following recurrence relation in homework, for which we need to find its asymptotics: $$T\left(n\right)=T\left( \frac{n}{3} \right) + T\left( \frac{n}{6} \right) + 1$$
I observed it is possible to approach this relation with the method of Akra-Bazzi, however this method was not taught in class. Akra-B... |
I am implementing a mathematic model for predicting the congestion of 802.15.4 network based on the paper:
Performance analysis of IEEE 802.15.4 non-beacon mode with the unslotted CSMA/CA
Based on the system of nonlinear equations mentioned in that paper, I converted that formula into python code and solved it with "sc... |
We define the vertex cover as the problem of finding for a graph $G$, a cover of size $k$. A cover is a set of vertices such that every vertex has an edge to this set. We define CD (cycles destructor), as the set of vertices with the size $k$, whose removal will lead to a cycle-free graph. Show a reduction from VC to C... |
Suppose search $n$ times in a given binary search tree $T$ with $n$ nodes. each searching have cost $C_i$, and $\sum_{i=1}^{n}C_i=O(n\log n)$. Now the problem is to find height of $T$. I think it be $O(\sqrt{n\log n})$, but after reading this post, what is correct proof to get that result?
|
Given four formulas in first order logic. Which of the following formulas are not valid? (In logic a proposition is valid if it never evaluates to $\bot$.)
$(\exists x P(x)\to Q)\to (\forall x (P(x)\to Q))$
$((\neg P\to Q)\wedge(P\to R))\to (\neg P\to R)$
$(\exists x(P(x)\to Q(x)))\leftrightarrow (\forall x P(x)\to\e... |
Is there a theory for Operating Systems?
That is, subfields of CS have theoretical parts; i.e. PL has type theory, ML has mathematical theorems, security has a lot of provable properties, etc.
There are certain "properties" in OS, like the optimality of SJF scheduling algorithm or the dining philosophers, but these see... |
Lemma 13.6 $p \in F \Longleftrightarrow [p] \in F'$
Proof. The direction $\Rightarrow$ is immediate from the definition of $F'$. For the direction $\Leftarrow$, we need to show that if $p \approx q$ and $p \in F$, then $q \in F$. In other words, every $\approx$-equivalence class is either a subset of $F$ or disjoin... |
Let the alphabet be $Σ = \{0, 1\}$. For any string $w ∈ Σ^*$ of length at least 2, define the
operation $C_2(w)$ to be a cyclic shift of size 2 on $w$. That is, if $w = w_1w_2 \cdots w_n$ with $n ≥ 2$ and each
$w_i ∈ Σ$, then $C_2(w) = w_3 \cdots w_nw_1w_2$ if n ≥ 3, and $C_2(w) = w$ if $n = 2$. Recall that $w^R$ mean... |
Does finding the successor of an element in a heap take $O(\log n)$?
An heap is not a binary search tree, so couldn't an element's successor be found in $O(n)$ time?
|
How does one estimate the access cost for the below query given that the data is sorted according to a non-key attribute, that the data is not uniformly distributed across all possible values of said attribute and that we must use a linear scan?
SELECT * FROM EMPLOYEE WHERE DNO = X
Context
Given the following:
Total ... |
How to prove
In a tree where every node has either $0$ or $2$ children, the number of nodes with $0$ child is $1$ more than the number of nodes with $2$ children.
|
A sorted array $A[1..n]$ is given. Each element of $A[i]\in \mathbb{N}$, and for each $A[i],A[j]$ we have $A[i]+A[j]\leq n$. Find two elements $A[i], A[j]$ such that $(A[i]-i)+(A[j]-j)=0$. Give a deterministic $O(n)$ time algorithm for this problem.
I tackle with this problem as follow :
Calculate each $A[i]-i$ , and i... |
Is there a well-known or (relatively) easily-implementable streaming algorithm for approximating the median of the last, say, $k$ elements of a stream $c_1,c_2,c_3,\dots$?
The scenario is: I have a stream of numbers, and at any point in the streaming process I should be able to query for the (approximate) median in the... |
Let H be a class of all functions, mapping M possible keys to N integers. Is it true that H is a 2-universal family? Is it a good idea to use H in applications?
I don't even know where and how to start. Can you give me a hint on how to prove this?
Is it even possible to prove this?
|
Suppose there is an n-element stream with elements from $\{0,1\}^\ell$ which means each element is in set $\{0, \dots , 2^\ell-1\}$. Also may assume $2^\ell >n^2$. How can I with $2p$ passes over the data (for $p \in \{1, \dots , 2^\ell\} $) solve the number of distinct elements problem using only $O(\frac{n}{p}\ell)$ ... |
Let a non-deterministic machine have at most $2^{t+1}-1$ accepting paths (highest significant bit position is $t$ and lowest significant bit position is $1$).
I want to decide if the number of accepting paths $N_{accept}$ is $0$ or $>0$.
I can ask a $\oplus P$ oracle to decide if $2^t|N_{accept}$ and $2^{t+1}|N_{accept... |
Let a matrix $A=0$. Can I say $A$ is nilpotent? I am asking if the zero matrix is nilpotent or not.
Nilpotent means that $A^k = 0$ for some $k$ that is a non-negative integer. When $k = 1$, $A^k = A = 0$. Does this idea support that a zero matrix is nilpotent?
|
Given that
$\mathsf{NP}=\mathsf{PCP}_{[\frac{1}{n},1]}\left(O\left(\log n\right),\left(O(\log n\right)\right)$,
show that it is NP-hard to approximate clique up to factor of $n^a$ for some $a \in (0,1)$.
|
I have six characters: (,),[,],{,}. They are stored lexicographically: '(' < ')' < '[' < ']' < '{' < '}'. So I can store all balanced parenthesis sequences of length $n$ lexicographically and each sequence will have unique number $1 \dots catalan(n)*3^n$. Than I want to get sequence by its number.
Problem: If I have an... |
There exist greedy algorithms for vertex coloring like optimization problems. We know that for graph coloring, there is an order of vertices for which greedy coloring produces the optimum results. Is it true for any problem on graph which has such a greedy algorithm.
|
I am interested in knowing the Chomsky hierarchy of a particular computation model. Also, I would like to know if it is equivalent to Finite State Machine or is Turing complete.
This computation model is called marbles and circles. For this model, the variables take a constant word size w which matches the problem. A ... |
Show if $L = \{a^mb^nc^n \mid m,n \geq 0\} \cup \{b,c\}^*$ is regular or not.
My attempt:
I think the Pumping lemma won't work in that constellation, so I'm working with "The intersection of regular languages is regular".
Assuming $L$ is regular. I already know that $S=\{ab^* c^*\}$ is regular. I'll now look at the int... |
Consider a directed acyclic graph (DAG) of topics and links. Apart from the root topic, topics are situated under one or more parent topics, and links, as well, are situated under one or more parent topics. Now imagine that the DAG changes over time as users add, remove and update link and topic relationships and met... |
As the title suggests, I am curious whether Linear Discriminant Method can be performed on a dataset as pre-processing before putting the reduced-dimensional data as input for a neural network for creating the mapping function/ surrogate model.
Thanks!
|
We are given a flow network and two nodes $u$ and $v$. We want to create an algorithm that tells us whether or not there is a minimum s-t cut so that $u$ belongs to the same side of the cut as the source node $s$ and $v$ belongs to the same side of the cut as the sink node $t$.
My initial idea was to run Ford-Fulkerson... |
Say I have a circle of a fixed radius, with overlapping arc intervals along its edge. I want to return a minimum set of Points which intersects all arcs in $n^2$ time.
I'm having some trouble proving that my algorithm works. I'm getting caught up with arc intervals that span $0,2\pi$.
For example I have the intervals (... |
We are trying to find height of following recursion formula in terms of $n,k$:
\begin{gather*}
T(n,k)=T(\frac{n}{2},k)+T(n,\frac{k}{4})+nk
\end{gather*}
\begin{gather*}
T(n,1)=T(1,k)=O(1)
\end{gather*}
I read this link , and this post, but i think neither of answers are true.
|
I was task to describe this regular expression a* (ba (cf* (g ( f +h )* bf* )* e )* a)* informally.
My attempt at describing it informally = any number of a followed by any number of one b one a with any number of one c and any number of f with any number of one g with any number of f or h one b and any number ... |
T(n)=T(n/2)+log log(n)--------1
T(n)=T(n/4)+log log(n/2)+log log(n)-------------2
T(n)=T(n/8)+log log(n/4)+log log(n/2)+log log(n)-----------3
T(n)=T(n/2k)+log log(n/k)+....+log log(n/2)+log log(n)
T(n)=1+log log(n/k)+....+log log(n/2)+log log(n)
n/2k=1 => n=2k
T(n)=1+log log(2K/k)+....+log log(n/2)+log log(n)
T(n)=... |
\begin{gather*}
T(n)=T(\frac{n}{\log n})+O(1)
\end{gather*}
\begin{gather*}
T(1)=O(1)
\end{gather*}
I try to use substitution method to solve $T(n)$, but because of $\log n$ get stuck. Can we use substitution method for solving $T(n)$?
My attempt:
One step of my extending of $T(n)$:
\begin{gather*}
T(n)=T(\frac{n}{\... |
how can I know what are the recursive calls of this algorithm ?
in line two there are 2 recursive calls and I don't know how to write this as T(n) for the Recurrence relation.
Here is the algorithm :
|
Given a binary search tree $T$, we insert $n$ elements, but when the size of tree become doubled then we balance the tree. for example if we insert $2^{k-1}$ element then when the size become to $2^k$ then we balance $T$. what is time complexity insert $n$ items in such tree?
I think be $O(n)$, but when i want draw a ... |
I have a question regarding the methodology of Huffman coding. So, is there a Huffman coding methodology that approximates the minimum average number of bits per decimal character when the odds of information symbols are not powers of 2? I can't understand or find anything relevant
|
Assuming we have a fixed set of line segments $S$ such that any two segments are either disjoint or have a common endpoint.
A query would look like this; given a query point $q$ shoot 4 rays from $q$ (both sides horizontally and both sides vertically) and report the line segment in $S$ closest to $q$ intersecting any o... |
I came across interactive proofs and randomized computation, in particular, i read about the complexity classes $\text{IP}, \text{BPP}, \text{RP}$, etc.
Since the above classes are well-known, I will give a hand-wavy definition of $\text{IP}$. Then, I will state my question. Roughly speaking, a language $L \in \text{IP... |
I'm currently reading a paper on First-order definable languages by Volker Diekert and Paul Gastin.
Im having trouble understanding a part of the proof for lemma 3.2 (splitting lemma).
The part I'm having a problem with, is about the complement:
(Note: I've substituted $B^\infty = B^* \cup B^\omega$ with $B^*$ which sh... |
The $k$-center problem is where we a given a graph $G(V,E)$, an integer $k$, a distance metric $d$ and we want to find a subset $C\subseteq V$ (such that $|C|\leq k$) which minimizes the following function: $\max_{v\in V}\min_{c\in C}d(v,c)$.
I am trying to understand the proof that the $Gon$ algorithm is a 2-approxima... |
I'm looking for a data structure that supports efficient:
Insertion of arbitrary integers.
Value lookup (given a particular value needle, return true if it's currently in the structure).
Removal of all values below a given threshold integer.
I suspect this can be with a self-balancing BST, with insertion and lookup b... |
My professor has said that the average depth of all possible binary trees which can be formed with $n$ nodes would be $O(\sqrt n)$ and has assigned the proof of this as homework. How do I approach this problem?
|
I am reading about P and NP and looking at the reduction of a Rudrata/Hamiltonian path to a Rudrata cycle. I think adding an extra node and 2 edges connecting the start, s and the target, t is O(1) time as this doesn't depend on the size of the graph. Algorithms by Dasgupta et al. says that the pre and post processing ... |
I am reading about P and NP and looking at the reduction of a Rudrata/Hamiltonian path to a Rudrata cycle. I think adding an extra node and 2 edges connecting the start, s and the target, t is O(1) time as this doesn't depend on the size of the graph. Algorithms by Dasgupta et al. says that the pre and post processing ... |
The number of Dyck paths (paths on a 2-d discrete grid where we can go up and down in discrete steps that don't cross the y=0 line) where we take $n$ steps up and $n$ steps down follows the Catalan numbers. Another set of objects that follows the Catalan numbers is the number of binary search trees with $n$ nodes.
This... |
I am looking for intuition here. Essentially, I understand that the set of parse trees from a context free grammar forms a regular tree language. I also understand that regular tree languages are closed under union, intersection and complement. Now, why are deterministic context free languages not closed under intersec... |
The problem: we have a list of terms $[t_1, ..., t_n]$ , and a term $t$, and we want to find which of the terms in the list can be unified with $t$. Obviously we can iterate through the list and check one-by-one whether $t_i$ unifies with $t$, but what better (i.e. faster) approaches exist? Assume we can store the list... |
Context: I am a clinical psych researcher dabbling in machine learning.
Humans cannot be truly random. Therefore, could machine learning be used to analyze a string of numbers and determine the probability that said string was generated by a human or by a computer? Taking it a step further, could machine learning be us... |
The proof is in the image below, taken from "Quantum Computing Since Democritus":
Here's what I don't totally get: my understanding of random algorithms is that randomization is not done over the input space; the inputs are still worst case. So that when a random algorithm has some error, what I interpret that to mean... |
If the same $f$ reduces $L_1$ to $L$ and also $L_2$ to $L$ does it imply that $L_1=L_2$?
My intuition says no, but I couldn't find a counterexample.
|
I want to build a utility that helps manage small groups of participants. It is an acting class setting.
For each exercise, the facilitator will usually have some number of participants get up to do a scene. Two is the most common, but sometimes 1 or 3 or 4. More than 4 is not common.
I want the utility to have a list ... |
I'm trying to determine whether a language $L_{a}$ is recursively enumerable, but first I'm having trouble deciphering the definition $L_{a}$ given the following question:
Given an recursively enumerable language $L$, we can define $L_{a} = \{ x : \exists\langle M\rangle \in L \text{ such that } x \in L(M)\}$. Prove $L... |
Consider the language:
$L=$binary strings that contain a substring of the form $ww$, where $w
\in (0+1)(0+1)^*$.
I am convinced this language is not regular, as $w$ can have arbitrary length due to the $(0+1)^*$ term, and whatever is generated by this term must be remembered for the next occurrence of $w$ immediatel... |
I know that for most computation involve nan (not a number) the result is a nan itself except for some cases.
For example, $1^{\text{nan}} = 1.00$ which proven by mathematicians to be true.
I tried to find a proof but failed
so my question is how to prove that $1^{\text{nan}} = 1.00$?
|
Is $e = 1 + \frac{1}{1!} + \frac{1}{2!} + \frac{1}{3!} + \frac{1}{4!} +\ldots$ efficiently computable? To be more specific, we say that a real number $r$ is efficiently computable if there is a polynomial time algorithm that takes a positive integer $C$ as input and outputs a rational number $y$ such that $r−\frac{1}{C... |
I never heard about this variation of the gas station problem. The statement is as follows:
There is just one road connecting the n+1 cities c0, …, cn
consecutively. You want to go from c0 to cn stopping at most s times
to fill the tank of the car. There are gas stations at the cities, but
none on the roads. The lengt... |
Why are registers named so short - EAX, EBX,...etc They could have easily made the names more
descriptive rather than encrypted like that.
|
The EAX, EBX and ECX registers on a cpu are they 64 bits for a 64-bit cpu ?
|
I'm reading the paper where AdaBoost was invented (link), and I couldn't understand why they have chosen the formula α_t = 1/2 * ln((1-ε_t) / ε_t).
snippet:
AdaBoost algorithm from the paper
What is the motivation behind that specific formula?
Why not using something that feels more natural like ε_t?
|
When translating an NFA to its deterministic equivalent, we get an exponential blowup due to the powerset construction method. I tried to search but couldn't find an appropriate question regarding this question:
I was wondering if there are algorithms that are better, even if it's just a tiny bit, for translating NFAs... |
Given $a\in\mathbb{N}$, I wondered for what bases $b$ is the following language regular
$$\{a_ka_{k-1}\ldots a_0\mid \exists n\in\mathbb{N},\ a_0+a_1b+a_2b^2+\ldots+a_kb^k=a^n\}$$
I think it's regular only for bases which are a rational power of $a$, but I couldn't come up with any proof of that.
Is that correct? How c... |
Thinking about specific settings on WorldBuilding.SE, it turns out I need help from people who are more in touch with CS and Clusters. For those who curious about how it started, backstory here, relevant details will be provided in the body of the Q. A note, despite that joking setting, it has some bearing in reality a... |
I know butterfly networks (and benes as well) allow routing a packet from any input to any output node. Congestion is $\sqrt{n}$ but with bene it can be $1$.
Now assume that in a butterfly network, each switch is a selection switch, i.e. the switch has two inputs terminals and two outputs terminal but it "copies" one o... |
You are given an directed graph $G = (V , E)$ with positive edge capacities, a source vertex $s \in V$, and a target vertex $t \in V \setminus \{s\}$. $G$ is guaranteed to have the following additional property: The graph obtained by deleting $t$ from $G$ has exactly one path from $s$ to each other vertex in $V \setmi... |
Let $\displaystyle S_{1} ,S_{2} \subseteq \{0,1\}^{*}$, we say $\displaystyle x\in S_{1}°S_{2}$ if it's of the form $\displaystyle x=x_{1} x_{2} ...x_{n}$, for $\displaystyle n$ even, such that:
$\displaystyle x_{i} \in \{0,1\}^{*}$
$\displaystyle x_{1} x_{3} ...x_{n-1} \in S_{1}$
$\displaystyle x_{2} x_{4} ...x_{n}... |
I want to find an upper bound on the number of planar graphs with $n$ vertices, assuming that we are given some embedding for those vertices beforehand. In particular, Im interested in either showing for every embedding there is $2^{o(n\log(n))}$ planar graphs, or showing that there exists an embedding with $2^{\Omega(... |
I know that for most programs pseudo-random numbers are sufficient, but there are ways that machines can generate truly random numbers! There are devices that generate unpredictable processes. However, they tend to be biased somehow. So, is it possible to make devices that can generate unpredictable processes and also ... |
I came across the term self-delimiting program, referring to the paper "Laws of information (nongrowth) and aspects of the foundation of probability theory" by Levin, 1974.
Unfortunately this paper is not available afaik, and I couldn't find any definition anywhere. What is the definition? or what is a resource stating... |
Say I have a 256 bit bit-string, and I know that there are 16 ones and 240 zeros. I know that this bit string can be compressed, because there are only 256 choose 16 possible strings that satisfy this condition: that's about 2^83.06.
So I know that I should be able to compress this bit string down to 84 bits long. But ... |
According to my fragile knowledge of computer hardware the way computers store information is by electric circuits. If there is current the bit is 1 if there isnt its 0. My question is after a computer runs out of battery the memory stil holds all of the information, how? Wont it be the case that all the bits are 0?
|
See this picture, in parentheses are (arrival time, execution time required)
Why doesn't the "p5" process is processed before "p6"? Why do p3 and p4 are finished and p5 is executed only after the processes that arrive at "11" are executed?
|
I have divide and conquer problem and below is the recurrence relation for it
$$\begin{align}t (n) &= a\cdot t (n/4) + O (n^2/\log(n)) + O(n^2)\\
t(n) &= a\cdot t (n/4) + O(n^2)
\end{align}$$
I solved this recurrence for different values of $a$. These are the solutions below
$$ =\begin{cases}O(n^2),&\text{ for }a = 8\\... |
I was going through the text : Compilers: Principles, Techniques and Tools by Ullman et. al where I came across a claim:
$\text{"The error entries in the goto table are never consulted"}$
I feel that whenever there is a reduce move, the current state pointer moves some states back. Suppose that $A\rightarrow \alpha$ ... |
Given
The starting and the end values of X
The maximum step (maximum delta)
Exact amount of steps
I need to determinte the maximum and the minimum possible values that X could become during this chain of changes and still make it from the start value to the end value with the steps that are less or equal to the maxim... |
Consider the alphabet {0, 1}. How do I find the regular expression for the set of all strings such that each block of five consecutive symbols contains at least two 0's?
Here, by block I mean a given set of concurrent substrings. For example, for a string "0011010", the first five characters are "00110", which satisfie... |
Just like we can represent a mathematical expression uniquely with a binary expression tree, I was wondering if we could do the same for LTL formulae? Such that no two different looking LTL formula will have a same in order traversal.
|
It is common to see articles praising the advances in AI (here is one example).
There is no doubt that significant progress has occurred on all kinds of automation, hard games like chess, etc.
The question is, how much of that progress is due to conceptual proogress, as opposed to increase in processing power? Or, to p... |
The question is to find Find a Cook Reduction from $R_{k-Clique}$ to its determinist problem.
Basically:
k-Clique: a group of $k$ nodes in the graph such there is an edge between every two nodes.
Suppose you are allowed to use an algorithm (B) that in $O(1)$, given as input a graph $G$ and a number $k$, returns whether... |
I've been thinking about this for a while now. Given a graph $G$ of 2-dimensional points (we draw the edges based on a "threshold" distance), find $s_1, s_2, \dots, s_k$, the sizes of all connected components in $G$.
The vertices of the graph are 2-dimensional points and there is an edge between $v_1$ and $v_2$ if the ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.