# All Questions

36,746 questions
Filter by
Sorted by
Tagged with
16 views

### Another feasible way to implement multi-level page table?

The advantage of a multi-level page table is that we can swap the inner-level page tables to some secondary storage. If however we want quick access to the whole address space, we have to keep all ...
23 views

### Dangling Else Ambiguous Grammar

How is the following grammar ambiguous stmt -> if expr then stmt | matched_stmt matched_stmt -> if expr then matched_stmt else stmt | terminal
124 views

### If I have an MST, and I add any edge to create a cycle, will removing the heaviest edge from that cycle result in an MST? [duplicate]

Let's say that I have an MST, $T$. I pick an edge not in $T$ and change its weight, and add it to $T$ to create a cycle. Will removing the heaviest edge from that cycle result in an MST? MST means ...
16 views

### Given a p.c. function $f(x,y)$ find a p.r. function $g(u,v)$ s.t. $\Phi_{g(u,v)}(x)=f(\Phi_u(x),\Phi_v(x))$

Since $f$ is p.c. we know there's a program $\mathscr{P}$ that computes it. Let $w=\#(\mathscr{P})$. We have: $$f(\Phi_u(x),\Phi_v(x))=\Phi(\Phi(x,u),\Phi(x,v),w)$$ But the left hand side is a ...
10 views

### Circuit : Switching function. Can I ignore RESET and CLOCK for the functions?

So if I have to state any function like state transition function or switching function can I ignore CLOCK and RESETS?
101 views

### Strings that do not contain 11 as a substring

Today I had a couple of formal language lectures. The Instructor wrote a regular expression for the alphabet $\{0,1\}$ which does not include any string which includes "11" as a substring. She wrote ...
51 views

### How do I replace a D Flip Flop with a JK Flip Flop

Hello I have this circuit with this I want to learn about Mealey and Moore. Is this a Mealy Automata? I would say yes because of the upper LED depends on the variables I got. Otherwise isn't the ...
34 views

### What unusual property does this finite automata yield?

I'm asked to construct a finite automata for a given task. The Automata should accept the values zero or one. In the starting ...
19 views

### Internal & external fragmentation

Given five memory partitions 200kB, 600kB, 250kB, 450kB and 500kB which are fixed and in order. processes of 212kB, 517kB, 115kB and 430kB in order. In First-Fit order 212 kB --> 600 kB partition (...
51 views

### Proving complexity of $T(n)=2T(n/3 + 1) + n$ non-Akra-Bazzi

We know that the complexity of $T(n)=2T(n/3 + 1) + n$ is $\Theta(n)$, as has been proved on this exchange before. However, what about proving it inductively? I believe that this method might work. ...
14 views

### Weights vs Training ML

The weights of Machine Learning models are learned during the training process. Why is said that the higher values of weights leads to the overfitting of the model? Why is it necessary to have low ...
12 views

### working set bits in working set approximation

I am looking at the example pdf from Cornell found here: https://www.cs.cornell.edu/courses/cs4410/2016su/slides/lecture13.pdf Also reading OS Concepts 10e Chapter 10 but it does not go into detail. ...
16 views

### Is it possible to implement iterative pre/in/post-order traversal with only one stack?

All iterative algorithms I've seen for pre-order, in-order, and post-order traversals of trees have used two stacks. Is it possible to do it with one? I've been thinking about it for ever, I haven't ...
30 views

### Is this correct transformation of a grammar to one without left recursion?

So the last few days I am writing a compiler for a subset of C language by given grammar for a class at university. I encountered this problem and then I realized I need to remove left-recursion in my ...
30 views

### Clustering algorithm with specific cluster grouping areas

I'm looking for a way to cluster points in a given space, where clusters form around specific closed, allowed zones of that initial space. Each allowed zone should be surrounded by points of its ...
212 views

### Sorting strings using Counting Sort in O(n), where n is the total number of characters in all the strings

Suppose, you are given an array of strings of different lengths, but the total number of characters over all the strings is n. Describe an algorithm using Counting Sort to sort the strings in ...
40 views

### pseudocode to split number value to array of numbers

How to write a pseudocode to split a number value to array of numbers? Let's say the number value is 12345. I need to convert it into [1,2,3,4,5].
18 views

### Is DHAMPATH downward self-reducible?

DHAMPATH is the set of all the directed graphs which have a hamiltonian path. It's a well known NP-complete problem. I know the proof of SAT's downward self-reducibility. Arora-Barak says Cook-Levin'...
71 views

49 views

### Understanding how convolution of images work in cnn

I'd like to understand convolutional neural network. Consider this quote from Stanford CS notes on Convolutional Neural Networks for Visual Recognition (CNNs/ConvNets): Example Architecture: ...
22 views

### Why does my EM algorithm not converge?

Any ideas why my likelihood probability for this EM algorithm doesn't converge (have slope of 0) to "find" the three clusters? I've tried increasing the iterations, which makes the slope nearly ...
36 views

### Graham 1966 Minimum makespan scheduling

I am trying to understand how Graham's 1966 makespan algorithm results in 2-approximation. I have searched in google and I have found files, and videos on youtube about makespan scheduling, but again ...
42 views

### Binary Search Complexity

I was reading an article about Binary Search on one of the websites on the internet that someone had linked, can't find the link anymore, but this really is bothering me, and I think I am missing ...
45 views

### Runtime Calculation Sort-Algortihm

I'm really struggling with the following exercise and I would really appreciate your help: I have to calculate the expected runtime of a sort Algorithm with the following variants: ...
21 views

### 64 byte cache block and memory overhead for cachline with 7 states (3 bits)

I came across some lecture notes of a professor about memory consistency and models. There is an example about memory overhead: The cache line has 7 states (3 bits): unowned, shared, exclusive, ...
23 views

52 views

### How big is the capacity of a standard memory cell that the pointer is linking to?

Often programming language lectures and references have an illustration of computer memory as an array composed of individual cells. Each cell has an address, which is effectively the pointer and can ...
21 views

### Confused on Variational AutoEncoder

I'm a bit confused on how Variational Autoencoders are trained. In particular I'm confused on how the latent variable is generated for each input. My questions are as follows: When running ...
24 views

### Spliting strings into groups of similar strings

I would like to group a list of strings into groups of strings differing by max 1 character: For instance, given: [John, Alibaba, Johny, Alidaba, Mary] I would ...