# All Questions

39,391 questions
Filter by
Sorted by
Tagged with
3 views

### Finding the minimum value of a subset in a 2D array

Imagine a N by M 2D array of random positive integers and two coordinates (i1,j1), (i2,j2), which represent the upper-left bound and bottom-right bound of a subarray, respectively. Is there a ...
8 views

### OS: Why is it necessary to have hardware support for implementing Preemptive Scheduling Strategies?

I think, Preemption can easily be done in kernel mode, where it just have to call the Context-Switch procedure. Also, based on algorithm we can select the new process from the ready queue as well... I'...
5 views

### Numerically solving an ode with infinitely many variables of which only finitely many are significant in magnitude

Suppose I have an ode that involves infinitely many variables, with the property that at any given time, only finitely many of them are large enough to be of interest (say $>10^{-10}$). However, at ...
15 views

### Interesting Speedup & Amdhal's law problem

I have found a problem on my Computer Architecture textbook which I have some issues with: We have a process which spends its time in the following way: 50% of the time, it executes common ...
19 views

### Sorting algorithm for ranking hundreds of Images based on pairwise comparison

I am facing the task of designing an algorithm to rank some hundred of images (around 300). The ranking is to be based on pairwise comparison judged by human (done through Amazon mechanical Turk). I ...
15 views

### Sub routine for an algorithm

The data in the table below has been collected by a teacher at the end of two unit assessments. Produce a subroutine for an algorithm that could be used to count the number of students who achieved a ...
14 views

### Find the most frequent alphabet appearing in the given string. In case letter with same frequency, choose the one which comes first alphabetically

This is the desired result which I want:
30 views

### Does the O(n) algorithm always run faster than the O(n^3) algorithm? Why?

Assuming that the time complexity of the two algorithms A1 and A2 to solve the same problem are O(n3) and O(n) respectively. If you write programs for these two algorithms and run them in the same ...
10 views

### Shift Operation with Shifted Bits Greater Than or Equal To the Operand's [closed]

In Computer Systems A Programmer's Perspective (3rd Edition), the author says, "For a data type consisting of w bits, if we shift by some value ...
25 views

### When LP solution is ILP solution?

For many discrete problems, it's natural to consider their continuous relaxations. A common case is when instead of $x_i \in \{0, 1\}$ we allow $x_i \in [0, 1]$. In certain cases, the original problem ...
14 views

### Numerical computing Question

Please help. I am studying and going through questions and dont know how to even start this. I would gladly appreciate if someone could walk me through the problem.
24 views

### Assign few binary variables to make all polynomials identically zero

I have 50 polynomials $f_i$ over binary variables $(x_1,\ldots,x_{100})$. Also $f_i(0,0,\ldots,0)=0$ for any $i \in [1,50]$. I want to assign few variables so that all $f_i$ will be identically zero. ...
20 views

### When do insertions and deletions get enacted in a buffer tree?

Buffer trees are $(a, b)$-trees in which each node in the tree gets an associated buffer for storing operations to be conducted on elements in the tree. While I appreciate the idea of amortizing the I/...
25 views

### How do computers *really* work? (at the most basic level)

While learning about computers I will read about RAM and Storage and the CPU, and while these explain the architecture of a computer and how parts of a computer work together, I still don't understand ...
32 views

### How much faster are out machines (generally) than Arthur C. Clarke's machine in 1953's “The 9 Billion Names of God”?

In Arthur C. Clarke's short story, "The 9 Billion Names of God", two software/hardware engineers are contracted by a monastery to generate 9 billion string permutations from a 13-character ...
102 views

### Compiler Design Question

Consider the following ANSI C code int main(){ Integer x; return 0; } What will be the type of error? a)Lexical, b)Syntax, c)Semantic, d)None According to me, Syntax Analysis phase should detect the ...
45 views

### Why do these functions satisfy that f(n) is not O(g(n)) and g(n) is not O(f(n))?

I don't understand what these function are like and why they satisfy that f(n) is not O(g(n)) and g(n) is not O(f(n)). Where is x? \begin{eqnarray} f(x)= \begin{cases} k^{2k}, &x\in(2𝑘,2𝑘+1)&...
16 views

### Create user searching emulator in PERL [closed]

Can anyone help me I want to create user searching emulator on the perl, so what I need perl code whch: 0.Ask me for browser I shall use it must give me text field to input path to my browser I want ...
44 views

### Cardinality of sets and strings -> confused

I have a question regarding the cardinality of sets and strings. If $\Sigma^*$ is empty, the cardinality is 1, because the empty word $\varepsilon$ is counted. If $\Sigma^+$ is empty, the ...
11 views

### Correctness of addition in 1's complement number representation

The one's complement representation of integer numbers in computer memory is generally defined as the system prescribes to invert all bits (all but the sign one) of a negative signed number. It didn't ...
18 views

### selection problem with a group of log(n)

the formula of selection problem if we divide to 5 elements in every group : T(n)=T(n/5)+T(7n/10)+O(n) with a group of 5 elements if we divide to log(n) elements I get T(n)=T(n/log(n))+ ? + O(nlog(log(...
29 views

### Showing that T(n) = 2 + 2T($\frac{n}{4}$) = O($\sqrt{n}$)

I am doing an exercise which says that this is true: T(n) = 2 + 2T($\frac{n}{4}$) = O($\sqrt{n}$) So I tried to solve it by substitution, but I am getting a non-sense result. So would really ...
14 views

help me please I need it downloading only one folder from the site with it all content without above level folders or equal level folders: like this http: //site.com/directory0... directory0N/...
24 views

### Implement Immediate Smaller Element problem using Stack

Immediate Smaller Element Problem: Given an integer array arr of size $n$. For each element in the array, check whether the right adjacent element (on the next ...
32 views

### Summation and big theta

Can anyone suggest a starter book or website where I can find information and examples of putting functions under summation signs into Big Theta. basic Arihmetic , geometric, Quadratic are fine , but ...
34 views

46 views

### Words of the same length in a language

Let $L\subseteq\Sigma^*$ be a language, where $\Sigma$ is a set, and let $n\in\mathbb N$. I am wondering if there is some good terminology for $L\cap\Sigma^n$. Of course I could say "the set of ...
20 views

### Designing less than and less than or equal operators for Map with value being a Set

I am trying to come up with less than and less than or equals operators for a Map where values are Sets. These are the hints I was able to get from the Professor. ...
41 views

### How do I assign homes to hospitals based on locality? (clustering, kmeans?)

I have a large set of $(X)$ hospitals and $(Y)$ homes, where $(Y)$ is much larger than $(X)$, and their respective coordinates. Each hospital can handle any home within a 50 mile radius, and up to 10,...
50 views

### Is $n^2 \log n$ in $O (n^2)$ am confused

I graphed the functions and when $n_0$ is greater than $3$, $cg(n)$ is always greater than $n^2 \log n$ so it would seem to me by definition that $m^2 \log n$ is in $O (n^2)$. I tried to prove it by ...
I have the following regular expression $R=ab^*(\epsilon \cup c) \cup c^*a$ and I want to construct the NFA that accepts languages defined by that regular expression. I started by constructing the NFA ...