# All Questions

30,178 questions
60 views

### Determine number of values less than mean in one pass through list

The problem statement is as follows: Can we determine precisely the number of elements less than the mean in a list $A$ of $n$ numbers in only one pass through the array (starting at $A_1$ and ...
36 views

### prove that the language is not context free language

Prove that the language $\{a^i b^j c^k$ $|$ $i>j>k \geq 0\}$ is non context free language without using the pumping lemma. we could use some helpful facts to solve the question: $A$ is a ...
25 views

### how do i fix this. the total amount is still zero after running the program [closed]

this is my coding👇👇 include include using namespace std; int main() { string name, address, category; int unit, float amt; ...
21 views

33 views

### Interpretation of this regular expression: (1*0*)*

Do the values of the two * inside the ( ) need to remain unchanged for every repetition of ( )? For example, 110011001100 is part of this language set, but 1100100010 isn't? Or can the values of the ...
18 views

### Yao's minimax lemma for Monte Carlo algorithms

In the query complexity model, we define $R(f)$ as the bounded-error query complexity of $f$. It is said that Claim. we can find two hard distributions over the 0- and 1-inputs of $f$ respectively, ...
29 views

### How does the cpu know which process to wake?

In general, my understanding is: the cpu is executing a process/thread until either it is interrupted, the scheduler kicks it out, or it's waiting for something else (I/O for example), when it's put ...
27 views

### whether an algorithm terminates or not after a finite number of steps

I was reading some documents on web about finiteness property of an algorithm where it is mentioned that "The algorithm must always terminate after a finite number of steps." Does it mean that any ...
20 views

### Time complexity: Using linear programming to solve a system of linear equations

As far as I know, most direct methods for solving linear systems of equations have time copmlexity $O(n^3)$ (where $n$ is the number of variables), with the few methods being faster having huge ...
45 views

### Operations making non-context-free languages regular [on hold]

If $A$ is a non-context free language, is $A^*$ a regular language? If $A$ is a non-context free language and $B$ is a regular language, is it possible that their concatenation is a regular language?
29 views

### can anyone tell what programing languages use for writing parallel program [closed]

i have heard we can use c, c++ and fortran in order to write parallel program but there is any other languages that i can use to write parallel program. And if it is then what library should i use ...
28 views

64 views

### Do you agree with the following claim: Why (not)? [closed]

"We should rewrite database systems such that they execute transactions in a serial manner." It might seem to be a subjective question but apparently it is not, there is a right choice, it is an exam ...
39 views

### Why do OS and DBMS have their own synchronisation mechanisms, when OS can alone do it and it sits at the bottom of DB?

I know that synchronization is important in the OS, but why do we need a separate topic synchronization and concurrency in the DBMS? The OS concentrates on program synchronization while the DBMS ...
44 views

### How to find the length of maximum subarray sum in segment tree query?

Problem: Given an array with size$\ n$: for each$\ a[i]$, it denotes the value of the house. You are given the task to build the wall that saves the house that is not exceed$\ w$ length. What is ...
31 views

### Crafting a Context Free Grammar

I'm trying to figure out the intuition on creating a CFG in my head. I understand the idea of Grammar rules akin to "onions" with various layers throughout. For example, I was working on a problem ...
15 views

### Machine Learning [closed]

Can anyone tell me what is the error. the Log_model does not accept the text reveiw as string. ValueError: could not convert string to float: 'Drinks were bad, the hot chocolate was watered down and ...
19 views

### sklearn text review [closed]

THE ERROR is ValueError: could not convert string to float: 'Drinks were bad, the hot chocolate was watered down and the latte had a burnt taste to it. The food was also poor quality, but the service ...
Irrational numbers like $\pi$, $e$ and $\sqrt{2}$ have a unique and non-repeating sequence after the decimal point. If we extract the $n$-th digit from such numbers (where $n$ is the number of times ...