instruction stringlengths 0 29.8k ⌀ |
|---|
I am working on a **Sparse Autoencoder** but Andrew NG's notes are hard to understand.
My question is about the following equation: **Loss Function**.
[![image][1]][1]
In sparse autoencoder, **the goal is to inactive some nodes to obtain low-level features** or more precise features. Now if you check Andrew NG's ... |
I suggest that you think about this differently. An autoencoder maps the input to a "representation". The representation is a vector that contains the output of the hidden units. (It is also sometimes called an "embedding".) A vector is said to be "sparse" if most of its entries are zero. The goal of a sparse auto... |
null |
null |
null |
All indices below are understood to take valid values.
Consider an increasing subsequence $b_{i_1}, b_{i_2}, \cdots, b_{i_s}$ of some sequence $b_1, b_2, \cdots, b_n$ which is
$$a[1..r-1],\ (a[l..r]+x),\ a[r+1..n]$$
where
- $a[1..r-1]$ means $a_1, a_2,\cdots a_{r-1}$;
- $\ a[l..r]+x$ means $a[l]+x, a[l+1]+x, ... |
null |
All indices below are understood to take valid values.
As expected, we will use dynamic programming.
Consider an increasing subsequence of
$$a_1,\cdots a_{l-1}, a_l+x, a_{l+1}+x, \cdots, a_r+x, a_{r+1}, \cdots, a_n$$
that ends at element $a_e$ or $a_e+x$.
Classify that subsequence
- by $(e, 0,``\text{befo... |
A sequence $(a_1,a_2, \dots, a_n) $ and natural numbers $n$ and $k$ are given.
We want to calculate the longest (strictly) increasing subsequence of sequence $(b_1,b_2, \dots, b_n)$ for which there exist an interval of pointers $[l, r]$ and an integer $x$, $-k\le x\le k$, such that $b_i = a_i + x$ for $i \in [l, r]$... |
|algorithms|dynamic-programming|arrays|polynomial-time|longest-increasing-subsequence| |
null |
The total cache size is C entries of two words each = 2C words.
The total memory is M words.
Assuming that the same number of words are mapped to each cache entry (and this is a very very safe assumption), there are M / (2C) words mapped to each entry.
There is another answer claiming this is the same ques... |
Assume two sorted lists A and B with n and m elements, where n is much smaller than m.
First, it will be faster if you can modify B, because most of the links between list elements are correct and don't need changing. If you create a new list, you have to set up n+m connections correctly. But anyway, do your list i... |
The term "operating system" is actually a fairly loose one, and many arguments can be had about its definition. For instance, is Linux (the kernel) an operating system, or do you need GNU/Linux (the kernel plus some minimum set of services), or even Debian GNU/Linux (a complete user-ready environment running on top of ... |
In statistical computing, we often have linear models that involve computing multiple vector dot products, but there's a high amount of redundancy in the operations when you break them down. As an example, let `X` be the following 12x3 matrix:
[[-1,-1,-1]
,[-1,-1,1]
,[-1,1,-1]
,[-1,1,1]
,[0,-... |
Shortcut for multiple highly-redundant dot-products? |
|efficiency| |
I was attempting to write a computer algorithm to determine if a particular number breaks the Collatz conjecture. It is very easy to determine if a particular number falls into a loop, however I cannot think of any way to determine if a particular number is on an infinite divergent trajectory.
Assuming the Collat... |
Knowing that $log(n!) = \theta(nlogn)$
|
How $log((mn^2!) = \theta (mn^2 log(mn))$? |
|time-complexity| |
How $log((mn^2)!) = \theta (mn^2 log(mn))$? |
**Hint:**
$$\log(mn)\le\color{blue}{\log(mn^2)}\le\log(m^2n^2)=2\log(mn).$$ |
In statistical computing, we often have linear models that involve computing multiple vector dot products, but there's a high amount of redundancy in the operations when you break them down. As an example, let `X` be the following 12x3 matrix:
[[-1,-1,-1]
,[-1,-1,1]
,[-1,1,-1]
,[-1,1,1]
,[0,-... |
null |
No answers but three "don't do that" replies. Tsk!
In Emacs, I use `(rx (seq "/*" (*? anything) "*/"))`
which expands to `"/\\*[^z-a]*?\\*/"`
Sadly, grep, sed, et. al., lack `*?` non-greedy repetition.
The kooky `[^z-a]` does what `"\\(?:.\\|\n\\)"` does. |
I think you're right to notice this strong connection. At a high level, there is a strong similarity between a hypervisor and a [microkernel](https://en.wikipedia.org/wiki/Microkernel) operating system.
There are also some differences. Hypervisors are specialized to supporting virtual machines. Conventional opera... |
Let $H=\left( E_0 ,E_1 ,E_2 , \ldots , E_d \right)$ be a $d$-dimensional full-hyper graph/complex. That is to say, if for some $i\in \left[d \right]$ the hyper-edge $e_j \in E_i$ than for any $i-1$-dimensional $e_k \subset e_j$: $e_k \in E_{i-1}$. The vertices are $E_0$, the hyper-edges between $2$ vertices are $E_1$, ... |
Regularity property on hypergraphs |
|algorithms|graphs|combinatorics| |
null |
null |
Take John’s answer. However, we don’t actually need a prime factorisation. Let’s say we have a large x which might be prime or composite (and finding out takes a long time). Instead of trying to factor x, we calculate the gcd with the other numbers. A gcd ≠ 1 means we found a factor. If all gcds are = 1 then it doesn’t... |
null |
(I haven't read any literature on this paradox nor am I good at formal proofs, so this is just my intuitive thoughts on the paradox.)
If we assume the statement "This statement is false" as a function `f()` on a state machine `M`, where `M` has 2 states `S0` and `S1` representing `false` and `true`, we'd just be eva... |
My attempt at the "This statement is false" paradox |
|propositional-logic|check-my-answer| |
Say P1 sent a message to P2 saying ((1,x1),(3,x3),(4,x4)) informing P2 of updates in the values on 1,3, 4 Process ids. Later, it sends another msg to P2 saying ((1,x11),(5,x7)). This time it sends information only about itself and pid 7. If the second message reaches P2 before the first message; then P2 will know only ... |
Find a point with minimum $x$. $O(n)$.
Find the next vertex by 2D gift wrapping on the 2D projection of the points on a plane. $O(n)$.
The third vertex is obtained by comparing the faces built from the above edge and all remaining points. $O(n)$. |
(I haven't read any literature on this paradox nor am I good at formal proofs, so this is just my intuitive thoughts on the paradox.)
If we assume the statement "This statement is false" as a function `f()` on a state machine `M`, where `M` has 2 states `S0` and `S1` representing `false` and `true`, we'd just be eva... |
null |
It’s obviously O(n) since the first modulo gives a result from 0 to N-1, then 0 to N-2, and so on. You can also construct m so that n steps are indeed needed. However, such an m could be very large, so the size of m will also limit this.
For random x, the result of x mod n is (n-1)/2 on average, so the expected num... |
null |
null |
Extending on @gnasher729's answer, I tried to find, given $N\in \mathbb{N}$, what is the smallest $M$ such that $N$ iterations of modulo are necessary before getting $0$ (and even finding if such an $M$ existed).
What we want to find is the smallest $M$ such that $\forall k\in \{1, …, N\}$, $M \mod k = k -1$. Denote... |
null |
null |
Extending on @gnasher729's answer, I tried to find, given $N\in \mathbb{N}$, what is the smallest $M$ such that $N$ iterations of modulo are necessary before getting $0$ (and even finding if such an $M$ existed).
What we want to find is the smallest $M$ such that $\forall k\in \{1, …, N\}$, $M \mod k = k -1$. Denote... |
It’s obviously O(n) since the first modulo gives a result from 0 to N-1, then 0 to N-2, and so on. You can also construct m so that n steps are indeed needed. However, such an m could be very large, so the size of m will also limit this. (m = n! - 1 is the smallest such number, so the number of steps can be n only if m... |
null |
Extending on @gnasher729's answer, I tried to find, given $N\in \mathbb{N}$, what is the smallest $M$ such that $N$ iterations of modulo are necessary before getting $0$ (and even finding if such an $M$ existed).
What we want to find is the smallest $M$ such that $\forall k\in \{1, …, N\}$, $M \equiv -1 \mod k$. Den... |
For any 2 strongly normalizing terms in the Lambda Calculus, s and t, is st also strongly normalizing? And why? I'm a bit confused as this is used in a proof regarding strong normalization and the typable lambda calculus, but I have not been able to show that this is the case. Any help would be much appreciated. |
Simple Lambda Calculus Question |
|lambda-calculus|normal-forms| |
It’s obviously O(n) since the first modulo gives a result from 0 to N-1, then 0 to N-2, and so on. You can also construct m so that n steps are indeed needed. However, such an m could be very large, so the size of m will also limit this. (m = LCM(1..n) - 1 seems to be the smallest such number, so the number of steps ca... |
It’s obviously O(n) since the first modulo gives a result from 0 to N-1, then 0 to N-2, and so on. You can also construct m so that n steps are indeed needed. However, such an m could be very large, so the size of m will also limit this. (m = LCM(1..n) - 1 seems to be the smallest such number, so the number of steps ca... |
It’s obviously O(n) since the first modulo gives a result from 0 to N-1, then 0 to N-2, and so on. You can also construct m so that n steps are indeed needed. However, such an m could be very large, so the size of m will also limit this. (m = LCM(1..n) - 1 seems to be the smallest such number, so the number of steps ca... |
It’s obviously O(n) since the first modulo gives a result from 0 to N-1, then 0 to N-2, and so on. You can also construct m so that n steps are indeed needed. However, such an m could be very large, so the size of m will also limit this. (m = LCM(1..n) - 1 seems to be the smallest such number, so the number of steps ca... |
I don't want to repeat what has already been written in other answers. Instead I will focus on two things: one, a comparison of features, and two, a pair of examples.
I hope you will see in the end that Operating Systems and Hypervisors are closely related and also that there is no real sharp boundary, but rather a ... |
It’s obviously O(n) since the first modulo gives a result from 0 to N-1, then 0 to N-2, and so on. You can also construct m so that n steps are indeed needed. However, such an m could be very large, so the size of m will also limit this. (m = LCM(1..n) - 1 seems to be the smallest such number, so the number of steps ca... |
For any 2 strongly normalizing terms in the Simply Typed Lambda Calculus, s and t, is st also strongly normalizing? And why? I'm a bit confused as this is used in a proof regarding strong normalization and the typable lambda calculus, but I have not been able to show that this is the case. Any help would be much apprec... |
null |
I think all you need is to extend the fifth constraint to all k = 1, ...,n and where there is k+1 in the constraint, add (mod k) operator.
This ensures that there is an edge from the last vertex to the first in the path, meaning it's a cycle. |
I think all you need is to extend the fifth constraint to all k = 1, ...,n and where there is k+1 in the constraint, add (mod n) operator.
This ensures that there is an edge from the last vertex to the first in the path, meaning it's a cycle. |
The paradox which you seem to be alluding to is often referenced as the [Liar's paradox][1] or in another form, [Russell's paradox][2] which in such form technically speaking is set theoretic. The crux of such a paradox is a statement that seems to produce the following logical form:
**S<sub>1</sub>** If x is true, ... |
The 32-bit number is split into 4 8-bit groups (bytes):
00000000 00010010 00110100 01010110
hex: 00 12 34 56
In little-endian order 56 is stored at the lowest address, then 34, then 12, then 00. In big-endian order 00 is stored at the lowest address, then 12, then 34, then 56. So when you... |
The paradox which you seem to be alluding to is often referenced as the [Liar's paradox][1] or in another form, [Russell's paradox][2] which in such form technically speaking is set theoretic. The crux of such a paradox is a statement that seems to produce the following logical form:
**S<sub>1</sub>** If x is true, ... |
The paradox which you seem to be alluding to is often referenced as the [Liar's paradox][1] or in another form, [Russell's paradox][2] which in such form technically speaking is set theoretic. The crux of such a paradox is a statement that seems to produce the following logical form:
**S<sub>1</sub>** If x is true, ... |
I'm currently studying virtualization and while looking at hypervisors I realized that bare metal hypervisors are quite similar to operating systems.
So while from an application standpoint they are different, can an operating system theoretically be viewed as bare metal hypervisor? |
Difference between bare metal hypervisor and operating system |
null |
null |
I am interested in tight bounds for the Parallel Machine scheduling problem with a [gang scheduling](https://en.wikipedia.org/wiki/Gang_scheduling) constraint.
In the [notation of Graham, Lawler, Lenstra and Rinnooy Kan](https://en.wikipedia.org/wiki/Optimal_job_scheduling), this might be called $Pm|\rm{gang}|C_{\rm... |
tight lower bounds of parallel machine scheduling with gang scheduling constraint |
|optimization|approximation|scheduling| |
Let us work out an example with $n=5$.
The outer loop is executed with $i=1,2,3,4,5$. Thus the first inner loop executes $4+3+2+1+0$ `print`'s. And the second inner loop $0+0+0+2+4$ `print`'s.
For $n=6$, we have $5+4+3+2+1+0$ `print`'s. And the second inner loop $0+0+0+1+3+5$ `print`'s.
We can easily generaliz... |
This is a very good question, which I don't think I can completely answer.
What I can try to do is
1. give some history of how the idea emerged (although I haven't been able to discover as much of the story as I'd like).
2. provide _an_ explanation of why FSM+datapath is a valuable abstraction technique. (Note: _an... |
{"Voters":[{"Id":755,"DisplayName":"D.W."}],"SiteSpecificCloseReasonIds":[]} |
null |
Previously, I've asked [a question](https://cs.stackexchange.com/questions/124640/when-can-the-coinduction-hypothesis-be-used) about coinduction. That gave me a lot of useful high-level insights on what coinduction provides, and what are the usefulness of coinductive proofs.
This question is about walking through an... |
How to prove by coinduction? |
|coinduction| |
In the simplest terms, an operating system manages the hardware on behalf of user-mode programs, where a hypervisor manages the hardware on behalf of a VM, itself pretending to be hardware.
An "operating system" traditionally consists of an "executive" or "kernel", a collection of utility programs, and at least one ... |
JavaScript / [ECMAScript](https://tc39.es/ecma262/) does not have a static type system, so it doesn't really make sense to talk about "types". In general, "type theory" means "static type theory", and thus you will get non-sensical results when trying to apply type-theoretic concepts to dynamically-typed languages.
... |
null |
In a hypothetical scenario - A(lan) Turing Machine arrives to the "Universal-Algorithm-Island", and meets Christopher, an oracle with a True or False response.
ATM: "Long time no seen".
Christopher: "True".
-----------------
**Case 1**
ATM: "... do all machines in 'UAI' have NP algorithm to solve them?".
... |
Is P unequal NP in a hypothetical perspective? |
|complexity-theory|turing-machines|philosophy|hypercomputation| |
I am interested in tight bounds for the Parallel Machine scheduling problem with a [gang scheduling](https://en.wikipedia.org/wiki/Gang_scheduling) constraint.
In the [notation of Graham, Lawler, Lenstra and Rinnooy Kan](https://en.wikipedia.org/wiki/Optimal_job_scheduling), this might be called $Pm|\rm{gang}|C_{\rm... |
This makes no sense whatsoever to me. You imagine a scenario that is self-contradictory, and then observe that it is a contradiction, and.. then what? All that proves is that your scenario can't happen.
It's like me imagining scenario where I walk up to a knight who never lies, and then the knight tells me "2+2=5"... |
I have a matrix of size NxM.
Each coefficient can have either some fixed value or a joker denoted by *
* Let's take two random rows. We are going to loop through the columns. For each column, either we color it green or in red.
* We color using red when the two values in the same column have an intersection, i... |
How to find an algorithm better than brute force for this matrix computation? |
|algorithms| |
I have a matrix of size NxM.
Each coefficient can have either some fixed value or a joker denoted by *
* Let's take two random rows. We are going to loop through the columns. For each column, either we color it green or in red.
* We color using red when the two values in the same column have an intersection, i... |
This makes no sense to me. You imagine a scenario that is self-contradictory, and then observe that it is a contradiction, and.. then what? All that proves is that your scenario can't happen.
It's like me imagining scenario where I walk up to a knight who never lies, and then the knight tells me "2+2=5". Well, th... |
null |
Create two lists,
descriptions = [],hobbies = []
Iterate through the rows of data and append the description and hobby for each row to the appropriate lists.
Aggregated data is now stored in the descriptions and hobbies lists |
Create two lists,
descriptions = [ ],hobbies = [ ]
Iterate through the rows of data and append the description and hobby for each row to the appropriate lists.
Aggregated data is now stored in the descriptions and hobbies lists |
I am self-learning [proof assistants][1] and decided to start on some basic proofs and work my way up. Since proofs are based on other proofs and so form a hierarchy, is there a repository of the hierarchy of proofs?
I know I can pick a particular proof-assistant and analyze its library to extract its hierarchy, how... |
null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.