Editing
Set Theory
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== <span style="color: #FFFFFF;">Applying</span> == '''Modeling 'Set Operations' (Data Filtering):''' <syntaxhighlight lang="python"> def compare_customer_lists(list_a, list_b): """ Shows the power of Union and Intersection. """ set_a = set(list_a) set_b = set(list_b) return { "Exclusive to A": set_a - set_b, "Common Customers": set_a & set_b, # Intersection "Total Unique Customers": set_a | set_b # Union } # Data from two stores store_1 = ["Alice", "Bob", "Charlie"] store_2 = ["Bob", "David", "Edward"] print(compare_customer_lists(store_1, store_2)) # Every modern database uses Set Theory to find # the 'Overlap' between different tables. </syntaxhighlight> ; Set Theory Concepts : '''The Power Set Rule''' β A set with $n$ elements has $2^n$ subsets. (e.g., A set of 3 items has 8 possible combinations). : '''Cantor's Theorem''' β The power set of any set always has a strictly larger cardinality than the set itself (even for infinite sets!). : '''Ordinal Numbers''' β Numbers that describe "Position" in a sequence (1st, 2nd, 3rd...), extending into the infinite. : '''Fuzzy Sets''' β Sets where membership is not "Yes/No" but a "Degree" (e.g., the set of "Tall People"). </div> <div style="background-color: #8B4500; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;">
Summary:
Please note that all contributions to BloomWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BloomWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information