Last active
February 10, 2018 12:24
-
-
Save kenwebb/edf2675c25df3553cffc478ff7035bfa to your computer and use it in GitHub Desktop.
Exercises with Sets 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!--Xholon Workbook http://www.primordion.com/Xholon/gwt/ MIT License, Copyright (C) Ken Webb, Sat Feb 10 2018 07:23:45 GMT-0500 (EST)--> | |
<XholonWorkbook> | |
<Notes><![CDATA[ | |
Xholon | |
------ | |
Title: Exercises with Sets 1 | |
Description: | |
Url: http://www.primordion.com/Xholon/gwt/ | |
InternalName: edf2675c25df3553cffc478ff7035bfa | |
Keywords: | |
My Notes | |
-------- | |
February 9, 2018 | |
see my paper notebook for Feb 9 | |
Venn Diagrams | |
------------- | |
With this workbook, I'm implementing Venn-like diagrams. | |
Using the d3cp graphical representation, when the cursor hovers above A, B, or C, the corresponding elements in U are highlighted. | |
I don't draw paths around the element subsets, I don't show intersections and unions, but I could do these things. | |
symbols | |
∈ ⊆ ⊂ ⊇ ⊃ ∩ ∪ ∅ ℕ ℤ ℚ ℝ ℂ | |
TABLE 1 - Set Identities [1 p.49] | |
------------------------ | |
Identity laws | |
A ∪ ∅ = A | |
A ∩ U = A | |
Domination laws | |
A ∪ U = U | |
A ∩ ∅ = ∅ | |
Idempotent laws | |
A ∪ A = A | |
A ∩ A = A | |
Complementation law ? | |
TODO | |
Commutative laws | |
A ∪ B = B ∪ A | |
A ∩ B = B ∩ A | |
Associative laws | |
A ∪ (B ∪ C) = (A ∪ B) ∪ C | |
A ∩ (B ∩ C) = (A ∩ B) ∩ C | |
Distributive laws | |
A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) | |
A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) | |
De Morgan's laws | |
TODO | |
Bug | |
--- | |
- in Composite Structure Hierarchy, I can only have one <port name="port" /> | |
- if there are more than one, only the last one is available at step 0 | |
- ex: index="0" and the ondex="1", only "1" would be available | |
- for now I am changing the name of "port" to "element" | |
References | |
---------- | |
(1) Kenneth H. Rosen, Discrete Mathematics and its Applications 4th ed., 1999 | |
p. 49, 17, 597, 599 | |
(2) L. C. Pascoe, New Mathematics, 1971 | |
p. 115, 126, 139, 144 | |
(3) Ian Stewart, Concepts of Modern Mathematics, 1975 | |
Group Theory | |
(4) http://www.benfrederickson.com/venn-diagrams-with-d3.js/ | |
) https://github.com/benfred/venn.js/ | |
Area proportional Venn and Euler diagrams in JavaScript | |
uses d3 | |
]]></Notes> | |
<!--<params> | |
<param name="MaxPorts" value="10"/> | |
</params>--> | |
<_-.XholonClass> | |
<PhysicalSystem/> | |
<!-- a universal set, such as all integers, or more practically some small sequence or collection of integers --> | |
<UniversalSet/> | |
<!-- a set consisting of just one PSet object with zero or more ports to items in a UniversalSet --> | |
<PSet/> | |
</_-.XholonClass> | |
<xholonClassDetails> | |
<PSet xhType="XhtypePureActiveObject"/> | |
<Avatar><Color>red</Color></Avatar> | |
</xholonClassDetails> | |
<PhysicalSystem> | |
<!-- the empty set --> | |
<PSet roleName="∅"/> | |
<!-- a small universal set --> | |
<UniversalSet roleName="U"> | |
<!-- integers from 1 to 20 --> | |
<Attribute_int>1</Attribute_int> | |
<Attribute_int>2</Attribute_int> | |
<Attribute_int>3</Attribute_int> | |
<Attribute_int>4</Attribute_int> | |
<Attribute_int>5</Attribute_int> | |
<Attribute_int>6</Attribute_int> | |
<Attribute_int>7</Attribute_int> | |
<Attribute_int>8</Attribute_int> | |
<Attribute_int>9</Attribute_int> | |
<Attribute_int>10</Attribute_int> | |
<Attribute_int>11</Attribute_int> | |
<Attribute_int>12</Attribute_int> | |
<Attribute_int>13</Attribute_int> | |
<Attribute_int>14</Attribute_int> | |
<Attribute_int>15</Attribute_int> | |
<Attribute_int>16</Attribute_int> | |
<Attribute_int>17</Attribute_int> | |
<Attribute_int>18</Attribute_int> | |
<Attribute_int>19</Attribute_int> | |
<Attribute_int>20</Attribute_int> | |
</UniversalSet> | |
<!-- a subset of the universal set --> | |
<PSet roleName="A"> | |
<!-- note that name is "element" rather than "port" --> | |
<port name="element" index="0" connector="../UniversalSet/Attribute_int[1]"/> | |
<port name="element" index="1" connector="../UniversalSet/Attribute_int[2]"/> | |
<port name="element" index="2" connector="../UniversalSet/Attribute_int[3]"/> | |
<port name="element" index="3" connector="../UniversalSet/Attribute_int[4]"/> | |
<port name="element" index="4" connector="../UniversalSet/Attribute_int[5]"/> | |
<port name="element" index="5" connector="../UniversalSet/Attribute_int[6]"/> | |
<port name="element" index="6" connector="../UniversalSet/Attribute_int[7]"/> | |
</PSet> | |
<!-- a subset of the universal set --> | |
<PSet roleName="B"> | |
<port name="element" index="0" connector="../UniversalSet/Attribute_int[11]"/> | |
<port name="element" index="1" connector="../UniversalSet/Attribute_int[12]"/> | |
<port name="element" index="2" connector="../UniversalSet/Attribute_int[13]"/> | |
<port name="element" index="3" connector="../UniversalSet/Attribute_int[14]"/> | |
<port name="element" index="4" connector="../UniversalSet/Attribute_int[15]"/> | |
<port name="element" index="5" connector="../UniversalSet/Attribute_int[16]"/> | |
<port name="element" index="6" connector="../UniversalSet/Attribute_int[17]"/> | |
</PSet> | |
<!-- a subset of the universal set --> | |
<PSet roleName="C"> | |
<port name="element" index="0" connector="../UniversalSet/Attribute_int[9]"/> | |
</PSet> | |
<!-- a subset of the universal set; partly overlaps other sets --> | |
<PSet roleName="D"> | |
<port name="element" index="0" connector="../UniversalSet/Attribute_int[1]"/> | |
<port name="element" index="1" connector="../UniversalSet/Attribute_int[12]"/> | |
<port name="element" index="2" connector="../UniversalSet/Attribute_int[3]"/> | |
<port name="element" index="3" connector="../UniversalSet/Attribute_int[14]"/> | |
<port name="element" index="4" connector="../UniversalSet/Attribute_int[5]"/> | |
<port name="element" index="5" connector="../UniversalSet/Attribute_int[16]"/> | |
<port name="element" index="6" connector="../UniversalSet/Attribute_int[7]"/> | |
</PSet> | |
</PhysicalSystem> | |
<UniversalSetbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[ | |
var me, beh = { | |
postConfigure: function() { | |
me = this.cnode.parent(); | |
}, | |
act: function() { | |
//me.println(me.name()); | |
} | |
} | |
]]></UniversalSetbehavior> | |
<SvgClient><Attribute_String roleName="svgUri"><![CDATA[data:image/svg+xml, | |
<svg width="100" height="50" xmlns="http://www.w3.org/2000/svg"> | |
<g> | |
<title>UniversalSet</title> | |
<rect id="PhysicalSystem/UniversalSet" fill="#98FB98" height="50" width="50" x="25" y="0"/> | |
<g> | |
<title>Attribute_int</title> | |
<rect id="PhysicalSystem/UniversalSet/Attribute_int" fill="#6AB06A" height="50" width="10" x="80" y="0"/> | |
</g> | |
</g> | |
</svg> | |
]]></Attribute_String><Attribute_String roleName="setup">${MODELNAME_DEFAULT},${SVGURI_DEFAULT}</Attribute_String></SvgClient> | |
</XholonWorkbook> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment