Talk:Symmetric difference: Difference between revisions

No edit summary
Line 90:
:: The REXX version 2 ''does'' use a list of items (two lists, in fact). Any item is allowed to have blanks, the fact that none of the lists have names with special characters doesn't mean they aren't allowed. The REXX version 2 doesn't have blanks in the items, the blanks are separating the items (as delimiters). The REXX version 2 has words that are delimited by blanks instead of values within quotes, separated by commas. Because of the items are in a list, it should be able to handle duplicates (items) correctly. It doesn't. Try and add a duplicate item to both of the lists and observe the output. The list that version 2 uses is a list of words within a variable. That's a list. If they were a true set, then duplicates won't be a problem. So, again referring to note 1 (in the task requirements), introduce a duplicate (to each list), and observe if the duplicates are handled correctly. I agree with you there is no requirement to show the UNION of the sets. Perhaps you are referring to the optional part of the requirement: give the individual differences (symmetric difference of sets A and B). You may also want to peruse the GAP, Pike, and Prolog examples (among others), although all of those appear to use true SETs. The PL/I example also suffers from the same problem as the Rexx version 2, although the list is stored in a fixed array (which seems problematic that the array size is hard-coded), and each value has a varying length; it also can't handle duplicates in the lists. If a language can use a true SET(s), it automatically handles duplicates (essentially by ignoring the duplicates). -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 07:34, 16 December 2013 (UTC)
:: to me 'a b c' is a representation of a set (a, b, and c) and duplicate elements aren't a problem in this particular case/algorithm. --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 07:47, 16 December 2013 (UTC)
::: oops, I see that there IS a problem if invalid sets (with duplicate elements) are specified. Some other points are moot, however, --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 07:59, 16 December 2013 (UTC)
2,295

edits