instruction stringlengths 35 29.1k |
|---|
I have begun reading Numerical Analysis by Walter Gautschi. On page $3$, the author introduces the floating point number system as follows: a floating point number is a number representible as
$$
\begin{equation}
\pm (.b_{-1}b_{-2}...b_{-t})_2 \cdot 2^{\pm(c_{s-1}c_{s-2}...c_0.)_2} \tag {1}
\end{equation}
$$
where $s,... |
From what I have read on operating systems, the impression I have been receiving is that, for at least 30 years, "everybody has known" that microkernel-based operating systems are "better" than monolithic operating systems. And yet, I have a Linux OS at work and am typing these lines on a computer running a Windows OS ... |
I am reading Numerical Analysis by Walter Gautschi. I am somewhat confused by the following quote from page $5$:
To increase the precision, one can use two machine registers to represent a machine number. In effect, one then embeds $\mathbb{R}(t, s) \subset \mathbb{R}(2t, s)$, and calls $x \in \mathbb{R}(2t, s)$ a dou... |
That what I have so far, but I am not sure at all.
Assume toward contradiction that $_1 \circ _2$ is regular.
Define $\Sigma' = \{\sigma'|\sigma\in\Sigma\} $.
Define a regular substitution $\forall\sigma\in\Sigma, h(\sigma) = \sigma'$.
$h(_1) = \{ = '_1'_2 ... '_ | = _1_2 ... _ \in _1\}$ is also regular and finite by ... |
As requested by a moderator, this question as been separated from my question about microkernel-based operating systems.
In the 1980's, the team that developed C and Unix developed a distributed operating system Plan 9 from Bell Labs. Its descendant Inferno is still with us. Given its impeccable pedigree, the fact that... |
I know this is not a question answer posting site but for the sake of explaining my doubt I will like to post a question
Let $A$ be a $regular$ $language$ and $B$ be a $CFL$ over the alphabet
$\sum^*$, which of the following about the langauge
$R=\overline{A}-B$ is $TRUE?$
a. $R$ is necessarily $CFL$ but $not$ n... |
I am working in an algorithm which finds a unique maximal independent set of vertices. Then, using this set, one can construct all other vertex subsets. I assume this might have some applications outside mathematics, especially in computer science, but I am not sure where I can read about such applications. Does anyone... |
I read following:
Turing Machine with finite (fixed sized) tape is essentially Finite state automaton.
Is this fact correct? My doubt is Turing Machine can go infinite loop even on finite tape if it keeps moving from left to right and finite state machine does never go in such infinite loops. So, do we also need rest... |
I have a data set which contains categorical data, for example:
+-----+-----+------+
| age | sex | grade|
+-----+-----+------+
| 18 | M | 59 |
+-----+-----+------+
| 19 | F | 16 |
+-----+-----+------+
How can i map the sex column to numerical data? generally how can i do map categorical data to numerical d... |
I'm looking for information about distributed consensus algorithms that:
maintain a consistent transaction log across all healthy nodes
have similar high-availability properties to Paxos (i.e. not liveness, but practically very likely to terminate in reasonable time)
make progress with 2F+1 nodes despite F simultaneou... |
I'm reading these slides that present Hindley-Milner type inference. In the system HM, we have the following let rule:
$\dfrac{\Gamma \vdash t:S \;\; \Gamma,x:S \vdash t':T }{\Gamma \vdash \text{let} \, x = t \, \text{in} \, t':T}$
Here $S$ is a type scheme, i.e $S ::= S | \forall a. S$, which allows polymophism only o... |
Let $\mathcal{I}$ be a set of intervals with cardinality $L$, where each interval $I_i \in \mathcal{I}$ is of the form $[a_i, b_i]$ and $a_i, b_i$ are pairwise distinct non-negative integers bounded by a constant $C$ i.e. $0 \leq a_i < b_i \leq C$. We say a pair of intervals $I_i, I_j \in \mathcal{I}$ overlap if the le... |
Why do we use operator precedence rule for Arithmatic operators? Can't we simply just do the operation in a linear manner from left to right or vice-versa and deal with the operator that comes first.
For e.g. 2+3*4 = (2+3)*4 , if we do the operation from left to right.
My guess why we might do it is that, since * and /... |
There is plenty of machine/assembly languages such as LC-3, DLX, etc. designed for educational purposes. I am looking for an educational VM, by VM I mean stack virtual machine that has instructions higher-level than assembly language, something similar to JVM, but much simpler, in order to make the implementation of a ... |
I am currently working on a project where I have to perform a computation over all possible permutations of a multiset $S$. In my setting, each multiset is a list of small positive integers such as $S = [1, 1, 3, 4]$ with between 2 to 10 elements and at least 1 duplicate.
I am wondering if there is an algorithm to gene... |
This question is about max heap and array
Suppose there is max heap $h$, with $n$ data items already stored in $h$. An array that is formed by inserting a value larger than all the values in $h$ at the beginning/head of the heap $h$ is assumed to be new array $C$.
The array $C$ is a heap (or) not?
My answer: is ... |
Say you had a very powerful computer and wanted to run a completely lossless simulation of a universe approximately the same size as our own: $10^{80}$ particles.
Each particle in the simulation has properties like velocity, mass, charge, etc. Assuming that your program didn't use any tricks (like compressing this simu... |
So we know a nondeterministic Turing machine (NTM) is just a theoretical model of computation. They are used in thought experiments to examine the abilities and limitations of computers. Commonly used to dicuss P vs NP, and how NP problems cannot be solved in polynomial time UNLESS the computation was done on the hypot... |
For the set disjointness problem in the 2-party model of communication complexity, Alice is given an input $X$ and Bob is given input $Y$, $X$ and $Y$ are $n$-length bitstrings (sampled from some distribution), which are interpreted as subsets of $[n]$, i.e., $X_i=1$ means the $i$-th bit of $X$ is in the subset. The go... |
Context
I am doing an undergrad math project that involves exploring Donald Knuth's "TAOCP, Volume 4, fascicle 6: Satisfiability".
I am having trouble parsing some of this material.
Surely there are some online forums where different sections are unpacked or discussed or translated into Python?
I googled this but canno... |
Given an array of N integer elements (not necessarily distinct), what is the minimum number of swaps (not necessarily adjacent) needed to sort the array?
I've been struggling with this problem for a few months now. I know that the elements are distinct, the answer is the number of cycles in the permutation obtained aft... |
The following process seems to be a recurring one:
Initial design. Commercial organisations invent and implement a design that seems at the time to work.
Problem discovered, new design suggested. Due to new developments, or just because the designers missed something, a problem with the design is discovered. Academics... |
Do the hyper computing machines/models that are supposed to be more powerful than Turing machines, capable of recognizing and deciding the languages that are not recognizable/decidable by Turing machines?
|
Let some deterministic finite automata be given. There is a problem of determining whether the intersection of these DFA is empty, and I want to show its PSPACE-completeness.
It seems to me that I understand, why this problem lies in PSPACE: if $ n_1,\dots, n_k $ are the numbers of states, then one can take the produc... |
I'm looking for a methodology made specifically for mobile applications development. I have read about Waterfall and Agile but they are more general. Also, I want a methodology for when there is only one programmer. There is one for only one person: PXP, but its problem is that it lacks in documentation, so I would lik... |
I'm creating a website like where users will answer some yes/no questions set by me, up to them how many of those questions they want to answer. After a user submits his answer(s), he will be shown top 5 matches along with their match percentages. If two users have 10 common questions and their answers match for 8 of t... |
Minor disclaimer: This is my first question here, so I hope it is the
right place to put it.
Question: Is there an algorithm to exhaustively generate all set
partitions of equal size? That is, I want to list all possible ways to
divide a set of $N$ elements into $K$ parts where each part has the same
size $\frac{... |
I am a biologist doing some computational work. I encountered a problem and need some help since I don't have much algorithmic background.
The problem:
Assume we have a non-directed, weighted graph, in which every node has some categorical attribute, e.g. color. I want to break the graph into sub-graphs in which ther... |
I'm not very certain about how to deal with asymptotics when they are in the denominator. For $$O\left(\frac{n^2}{\log{\frac{n(n+1)}{2}}}\right)$$, my intuition tells me that it should be treated in a similar way as little o. Would that be correct?
Also, is this in any way comparable with $O(n)$ or $O(n^2)$?
|
I am given the following randomized algorithm for SAT,
Input: A satisfiable CNF-formula $\varphi$.
Output: An assignment $\rho$, such that $\rho \models \varphi$.
The algorithm works as follow:
Choose an arbitrary assignment $\rho$.
As long as $\rho \not \models \varphi$
Choose a clause in $\varphi$ not satisfied b... |
I'm pracitcing exams towards finals,
Given an undirected graph $G(V,E)$ , we denote 2 MST $T,T'$ neighbours if by deleting one edge from $T$ and add another one we get $T'$.
Prove :
for every 2 distinct MST $T,T'$ there is a sequence of $k$ MST's such that every 2 MST's $T_i,T_i+1$(+1 on the index) in the list are nei... |
Suppose I have an algorithm whose running time is
$O(f(n))$ where $f(n) = O\left(\frac{\log n}{\log\log n}\right)$
And suppose I can change this running time in $O(1)$ steps into $O\left(f\left(\frac{n}{f(n)}\right)\right)$, i.e. I can get an algorithm whose running time is $O(g(n)) = O\left(\frac{\log\frac{n}{\frac{... |
I have a list of sets that I would like to sort into a partial order based on the subset relation.
In fact, I do not require the complete ordering, only the minimal elements.
If I am not mistaken, each minimal elements should define one separate component of the respective graph - and this component should be a meet-s... |
In time analysis, how many units of time will the piece of code
z=2x+3y;
take?
will it take 1 unit of rime or 4 units of time ?
|
I am implementing conflict directed Backjumping algorithm of prosser in java. But, the algorithm is iterative approach. How can it be built with recursive approach?
In AIMA they give the recursive version of backtracking.
function BACKTRACKING-SEARCH(csp)
return BACKTRACKING({}, csp)
function BACKTRACK(assignment, c... |
I am reading "Algorithms 4th Edition" by Sedgewick & Wayne.
The following method computes the number of self loops of an undirected graph $G$.
Why does this code return $\frac{count}{2}$ instead of $count$?
I think self loop appears in adjacency list only once.
// number of self-loops
public static int numberOfSelfLo... |
I have a real world problem where I have a list of nodes. Each ones contains a name and the name of the node before it in order. I am trying to devise an algorithm to sort these in order. The problem is that any two random nodes will not tell me anything about their order unless they happen to lie next to each other, s... |
I am taking a complexity class now, and I struggle to understand the concept of "hardness":
Assume that $L \in \textsf{NP } \cap \textsf{coNP}$. In means that under the assumption $\mathsf{NP} \neq \textsf{coNP}$, $L$ cannot be $\textsf{NP}$-complete. The formal meaning is that not all languages in $\textsf{NP}$ can be... |
I read BFS and DFS from CLRS and realized that the BFS algorithm does not consider graph with multiple connected components but only with single connected component, whereas DFS algorithm considers graph with multiple connected components as can be seen in below pic:
Are my observations correct? If yes, why is it like... |
During undergrad I felt my education was mostly comprised of applying existing theory to real world problems (ie. algorithm design/analysis). I've seen derivations of many algorithms and proofs of their complexity, but I'm often left bothered by the question of how one comes to discover an algorithm. It seems daunting ... |
PageRank is heavily skewed in that a small proportion of webpages have a high PageRank score while most of the others have a very low PageRank score. Does this undermine the effectiveness of the TF-IDF function? For example, if PageRank scores were to be combined with TF-IDF scores, then for a few of the webpages, the ... |
How would you go about solving this problem?
I thought about using a limit infinity approach, but got confused and Wolfram Alpha didn't provide any explanation.
|
I have been thinking about the following problem:
Let $J$ be a set of jobs that need to be performed. Each jobs comprises of some number ($>1$) of tasks, and a job is considered finished when all of the tasks have been completed. Find an ordering to perform the tasks such that the sum of the maximum time needed to fini... |
We know that there is a Greedy algorithm for scheduling of $n$ jobs which each job has its own deadline and profit.
In greedy algorithm, we sort the set by their profit descendant, And if a job can add to a possible set of jobs, we add it to the set.
A job can be added to the set, if it starts before its deadline and e... |
Our teacher gave us the following statement and we were wondering what is wrong with it.
Consider an array $A$ of $n$ distinct numbers. Since there are $n!$ permutations of $A$,
we cannot check for each permutation whether it is sorted, in a total time which is polynomial in $n$.
Therefore, sorting $A$ cannot be i... |
Suppose I have something like the following:
$f(x) = g(x) + O(x^n)$
And I apply a power $m$ to both sides
$f(x)^m = g(x)^m + \cdots + O(x^n)^m$
My question is whether the following is well formulated:
$O(x^n)^m = O(x^{nm})$
Thank you!
|
$\eta$-reduction is often described as arising from the desire for functions which are point-wise equal to be syntactically equal. In a simply typed calculus with products it is sufficient, but when sums are involved I fail to see how to reduce point-wise equal functions to a common term.
For example, it is easy to ver... |
In my data structures course we are given definitions for Type and Abstract Type but they confuse me.
A type is a set of values and the operations you can do on them. The set of operations is called an interface.
Wait, what? Do this mean that Type = set of values + interface?
An Abstract Type is a type only accessib... |
I have just started to learn QC. It is said that
The quantum state of $N$ qubits can be expressed as a vector in a space
of dimension $2^N$
If there is $1$ qubit then we have two possible state vectors $|0\rangle$ and $|1\rangle$ or $(0,1)$ and $(1,0)$ respectively. Getting to $2$ qubits we have $4$ possible state... |
I am looking at the possible implementations for solving the rod cutting problem (CLRS). Do you know of any variants of this problem and their use in industry?
|
Given a matrix $A_{n\times n} = \{a_{ij}\}$ such that $a_{ij}$ is a non-negative number and given 2 vectors $(r_1,r_2,...,r_n)$ , $(c_1,c_2,...,c_n)$ such that $r_i,c_i\in \mathbb{Z}$ define an efficient algorithm that will determine if there's a matrix $B_{n\times n} = \{b_{ij}\}$ , $b_{ij} \in \mathbb{Z}$ and
for eve... |
I recently solved problem of finding union of two DFAs and came up with some observations. I need confirmation about them along with some other facts:
I can prepare the union, subtraction and intersection DFA of two DFAs by preparing their product automaton and then suitably choosing final state. If $A_1$ and $A_2$ ar... |
What is the name of the property of a Programming Language that says that extracting a subprogram into a subroutine and using that subroutine instead of the subprogram should not change the meaning of the program?
I could swear that this exists and that it has a well-known name, but I can't for the life of me remember ... |
Consider we have two processes P1 and P2. There are also two semaphores M and N which are initialized to zero. Here's how they execute:
+-----------+-----------+
| P1 | P2 |
+-----------+-----------+
| wait(M) | wait(N) |
| ... | ... |
| wait(N) | wait(M) |
| ... | ... |
| ... |
On the Wikipedia page for the Axiom of Choice the following statement is given:
$(\forall x^\sigma)(\exists y^\tau)R(x,y)\rightarrow(\exists f^{\sigma \rightarrow \tau})(\forall x^\sigma)R(x, f(x))$
Most of it seems fairly straightforward, except for the meanings of the symbols that look like 180 degree rotated 'E' and... |
To rank the keyword search results, I'm trying to crack the way the Airbnb algorithm or similar ones work. I'm not asking which features they are using since those are different depending on the business needs. What I'm asking is where can I find a paper/survey/book to see what are the various relevancy metrics in addi... |
I passed by this question in a previous exam while studying for the "Automata / Theory Of Computation" and I am struggling to find answer. I would appreciate it if someone can help me with it:
This is the question:
a)On the basis of what was covered in class, draw the Venn diagram representing the following sets:
1.REX... |
For a certain problem two solution algorithms (A1 and A2) with the following execution times have been found:
$A1: T_{A1}(n)=4n^2 +7log(n^2)$
$A2: T_{A2}(n) = 4T(n/2) + log(n)$
Say, technically justifying the answer, which of the two algorithms is preferable for input of size
sufficiently large
Here my solution
For $... |
My primary goal with this question is to identify the type of problem I have so I know what solution to pursue. I think it's either an instance of the assignment problem or the fair item allocation problem, though I can also envision a solution that involves a variation on the stable marriage problem.
The question:
I... |
I really don't understand this pseudo code. The function prints all permutations of $n$ given integers, assuming that all numbers are different.
Is there a way to explain this code more easily as I really don't get the purpose of the swapping.
PERMUTATE(A, start, end)
if start == end return A
else
PERMUTAT... |
Is there a published method to construct a generalised suffix tree from a large set of strings (~ 500 000) without the need of concatenating them?
I would like to use the resulting suffix tree for a pattern search problem.
|
The number of possible heaps that are full binary trees of height $h$ and can be formed with ($n = 2^h - 1$) distinct elements can be computed by recursion:
$$ a_h = {2^h - 2 \choose 2^{h - 1} - 1} a_{h - 1}^2 $$
How to compute the general term formula with this recursion formula?
|
Let $$ be any alphabet and let $_ \subseteq ^{∗}$ and $_2 \subseteq ^{∗}$ be two non-empty languages.
a. If $_ ^{∗} \neq ^{∗}$ than what can we say about $L_1$.
b.Let $\Lambda \in L_1$ and $\Lambda \in L_2$. Show using axioms and theorems of languages that $_ ^{∗}_2 = ^{∗}$
For (a), $\Lambda$ should not belong to $L... |
I am given an array of numbers, not necessarily unique, and the size of a group. Let the array be denoted by $B$ and the size of the group be $A$.
I need to find the maximum number of groups with the exact same contents and of size $A$ that can be made from the elements of $B$. Once an element is used in a group it is ... |
An irreducible kernel is the term used in Handbook of Theoretical Computer Science (HTCS), Volume A "Algorithms and Complexity" in the chapter on graph algorithms. Given a directed graph $G=(V,E)$, an irreducible kernel is a graph $G'=(V,E')$ where $E'$ is a subset of $E$, and both $G$ and $G'$ have the same reachabil... |
I am reading this excerpt from Ullman's book:
I have following doubts:
(related to red underline) TM can make 5 left moves or 5 right moves. So it will need at max 11 cells. Then how it says 9?
(related to green underline) Whats the significance of "finite"? Due to 9 (or 11 if I was correct in point 1)?
(related to ... |
Given an image of a biology diagram, I would like to classify the diagram into these 4 categories:
Plant
Animal
Cell
Anatomy
However, I don't have any training data. I would like to avoid the crowdsourcing for data. Is there anything I can do?
|
I have a set of elements. Each element is connected with every other element by a path of length $l_i,_j\geq0$ (where i$\neq$j).
I have to calculate the maximum sum of path length such that I should take each vertex only once (i.e. if $l_i,_j$ is taken then I should not take $l_i,_k$).
I've thought of brute force algor... |
We say that a query in a TRC is a statement of the form $\{T: P(T)\}$, where $T$ is a tuple variable and $P(T)$ is a formula.
Now my question is, what are the possible tuples $T$ to be tested i.e., what are the types and values for tested tuples.
As far as I know in set theory and in particular in set builder notation... |
I am given a complete weighted graph and I need to make pairs among the vertices so that the sum of weights is maximum.
(If I have vertices $v1, v2, v3, v4$ and if I make pairs $(v1,v2)$ and $(v3,v4)$ then only the edges connecting the vertices in the pairs respectively will contribute to the sum.)
On doing some resear... |
Does the rule of $n ^ a$ dominate $n ^ b$ if $a > b$ apply here as well?
My understanding is that $n \log n$ will be dominated by $n \log ^2 n$ because of $\log$ being raised to the power of $2$.
|
This answer says:
We can have uncountable languages only if we allow words of infinite length.
So does that means any (finite / infinite) language or any (finite / infinite) set of languages over any (finite / infinite) alphabet will be uncountable of words have infinite length?
Let me simplify this by asking specifi... |
The problem statement is pretty straightforward: given an array of integers and a window size, return an array of doubles of the median of each window.
$arr = 1, 3, 5, 10, 6, 9, 2$ and $k = 3$ would yield a result of $3, 5, 6, 9, 6$.
Using std::priority_queue (in C++) for the heap implementation, there's a minHeap and ... |
I want to know from this picture which one is bubble sort, insertion sort and selection sort?
My answer is:
bubble sort algorithm,
insertion sort algorithm,
selection sort algorithm.
Is it this right?
Is there reference link too to picture which one is the right sort?
|
For example in this post they discuss how to construct a reduction between problems to show that one probleme is NP-Hard:
Post
I am searching for a scientific paper to cite where it is written, that this is a valid method.
Does anybody knows one?
|
I just learned about using UF with union by rank and path compression. A path can be compressed via attaching a node to its root after Find is called on the node. If the goal here is to flatten the tree, why not just implement the tree such that each node is directly attached to its root (instead of its true parent)? T... |
Could anyone explain the difference/relation between the Actor model and Reactive programming?
It seems that they are located at different levels of abstraction - one can design the interaction between the components of any distributed system using Actor approach, they would send messages, and inside the actors, write ... |
Lately, I have been dealing with a problem that I didn't know how to name it to solve it properly.
The problem is as follow: let's assume that we have a set of elements $A$. And, we have two functions $f$ and $g$, where for any sub-set $B \subset A$ where $\left|B\right| < k$, $k$ is a constraint:
$f(B)$ : estimates t... |
Some time ago i read the following problem (i don't remember the article from which i read it from) :
"Suppose you are given a picture where the goal is to find waldo (from the game where is waldo), you search for a bit and don't find him so you become suspicious of the fact that waldo actually is in the picture, how c... |
The original question is the following
prove that $2·\sum_{i=0}^{n-1} 3^{i} = 3^n-1$ for all n $\geq$ 1
I know that I have to prove by induction and have successfully done the base case, my IH is the following:
Assume $2·\sum_{i=0}^{n-1} 3^{i} = 3^n-1$ holds for all n $\geq$ 1 to prove $2·\sum_{i=0}^{n} 3^{i} = 3^{n... |
For the proof of Chernoff Bounds (upper tail) we suppose δ<2e−1 .
Like in this paper ([see this link ]) 1. Can you tell me why ?
|
Hey I am new to Hoare triples, and I can't understand on finding the loop invariants in hypothesis. For example this while loop
[x>1 & y>1] WHILE x>0 DO x:=x-1; y:=y+2 END [x+y>5].
The invariant is [2x + y > 5] but I don't understand on how to find it. A step by step explanation on how to find it will be greatly appre... |
You are given a function $\operatorname{rk}:\{1\dots 2^k\}\rightarrow \mathbb{N^+}$ representing the ranks of the players $1\dots2^k$ in a participating in a tournament. The tournament evolves in a random way, so that when player $i$ faces player $j$, he wins with probability $\frac{\operatorname{rk}(i)}{\operatorname{... |
I read a C++ implementation of a hash map here.
https://www.geeksforgeeks.org/implementing-hash-table-open-addressing-linear-probing-cpp/
Let's say key k1 has a hash index of h. Suppose there's a collision with key k2 such that hash(k1) == hash(k2). Then won't the new hash index of k2 become h+1?
Key: k1 Index: h... |
It seems every program that purports to record webcams fails to keep audio and video in sync. Moreover, there are probably man millenia being spent by people trying to correct for this during editing.
While it is understandable that OS's may have to buffer incoming raw audio and video prior to compression, if necessar... |
If you designed a greedy algorithm to obtain an optimal solution and the algorithm can produce different combinations of values but still, any of theses combination is an optimal solution. How you prove it is optimality?
For example you have a set of numbers $\mathcal{M}=\{1,2,3,4\}$ and you want to design an algorithm... |
I am trying to figure out the process of generating code (set of instructions, implementation language specifics dont matter at this time) from an automaton.
The description of my intent is vague because although I am an electrical engineer, with extensive coding experience, I have no theoretical CS background and I am... |
Context
I am a student starting an undergrad math project.
I was instructed to read Donald Knuth's Fascicle 6: Satisfiability and come up with ideas for a project from this material.
I have 13 weeks to do the project.
I have carefully read the Example applications section of the book and over Christmas I managed to en... |
Here I'm trying to do a comparison of two simple as possible algorithms, solving the symmetric travelling salesman problem, finding the optimal solution without the support of heuristics. I'm showing (or just referencing) the code of both algorithms only to better specify the implementation details, which could be rele... |
I have to show, that the clique problem in planar graphs is in P. I found the answer here here. However I don't get the conclusion
This follows already from Kuratowski's theorem: a clique is at most of size 4.
I've never heard of that theorem before and the exercise indicates to proof it with the fact, that the clas... |
design a DFA accepting the set of strings over the alphabet {0, 1} that when interpreted in reverse as a binary integer, are divisible by 3
|
Given two algorithms with their time-complexity $t_a(n)=\sqrt{n}$ and $t_b(n) = 2^{\sqrt{\log _{2}n}}$ and i have to show $t_b(n) = O(t_a(n)) $.
I´ve made a program to check this statement and it seems that for any given $c>0,\forall n\geq16$ it holds, however i don´t know how to formally proof this ,because i can´t... |
Is there a commonly used term for the result of a reduction operation?
"reductant" does not quite sound right...
|
This is a pseudocode question in my IGCSE CompSci textbook:
Use a CASE statement to display the day of the week if the variable DAY has the value 1 to 7 and an error otherwise.
This is my answer to it:
CASE Day OF
1 : OUTPUT "Monday"
2 : OUTPUT "Tuesday"
3 : OUTPUT "Wednesday"
4 : OUTPUT "Thursday"
... |
That is, the right child of a left child, or the left child of a right child. The best that I can come up with is the "opposing child" but I was wondering if anyone has come across an existing naming convention for this.
|
I have a question about classical tree-search algorithms as I will have an exam soon and this is the type of questions they might be asking. Although I know how to compare the complexities, optimality, and completeness, I would like to go a bit further than that and compare the sparseness of the tree, the branching fac... |
Is the k-Clique Problem (given a Graph G and a natural number k does G kontain a Clique of size k)
polynomial time reduzible to the graph-Homomorphism Problem (given two graphs, G and H, is there a Homomorphism from G to H)
And if so what would the reduction look like?
Since i am a little confused by the subject, is... |
"With block cipher, each plaintext block is XOR-ed with the previous ciphertext block and then encrypted, this is known as block chaining. This prevents identical blocks of plaintext from producing the same ciphertext each time they are encrypted"
What happens inside the clause of the "XOR" statement, to make two equal... |
"A" represents all the odd natural numbers and "B" represents all the even natural numbers. For a given integer v, we can reduce it either by A0 or (A0)+1 then B0 or (B0)+1 and so on until the value of v becomes <=0. Considering that we chose (Ai) or (Ai)+1 and (Bi) or (Bi)+1 optimally where i is the index, we want to ... |
I found this statement in a true/false test section:
Could someone explain in laymans why this is a true statement?
My understanding is that if $X$ is $\mathcal{NP}$-hard, then its complement must be $\operatorname{co-\mathcal{NP}}$-hard. However, here we are assuming that a language that is $\operatorname{co-\mathcal... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.