How to check if a vector is in a subspace of another vector
Lets say we have to vectors u := Vector(3,[0,a_2,a_3]) and v :=Vector(3,[a_1,a_2,a_3]), in which a_1, a_2 and a_3 are arbitrary constants. It is clear that if we set a_1=0 we could see that u is...
View ArticleNeed help in optimizing code
Hello everybody,I need help to increase the speed of two procedures.My first (recursive) procedure returns a list of all k - element subsets of a given set {1, ... , n}:nkSubSetList := proc(n ::...
View Articlecombinat:-subset with a chosen number of elements? An alternative?
HelloI need to test a huge amount of subsets and for doing that I was thinking of using combinat:-subset, since it avoids allocating memory for all subsets. The problem with subset for my specific...
View ArticleHow to search if sets in a list are subsets of another list of sets?
Hello I need a procedure P that given two lists of sets A and B returns a list of lists L such that L[i] is the list of j such that A[i] subset B[j]. Here is an example: ans6 := [{alpha[1, 8], alpha[2,...
View ArticleHow do I get an iterator for generating k-subsets
 The function subsets is an iterator for generating the power set of a set one set at a time.  I wanted to get iterators for all k -subsets , so I modified the codes for getitng iterators for the...
View ArticleHow to Check if one Interval is a Subset of Another
Hi,I am trying to write a procedure that takes two intervals of real numbers (in interval notation) and checks if one is a subset of the other. For example, isSubset([-5,2],[-10,infinity)) would return...
View Article