instruction stringlengths 0 29.8k ⌀ |
|---|
|lambda-calculus|type-theory| |
Given :
- Profit[n]: a n item array indicating the profit on a day (may be positive or negative)
- Cost[n]: a n item array indicating the cost of holding a stock on a day (always positive)
Task:
Find $1 \leq i \leq j \leq n$ that maximize Total Profit divided by $\sqrt{\text{Total Cost}}$ from day $i$ to day $j... |
null |
Are there ASICs (application-specific integrated circuits) optimized to solve the SAT problem, such as by the DPLL algorithm? |
Are there ASICs optimized to solve the SAT problem? |
|satisfiability|sat-solvers| |
null |
null |
Can someone explain for me how to build a XOR gate using 5 NOR gates? The thing I'm looking for is a proof similar to this:
$A^B\ =\ (!A)B\ +\ A(!B)$
$=\ !!((!A)B)\ +\ !!(A(!B))$
$=\ !(!!A\ +\ !B)\ +\ !(!A\ +\ !!B)$
$=\ !(A\ +\ !B)\ +\ !(!A\ +\ B)$
$=\ !((A\ +\ !B)(!A\ +\ B))$
$=\ !(A(!A)\ +\ AB\ +\ ... |
Building a XOR gate out of NOR gates |
null |
{"Voters":[{"Id":755,"DisplayName":"D.W."}],"SiteSpecificCloseReasonIds":[5]} |
I suggest reading about "VM detection", e.g., https://reverseengineering.stackexchange.com/q/1686, https://stackoverflow.com/q/39533/781723. There is lots written on this topic. |
Let's say I have a group of people that meets every week. I would like to assign them to groups of 4. How can I assign these people such that, week after week, *collectively*, every group consists largely of "strangers"?
For example, John, Paul, George, and Ringo being assigned together means John has been grouped w... |
How can I assign people to groups of 4 and optimize for "strangers" on a week-to-week basis when the group can change? |
|algorithms|combinatorics|assignment-problem| |
The standard approach is to expand the [Curry-Howard Correspondence](https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspondence) to cover disjunctions by providing cover for the tautologies:
$$
O: (a ⊃ c) ⊃ (b ⊃ c) ⊃ a ∨ b ⊃ c,\quad : a ⊃ a ∨ b,\quad : b ⊃ a ∨ b,$$
and define $[f,g] = Ofg$, where $f: a ⊃ c$ a... |
A standard approach that is very general is to formulate this as an instance of integer linear programming, and apply an off-the-shelf ILP solver. The field of operations research deals with a lot of combinatorial optimization problems, such as arise in scheduling and logistics, and ILP solvers are one standard tool f... |
null |
The brute force approach: There are 16 functions with two arguments, and 65,536 sets of such functions. Initially with 0 gates you have two functions: A and B.
Calculate all sets that you can build with one nor gate. You can implement a nor a = not a with one gate, or not b, or a nor b. So you create three sets by ... |
null |
null |
null |
null |
null |
The brute force approach: There are 16 functions with two arguments, and 65,536 sets of such functions. Initially with 0 gates you have two functions: A and B.
Calculate all sets that you can build with one nor gate. You can implement a nor a = not a with one gate, or not b, or a nor b. So you create three sets by ... |
Anyone please answer the question:-
Prove that in a complete binary tree with L levels, the total number of nodes N <= 2^(L+1) - 1 |
Prove that in a complete binary tree with L levels, the total number of nodes N <= 2^(L+1) - 1 |
|numerical-algorithms| |
a xor b = x nor y. We need x, y so that x or y = not (a xor b) = (a and b) or (!a and !b). So we try to represent x = (a and b) using nor, and y = (!a and !b), then a xor b = x nor y.
y is easy: !a and !b = ! (a and b) = a nor b.
!a = a nor a, !b = b nor b, so x = ((a nor a) nor (b nor b)), and that’s it.
a... |
You should really show what you tried before asking, this is not a site for answering homework questions. Still, some hints.
You can use the principle of mathematical induction. Start with your base case, when $L = 0$ (i.e., there are no nodes so $N = 0$). Then
$$2^{0 + 1} - 1 = 2^1 - 1 = 1 \quad \text{and } 0 = ... |
Or take Russel's paradox. Either the barber does or doesn't shave himself -- _that's all there is._ How you describe it is an artificial construct.
Godel's theorem is like dividing by zero and declaring arithmetic incomplete.
It seems to me that all it means is, humans can construct artificial incomplete formal ... |
Why is incompleteness important? |
|recursion|number-theory| |
Russell's paradox and incompleteness are two different things. I begin with your question regarding Russell's paradox.
Russell's paradox showed that a proposed set theory, proposed for the foundation of mathematics itself, contained a contradiction:
> Let $R = \{x \mid x \notin x \}$, then $R \in R$ if and only ... |
null |
Anyone please answer the question:
Prove that in a complete binary tree with $L$ levels, the total number of nodes $N \leq 2^{(L+1)} - 1$. |
Prove that in a complete binary tree with $L$ levels, the total number of nodes $N \leq 2^{(L+1)} - 1$ |
|proof-techniques|binary-trees| |
null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.