set-theory Questions
3
Solved
This is a construct I come across quite a lot. Is there a nice way to one-line it in Swift?
I could just write an extension on Sequence for it, but I feel like there's a "obvious" higher-order-fun...
Glochidiate asked 10/9, 2019 at 11:19
1
Solved
I am a bit confused about the name Intersection Types in Typescript.
In set theory, intersection would imply that only properties that are common to both types would be available in the intersectio...
Isopod asked 23/1, 2022 at 5:48
2
Solved
The above shaded area, according to Wolfram is supposed to represent:
A XOR B XOR C XOR (A AND B AND C)
How to translate this into python code? The code must closely correlate to the set ope...
Reinert asked 5/3, 2018 at 20:8
3
Solved
I have two collections a and b. I would like to compute the set of items in either a or b, but not in both (a logical exclusive or). With LINQ, I can come up with this:
IEnumerable<T> Delta&...
Abnormity asked 26/5, 2010 at 5:31
10
I'm trying to determine how many different ways I can remove a group of values from a sequence, leaving the original sequence in order (stable), and making sure to remove only 1 instance value each...
Leapfrog asked 12/8, 2016 at 16:58
1
Solved
How can I describe in Coq that one set Y is a subset of another set X?
I tested the following:
Definition subset (Y X:Set) : Prop :=
forall y:Y, y:X.
, trying to express that if an element y i...
Lunch asked 24/7, 2016 at 9:50
5
I have two NSArrays A and B that share some common elements, e.g.
A: 1,2,3,4,5
B: 4,5,6,7
I would like to create a new NSArray consisting of the contents common between the two NSArrays joined ...
Barn asked 30/9, 2011 at 21:53
5
Solved
Given the input array
[a,b,c,d,e]
and a 'join' function (a,b) => (a+b)
my code returns the following array of arrays, containing each possible variation obtained by applying the join functio...
Ackler asked 16/4, 2013 at 11:28
5
Solved
I've had trouble understanding joins in sql and came upon this image which I think might help me. The problem is that I don't fully understand it. For example, the join in the top right corner of t...
Divine asked 21/12, 2012 at 21:22
4
Solved
I am trying to implement a list difference routine in prolog.
For some reason the following fails:
difference(Xs,Ys,D) :- difference(Xs,Ys,[],D).
difference([],_,A,D) :- D is A, !.
difference([X|X...
Valma asked 6/10, 2009 at 1:16
5
Solved
I'm designing a class library for discrete mathematics, and I can't think of a way to implement an infinite set.
What I have so far is: I have an abstract base class, Set, which implements the int...
Christianly asked 25/7, 2012 at 22:33
2
Assuming that you want to implement set theory concepts such as element, set, collection and relation in Java: How would you represent the empty set ∅?
Do I mislead myself, if I think of the...
Gnaw asked 10/7, 2012 at 13:34
6
Assume we have trillions of sets stored somewhere. The domain for each of these sets is the same. It is also finite and discrete. So each set may be stored as a bit field (eg: 0000100111...) of a r...
Newspaper asked 28/12, 2010 at 0:44
2
Solved
How to implement set theory operations in pure php?
Demimonde asked 17/8, 2010 at 2:3
2
Solved
Recently I came across a situation where set theory and set math fit what I was doing to the letter (granted there was an easier way to accomplish what I needed - i.e. LINQ - but I didn't think of ...
Uraninite asked 24/5, 2010 at 11:20
5
I'm drawing a blank, or as some would say, having a senior moment. I know there’s a formal definition and a name for the concept where a db operation (stored procedure) that runs in a database will...
Resistant asked 23/12, 2008 at 2:24
1
© 2022 - 2024 — McMap. All rights reserved.