set - Qlikview: Restrict dynamic dimension via variables

I want to create a table which shows all person with a revenue in a specifc range. Persons that are not in the range need to be hidden/filtered.The range is specified by two variables: vNettoAb and vNettoBis.My idea is it to create a dynamic dimension with the following code: person_dbid=if(((sum(invoice.value) <= vNettoBis) AND sum(invoice.nettosumme_value) >= (vNettoAb)), %person_dbid)My formula show an unspecific error, I can't figure out why. Is there a way to filter the persons with Set Analysis (e.g. with e({....}) or do you have an...Read more

Mandelbrot Set implementation in Common Lisp

I've been working on an implementation of the Mandelbrot Set in several different languages. I have a working implementation in C++, C#, Java, and Python, but the Common Lisp implementation has some bugs that I just can't figure out. It generates the set but somewhere in the pipeline the set gets distorted. I've tested and know with near certainty that the file I/O CLO isn't the problem - it's unlikely but possible, I've tested it pretty thoroughly.Note that the intent of these implementations is to benchmark them against one another - so I'...Read more

set - total method and the sigil of a Bag variable in Perl 6

We can use the total method to know the sum of all the weights in a Bag.> my $b = (1,2,1).BagBag(1(2), 2)> $b.total3But if we use the % sigil instead of $ for our Bag, we get an error message.> my %b = (1,2,1).Bag{1 => 2, 2 => 1}> %b.totalNo such method 'total' for invocant of type 'Hash'. Did you mean 'cotan'? in block <unit> at <unknown file> line 1If %b is explicitly converted to Bag before total, it works:> %b.Bag.total3The question: I used to think that with Set, Bag, SetHash etc., using the % sigil is pre...Read more

set - Monogame Extended Tiled

I'm making an isometric city builder using Monogame Extended and Tiled. I've got everything set-up and now i need to somehow access the specific tiles so i can change them at runtime as the user clicks on a tile to build an object. The problem is, i can't seem to find a "map.GetLayer("Layername").GetTile(x,y) or .SetTile(x,y) function or something similar.Now what i can do is edit the xml(.tmx) file which has a matrix in it that represents the map and it's drawn tiles. The problem with this is that i need to build the map in the content pipelin...Read more

set - Challenge on Alphabet and Formal Grammar and Language

We know set A is countable if A is finite or in a one-to-one mapping to natural numbers.Suppose ALPH be an arbitrary finite alphabet.I summarize my inference:a) Each arbitrary Language on ALPH is Countable. (I think this is True)b) the set of all language from ALPH is Countable.(I think this is False)c) for Each arbitrary Language on ALPH we have a generative formal grammar. (I think this is False)d) Each arbitrary Language on ALPH that can be generated by formal grammar, is recursive. (I think this is True)anyone could help me, and maybe...Read more

Fuzzy logic - Computing membership function given term set

I am a student studying for a Fuzzy Logic exam, and I have been working my way through the questions about fuzzy sets. However I have just came across an exam question that I do not understand how to do from the lecturer's notes, and was wondering if someone could help me get started:This is the part of the question I am stuck on:Subjects of both sexes whose ages ranged from 6 to 72 were asked to class the height of both men and women using the term set of heights: "very very short, very short, short, tall, very tall, very very tall" | ...Read more

Composed relation of 2 relations on the set A

I'm struck with this problem, and i'm wondering if I'm wrong or the answer sheet I have is wrong. I've included the problem description and answer below:The problem is with 2 and 3. First I construct the matrix for R and S:Then I can compute the 5th row of the R ◦ S using this equation:When i try with (5, 4) as shown in the solution i get 0, how ever if i try with 3 i get 1.Same happens in the 3rd problem where I get the result 4, but I should get 3. Have I swapped something along the way since my to answers are just the opposite answer?...Read more

discrete mathematics - How to determine which set of integers is "lower"

I'm doing a coding challenge, and part of the problem requires me to determine which set of integers has the lowest numbers."If there are multiple sets of the same size, return the set of with the lowest IDs (as indexes) in sorted order."The problem I seem to be facing is how to decide which set has the lowest numbers. For instance, if I have {1, 4} and {2, 3}, which one would I return?I've tried basic things like returning the one with the lowest minimum or lowest maximum, returning the one with the lowest sum, product, average, etc. I've eve...Read more

tuples - R o R (Discrete Mathematics - Relations on Sets)

The following is givenLet A = {1, 2, 3, 4}Let R = the relation on the set A, or: R = {(1,1), (1,2), (1,3), (2,1), (3,2), (3,3), (4,4)}Find R o R as a set of tuples.I am not certain how to approach this problem.My best guess isR o R = {((1,1),(1,1)), ((1,1),(1,2), ..., ((4,4),(4,4))}but that does not seem right to me. I'm looking for how to solve this type of problem, not just a solution to this problem.Any help would be appreciated!...Read more

Discrete math: sets and subsets?

I am trying to clear something up with subsets.Say I have this setup:A={x,y} B={a,b,c,{x,y}}I understand that: x is not a member of B. A is a member of BBut now I am wondering: Is A a proper subset of B?If it's not, is it because A is considered an element in B and not a set? Would it only be a subset of B if B={a,b, c, {{x,y}}} (and in this case, would {x,y} not be a member of B)?If it is a proper subset of B, then why?Thank you!...Read more

set - How to count all distinguishable subsets with repeated elements?

Say you have a list of elements, with some repeats: [1,2,2,3,3,3,4] and you want to count all distinguishable sets of at most the set's length. E.g. {1,2,2,3,3,4} and {1,2,3,4} are counted but we don't want to multi-count {1,2,3,4}. How would you do this?My thinking was you'd have 2^7 non-unique sets and you could subtract or divide to find uniques. But I couldn't think of the right approach.Or maybe you could treat the problem as putting the elements in 2 different bags and use the multinomial theorem but I'm not sure how to set that up eit...Read more

set - What does := mean when used in pseudocode?

When looking at pseudocode (actually, on the Wikipedia article on A*), i came across the use of := to assign or initialize a variable. What does this mean? Is part of some kind of set notation? If it's something complicated, how would one go about implementing this in C++ or Java? Thanks....Read more